Skip to content

Fail or warn when using an overrestricitve test filter that filters all tests #6151

@phansch

Description

@phansch

I'm not sure if this or the rust repo (libtest) is the right place to report this.

It's possible to run cargo test <pattern> to run the tests that match the given pattern.

However, if I run cargo test this_does_not_exist, everything looks green in the output. For example, if I run cargo test mod_floors in Chrono, it will look like this:

selection_008

On the first glance, it looks like everything is green and all tests passed.
It doesn't tell me that no tests were executed. I really wanted to run cargo test mod_floor:

selection_009

It would be nice if cargo test somehow tells me that no tests were executed.

Maybe adding a yellow or red warning text could be a good start?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Command-testS-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions