main: don't print ok for a successful compile-only

Этот коммит содержится в:
Damian Gryski 2023-04-15 11:33:41 -07:00 коммит произвёл Ayke
родитель b4c9b579b8
коммит 8b9bee4cad

Просмотреть файл

@ -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) fmt.Fprintf(w, "? \t%s\t[no test files]\n", err.ImportPath)
// Pretend the test passed - it at least didn't fail. // Pretend the test passed - it at least didn't fail.
return true, nil return true, nil
} else if passed { } else if passed && !testConfig.CompileOnly {
fmt.Fprintf(w, "ok \t%s\t%.3fs\n", importPath, duration.Seconds()) fmt.Fprintf(w, "ok \t%s\t%.3fs\n", importPath, duration.Seconds())
} else { } else {
fmt.Fprintf(w, "FAIL\t%s\t%.3fs\n", importPath, duration.Seconds()) fmt.Fprintf(w, "FAIL\t%s\t%.3fs\n", importPath, duration.Seconds())