Skip to content

Commit 235d44d

Browse files
committed
Fix LLVM test to use %python instead of python
This uses lit substitution, which fixes running this test on some environment where 'python' isn't in the path.
1 parent aa04b65 commit 235d44d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

llvm/utils/lit/tests/lit.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ lit_path = os.path.abspath(lit_path)
3939

4040
# Required because some tests import the lit module
4141
if llvm_config:
42+
llvm_config.use_default_substitutions()
4243
llvm_config.with_environment("PYTHONPATH", lit_path, append_path=True)
4344
else:
4445
config.environment["PYTHONPATH"] = lit_path

llvm/utils/lit/tests/windows-pools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Create a directory with 20 files and check the number of pools and workers per pool that lit will use.
22

33
# RUN: rm -Rf %t.dir && mkdir -p %t.dir
4-
# RUN: python -c "for i in range(20): open(rf'%t.dir/file{i}.txt', 'w').write('RUN:')"
4+
# RUN: %python -c "for i in range(20): open(rf'%t.dir/file{i}.txt', 'w').write('RUN:')"
55

66
# RUN: echo "import lit.formats" > %t.dir/lit.cfg
77
# RUN: echo "config.name = \"top-level-suite\"" >> %t.dir/lit.cfg

0 commit comments

Comments
 (0)