]> granicus.if.org Git - llvm/commitdiff
[lit] Use a %{python} substitution to avoid relying on python being on PATH
authorReid Kleckner <rnk@google.com>
Fri, 28 Jul 2017 21:13:47 +0000 (21:13 +0000)
committerReid Kleckner <rnk@google.com>
Fri, 28 Jul 2017 21:13:47 +0000 (21:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309434 91177308-0d34-0410-b5e6-96231b3b80d8

utils/lit/tests/Inputs/max-failures/lit.cfg
utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt
utils/lit/tests/Inputs/shtest-format/lit.cfg
utils/lit/tests/Inputs/shtest-shell/lit.cfg
utils/lit/tests/Inputs/shtest-shell/redirects.txt

index 50d07566e1ccdd574156e77e91c5bd2807e64e2e..605bd72336708b1b4c7c4aab51f4d7d69a7c222e 100644 (file)
@@ -1,6 +1,2 @@
-import lit.formats
-config.name = 'shtest-shell'
-config.suffixes = ['.txt']
-config.test_format = lit.formats.ShTest()
+lit_config.load_config(config, os.path.dirname(__file__) + "/../shtest-shell/lit.cfg")
 config.test_source_root = os.path.dirname(__file__) + '/../shtest-shell'
-config.test_exec_root = None
index 12bbfc25b524e3f86818ff5992b436dc4bc9dc17..ce38831e32ed36d4b6077af6ad9deaa7e97a6f19 100644 (file)
@@ -1,5 +1,5 @@
 # Run a command that fails with error on stdout.
 #
-# RUN: python %S/write-bad-encoding.py
+# RUN: "%{python}" %S/write-bad-encoding.py
 # RUN: false
 
index 9b47985a3d868998a6e290727602a0a342b64681..0d6488848b4f8666b424b4ce8239b6de965b6bd0 100644 (file)
@@ -6,3 +6,4 @@ config.test_source_root = None
 config.test_exec_root = None
 config.target_triple = 'x86_64-unknown-unknown'
 config.available_features.add('a-present-feature')
+config.substitutions.append(('%{python}', sys.executable))
index 7f31129ad114bfcc944ef29747a7e4e719e0c587..761dc6748855839b0791e1e57c887087382d9c5e 100644 (file)
@@ -4,3 +4,4 @@ config.suffixes = ['.txt']
 config.test_format = lit.formats.ShTest()
 config.test_source_root = None
 config.test_exec_root = None
+config.substitutions.append(('%{python}', sys.executable))
index 2329955aa4c2b20c3dd65fd7fc84873556f3a8d2..f90c2b7868b78acbf25cbf0796462915b73c6f89 100644 (file)
 # Check stderr redirect (2> and 2>>).
 #
 # RUN: echo "not-present" > %t.stderr-write
-# RUN: python %S/write-to-stderr.py 2> %t.stderr-write
+# RUN: "%{python}" %S/write-to-stderr.py 2> %t.stderr-write
 # RUN: FileCheck --check-prefix=STDERR-WRITE < %t.stderr-write %s
 #
 # STDERR-WRITE-NOT: not-present
 # STDERR-WRITE: a line on stderr
 #
-# RUN: python %S/write-to-stderr.py 2>> %t.stderr-write
+# RUN: "%{python}" %S/write-to-stderr.py 2>> %t.stderr-write
 # RUN: FileCheck --check-prefix=STDERR-APPEND < %t.stderr-write %s
 #
 # STDERR-APPEND: a line on stderr
@@ -33,7 +33,7 @@
 # Check combined redirect (&>).
 #
 # RUN: echo "not-present" > %t.combined
-# RUN: python %S/write-to-stdout-and-stderr.py &> %t.combined
+# RUN: "%{python}" %S/write-to-stdout-and-stderr.py &> %t.combined
 # RUN: FileCheck --check-prefix=COMBINED-WRITE < %t.combined %s
 #
 # COMBINED-WRITE-NOT: not-present