Skip to content

Commit

Permalink
Fixed integration test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre committed Feb 10, 2022
1 parent 46bab13 commit 33e8209
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/bazel_integration_test/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 33e8209

Please sign in to comment.