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

Store test output by ID #125

Merged

Conversation

dnephin
Copy link
Member

@dnephin dnephin commented Jun 6, 2020

Fixes #119

So that when a test case is encountered multiple times, either because -count=n was used, or because ScanTestOutput is being passed multiple test runs, a failure or skipped test displays only its own output, not that of all tests with the same name.

Also move addTestEvent to Package, it is more appropriate as a Package method, and make Package methods use a pointer receiver. Many of them update the Package.

Also remove the need for hasSubtestSkipped by using the Skipped list to determine if a subtest has been skipped.

So that when a test case is encountered multiple times, either because
-count=n was used, or because ScanTestOutput is being passed multiple instances
of test runs, a failure or skipped test displays only its own output,
not that of all tests with the same name.

Also move addEvent to Package, it is more appropriate as a Package
method, and make Package methods use a pointer receiver. Many of them
update the Package.
It can be determined by using the list of skipped test cases.
@dnephin dnephin merged commit 41d5687 into gotestyourself:master Jun 6, 2020
@dnephin dnephin deleted the bug-repeated-test-case-output branch June 6, 2020 23:44
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.

When go test -count is greater than 1, only the output for the last test is saved.
1 participant