Skip to content

Commit cc2404c

Browse files
committed
[lit, python] Always add quotes around the python path in lit
Summary: The issue with the python path is that the path to python on Windows can contain spaces. To make the tests always work, the path to python needs to be surrounded by quotes. This change updates several configuration files which specify the path to python as a substitution and also remove quotes from existing tests. Reviewers: asmith, zturner, alexshap, jakehehrlich Reviewed By: zturner, alexshap, jakehehrlich Subscribers: mehdi_amini, nemanjai, eraman, kbarton, jakehehrlich, steven_wu, dexonsmith, stella.stamenova, delcypher, llvm-commits Differential Revision: https://reviews.llvm.org/D50206 llvm-svn: 339073
1 parent a29e762 commit cc2404c

File tree

22 files changed

+51
-49
lines changed

22 files changed

+51
-49
lines changed

llvm/test/BugPoint/compile-custom.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext --compile-custom --compile-command="%python %/s.py arg1 arg2" --opt-command opt --output-prefix %t %s | FileCheck %s
1+
; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext --compile-custom --compile-command="%/s.py arg1 arg2" --opt-command opt --output-prefix %t %s | FileCheck %s
22
; REQUIRES: loadable_module
33

44
; Test that arguments are correctly passed in --compile-command. The output

llvm/test/BugPoint/unsymbolized.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; RUN: echo "import sys" > %t.py
33
; RUN: echo "print('args = ' + str(sys.argv))" >> %t.py
44
; RUN: echo "exit(1)" >> %t.py
5-
; RUN: not bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -opt-command="%python" -opt-args %t.py | FileCheck %s
5+
; RUN: not bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -opt-command=%python -opt-args %t.py | FileCheck %s
66
; RUN: not --crash opt -load %llvmshlibdir/BugpointPasses%shlibext %s -bugpoint-crashcalls -disable-symbolication 2>&1 | FileCheck --check-prefix=CRASH %s
77
; RUN: not bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -opt-command=%t.non.existent.opt.binary -opt-args %t.py 2>&1 | FileCheck %s --check-prefix=BAD-OPT
88

llvm/test/Other/opt-bisect-legacy-pass-manager.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
; utils/bisect) to locate the optimization that inlines the call to
3939
; f2() in f3().
4040

41-
; RUN: '%python' %S/opt-bisect-helper.py --start=0 --end=256 --optcmd=opt \
41+
; RUN: %python %S/opt-bisect-helper.py --start=0 --end=256 --optcmd=opt \
4242
; RUN: --filecheckcmd=FileCheck --test=%s \
4343
; RUN: --prefix=CHECK-BISECT-INLINE-HELPER \
4444
; RUN: | FileCheck %s --check-prefix=CHECK-BISECT-INLINE-RESULT

llvm/test/TableGen/JSON.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: llvm-tblgen -dump-json %s | '%python' %S/JSON-check.py %s
1+
// RUN: llvm-tblgen -dump-json %s | %python %S/JSON-check.py %s
22

33
// CHECK: data['!tablegen_json_version'] == 1
44

