Skip to content

Commit e49994c

Browse files
committed
skip test on windows
1 parent dc731ad commit e49994c

File tree

4 files changed

+14
-29
lines changed

4 files changed

+14
-29
lines changed

tests/bootstrap_impls/bin_calls_bin/BUILD.bazel

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
load("@rules_shell//shell:sh_test.bzl", "sh_test")
22
load("//tests/support:py_reconfig.bzl", "py_reconfig_binary")
3-
load("//tests/support:support.bzl", "SUPPORTS_BOOTSTRAP_SCRIPT")
3+
load("//tests/support:support.bzl", "NOT_WINDOWS", "SUPPORTS_BOOTSTRAP_SCRIPT")
44

55
# =====
66
# bootstrap_impl=system_python testing
@@ -39,6 +39,10 @@ sh_test(
3939
"verify.sh",
4040
":outer_calls_inner_system_python",
4141
],
42+
# The way verify_system_python.sh loads verify.sh doesn't work
43+
# with Windows for some annoying reason. Just skip windows for now;
44+
# the logic being test isn't OS-specific, so this should be fine.
45+
target_compatible_with = NOT_WINDOWS,
4246
)
4347

4448
# =====
Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
#!/bin/bash
22
set -euo pipefail
33

4-
# rules_python_get_runfiles_path is a helper to correctly look up runfiles.
5-
# It is needed because on Windows, the path to a runfile can be absolute,
6-
# which is not something that bash can handle. So we use cygpath to fix it up.
7-
rules_python_get_runfiles_path() {
8-
local path="$1"
9-
if [[ -f /bin/cygpath ]]; then
10-
cygpath -u "${path}"
11-
else
12-
echo "${path}"
13-
fi
14-
}
15-
16-
source "$(rules_python_get_runfiles_path "$(dirname "$0")/verify.sh")"
17-
verify_output "$(rules_python_get_runfiles_path "$(dirname "$0")/outer_calls_inner_script_python.out")"
4+
source "$(dirname "$0")/verify.sh"
5+
verify_output "$(dirname "$0")/outer_calls_inner_script_python.out"
Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
#!/bin/bash
22
set -euo pipefail
33

4-
# rules_python_get_runfiles_path is a helper to correctly look up runfiles.
5-
# It is needed because on Windows, the path to a runfile can be absolute,
6-
# which is not something that bash can handle. So we use cygpath to fix it up.
7-
rules_python_get_runfiles_path() {
8-
local path="$1"
9-
if [[ -f /bin/cygpath ]]; then
10-
cygpath -u "${path}"
11-
else
12-
echo "${path}"
13-
fi
14-
}
15-
16-
source "$(rules_python_get_runfiles_path "$(dirname "$0")/verify.sh")"
17-
verify_output "$(rules_python_get_runfiles_path "$(dirname "$0")/outer_calls_inner_system_python.out")"
4+
source "$(dirname "$0")/verify.sh"
5+
verify_output "$(dirname "$0")/outer_calls_inner_system_python.out"

tests/support/support.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,8 @@ SUPPORTS_BZLMOD_UNIXY = select({
5454
"@platforms//os:windows": ["@platforms//:incompatible"],
5555
"//conditions:default": [],
5656
}) if BZLMOD_ENABLED else ["@platforms//:incompatible"]
57+
58+
NOT_WINDOWS = select({
59+
"@platforms//os:windows": ["@platforms//:incompatible"],
60+
"//conditions:default": [],
61+
})

0 commit comments

Comments
 (0)