[PATCH] D70105: [lit] Better/earlier errors for empty runs
Julian Lettner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 11 16:55:38 PST 2019
yln created this revision.
Herald added subscribers: llvm-commits, delcypher.
Herald added a project: LLVM.
Fail early, when we discover no tests at all, or filter out all of them.
There is also `--allow-empty-runs` to disable test to allow workflows
like `LIT_FILTER=abc ninja check-all`. Apparently `check-all` invokes
lit multiple times if certain projects are enabled, which would produce
unwanted "empty runs". Specify via `LIT_OPTS=--allow-empty-runs`.
There are 3 causes for empty runs:
1. No tests discovered. This is always an error. Fix test suite config or command line.
2. All tests filtered out. This is an error by default, but can be suppressed via `--alow-empty-runs`. Should prevent accidentally passing empty runs, but allow the workflow above.
3. The number of shards is greater than the number of tests. Currently, this is never an error. Personally, I think we should consider making this an error by default; if this happens, you are doing something wrong. I added a warning but did not change the behavior, since this warrants more discussion.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70105
Files:
llvm/utils/lit/lit/cl_arguments.py
llvm/utils/lit/lit/main.py
llvm/utils/lit/lit/run.py
llvm/utils/lit/tests/selecting.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70105.228784.patch
Type: text/x-patch
Size: 5903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191112/7d3eadf8/attachment.bin>
More information about the llvm-commits
mailing list