Skip to content

Commit 6f462fb

Browse files
dsheminaykevl
authored andcommitted
fix: remove message after test binary built
1 parent ac39670 commit 6f462fb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,11 @@ func Test(pkgName string, stdout, stderr io.Writer, options *compileopts.Options
347347
}
348348
return err
349349
})
350+
351+
if testConfig.CompileOnly {
352+
return true, nil
353+
}
354+
350355
importPath := strings.TrimSuffix(result.ImportPath, ".test")
351356

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

0 commit comments

Comments
 (0)