[PATCH] D65121: [FileCheck][lit] Make FILECHECK_OPTS useful for their test suites

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 15:36:22 PDT 2019


jdenny created this revision.
jdenny added reviewers: probinson, delcypher.
Herald added a subscriber: thopre.
Herald added a project: LLVM.

Without this patch:

- `FILECHECK_OPTS` isn't propagated to FileCheck's test suite so that `FILECHECK_OPTS` doesn't inadvertently affect test results by affecting the output of FileCheck calls under test.  As a result, `FILECHECK_OPTS` is useless for debugging FileCheck's test suite.

- 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.  However, only one such sample test suite is protected from `FILECHECK_OPTS`.

This patch provides solutions for the above problems, and it handles
the deprecated `FILECHECK_DUMP_INPUT_ON_FAILURE` in the same manner as
`FILECHECK_OPTS`.

In the case of FileCheck's test suite, the solution requires
propagating the new substitution `%TestFileCheckOut` throughout the 
test suite.  To make this patch easier to read, that will come in a
subsequent patch (which I'll submit if people actually think this approach
is worthwhile).

Fixes PR40284.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65121

Files:
  llvm/test/FileCheck/lit.local.cfg
  llvm/utils/lit/tests/lit.cfg
  llvm/utils/lit/tests/shtest-run-at-line.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65121.211215.patch
Type: text/x-patch
Size: 5139 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190722/0ff9b887/attachment.bin>


More information about the llvm-commits mailing list