Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
test-cases: Don't treat SKIP as an error
Browse files Browse the repository at this point in the history
test-cases was incorrectly treating skipped unit tests as tests that
had failed, or rather tests that had not run.  This resulted in skipped
unit tests failing the travis build, which is not really what we wanted.

Fixes #296

Signed-off-by: Mark Ryan <[email protected]>
  • Loading branch information
Mark Ryan committed Jun 21, 2016
1 parent 6cc6aea commit cd02015
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test-cases/test-cases.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func init() {
flag.StringVar(&coverProfile, "coverprofile", "", "Path of coverage profile to be generated")
flag.BoolVar(&appendProfile, "append-profile", false, "Append generated coverage profiles an existing file")
flag.BoolVar(&colour, "colour", true, "If true failed tests are coloured red in text mode")
resultRegexp = regexp.MustCompile(`--- (FAIL|PASS): ([^\s]+) \(([^\)]+)\)`)
resultRegexp = regexp.MustCompile(`--- (FAIL|PASS|SKIP): ([^\s]+) \(([^\)]+)\)`)
coverageRegexp = regexp.MustCompile(`^coverage: ([^\s]+)`)
}

Expand Down Expand Up @@ -335,7 +335,7 @@ func runPackageTests(p *PackageTests, coverFile string, errorOutput *bytes.Buffe
exitCode = 1
} else {
t.Result = res.result
t.Pass = res.result == "PASS"
t.Pass = (res.result == "PASS" || res.result == "SKIP")
if !t.Pass {
exitCode = 1
}
Expand Down

0 comments on commit cd02015

Please sign in to comment.