From 1a76bcab18b4adabdd1efc264aee81e03608ecb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 24 Sep 2025 13:29:20 +0300 Subject: [PATCH] [lit] [test] Fix the shtest-readfile test on Python 3.13 on Windows 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. --- llvm/utils/lit/tests/shtest-readfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/utils/lit/tests/shtest-readfile.py b/llvm/utils/lit/tests/shtest-readfile.py index a122dd7664272..f2e4fb0a9e169 100644 --- a/llvm/utils/lit/tests/shtest-readfile.py +++ b/llvm/utils/lit/tests/shtest-readfile.py @@ -10,7 +10,7 @@ # CHECK-LABEL: FAIL: shtest-readfile :: file-does-not-exist.txt ({{[^)]*}}) # CHECK: # executed command: @echo 'echo %{readfile:/file/does/not/exist}' -# CHECK: # | File specified in readfile substitution does not exist: /file/does/not/exist +# CHECK: # | File specified in readfile substitution does not exist: {{.*}}/file/does/not/exist # CHECK-LABEL: FAIL: shtest-readfile :: relative-paths.txt ({{[^)]*}}) # CHECK: echo hello