mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 07:23:39 +00:00
test: show output even when a test binary didn't exit cleanly
This was a problem on wasm, where node would exit with a non-zero exit code when there was a panic.
This commit is contained in:
@@ -429,6 +429,9 @@ func runTestWithConfig(name string, t *testing.T, options compileopts.Options, c
|
|||||||
for _, line := range strings.Split(strings.TrimRight(w.String(), "\n"), "\n") {
|
for _, line := range strings.Split(strings.TrimRight(w.String(), "\n"), "\n") {
|
||||||
t.Log(line)
|
t.Log(line)
|
||||||
}
|
}
|
||||||
|
if stdout.Len() != 0 {
|
||||||
|
t.Logf("output:\n%s", stdout.String())
|
||||||
|
}
|
||||||
t.Fail()
|
t.Fail()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user