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

Commit

Permalink
test-cases: add passthrough for -race
Browse files Browse the repository at this point in the history
The -race option is useful and should pass through to the 'go test'
invocation if specified on the test-cases command line.

Signed-off-by: Tim Pepper <[email protected]>
  • Loading branch information
Tim Pepper committed Aug 5, 2016
1 parent 38c7228 commit e9e316b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test-cases/test-cases.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ var coverageRegexp *regexp.Regexp
var cssPath string
var textOutput bool
var short bool
var race bool
var tags string
var colour bool
var coverProfile string
Expand All @@ -153,6 +154,7 @@ func init() {
flag.StringVar(&cssPath, "css", "", "Full path to CSS file")
flag.BoolVar(&textOutput, "text", false, "Output text instead of HTML")
flag.BoolVar(&short, "short", false, "If true -short is passed to go test")
flag.BoolVar(&race, "race", false, "If true -race is passed to go test")
flag.StringVar(&tags, "tags", "", "Build tags to pass to go test")
flag.StringVar(&coverProfile, "coverprofile", "", "Path of coverage profile to be generated")
flag.BoolVar(&appendProfile, "append-profile", false, "Append generated coverage profiles an existing file")
Expand Down Expand Up @@ -382,6 +384,9 @@ func runPackageTests(p *PackageTests, coverFile string, errorOutput *bytes.Buffe
if short {
args = append(args, "-short")
}
if race {
args = append(args, "-race")
}
if tags != "" {
args = append(args, "-tags", tags)
}
Expand Down

0 comments on commit e9e316b

Please sign in to comment.