[PATCH] D65156: [lit] Protect full test suite from FILECHECK_OPTS
Joel E. Denny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 24 20:15:54 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL366980: [lit] Protect full test suite from FILECHECK_OPTS (authored by jdenny, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D65156?vs=211324&id=211664#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65156/new/
https://reviews.llvm.org/D65156
Files:
llvm/trunk/utils/lit/tests/lit.cfg
llvm/trunk/utils/lit/tests/shtest-run-at-line.py
Index: llvm/trunk/utils/lit/tests/shtest-run-at-line.py
===================================================================
--- llvm/trunk/utils/lit/tests/shtest-run-at-line.py
+++ llvm/trunk/utils/lit/tests/shtest-run-at-line.py
@@ -1,7 +1,7 @@
# Check that -vv makes the line number of the failing RUN command clear.
# (-v is actually sufficient in the case of the internal shell.)
#
-# RUN: env -u FILECHECK_OPTS not %{lit} -j 1 -vv %{inputs}/shtest-run-at-line > %t.out
+# RUN: not %{lit} -j 1 -vv %{inputs}/shtest-run-at-line > %t.out
# RUN: FileCheck --input-file %t.out %s
#
# END.
Index: llvm/trunk/utils/lit/tests/lit.cfg
===================================================================
--- llvm/trunk/utils/lit/tests/lit.cfg
+++ llvm/trunk/utils/lit/tests/lit.cfg
@@ -44,10 +44,17 @@
if directory:
llvm_config.with_environment('PATH', directory, append_path=True)
+# This test suite calls %{lit} to test lit's behavior for the sample test
+# suites in %{inputs}. This test suite's results are then determined in part
+# by %{lit}'s textual output, which includes the output of FileCheck calls
+# within %{inputs}'s test suites. Thus, %{lit} clears environment variables
+# that can affect FileCheck's output.
config.substitutions.append(('%{inputs}', os.path.join(
config.test_source_root, 'Inputs')))
-config.substitutions.append(('%{lit}', "%%{python} %s" % (
- os.path.join(lit_path, 'lit.py'),)))
+config.substitutions.append(('%{lit}',
+ "{env} %{{python}} {lit}".format(
+ env="env -u FILECHECK_OPTS -u FILECHECK_DUMP_INPUT_ON_FAILURE",
+ lit=os.path.join(lit_path, 'lit.py'))))
config.substitutions.append(('%{python}', '"%s"' % (sys.executable)))
# Enable coverage.py reporting, assuming the coverage module has been installed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65156.211664.patch
Type: text/x-patch
Size: 1802 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190725/96865be9/attachment.bin>
More information about the llvm-commits
mailing list