Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Test Option --last-failed-only #6826

Closed
Nokel81 opened this issue Apr 6, 2019 · 2 comments
Closed

Test Option --last-failed-only #6826

Nokel81 opened this issue Apr 6, 2019 · 2 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-test S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

Comments

@Nokel81
Copy link

Nokel81 commented Apr 6, 2019

Describe the problem you are trying to solve
I have a very large test suite that does quite a but of file IO, which makes the tests rather long to run. I need the file IO because I use external programs to verify my output. It would be very useful to be able to only run the tests that failed the last time I ran the suit.

Describe the solution you'd like
A new option (namely something like --last-failed-only) that would limit which tests are run.

@Nokel81 Nokel81 added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Apr 6, 2019
@weihanglo weihanglo added the S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix label May 15, 2023
@weihanglo
Copy link
Member

We could definitely rerun a single test suite if there is any test case failed in a test suite. However, if we want to rerun only one failed test function annotated with #[test], it is not currently supported (1.69). Unless we get libest JSON format stabilized (rust-lang/rust#49359), there is no enough information for Cargo to rerun a single #[test] function.

Marked this as S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix accordingly.

@weihanglo
Copy link
Member

Close in favor of #10673. More discussions happen there.

@weihanglo weihanglo closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-test S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix
Projects
None yet
Development

No branches or pull requests

3 participants