Skip to content

Commit c547d48

Browse files
fix Windows CI
Created using spr 1.3.6
1 parent 77fccd4 commit c547d48

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

llvm/utils/lit/lit/TestRunner.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,11 @@ def _replaceReadFile(match):
733733
with open(filePath) as fileHandle:
734734
return fileHandle.read()
735735
except FileNotFoundError:
736-
raise InternalShellError(cmd, "File does not exist: %s" % filePath)
736+
raise InternalShellError(
737+
cmd,
738+
"File specified in readfile substitution does not exist: %s"
739+
% filePath,
740+
)
737741

738742
arguments[i] = re.sub(r"%{readfile:([^}]*)}", _replaceReadFile, arg)
739743

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
## Tests the readfile substitution.
22

3-
# RUN: not %{lit} -a -v %{inputs}/shtest-readfile | FileCheck -match-full-lines -DTEMP_PATH=%S/Inputs/shtest-readfile/Output %s
3+
# RUN: not %{lit} -a -v %{inputs}/shtest-readfile | FileCheck -match-full-lines -DTEMP_PATH=%S%{fs-sep}Inputs%{fs-sep}shtest-readfile%{fs-sep}Output %s
44

55
# CHECK: -- Testing: 4 tests{{.*}}
66

77
# CHECK-LABEL: FAIL: shtest-readfile :: absolute-paths.txt ({{[^)]*}})
88
# CHECK: echo hello
9-
# CHECK: # executed command: echo '%{readfile:[[TEMP_PATH]]/absolute-paths.txt.tmp}'
9+
# CHECK: # executed command: echo '%{readfile:[[TEMP_PATH]]{{[\\\/]}}absolute-paths.txt.tmp}'
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 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
1717
# CHECK: # executed command: echo '%{readfile:rel_path_test_folder/test_file}'
1818

1919
# CHECK-LABEL: FAIL: shtest-readfile :: two-same-line.txt ({{[^)]*}})
2020
# CHECK: echo hello bye
21-
# CHECK: # executed command: echo '%{readfile:[[TEMP_PATH]]/two-same-line.txt.tmp.1}' '%{readfile:[[TEMP_PATH]]/two-same-line.txt.tmp.2}'
21+
# CHECK: # executed command: echo '%{readfile:[[TEMP_PATH]]{{[\\\/]}}two-same-line.txt.tmp.1}' '%{readfile:[[TEMP_PATH]]{{[\\\/]}}two-same-line.txt.tmp.2}'

0 commit comments

Comments
 (0)