Skip to content

--failed flag for x test #114609

Closed
Closed
@darklyspaced

Description

@darklyspaced

I'm proposing a flag for x test called --failed that reruns all tests that failed the last time that they were ran.

Of course, this would require the tool to keep track of the status of different tests -- not run, passed, failed etc -- in a permanent file. However, by doing this, we could also potentially add an optional pre-push hook that checks whether there are any tests that are failing and prompts the user to rerun those tests before pushing.

We could also integrate the tool with x suggest so that this is an option that is suggested and executed when there are tests that were failed on the previous iteration. I have started brewing up a PR implementing this feature; I wanted to get some feedback on whether this is something that people would actually find useful (I certainly would!).

cc @Ezrashaw (you might be interested based off your work on x suggest)

### Tasks
- [ ] https://github.com/rust-lang/rust/pull/114775
- [ ] Suggest `x test --failed` (if runnable) in `x suggest`
- [ ] Git pre-push hook that notifies of failed tests?
- [ ] Update rustc-dev-guide to inclue information about this flag

Metadata

Metadata

Assignees

Labels

A-testsuiteArea: The testsuite used to check the correctness of rustcC-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions