Skip to content

Commit

Permalink
test flags should be specified before package name
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Nov 2, 2015
1 parent e5049dd commit 5f033f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gocov/test.go
Expand Up @@ -78,7 +78,8 @@ func runTests(args []string) error {
// later merged into a single file.
for i, pkg := range pkgs {
coverFile := filepath.Join(tmpDir, fmt.Sprintf("test%d.cov", i))
cmdArgs := append([]string{"test", "-coverprofile", coverFile, pkg}, testFlags...)
cmdArgs := append([]string{"test", "-coverprofile", coverFile}, testFlags...)
cmdArgs = append(cmdArgs, pkg)
cmd := exec.Command("go", cmdArgs...)
cmd.Stdin = nil
// Write all test command output to stderr so as not to interfere with
Expand Down

0 comments on commit 5f033f7

Please sign in to comment.