Skip to content
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

rerun-fails: Only rerun failed subtests #135

Merged
merged 3 commits into from
Jul 18, 2020

Conversation

dnephin
Copy link
Member

@dnephin dnephin commented Jun 28, 2020

If a root test case has failed subtests, only rerun those that have failed. A new hidden flag is added to restore the old behaviour of re-running the entire root test case if any subtest fails.

Because of limitations of the 'go test -run' flag (golang/go#39904) this required running each test in a separate 'go test' process.

Also fixes a recently introduced bug where any incomplete tests stayed in Execution.running, which caused Execution.end() to produce incorrect artificial events for those tests on each re-run.

If a root test case has failed subtests, only rerun those that have
failed. A new hidden flag is added to restore the old behaviour of
re-running the entire root test case if any subtest fails.

Because of limitations of the 'go test -run' flag (github.com/golang/go/issues/39904)
this required running each test in a separate 'go test' process.
@dnephin dnephin marked this pull request as ready for review June 29, 2020 02:01
Otherwise, when an Execution is re-used, those tests still in running will have artifitial
events sent for them each time .end() is called, inflating the failure count. The test
count was correct because test count is incremented in run().
@dnephin dnephin merged commit e2b19e1 into gotestyourself:master Jul 18, 2020
@dnephin dnephin deleted the rerun-fails-only-subtests branch July 18, 2020 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant