mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 02:27:48 +00:00
main: don't consider compile-only tests as failing
Previously a command like the following would incorrectly print FAIL:
tinygo test -c math
This commit fixes this issue by defaulting to a passing test (the test
is marked as passed if it isn't run).
This commit is contained in:
committed by
Ron Evans
parent
793a3175d3
commit
4c95febeee
@@ -145,7 +145,7 @@ func Test(pkgName string, options *compileopts.Options, testCompileOnly bool, ou
|
||||
return false, err
|
||||
}
|
||||
|
||||
var passed bool
|
||||
passed := true
|
||||
err = builder.Build(pkgName, outpath, config, func(result builder.BuildResult) error {
|
||||
if testCompileOnly || outpath != "" {
|
||||
// Write test binary to the specified file name.
|
||||
|
||||
Reference in New Issue
Block a user