Open bcmills opened 3 years ago
It looks like the playground looks only for "--- FAIL" in the output to determine the tests failed. https://cs.opensource.google/go/x/playground/+/master:sandbox.go;l=382
Since the test binary exited early, it wouldn't print "--- FAIL". We should probably use a non-zero exit code to indicate failure as well. I assume this is what the go command does?
Yes. (See previously #40132, which I fixed by adding cmd/internal/test2json.(*Converter).Exited
.)
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
main_test.go
in a local package.go test .
What did you expect to see?
I expected the Playground to produce roughly the same result as
go test .
, which reports the test as failing:What did you see instead?
The output from the Playground is:
CC @golang/release