Skip to content

Commit

Permalink
fix: remove message after test binary built
Browse files Browse the repository at this point in the history
  • Loading branch information
dshemin authored and aykevl committed Jul 9, 2024
1 parent ac39670 commit 6f462fb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,11 @@ func Test(pkgName string, stdout, stderr io.Writer, options *compileopts.Options
}
return err
})

if testConfig.CompileOnly {
return true, nil
}

importPath := strings.TrimSuffix(result.ImportPath, ".test")

var w io.Writer = stdout
Expand All @@ -357,7 +362,7 @@ func Test(pkgName string, stdout, stderr io.Writer, options *compileopts.Options
fmt.Fprintf(w, "? \t%s\t[no test files]\n", err.ImportPath)
// Pretend the test passed - it at least didn't fail.
return true, nil
} else if passed && !testConfig.CompileOnly {
} else if passed {
fmt.Fprintf(w, "ok \t%s\t%.3fs\n", importPath, duration.Seconds())
} else {
fmt.Fprintf(w, "FAIL\t%s\t%.3fs\n", importPath, duration.Seconds())
Expand Down

0 comments on commit 6f462fb

Please sign in to comment.