Skip to content

Commit d80a9aa

Browse files
authored
Fixed integration test runner (#598)
1 parent 6388c8a commit d80a9aa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/bazel_integration_test/test_runner.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,20 @@ def main(conf_file):
6060
bazel_args.insert(0, bazelBinary)
6161
bazel_process = Popen(bazel_args, cwd=workdir)
6262
bazel_process.wait()
63+
error = bazel_process.returncode != 0
6364

6465
if platform.system() == "Windows":
6566
# Cleanup any bazel files
6667
bazel_process = Popen([bazelBinary, "clean"], cwd=workdir)
6768
bazel_process.wait()
69+
error |= bazel_process.returncode != 0
6870

6971
# Shutdown the bazel instance to avoid issues cleaning up the workspace
7072
bazel_process = Popen([bazelBinary, "shutdown"], cwd=workdir)
7173
bazel_process.wait()
74+
error |= bazel_process.returncode != 0
7275

73-
if bazel_process.returncode != 0:
76+
if error != 0:
7477
# Test failure in Bazel is exit 3
7578
# https://github.com/bazelbuild/bazel/blob/486206012a664ecb20bdb196a681efc9a9825049/src/main/java/com/google/devtools/build/lib/util/ExitCode.java#L44
7679
sys.exit(3)

0 commit comments

Comments
 (0)