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:
parent
ec248daf29
commit
fff21b99e4
|
@ -142,10 +142,21 @@ EOF
|
||||||
run_docker_tests() {
|
run_docker_tests() {
|
||||||
cd ${WORKSPACE_DIR}
|
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
|
# These names are used to exclude tests not supported in certain
|
||||||
# configuration, e.g. save/restore not supported with hostnet.
|
# configuration, e.g. save/restore not supported with hostnet.
|
||||||
declare -a variations=("" "-kvm" "-hostnet" "-overlay")
|
declare -a variations=("" "-kvm" "-hostnet" "-overlay")
|
||||||
for v in "${variations[@]}"; do
|
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.
|
# Run runsc tests with docker that are tagged manual.
|
||||||
bazel test \
|
bazel test \
|
||||||
"${BAZEL_BUILD_FLAGS[@]}" \
|
"${BAZEL_BUILD_FLAGS[@]}" \
|
||||||
|
|
|
@ -31,8 +31,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func getRuntime() string {
|
func getRuntime() string {
|
||||||
r := os.Getenv("RUNSC_RUNTIME")
|
r, ok := os.LookupEnv("RUNSC_RUNTIME")
|
||||||
if r == "" {
|
if !ok {
|
||||||
return "runsc-test"
|
return "runsc-test"
|
||||||
}
|
}
|
||||||
return r
|
return r
|
||||||
|
|
Loading…
Reference in New Issue