check,run: add abort to interrupt tests on failure#90
Open
unclejack wants to merge 1 commit intogo-check:v1from
Open
check,run: add abort to interrupt tests on failure#90unclejack wants to merge 1 commit intogo-check:v1from
unclejack wants to merge 1 commit intogo-check:v1from
Conversation
niemeyer
requested changes
Dec 8, 2016
Contributor
niemeyer
left a comment
There was a problem hiding this comment.
A few high-level changes, and we need a test for the feature.
check.go
Outdated
| c := runner.runTest(runner.tests[i]) | ||
| if c.status() == fixturePanickedSt { | ||
| status := c.status() | ||
| if status == fixturePanickedSt { |
Contributor
There was a problem hiding this comment.
All of these are a single condition:
if status == fixturePanickedSt || runner.abort && (status == failedSt || status == panickedSt)
run.go
Outdated
| if !runConf.Abort { | ||
| continue | ||
| } | ||
| if res.Failed > 0 || res.Panicked > 0 { |
run.go
Outdated
| for _, suite := range allSuites { | ||
| result.Add(Run(suite, runConf)) | ||
| var res *Result | ||
| // a test from one suite has failed and we loop through |
Contributor
There was a problem hiding this comment.
Comment is misplaced (nothing has failed here). Should be below, perhaps shorter:
| var res *Result | ||
| // a test from one suite has failed and we loop through | ||
| // all suites to count all of the missed tests | ||
| if skipTests { |
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Contributor
Author
|
I've updated the code. PTAL when you have the time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements support for
-check.abortto make suites stop when a test fails. The skipped tests from the suite where the first failure was encountered and those in all following suites are counted as MISSED.Closes #84