nextest-rs / nextest

A next-generation test runner for Rust.
https://nexte.st
Apache License 2.0
2.11k stars 92 forks source link

Add support for `cargo test`s --skip and --exact command line flags #1483

Open svix-jplatte opened 4 months ago

svix-jplatte commented 4 months ago

Hi, I was just looking for an issue about --skip in nextest and found #29 which is saying that these are supported, but using different syntax. This is problematic for my use case since I have a test script that runs cargo nextest run if available, but falls back to regular cargo test if nextest is not installed. I also think that for interactive usage, --skip and --exact are much easier to use than the filter expression syntax.

Would you consider adding support for these flags? The implementation could just instantiate the appropriate filter expressions internally, so it should be really simple.

sunshowers commented 4 months ago

Hi -- I was hesitant to add this at first, but over the last few months I've changed my mind. I'm happy to accept a PR for this. Some notes:

svix-jplatte commented 2 weeks ago

I was able to get it to work, see #1653. It's in draft state though because I broke a test and couldn't really figure out how to add a new one either. And it's quite likely I didn't solve it in the best possible way.