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).
Этот коммит содержится в:
родитель
793a3175d3
коммит
4c95febeee
1 изменённых файлов: 1 добавлений и 1 удалений
2
main.go
2
main.go
|
@ -145,7 +145,7 @@ func Test(pkgName string, options *compileopts.Options, testCompileOnly bool, ou
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
|
||||||
var passed bool
|
passed := true
|
||||||
err = builder.Build(pkgName, outpath, config, func(result builder.BuildResult) error {
|
err = builder.Build(pkgName, outpath, config, func(result builder.BuildResult) error {
|
||||||
if testCompileOnly || outpath != "" {
|
if testCompileOnly || outpath != "" {
|
||||||
// Write test binary to the specified file name.
|
// Write test binary to the specified file name.
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче