Add hadrian option for rerunning failed test
When you write a ghc patch and want to create a MR, you'd probably run all tests locally with hadrian/build -j --freeze1 test
. You might run into a regression, where let's say T001
, T002
and T003
fail.
You write some code to fix the regression and now you manually have to copy down T001
, T002
and T003
.
It would be nicer, if hadrian, upon running all tests, created a file failed_tests
which listed all the tests that previously failed and deletes them, when they pass again. Running them is also made easier with a flag --only-run-failed
which only runs tests which previously failed.
An example workflow could then look like
<write ghc code>
hadrian/build -j test
- tests failed: A, B (failed_tests file has [A, B])
<write code to fix regression A>
hadrian/build -j --only-run-failed
- tests failed: B (failed_tests file has [B])
<fix regression B, adding regression C>
hadrian/build -j --only-run-failed
- all tests passed!
hadrian/build -j
- tests failed: C (failed_tests file has [C])
<fix C>
hadrian/build -j
- all tests passed!
Edited by Jade