From 4c95febeee0babe066eae5e9ccb0410061635b1e Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Wed, 2 Jun 2021 12:44:02 +0200 Subject: [PATCH] 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). --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index c56c0752..e6fc92c1 100644 --- a/main.go +++ b/main.go @@ -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.