From d73a74fe47ce61d63197f9dae794272ac01a4135 Mon Sep 17 00:00:00 2001 From: Ivo List Date: Thu, 21 Nov 2024 20:27:53 +0100 Subject: [PATCH] tests: make workspace CI jobs enable workspace mode (#2435) The CI setups claiming to run in WORKSPACE mode were wrong. This fixes it. Disable integration tests on Windows WORKSPACE mode. They are failing: https://buildkite.com/bazel/rules-python-python/builds/9791#01934eac-3a03-445d-ad53-6683371ca289 Example failure: `java.lang.UnsatisfiedLinkError: 'int com.google.devtools.build.lib.windows.WindowsFileOperations.nativeIsSymlinkOrJunction(java.lang.String, boolean[], java.lang.String[])'` --------- Co-authored-by: Richard Levasseur --- .bazelci/presubmit.yml | 23 ++++++++++++++++++++++ tests/integration/local_toolchains/test.py | 5 +++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 1808824109..3d992ea477 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -132,6 +132,7 @@ tasks: bazel: last_rc ubuntu_workspace: <<: *reusable_config + <<: *common_workspace_flags name: "Default: Ubuntu, workspace" platform: ubuntu2004 mac_workspace: @@ -141,8 +142,30 @@ tasks: platform: macos windows_workspace: <<: *reusable_config + <<: *common_workspace_flags name: "Default: Windows, workspace" platform: windows + # Most of tests/integration are failing on Windows w/workspace. Skip them + # for now until we can look into it. + build_targets: + - "--" + - "..." + # As a regression test for #225, check that wheel targets still build when + # their package path is qualified with the repo name. + - "@rules_python//examples/wheel/..." + build_flags: + - "--noenable_bzlmod" + - "--enable_workspace" + - "--keep_going" + - "--build_tag_filters=-integration-test" + - "--config=bazel7.x" + test_targets: + - "--" + - "..." + test_flags: + - "--noenable_bzlmod" + - "--enable_workspace" + - "--test_tag_filters=-integration-test" debian: <<: *reusable_config diff --git a/tests/integration/local_toolchains/test.py b/tests/integration/local_toolchains/test.py index 63771cf78d..d85a4c386b 100644 --- a/tests/integration/local_toolchains/test.py +++ b/tests/integration/local_toolchains/test.py @@ -18,8 +18,9 @@ def test_python_from_path_used(self): [shell_path, "-c", "import sys; print(sys.executable)"], text=True, ) - expected = expected.strip() - self.assertEqual(expected, sys.executable) + expected = expected.strip().lower() + # Normalize case: Windows may have case differences + self.assertEqual(expected.lower(), sys.executable.lower()) if __name__ == "__main__":