From 33e8209fc610380a1745816237ecf364dd913373 Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Thu, 6 Jan 2022 08:02:31 -0800 Subject: [PATCH] Fixed integration test runner --- tools/bazel_integration_test/test_runner.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/bazel_integration_test/test_runner.py b/tools/bazel_integration_test/test_runner.py index f10d86ac6a..ce81274d5e 100644 --- a/tools/bazel_integration_test/test_runner.py +++ b/tools/bazel_integration_test/test_runner.py @@ -60,17 +60,20 @@ def main(conf_file): bazel_args.insert(0, bazelBinary) bazel_process = Popen(bazel_args, cwd=workdir) bazel_process.wait() + error = bazel_process.returncode != 0 if platform.system() == "Windows": # Cleanup any bazel files bazel_process = Popen([bazelBinary, "clean"], cwd=workdir) bazel_process.wait() + error |= bazel_process.returncode != 0 # Shutdown the bazel instance to avoid issues cleaning up the workspace bazel_process = Popen([bazelBinary, "shutdown"], cwd=workdir) bazel_process.wait() + error |= bazel_process.returncode != 0 - if bazel_process.returncode != 0: + if error != 0: # Test failure in Bazel is exit 3 # https://github.com/bazelbuild/bazel/blob/486206012a664ecb20bdb196a681efc9a9825049/src/main/java/com/google/devtools/build/lib/util/ExitCode.java#L44 sys.exit(3)