From 8b9bee4cad5693105c1ee268ea29e5d3f8cb5408 Mon Sep 17 00:00:00 2001 From: Damian Gryski Date: Sat, 15 Apr 2023 11:33:41 -0700 Subject: [PATCH] main: don't print `ok` for a successful compile-only --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 53e8dca6..7a474f16 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())