[llvm] r309434 - [lit] Use a %{python} substitution to avoid relying on python being on PATH
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 28 14:13:47 PDT 2017
Author: rnk
Date: Fri Jul 28 14:13:47 2017
New Revision: 309434
URL: http://llvm.org/viewvc/llvm-project?rev=309434&view=rev
Log:
[lit] Use a %{python} substitution to avoid relying on python being on PATH
Modified:
llvm/trunk/utils/lit/tests/Inputs/max-failures/lit.cfg
llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt
llvm/trunk/utils/lit/tests/Inputs/shtest-format/lit.cfg
llvm/trunk/utils/lit/tests/Inputs/shtest-shell/lit.cfg
llvm/trunk/utils/lit/tests/Inputs/shtest-shell/redirects.txt
Modified: llvm/trunk/utils/lit/tests/Inputs/max-failures/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/max-failures/lit.cfg?rev=309434&r1=309433&r2=309434&view=diff
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/max-failures/lit.cfg (original)
+++ llvm/trunk/utils/lit/tests/Inputs/max-failures/lit.cfg Fri Jul 28 14:13:47 2017
@@ -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
Modified: llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt?rev=309434&r1=309433&r2=309434&view=diff
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt (original)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt Fri Jul 28 14:13:47 2017
@@ -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
Modified: llvm/trunk/utils/lit/tests/Inputs/shtest-format/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/lit.cfg?rev=309434&r1=309433&r2=309434&view=diff
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/lit.cfg (original)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/lit.cfg Fri Jul 28 14:13:47 2017
@@ -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))
Modified: llvm/trunk/utils/lit/tests/Inputs/shtest-shell/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-shell/lit.cfg?rev=309434&r1=309433&r2=309434&view=diff
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-shell/lit.cfg (original)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-shell/lit.cfg Fri Jul 28 14:13:47 2017
@@ -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))
Modified: llvm/trunk/utils/lit/tests/Inputs/shtest-shell/redirects.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-shell/redirects.txt?rev=309434&r1=309433&r2=309434&view=diff
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-shell/redirects.txt (original)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-shell/redirects.txt Fri Jul 28 14:13:47 2017
@@ -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
More information about the llvm-commits
mailing list