llvm.org GIT mirror llvm / b43e45f
[lit] Protect full test suite from FILECHECK_OPTS lit's test suite calls lit multiple times for various sample test suites. `FILECHECK_OPTS` is safe for FileCheck calls in lit's test suite. It's not safe for FileCheck calls in the sample test suites, whose output affects the results of lit's test suite. Without this patch, only one such sample test suite is protected from `FILECHECK_OPTS`, and I admit I haven't discovered other cases for which I can produce false failures using `FILECHECK_OPTS`. However, it's hard to predict the future, especially false passes. Thus, this patch protects all existing and future sample test suites from `FILECHECK_OPTS` (and the deprecated `FILECHECK_DUMP_INPUT_ON_FAILURE`). Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D65156 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366980 91177308-0d34-0410-b5e6-96231b3b80d8 Joel E. Denny a month ago
2 changed file(s) with 10 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
4343 if directory:
4444 llvm_config.with_environment('PATH', directory, append_path=True)
46 # This test suite calls %{lit} to test lit's behavior for the sample test
47 # suites in %{inputs}. This test suite's results are then determined in part
48 # by %{lit}'s textual output, which includes the output of FileCheck calls
49 # within %{inputs}'s test suites. Thus, %{lit} clears environment variables
50 # that can affect FileCheck's output.
4651 config.substitutions.append(('%{inputs}', os.path.join(
4752 config.test_source_root, 'Inputs')))
48 config.substitutions.append(('%{lit}', "%%{python} %s" % (
49 os.path.join(lit_path, 'lit.py'),)))
53 config.substitutions.append(('%{lit}',
54 "{env} %{{python}} {lit}".format(
56 lit=os.path.join(lit_path, 'lit.py'))))
5057 config.substitutions.append(('%{python}', '"%s"' % (sys.executable)))
5259 # Enable coverage.py reporting, assuming the coverage module has been installed
0 # Check that -vv makes the line number of the failing RUN command clear.
11 # (-v is actually sufficient in the case of the internal shell.)
22 #
3 # RUN: env -u FILECHECK_OPTS not %{lit} -j 1 -vv %{inputs}/shtest-run-at-line > %t.out
3 # RUN: not %{lit} -j 1 -vv %{inputs}/shtest-run-at-line > %t.out
44 # RUN: FileCheck --input-file %t.out %s
55 #
66 # END.