-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from sipsma/master
Forward agent containerd events to shim and monitor task exits via event subscriptions
- Loading branch information
Showing
13 changed files
with
740 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
DOCKER_RUN_ARGS="$1" | ||
DOCKER_IMAGE="$2" | ||
|
||
# test_names returns (via its stdout) a list of test names that match the provided regular expression | ||
test_names () { | ||
TEST_NAME_REGEX="$1" | ||
DOCKER_IMAGE="$2" | ||
|
||
docker run --rm \ | ||
--env FCCD_PACKAGE_DIR="${FCCD_PACKAGE_DIR}" \ | ||
"${DOCKER_IMAGE}" \ | ||
' | ||
cd /firecracker-containerd/${FCCD_PACKAGE_DIR} | ||
go test -list . | ||
' | sed '$d' | grep "${TEST_NAME_REGEX}" | ||
} | ||
|
||
# For each test case with a name matching the provided regex, run each one in its own isolated docker container | ||
for TESTNAME in $(test_names "${FCCD_TESTNAME_REGEX}" "${DOCKER_IMAGE}"); do | ||
docker run --rm \ | ||
--env TESTNAME="${TESTNAME}" \ | ||
--env FCCD_PACKAGE_DIR="${FCCD_PACKAGE_DIR}" \ | ||
${DOCKER_RUN_ARGS} \ | ||
"${DOCKER_IMAGE}" \ | ||
' | ||
echo "FCCD_PACKAGE_DIR = ${FCCD_PACKAGE_DIR}" | ||
echo "TESTNAME = ${TESTNAME}" | ||
cd /firecracker-containerd/${FCCD_PACKAGE_DIR} | ||
go test -v -count=1 -run "^${TESTNAME}$" . | ||
' | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You may | ||
# not use this file except in compliance with the License. A copy of the | ||
# License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "license" file accompanying this file. This file is distributed | ||
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
# express or implied. See the License for the specific language governing | ||
# permissions and limitations under the License. | ||
EXTRAGOARGS:= | ||
|
||
GOMOD := $(shell go env GOMOD) | ||
GOSUM := $(GOMOD:.mod=.sum) | ||
SOURCES:=$(shell find . -name '*.go') | ||
|
||
all: | ||
|
||
test: $(SOURCES) $(GOMOD) $(GOSUM) | ||
go test ./... $(EXTRAGOARGS) | ||
|
||
clean: | ||
|
||
install: | ||
|
||
.PHONY: clean all install test |
Oops, something went wrong.