Skip to content

Commit 7d114a2

Browse files
committed
[lit] Fix 7dbad26's remaining test fails under windows
For `llvm/utils/lit/tests/shtest-output-printing.py`, the executable in `%{python}` wasn't properly shell-quoted for windows. This caused the 127 exit code mentioned in 0fed321. Fix quoting and expect exit code 1 again. Fix shell-quoting issue in a few more file names in `llvm/utils/lit/tests/shtest-shell.py`, missed in 0fed321. Test failures seen in <https://lab.llvm.org/buildbot/#/builders/216/builds/26436>.
1 parent c62e097 commit 7d114a2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/Inputs/shtest-output-printing/lit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import lit.formats
22

33
config.name = "shtest-output-printing"
44
config.suffixes = [".txt"]
5-
config.substitutions.append(("%{python}", sys.executable))
5+
config.substitutions.append(("%{python}", f'"{sys.executable}"'))
66
config.test_format = lit.formats.ShTest(execute_external=False)

tests/shtest-output-printing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# CHECK: -- Testing: {{.*}}
99
# CHECK: FAIL: shtest-output-printing :: basic.txt {{.*}}
1010
# CHECK-NEXT: ***{{\**}} TEST 'shtest-output-printing :: basic.txt' FAILED ***{{\**}}
11-
# CHECK-NEXT: Exit Code: {{[1-9][0-9]*}}
11+
# CHECK-NEXT: Exit Code: 1
1212
# CHECK-EMPTY:
1313
# CHECK-NEXT: Command Output (stdout):
1414
# CHECK-NEXT: --

tests/shtest-shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@
475475
# CHECK-NEXT: # executed command: true
476476

477477
# CHECK: diff -U0 {{.*}}.foo {{.*}}.bar && false || true
478-
# CHECK-NEXT: diff -U0 {{.*}}.foo {{.*}}.bar
478+
# CHECK-NEXT: # executed command: diff -U0 {{.+}}.foo{{.*}} {{.+}}.bar{{.*}}
479479
# CHECK-NEXT: # .---command stdout{{-*}}
480480
# CHECK: # | @@ {{.*}} @@
481481
# CHECK-NEXT: # | -6 foo

0 commit comments

Comments
 (0)