-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow only running a specific set of tests #8685
Comments
Minor correction: |
Maybe this should be a feature request for libtest? The bit about |
There is an important distinction about
As for passing multiple filters, that is part of the libtest harness which lives in the rust-lang/rust repository. The issue tracking that is rust-lang/rust#30422. I personally would like to see support for multiple filters added, and I think it should be relatively easy. Unfortunately there isn't any active work or maintenance happening with libtest, but if you're interested you could maybe see if the libs team would accept/review such a change. dtolnay (a libs team member) mentioned here that they would be ok with it, although that was 3 years ago, so things might have changed. |
It may be better if it supports From this, I feel like should there be a parameter to support re-running test cases that failed in the previous round of testing? |
#7864 was our issue for rust-lang/rust#30422 was closed. So it seems like there is nothing left for this issue
Having
Huh, not seeing an issue for this. There'd be a lot of design issues to work out but its useful. |
|
Describe the problem you are trying to solve
It's currently not possible (to my understanding) to filter out multiple tests with Cargo. It would be nice to be able to rerun all the tests in a CI build that failed, without running all the passing tests too.
Describe the solution you'd like
A
--tests
option that lets you pass a list of tests to run, excluding all other tests. Although I would like it if it were not limited to just integration tests (as--test
is), and have it work on unit tests too. If I understand correctly, this would be the equivalent of passing--test
to the underlying test runner, except that the test runner does not allow multiple--test
options:Also it would be nice if at the end of a test run where there were failed tests, Cargo printed out the command that you can run to only re-run the failed tests.
Notes
I find the
--test
option confusing as it seems to only run integration tests. Could this be changed to allow you to use it with unit tests as well?See https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/.60cargo.20test.20--test.20foo.60.20for.20multiple.20tests for more context.
Cc @jyn514
The text was updated successfully, but these errors were encountered: