Skip to content

Commit 6e904e8

Browse files
authored
[lit] [test] Fix the shtest-readfile test on Python 3.13 on Windows (#160503)
Python 3.13 considers "/file/does/not/exist" to not be an absolute path on Windows, so the test runner does os.path.join(cwd, filePath), which can end up with an output path such as "D:/file/does/not/exist". Accept a potential prefix before the missing path here. This fixes running the lit tests on Windows with Python 3.13.
1 parent 59b4074 commit 6e904e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/utils/lit/tests/shtest-readfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# CHECK-LABEL: FAIL: shtest-readfile :: file-does-not-exist.txt ({{[^)]*}})
1212
# CHECK: # executed command: @echo 'echo %{readfile:/file/does/not/exist}'
13-
# CHECK: # | File specified in readfile substitution does not exist: /file/does/not/exist
13+
# CHECK: # | File specified in readfile substitution does not exist: {{.*}}/file/does/not/exist
1414

1515
# CHECK-LABEL: FAIL: shtest-readfile :: relative-paths.txt ({{[^)]*}})
1616
# CHECK: echo hello

0 commit comments

Comments
 (0)