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:
Ayke van Laethem
2024-10-30 09:50:57 +01:00
committed by Ayke
parent 1ac26d3d2f
commit 4b706ae25c
+3
View File
@@ -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") {
t.Log(line)
}
if stdout.Len() != 0 {
t.Logf("output:\n%s", stdout.String())
}
t.Fail()
return
}