Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix false positive tests in CI for Windows #598

Merged
merged 2 commits into from
Feb 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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