llvm/test/ThinLTO/X86/cache.ll

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@
106106
; RUN: rm -Rf %t.cache && mkdir %t.cache
107107
; Create cache files with different sizes.
108108
; Only 8B, 16B and 76B files should stay after pruning.
109-
; RUN: "%python" -c "with open(r'%t.cache/llvmcache-foo-1024', 'w') as file: file.truncate(1024)"
110-
; RUN: "%python" -c "with open(r'%t.cache/llvmcache-foo-16', 'w') as file: file.truncate(16)"
111-
; RUN: "%python" -c "with open(r'%t.cache/llvmcache-foo-8', 'w') as file: file.truncate(8)"
112-
; RUN: "%python" -c "with open(r'%t.cache/llvmcache-foo-76', 'w') as file: file.truncate(76)"
113-
; RUN: "%python" -c "with open(r'%t.cache/llvmcache-foo-77', 'w') as file: file.truncate(77)"
109+
; RUN: %python -c "with open(r'%t.cache/llvmcache-foo-1024', 'w') as file: file.truncate(1024)"
110+
; RUN: %python -c "with open(r'%t.cache/llvmcache-foo-16', 'w') as file: file.truncate(16)"
111+
; RUN: %python -c "with open(r'%t.cache/llvmcache-foo-8', 'w') as file: file.truncate(8)"
112+
; RUN: %python -c "with open(r'%t.cache/llvmcache-foo-76', 'w') as file: file.truncate(76)"
113+
; RUN: %python -c "with open(r'%t.cache/llvmcache-foo-77', 'w') as file: file.truncate(77)"
114114
; RUN: llvm-lto -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache --thinlto-cache-max-size-bytes 100
115115
; RUN: ls %t.cache/llvmcache-foo-16
116116
; RUN: ls %t.cache/llvmcache-foo-8
@@ -123,11 +123,11 @@
123123
; RUN: rm -Rf %t.cache && mkdir %t.cache
124124
; Create cache files with different sizes.
125125
; Only 8B and 16B files should stay after pruning.
126-
; RUN: "%python" -c "print(' ' * 1023)" > %t.cache/llvmcache-foo-1024
127-
; RUN: "%python" -c "print(' ' * 15)" > %t.cache/llvmcache-foo-16
128-
; RUN: "%python" -c "print(' ' * 7)" > %t.cache/llvmcache-foo-8
129-
; RUN: "%python" -c "print(' ' * 75)" > %t.cache/llvmcache-foo-76
130-
; RUN: "%python" -c "print(' ' * 76)" > %t.cache/llvmcache-foo-77
126+
; RUN: %python -c "print(' ' * 1023)" > %t.cache/llvmcache-foo-1024
127+
; RUN: %python -c "print(' ' * 15)" > %t.cache/llvmcache-foo-16
128+
; RUN: %python -c "print(' ' * 7)" > %t.cache/llvmcache-foo-8
129+
; RUN: %python -c "print(' ' * 75)" > %t.cache/llvmcache-foo-76
130+
; RUN: %python -c "print(' ' * 76)" > %t.cache/llvmcache-foo-77
131131
; RUN: llvm-lto -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache --thinlto-cache-max-size-files 2
132132
; RUN: ls %t.cache/llvmcache-foo-16
133133
; RUN: ls %t.cache/llvmcache-foo-8

llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ int main() { // TEXT: [[@LINE]]| 161|int main(
3737
//
3838
// RUN: llvm-cov export %S/Inputs/lineExecutionCounts.covmapping -instr-profile %t.profdata -name=main 2>/dev/null > %t.export.json
3939
// RUN: FileCheck -input-file %t.export.json %S/Inputs/lineExecutionCounts.json
40-
// RUN: cat %t.export.json | "%python" -c "import json, sys; json.loads(sys.stdin.read())"
40+
// RUN: cat %t.export.json | %python -c "import json, sys; json.loads(sys.stdin.read())"
4141
//
4242
// RUN: llvm-cov export %S/Inputs/lineExecutionCounts.covmapping -instr-profile %t.profdata 2>/dev/null -summary-only > %t.export-summary.json
4343
// RUN: not grep '"name":"main"' %t.export-summary.json

llvm/test/tools/llvm-objcopy/auto-remove-shndx.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: '%python' %p/Inputs/ungzip.py %p/Inputs/many-sections.o.gz > %t
1+
# RUN: %python %p/Inputs/ungzip.py %p/Inputs/many-sections.o.gz > %t
22
# RUN: llvm-objcopy -R .text -R s0 -R s1 -R s2 -R s3 -R s4 -R s5 -R s6 %t %t2
33
# RUN: llvm-readobj -sections %t2 | FileCheck --check-prefix=SECS %s
44

llvm/test/tools/llvm-objcopy/many-sections.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
RUN: '%python' %p/Inputs/ungzip.py %p/Inputs/many-sections.o.gz > %t
1+
RUN: %python %p/Inputs/ungzip.py %p/Inputs/many-sections.o.gz > %t
22
RUN: llvm-objcopy %t %t2
33
RUN: llvm-readobj -file-headers %t2 | FileCheck --check-prefix=EHDR %s
44
RUN: llvm-readobj -sections %t2 | FileCheck --check-prefix=SECS %s

llvm/test/tools/llvm-objcopy/remove-shndx.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This test checks to see that a .symtab_shndx section is added to any binary
22
# that needs it, even if the original was removed.
3-
RUN: '%python' %p/Inputs/ungzip.py %p/Inputs/many-sections.o.gz > %t
3+
RUN: %python %p/Inputs/ungzip.py %p/Inputs/many-sections.o.gz > %t
44
RUN: llvm-objcopy -R .symtab_shndx %t %t2
55
RUN: llvm-readobj -sections %t2 | FileCheck %s
66

llvm/test/tools/llvm-objcopy/strict-no-add.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This test makes sure that sections added at the end that don't have symbols
22
# defined in them don't trigger the creation of a large index table.
33

4-
RUN: '%python' %p/Inputs/ungzip.py %p/Inputs/many-sections.o.gz > %t.0
4+
RUN: %python %p/Inputs/ungzip.py %p/Inputs/many-sections.o.gz > %t.0
55
RUN: cat %p/Inputs/alloc-symtab.o > %t
66
RUN: llvm-objcopy -R .text -R s0 -R s1 -R s2 -R s3 -R s4 -R s5 -R s6 %t.0 %t2
77
RUN: llvm-objcopy -add-section=.s0=%t -add-section=.s1=%t -add-section=.s2=%t %t2 %t2

llvm/test/tools/llvm-symbolizer/pdb/pdb.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Subtract ImageBase from all the offsets and run the test again with
99
--relative-address.
1010

1111
RUN: grep '^ADDR:' %s | sed -s 's/ADDR: //' \
12-
RUN: | "%python" -c 'import sys;print("\n".join([hex(int(x, 16) - 0x400000) for x in sys.stdin]))' \
12+
RUN: | %python -c 'import sys;print("\n".join([hex(int(x, 16) - 0x400000) for x in sys.stdin]))' \
1313
RUN: | llvm-symbolizer -obj="%p/Inputs/test.exe" -demangle=false --relative-address \
1414
RUN: | FileCheck %s --check-prefix=CHECK-NO-DEMANGLE
1515

llvm/test/tools/llvm-symbolizer/ppc64.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ int foo() { return 0; }
44
int bar() { return foo(); }
55
int _start() { return bar(); }
66

7-
RUN: "%python" -c "print('0x1000014c\n0x1000018c\n0x100001cc')" | llvm-symbolizer -obj=%p/Inputs/ppc64 | FileCheck %s
7+
RUN: %python -c "print('0x1000014c\n0x1000018c\n0x100001cc')" | llvm-symbolizer -obj=%p/Inputs/ppc64 | FileCheck %s
88

99
CHECK: foo
1010
CHECK: bar

llvm/utils/lit/lit/llvm/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ def use_default_substitutions(self):
299299
'count'), verbatim=True, unresolved='fatal'),
300300
ToolSubst(r'\| \bnot\b', command=FindTool('not'), verbatim=True, unresolved='fatal')]
301301

