-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Describe the problem you are trying to solve
There is a project with 20+ integration tests, it takes like few minutes to build all of them. Even with a small change in one of the tests file and I wanted to just run one of the tests file, I did cargo tests part_a
but it still compiles everything again.
The solution right now,
rm tests/*
git restore tests/part_a.rs
cargo test part_a
, try rebuildinggit restore src/dep.rs
, add some dependencies needed
Essentially, this will also remove the issue of clogging the screen with 0 tests run and the need to scroll up multiple times to search for the tests run #4324.
Describe the solution you'd like
Search for the functions used in the filter (cargo test <filter>
), build and run only those files needed. Something like ripgrep for function name, but this requires cargo to include the dependencies too.
This provides 2 benefits, reducing the need to build unneeded files and prevent clogging the screen by running file without tests matching the filter.
Notes
I would like to take on this issue if the complexity is not high or if there are people willing to mentor.