Description
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