lit runs a gtest executable multiple times. First it runs it to
discover tests, then later it runs the executable again for each test.
However, if the discovery fails (perhaps because of a broken
executable), then no tests were previously run and no failures were
reported. This patch creates a dummy test if discovery fails, which
will later fail when test are run and be reported as a failure.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM, but I'm not sure about possible side-effects here. No one worked recently on this file, but Julian worked on lit in general recently and maybe can sanity check this as well?
Comment Actions
The commit message and comment sound reasonable, but I have not further insights. Is it possible to capture the improved behavior with a test?
Comment Actions
LGTM, with nits.
llvm/utils/lit/tests/Inputs/googletest-brokendiscovery/DummySubDir/OneTest.py | ||
---|---|---|
4 ↗ | (On Diff #265063) | Unnecessary imports |
llvm/utils/lit/tests/Inputs/googletest-brokendiscovery/lit.cfg | ||
2 ↗ | (On Diff #265063) | How about naming the test "googletest-error-during-discovery" or "googletest-disovery-failure" since discovery itself isn't "broken"? |
llvm/utils/lit/tests/googletest-brokendiscovery.py | ||
1 ↗ | (On Diff #265063) | Copy & pasted comment |
9 ↗ | (On Diff #265063) | Maybe just name the dir "subdir" to avoid the need for this regex |