[PATCH] D50206: [lit, windows] Fix several lit tests on Windows
Stella Stamenova via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 2 16:19:31 PDT 2018
stella.stamenova created this revision.
stella.stamenova added reviewers: asmith, zturner.
Herald added subscribers: llvm-commits, delcypher.
The issue with these tests is that they use python, but the path to python on Windows can contain spaces. To make the tests always work, pass the path surrounded by quotes.
Repository:
rL LLVM
https://reviews.llvm.org/D50206
Files:
utils/lit/tests/boolean-parsing.py
utils/lit/tests/discovery.py
utils/lit/tests/lit.cfg
utils/lit/tests/shell-parsing.py
utils/lit/tests/unittest-adaptor.py
Index: utils/lit/tests/unittest-adaptor.py
===================================================================
--- utils/lit/tests/unittest-adaptor.py
+++ utils/lit/tests/unittest-adaptor.py
@@ -1,6 +1,6 @@
# Check the lit adaption to run under unittest.
#
-# RUN: %{python} %s %{inputs}/unittest-adaptor 2> %t.err
+# RUN: '%{python}' %s %{inputs}/unittest-adaptor 2> %t.err
# RUN: FileCheck < %t.err %s
#
# CHECK-DAG: unittest-adaptor :: test-two.txt ... FAIL
Index: utils/lit/tests/shell-parsing.py
===================================================================
--- utils/lit/tests/shell-parsing.py
+++ utils/lit/tests/shell-parsing.py
@@ -1,3 +1,3 @@
# Just run the ShUtil unit tests.
#
-# RUN: %{python} -m lit.ShUtil
+# RUN: '%{python}' -m lit.ShUtil
Index: utils/lit/tests/lit.cfg
===================================================================
--- utils/lit/tests/lit.cfg
+++ utils/lit/tests/lit.cfg
@@ -38,7 +38,7 @@
config.substitutions.append(('%{src_root}', src_root))
config.substitutions.append(('%{inputs}', os.path.join(
src_root, 'tests', 'Inputs')))
-config.substitutions.append(('%{lit}', "%%{python} %s" % (
+config.substitutions.append(('%{lit}', "\'%%{python}\' %s" % (
os.path.join(lit_path, 'lit.py'),)))
config.substitutions.append(('%{python}', sys.executable))
Index: utils/lit/tests/discovery.py
===================================================================
--- utils/lit/tests/discovery.py
+++ utils/lit/tests/discovery.py
@@ -26,7 +26,7 @@
# CHECK-BASIC-OUT: top-level-suite :: test-two
# Check discovery when providing the special builtin 'config_map'
-# RUN: %{python} %{inputs}/config-map-discovery/driver.py \
+# RUN: '%{python}' %{inputs}/config-map-discovery/driver.py \
# RUN: %{inputs}/config-map-discovery/main-config/lit.cfg \
# RUN: %{inputs}/config-map-discovery/lit.alt.cfg \
# RUN: --single-process --debug --show-tests --show-suites > %t.out 2> %t.err
Index: utils/lit/tests/boolean-parsing.py
===================================================================
--- utils/lit/tests/boolean-parsing.py
+++ utils/lit/tests/boolean-parsing.py
@@ -1,4 +1,4 @@
# Test the boolean expression parser
# used for REQUIRES and UNSUPPORTED and XFAIL
-# RUN: %{python} -m lit.BooleanExpression
+# RUN: '%{python}' -m lit.BooleanExpression
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50206.158858.patch
Type: text/x-patch
Size: 2365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180802/69dd5d2a/attachment-0001.bin>
More information about the llvm-commits
mailing list