From 9e5a2958f3f54861300018205ab90c6f35d6d941 Mon Sep 17 00:00:00 2001 From: jheaff1 Date: Thu, 6 Jan 2022 13:32:46 +0000 Subject: [PATCH 1/2] Fix false positive tests in CI for Windows The error code of the invocation of "bazel shutdown" was queried to ascertain the result of "bazel test". Now, if the invocation of any bazel command fails, the test_runner.py script will return code 3. --- 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..527758ac71 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: # 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) From 5c73f7965defd634791946c10ebd216d03af4286 Mon Sep 17 00:00:00 2001 From: jheaff1 Date: Thu, 6 Jan 2022 13:44:06 +0000 Subject: [PATCH 2/2] update example requirements.txt files --- examples/pip_install/requirements.txt | 4 ++++ examples/pip_parse/requirements_lock.txt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/examples/pip_install/requirements.txt b/examples/pip_install/requirements.txt index 2fe2a78e62..d1786a6d80 100644 --- a/examples/pip_install/requirements.txt +++ b/examples/pip_install/requirements.txt @@ -30,6 +30,10 @@ charset-normalizer==2.0.7 \ --hash=sha256:e019de665e2bcf9c2b64e2e5aa025fa991da8720daa3c1138cadd2fd1856aed0 \ --hash=sha256:f7af805c321bfa1ce6714c51f254e0d5bb5e5834039bc17db7ebe3a4cec9492b # via requests +colorama==0.4.4 \ + --hash=sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b \ + --hash=sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2 + # via sphinx docutils==0.15.2 \ --hash=sha256:6c4f696463b79f1fb8ba0c594b63840ebd41f059e92b31957c46b74a4599b6d0 \ --hash=sha256:9e4d7ecfc600058e07ba661411a2b7de2fd0fafa17d1a7f7361cd47b1175c827 \ diff --git a/examples/pip_parse/requirements_lock.txt b/examples/pip_parse/requirements_lock.txt index 57a509925a..5aa7a9d21f 100644 --- a/examples/pip_parse/requirements_lock.txt +++ b/examples/pip_parse/requirements_lock.txt @@ -20,6 +20,10 @@ chardet==4.0.0 \ --hash=sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa \ --hash=sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5 # via requests +colorama==0.4.4 \ + --hash=sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b \ + --hash=sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2 + # via sphinx docutils==0.17.1 \ --hash=sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125 \ --hash=sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61