302-
self.config.substitutions.append(('%python', sys.executable))
302+
self.config.substitutions.append(('%python', "'%s'" % (sys.executable)))
303+
303304
self.add_tool_substitutions(
304305
tool_patterns, [self.config.llvm_tools_dir])
305306

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ config.test_source_root = None
66
config.test_exec_root = None
77
config.environment['FOO'] = '1'
88
config.environment['BAR'] = '2'
9-
config.substitutions.append(('%{python}', sys.executable))
9+
config.substitutions.append(('%{python}', "'%s'" % (sys.executable)))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Run a command that fails with error on stdout.
22
#
3-
# RUN: "%{python}" %S/write-bad-encoding.py
3+
# RUN: %{python} %S/write-bad-encoding.py
44
# RUN: false
55

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ config.test_source_root = None
66
config.test_exec_root = None
77
config.target_triple = 'x86_64-unknown-unknown'
88
config.available_features.add('a-present-feature')
9-
config.substitutions.append(('%{python}', sys.executable))
9+
config.substitutions.append(('%{python}', "'%s'" % (sys.executable)))
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Check handling of /dev/null in command line options
22
# On windows, it should be redirected to a temp file.
33
#
4-
# RUN: "%{python}" %S/check_args.py --my_arg /dev/null | FileCheck %s --check-prefix=CHECK1
4+
# RUN: %{python} %S/check_args.py --my_arg /dev/null | FileCheck %s --check-prefix=CHECK1
55
# CHECK1: OK
66

7-
# RUN: "%{python}" %S/check_args.py --my_arg=/dev/null | FileCheck %s --check-prefix=CHECK2
7+
# RUN: %{python} %S/check_args.py --my_arg=/dev/null | FileCheck %s --check-prefix=CHECK2
88
# CHECK2: OK
99

10-
# RUN: "%{python}" %S/check_args.py -a /dev/null | FileCheck %s --check-prefix=CHECK3
10+
# RUN: %{python} %S/check_args.py -a /dev/null | FileCheck %s --check-prefix=CHECK3
1111
# CHECK3: OK
1212

13-
# RUN: "%{python}" %S/check_args.py -a=/dev/null | FileCheck %s --check-prefix=CHECK4
13+
# RUN: %{python} %S/check_args.py -a=/dev/null | FileCheck %s --check-prefix=CHECK4
1414
# CHECK4: OK

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ config.suffixes = ['.txt']
44
config.test_format = lit.formats.ShTest()
55
config.test_source_root = None
66
config.test_exec_root = None
7-
config.substitutions.append(('%{python}', sys.executable))
7+
config.substitutions.append(('%{python}', "'%s'" % (sys.executable)))

