kokoro: run tests with a default docker container runtime

We want to know that our environment set up properly
and docker tests pass with a native runtime.

PiperOrigin-RevId: 248229294
Change-Id: I06c221e5eeed6e01bdd1aa935333c57e8eadc498
This commit is contained in:
Andrei Vagin 2019-05-14 16:00:53 -07:00 committed by Shentubot
parent ec248daf29
commit fff21b99e4
2 changed files with 13 additions and 2 deletions

View File

@ -142,10 +142,21 @@ EOF
run_docker_tests() {
cd ${WORKSPACE_DIR}
# Run tests with a default runtime (runc).
bazel test \
"${BAZEL_BUILD_FLAGS[@]}" \
--test_env=RUNSC_RUNTIME="" \
--test_output=all \
//runsc/test/image:image_test
# These names are used to exclude tests not supported in certain
# configuration, e.g. save/restore not supported with hostnet.
declare -a variations=("" "-kvm" "-hostnet" "-overlay")
for v in "${variations[@]}"; do
# FIXME(b/132073574): we need to flush arp tables, otherwise tests fail with
# timeout.
sudo ip neigh show
sudo ip neigh flush dev docker0
# Run runsc tests with docker that are tagged manual.
bazel test \
"${BAZEL_BUILD_FLAGS[@]}" \

View File

@ -31,8 +31,8 @@ import (
)
func getRuntime() string {
r := os.Getenv("RUNSC_RUNTIME")
if r == "" {
r, ok := os.LookupEnv("RUNSC_RUNTIME")
if !ok {
return "runsc-test"
}
return r