Skip to content

Commit df6a9da

Browse files
fix
Created using spr 1.3.7
1 parent 79e59dc commit df6a9da

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Tests that readfile works with the env builtin.
22
# RUN: echo -n "hello" > %t.1
3-
# RUN: env TEST=%{readfile:%t.1} %python -c "import os; print(os.environ['TEST'])"
3+
# RUN: env TEST=%{readfile:%t.1} %{python} -c "import os; print(os.environ['TEST'])"
44

55
## Fail the test so we can assert on the output.
66
# RUN: not echo return

llvm/utils/lit/tests/Inputs/shtest-readfile/lit.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use_lit_shell = lit.util.pythonize_bool(lit_shell_env)
1010
config.test_format = lit.formats.ShTest(execute_external=not use_lit_shell)
1111
config.test_source_root = None
1212
config.test_exec_root = None
13+
config.substitutions.append(("%{python}", '"%s"' % (sys.executable)))
1314

1415
# If we are testing with the external shell, remove the fake-externals from
1516
# PATH so that we use mkdir in the tests.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# CHECK: # executed command: echo '%{readfile:[[TEMP_PATH]]{{[\\\/]}}absolute-paths.txt.tmp}'
1313

1414
# CHECK-LABEL: FAIL: shtest-readfile :: env.txt ({{[^)]*}})
15-
# CHECK: env TEST=hello python3 -c "import os; print(os.environ['TEST'])"
15+
# CHECK: env TEST=hello {{.*}} -c "import os; print(os.environ['TEST'])"
1616
# CHECK: # | hello
1717

1818
# CHECK-LABEL: FAIL: shtest-readfile :: file-does-not-exist.txt ({{[^)]*}})

0 commit comments

Comments
 (0)