llvm/utils/lit/tests/Inputs/shtest-shell/redirects.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
# Check stderr redirect (2> and 2>>).
1818
#
1919
# RUN: echo "not-present" > %t.stderr-write
20-
# RUN: "%{python}" %S/write-to-stderr.py 2> %t.stderr-write
20+
# RUN: %{python} %S/write-to-stderr.py 2> %t.stderr-write
2121
# RUN: FileCheck --check-prefix=STDERR-WRITE < %t.stderr-write %s
2222
#
2323
# STDERR-WRITE-NOT: not-present
2424
# STDERR-WRITE: a line on stderr
2525
#
26-
# RUN: "%{python}" %S/write-to-stderr.py 2>> %t.stderr-write
26+
# RUN: %{python} %S/write-to-stderr.py 2>> %t.stderr-write
2727
# RUN: FileCheck --check-prefix=STDERR-APPEND < %t.stderr-write %s
2828
#
2929
# STDERR-APPEND: a line on stderr
@@ -33,7 +33,7 @@
3333
# Check combined redirect (&>).
3434
#
3535
# RUN: echo "not-present" > %t.combined
36-
# RUN: "%{python}" %S/write-to-stdout-and-stderr.py &> %t.combined
36+
# RUN: %{python} %S/write-to-stdout-and-stderr.py &> %t.combined
3737
# RUN: FileCheck --check-prefix=COMBINED-WRITE < %t.combined %s
3838
#
3939
# COMBINED-WRITE-NOT: not-present

