aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDmitry Shemin <[email protected]>2024-07-09 08:53:50 +0700
committerAyke <[email protected]>2024-07-09 18:57:05 +0200
commit6f462fba4c4125f164aef634ab5b1bb8c6f88342 (patch)
treeded218e48f7a5543c089481619b45f8bce740432
parentac396708da17271ec48bffefb57d1185dd8cadb1 (diff)
downloadtinygo-6f462fba4c4125f164aef634ab5b1bb8c6f88342.tar.gz
tinygo-6f462fba4c4125f164aef634ab5b1bb8c6f88342.zip
fix: remove message after test binary built
-rw-r--r--main.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.go b/main.go
index cd2e43ace..4a23fa8cf 100644
--- a/main.go
+++ b/main.go
@@ -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
@@ -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())