Open jwilner opened 5 years ago
When a package uses a TestMain that exits with an error before running tests, go2xunit suppresses the error.
~/code/sample ➭ cat sample_test.go package main import ( "os" "testing" ) func TestMain(t *testing.M) { os.Exit(1) } ~/code/sample ➭ go test -v ./... exit status 1 FAIL _/Users/jwilner/code/sample 0.005s ~/code/sample ➭ go test -v ./... | go2xunit -fail <?xml version="1.0" encoding="UTF-8"?> <testsuite name="_/Users/jwilner/code/sample" tests="0" errors="0" failures="0" skip="0"> </testsuite> ~/code/sample ➭ echo $? 0
Thanks for reporting. I'll have a look this weekend.
When a package uses a TestMain that exits with an error before running tests, go2xunit suppresses the error.