llvm/utils/lit/tests/Inputs/shtest-shell/valid-shell.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
# Check force remove commands success whether the file does or doesn't exist.
33
#
44
# RUN: rm -f %t.write
5-
# RUN: "%{python}" %S/check_path.py file %t.write > %t.out
5+
# RUN: %{python} %S/check_path.py file %t.write > %t.out
66
# RUN: FileCheck --check-prefix=REMOVE-FILE < %t.out %s
77
# RUN: echo "create a temp file" > %t.write
8-
# RUN: "%{python}" %S/check_path.py file %t.write > %t.out
8+
# RUN: %{python} %S/check_path.py file %t.write > %t.out
99
# RUN: FileCheck --check-prefix=FILE-EXIST < %t.out %s
1010
# RUN: rm -f %t.write
11-
# RUN: "%{python}" %S/check_path.py file %t.write > %t.out
11+
# RUN: %{python} %S/check_path.py file %t.write > %t.out
1212
# RUN: FileCheck --check-prefix=REMOVE-FILE < %t.out %s
1313
#
1414
# REMOVE-FILE: False
@@ -19,14 +19,14 @@
1919
#
2020
# Check the mkdir command with -p option.
2121
# RUN: rm -f -r %T/test
22-
# RUN: "%{python}" %S/check_path.py dir %T/test > %t.out
22+
# RUN: %{python} %S/check_path.py dir %T/test > %t.out
2323
# RUN: FileCheck --check-prefix=REMOVE-PARENT-DIR < %t.out %s
2424
# RUN: mkdir -p %T/test
25-
# RUN: "%{python}" %S/check_path.py dir %T/test > %t.out
25+
# RUN: %{python} %S/check_path.py dir %T/test > %t.out
2626
# RUN: FileCheck --check-prefix=MAKE-PARENT-DIR < %t.out %s
2727
# RUN: rm -f %T/test || true
2828
# RUN: rm -f -r %T/test
29-
# RUN: "%{python}" %S/check_path.py dir %T/test > %t.out
29+
# RUN: %{python} %S/check_path.py dir %T/test > %t.out
3030
# RUN: FileCheck --check-prefix=REMOVE-PARENT-DIR < %t.out %s
3131
#
3232
# MAKE-PARENT-DIR: True
@@ -36,13 +36,13 @@
3636
#
3737
# RUN: rm -rf %T/test1
3838
# RUN: mkdir %T/test1
39-
# RUN: "%{python}" %S/check_path.py dir %T/test1 > %t.out
39+
# RUN: %{python} %S/check_path.py dir %T/test1 > %t.out
4040
# RUN: FileCheck --check-prefix=MAKE-DIR < %t.out %s
4141
# RUN: cd %T/test1 && mkdir foo
42-
# RUN: "%{python}" %S/check_path.py dir %T/test1 > %t.out
42+
# RUN: %{python} %S/check_path.py dir %T/test1 > %t.out
4343
# RUN: FileCheck --check-prefix=MAKE-DIR < %t.out %s
4444
# RUN: cd %T && rm -rf %T/test1
45-
# RUN: "%{python}" %S/check_path.py dir %T/test1 > %t.out
45+
# RUN: %{python} %S/check_path.py dir %T/test1 > %t.out
4646
# RUN: FileCheck --check-prefix=REMOVE-DIR < %t.out %s
4747
#
4848
# MAKE-DIR: True
@@ -52,16 +52,16 @@
5252
#
5353
# RUN: rm -rf %T/test
5454
# RUN: mkdir -p %T/test/test1 %T/test/test2
55-
# RUN: "%{python}" %S/check_path.py dir %T/test %T/test/test1 %T/test/test2 > %t.out
55+
# RUN: %{python} %S/check_path.py dir %T/test %T/test/test1 %T/test/test2 > %t.out
5656
# RUN: FileCheck --check-prefix=DIRS-EXIST < %t.out %s
5757
# RUN: mkdir %T/test || true
5858
# RUN: echo "create a temp file" > %T/test/temp.write
5959
# RUN: echo "create a temp1 file" > %T/test/test1/temp1.write
6060
# RUN: echo "create a temp2 file" > %T/test/test2/temp2.write
61-
# RUN: "%{python}" %S/check_path.py file %T/test/temp.write %T/test/test1/temp1.write %T/test/test2/temp2.write> %t.out
61+
# RUN: %{python} %S/check_path.py file %T/test/temp.write %T/test/test1/temp1.write %T/test/test2/temp2.write> %t.out
6262
# RUN: FileCheck --check-prefix=FILES-EXIST < %t.out %s
6363
# RUN: rm -r -f %T/*
64-
# RUN: "%{python}" %S/check_path.py dir %T/test > %t.out
64+
# RUN: %{python} %S/check_path.py dir %T/test > %t.out
6565
# RUN: FileCheck --check-prefix=REMOVE-ALL < %t.out %s
6666
#
6767
# DIRS-EXIST: True
@@ -92,7 +92,7 @@
9292
# RUN: mkdir -p %T/testCat
9393
# RUN: echo "abcdefgh" > %T/testCat/temp.write
9494
# RUN: cat %T/testCat/temp.write > %T/testCat/tempcat.write
95-
# RUN: "%{python}" %S/check_path.py file %T/testCat/tempcat.write > %T/testCat/path.out
95+
# RUN: %{python} %S/check_path.py file %T/testCat/tempcat.write > %T/testCat/path.out
9696
# RUN: FileCheck --check-prefix=FILE-EXISTS < %T/testCat/path.out %s
9797
# RUN: FileCheck --check-prefix=CAT-OUTPUT < %T/testCat/tempcat.write %s
9898
# FILE-EXISTS: True
@@ -106,7 +106,7 @@
106106
# RUN: echo "efghijkl" > %T/testCat/temp2.write
107107
# RUN: echo "mnopqrst" > %T/testCat/temp3.write
108108
# RUN: cat %T/testCat/temp1.write %T/testCat/temp2.write %T/testCat/temp3.write > %T/testCat/tempmulticat.write
109-
# RUN: "%{python}" %S/check_path.py file %T/testCat/tempmulticat.write > %T/testCat/path.out
109+
# RUN: %{python} %S/check_path.py file %T/testCat/tempmulticat.write > %T/testCat/path.out
110110
# RUN: FileCheck --check-prefix=MULTI-FILE-EXISTS < %T/testCat/path.out %s
111111
# RUN: FileCheck --check-prefix=MULTI-CAT-OUTPUT < %T/testCat/tempmulticat.write %s
112112
# MULTI-FILE-EXISTS: True

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ config.test_exec_root = config.test_source_root
2929
config.target_triple = '(unused)'
3030
src_root = os.path.join(config.test_source_root, '..')
3131
config.environment['PYTHONPATH'] = src_root
32-
config.substitutions.append(('%{python}', sys.executable))
32+
config.substitutions.append(('%{python}', "'%s'" % (sys.executable)))

llvm/utils/lit/tests/lit.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ config.substitutions.append(('%{inputs}', os.path.join(
4040
src_root, 'tests', 'Inputs')))
4141
config.substitutions.append(('%{lit}', "%%{python} %s" % (
4242
os.path.join(lit_path, 'lit.py'),)))
43-
config.substitutions.append(('%{python}', sys.executable))
43+
config.substitutions.append(('%{python}', "'%s'" % (sys.executable)))
44+
4445

4546
# Enable coverage.py reporting, assuming the coverage module has been installed
4647
# and sitecustomize.py in the virtualenv has been modified appropriately.

0 commit comments

Comments
 (0)