Feature request: Show Skipped Tests But Not Filtered Out Tests #2095
Replies: 1 comment 2 replies
-
So there's a couple of things here. The first is being able to mark a test as skipped at runtime. With libtest-mimic you can do that at list time, but with regular tests it really feels like there should be a way to exit out from a test at the beginning, and have that be clearly marked as distinct from I'm not fully sure what to call this. But it's most similar to a list-time The other consideration is having finer-grained indicators of test filtering. There's a few reasons we can choose to not run a test.
There is also a ranking of how important these reasons are, from highest to lowest:
Here, "ranking" means "if a test was filtered out due to multiple causes and we needed to attribute it to one cause, which would it be?" I'm not 100% sure of this ranking, but it feels right. Another consideration is signal-to-noise: how many tests do each of these skip? The smaller the number, the more relevant any information shown about them would be. It seems like:
Based on all this, I'm wondering if it makes sense to add a new filter with a level between pass and skip, covering both list-time and runtime ignores. But calling this filter "ignore" doesn't quite feel right, for two reasons:
There's also the asymmetry between the numbers of non-ignored and ignored tests here, which I think a good user experience would have to pay attention to. I'd love your thoughts on this. |
Beta Was this translation helpful? Give feedback.
-
Motivation
wgpu
uses nextest quite heavily. One particular quirk of the wgpu test suite is that we automatically run each one of our gpu-enabled tests on each gpu in the system. As we have tests for all sorts of features, not every gpu can run them. We currently make each test instance that cannot be run on that current system "no-op" itself. We use the test name to show why the test is disabled. Example of running a single test:I would love for the "unsupported" test to show as something other than "PASS". I tried to do this by:
ignored
inlibtest-mock
--status-level skip
.This worked great if I was running the whole suite. However, if I added any kind of filter like above, I would get 1500 lines of output instead of what I wanted, which was one.
Proposal
I would love some way to have a
--status-level skip
which includes ignored tests, but does not show filtered out tests.Alternatives
I haven't really thought of any good ones. I would really love regex based coloring, or a more dataful contract between libtest-mock and nextest but those both sound much more complicated 😅
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions