mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-19 20:14:04 +00:00
fix: remove message after test binary built
This commit is contained in:
@@ -347,6 +347,11 @@ func Test(pkgName string, stdout, stderr io.Writer, options *compileopts.Options
|
|||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if testConfig.CompileOnly {
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
|
||||||
importPath := strings.TrimSuffix(result.ImportPath, ".test")
|
importPath := strings.TrimSuffix(result.ImportPath, ".test")
|
||||||
|
|
||||||
var w io.Writer = stdout
|
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)
|
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 && !testConfig.CompileOnly {
|
} else if passed {
|
||||||
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())
|
||||||
|
|||||||
Reference in New Issue
Block a user