diff options
author | Adin Scannell <ascannell@google.com> | 2019-08-26 21:35:10 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-08-26 21:36:34 -0700 |
commit | b4cdaef4a1d545867d8e34036c5ed3175e55079d (patch) | |
tree | 652db6163c51f1af2eed17cf26e140f225c5de60 | |
parent | 1fdefd41c5410291b50c3f28ca13f423031f1f12 (diff) |
Don't lose test output.
PiperOrigin-RevId: 265606322
-rwxr-xr-x | tools/run_tests.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/run_tests.sh b/tools/run_tests.sh index 3e7c4394d..6fe80a36b 100755 --- a/tools/run_tests.sh +++ b/tools/run_tests.sh @@ -176,7 +176,6 @@ run_docker_tests() { 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 @@ -188,9 +187,7 @@ run_docker_tests() { bazel test \ "${BAZEL_BUILD_FLAGS[@]}" \ --test_env=RUNSC_RUNTIME="${RUNTIME}" \ - --test_output=all \ --nocache_test_results \ - --test_output=streamed \ //runsc/test/integration:integration_test \ //runsc/test/integration:integration_test_hostnet \ //runsc/test/integration:integration_test_overlay \ @@ -248,8 +245,7 @@ upload_test_artifacts() { fi } -# Finish runs at exit, even in the event of an error, and uploads all test -# artifacts. +# Finish runs in the event of an error, uploading all artifacts. finish() { # Grab the last exit code, we will return it. local exit_code=${?} @@ -294,8 +290,14 @@ main() { # Build other flavors too. build_everything dbg + # We need to upload all the existing test logs and artifacts before shutting + # down and cleaning bazel, otherwise all test information is lost. After this + # point, we don't expect any logs or artifacts. + upload_test_artifacts + trap - EXIT + + # Run docker build tests. build_in_docker - # No need to call "finish" here, it will happen at exit. } # Kick it off. |