Skip to content

Commit

Permalink
[lit] Fix c981c53's remaining test fails under windows
Browse files Browse the repository at this point in the history
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 f254bbf.  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 f254bbf.

Test failures seen in
<https://lab.llvm.org/buildbot/#/builders/216/builds/26436>.
  • Loading branch information
jdenny-ornl committed Aug 29, 2023
1 parent 6f30ef3 commit 012d844
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion llvm/utils/lit/tests/Inputs/shtest-output-printing/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import lit.formats

config.name = "shtest-output-printing"
config.suffixes = [".txt"]
config.substitutions.append(("%{python}", sys.executable))
config.substitutions.append(("%{python}", f'"{sys.executable}"'))
config.test_format = lit.formats.ShTest(execute_external=False)
2 changes: 1 addition & 1 deletion llvm/utils/lit/tests/shtest-output-printing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# CHECK: -- Testing: {{.*}}
# CHECK: FAIL: shtest-output-printing :: basic.txt {{.*}}
# CHECK-NEXT: ***{{\**}} TEST 'shtest-output-printing :: basic.txt' FAILED ***{{\**}}
# CHECK-NEXT: Exit Code: {{[1-9][0-9]*}}
# CHECK-NEXT: Exit Code: 1
# CHECK-EMPTY:
# CHECK-NEXT: Command Output (stdout):
# CHECK-NEXT: --
Expand Down
2 changes: 1 addition & 1 deletion llvm/utils/lit/tests/shtest-shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@
# CHECK-NEXT: # executed command: true

# CHECK: diff -U0 {{.*}}.foo {{.*}}.bar && false || true
# CHECK-NEXT: diff -U0 {{.*}}.foo {{.*}}.bar
# CHECK-NEXT: # executed command: diff -U0 {{.+}}.foo{{.*}} {{.+}}.bar{{.*}}
# CHECK-NEXT: # .---command stdout{{-*}}
# CHECK: # | @@ {{.*}} @@
# CHECK-NEXT: # | -6 foo
Expand Down

0 comments on commit 012d844

Please sign in to comment.