summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-07-28 21:13:47 +0000
committerReid Kleckner <rnk@google.com>2017-07-28 21:13:47 +0000
commit67de34897c177e88f9618a162b7740abd653c768 (patch)
tree7b0a1eb13330c61931d1acfcfde84cbe798d48a2 /llvm
parent99c4a5fb8e3efa5264838993a66efdd6735306a5 (diff)
downloadbcm5719-llvm-67de34897c177e88f9618a162b7740abd653c768.tar.gz
bcm5719-llvm-67de34897c177e88f9618a162b7740abd653c768.zip
[lit] Use a %{python} substitution to avoid relying on python being on PATH
llvm-svn: 309434
Diffstat (limited to 'llvm')
-rw-r--r--llvm/utils/lit/tests/Inputs/max-failures/lit.cfg6
-rw-r--r--llvm/utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt2
-rw-r--r--llvm/utils/lit/tests/Inputs/shtest-format/lit.cfg1
-rw-r--r--llvm/utils/lit/tests/Inputs/shtest-shell/lit.cfg1
-rw-r--r--llvm/utils/lit/tests/Inputs/shtest-shell/redirects.txt6
5 files changed, 7 insertions, 9 deletions
diff --git a/llvm/utils/lit/tests/Inputs/max-failures/lit.cfg b/llvm/utils/lit/tests/Inputs/max-failures/lit.cfg
index 50d07566e1c..605bd723367 100644
--- a/llvm/utils/lit/tests/Inputs/max-failures/lit.cfg
+++ b/llvm/utils/lit/tests/Inputs/max-failures/lit.cfg
@@ -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
diff --git a/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt b/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt
index 12bbfc25b52..ce38831e32e 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt
@@ -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
diff --git a/llvm/utils/lit/tests/Inputs/shtest-format/lit.cfg b/llvm/utils/lit/tests/Inputs/shtest-format/lit.cfg
index 9b47985a3d8..0d6488848b4 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-format/lit.cfg
+++ b/llvm/utils/lit/tests/Inputs/shtest-format/lit.cfg
@@ -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))
diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/lit.cfg b/llvm/utils/lit/tests/Inputs/shtest-shell/lit.cfg
index 7f31129ad11..761dc674885 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-shell/lit.cfg
+++ b/llvm/utils/lit/tests/Inputs/shtest-shell/lit.cfg
@@ -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))
diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/redirects.txt b/llvm/utils/lit/tests/Inputs/shtest-shell/redirects.txt
index 2329955aa4c..f90c2b7868b 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-shell/redirects.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-shell/redirects.txt
@@ -17,13 +17,13 @@
# 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
OpenPOWER on IntegriCloud