Skip to content

Commit

Permalink
TEMP: Debug test failure on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Feb 17, 2022
1 parent 2e197fd commit 66217d4
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions src/test/shell/bazel/bazel_rules_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -607,19 +607,12 @@ EOF
if "$is_windows"; then
cat >pkg/rules.bzl <<'EOF'
_SCRIPT_EXT = ".bat"
_SCRIPT_CONTENT = """@ECHO OFF
if NOT "%FIXED_ONLY%" == "fixed" {
exit /B 1
}
if NOT "%FIXED_AND_INHERITED%" == "inherited" {
exit /B 1
}
if NOT "%FIXED_AND_INHERITED_BUT_NOT_SET%" == "fixed" {
exit /B 1
}
if NOT "%INHERITED_ONLY%" == "inherited" {
exit /B 1
}
_SCRIPT_CONTENT = """
set
if not "%FIXED_ONLY%" == "fixed" exit /B 1
if not "%FIXED_AND_INHERITED%" == "inherited" exit /B 1
if not "%FIXED_AND_INHERITED_BUT_NOT_SET%" == "fixed" exit /B 1
if not "%INHERITED_ONLY%" == "inherited" exit /B 1
"""
EOF
else
Expand Down Expand Up @@ -669,7 +662,7 @@ my_test = rule(
EOF

FIXED_AND_INHERITED=inherited INHERITED_ONLY=inherited \
bazel test //pkg:my_test &> /dev/null || fail "Test should pass"
bazel test //pkg:my_test --test_output=errors || fail "Test should pass"
}

run_suite "rules test"

0 comments on commit 66217d4

Please sign in to comment.