aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
authorDamian Gryski <[email protected]>2023-04-15 11:33:41 -0700
committerAyke <[email protected]>2023-04-16 03:38:33 +0200
commit8b9bee4cad5693105c1ee268ea29e5d3f8cb5408 (patch)
treec12cba6a8d50cc8cbe7079f7e622d292b357aef3 /main.go
parentb4c9b579b8af43c02c12f067eec1968b72bbbd27 (diff)
downloadtinygo-8b9bee4cad5693105c1ee268ea29e5d3f8cb5408.tar.gz
tinygo-8b9bee4cad5693105c1ee268ea29e5d3f8cb5408.zip
main: don't print `ok` for a successful compile-only
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.go b/main.go
index 53e8dca6b..7a474f169 100644
--- a/main.go
+++ b/main.go
@@ -348,7 +348,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 {
+ } else if passed && !testConfig.CompileOnly {
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())