[PATCH] D70784: [FileCheck] Given multiple -dump-input, prefer most verbose
Joel E. Denny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 27 07:31:46 PST 2019
jdenny created this revision.
jdenny added reviewers: probinson, thopre.
Herald added a project: LLVM.
Problem: `FILECHECK_OPTS` was implemented so that a test runner, such
as a bot, can specify FileCheck debugging options, such as
`-dump-input=fail`. However, some existing test suites have FileCheck
calls that already specify `-dump-input=fail` or `-dump-input=always`.
Without this patch, such tests fail under such a test runner because
FileCheck doesn't accept multiple occurrences of `-dump-input`.
Solution: This patch permits multiple occurrences of `-dump-input` by
assigning precedence to its values in the following descending order:
`help`, `always`, `fail`, and `never`. That is, any occurrence of
`help` always obtains help, and otherwise the behavior is similar to
`-v` vs. `-vv` in that the option specifying the greatest verbosity
has precedence.
Rationale: My justification for the new behavior is as follows. I
have not experienced use cases where, either as a test runner or as a
test author, I want to **limit** the permitted debugging verbosity
(except as a test author in FileCheck's or lit's test suites where the
FileCheck debugging output itself is under test, but the solution
there is `env FILECHECK_OPTS=`, and I imagine we should use the same
solution anywhere else this need might occur). Of course, as either a
test runner or test author, it is useful to **increase** debugging
verbosity.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70784
Files:
llvm/test/FileCheck/dump-input-enable.txt
llvm/utils/FileCheck/FileCheck.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70784.231253.patch
Type: text/x-patch
Size: 14578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191127/51373435/attachment.bin>
More information about the llvm-commits
mailing list