Skip to content
This repository has been archived by the owner on Nov 20, 2019. It is now read-only.

Fix issue with tests ending with Fatal (without summary) #42

Merged
merged 1 commit into from
Nov 23, 2016
Merged

Fix issue with tests ending with Fatal (without summary) #42

merged 1 commit into from
Nov 23, 2016

Conversation

tamird
Copy link

@tamird tamird commented Nov 16, 2016

This can trigger when tests terminate with log.Fatal or os.Exit.

This is an issue report in the form of a PR - currently this kind of failure results in nothing reported from go2xunit :(

@tebeka cc @jordanlewis @RaduBerinde (ccing because maybe we want to change our log.Fatal to panic at the end instead of os.Exit'ing).

@tebeka
Copy link
Owner

tebeka commented Nov 17, 2016

Thanks! Seems like you forgot to add the test file (this is why tests on travis fail) - can you add it?

@tamird
Copy link
Author

tamird commented Nov 17, 2016

Sure, I can add them, but I'd be guessing as to what they should look like - the bug here is that the result of parsing this input is actually empty.

@tebeka
Copy link
Owner

tebeka commented Nov 18, 2016

I don't understand. The test log says:

regression_test.go:47: can't read data/out/xunit/gotest-fatal-nosummary.out.xml - open data/out/xunit/gotest-fatal-nosummary.out.xml

You'll need to add this file (and same in data/out/xunit.net)

If it's an empty file, add an empty file.

Test binaries compiled with `go test -c` that encounter os.Exit or Fatal
crash without a package summary. Previously, this caused the tests to
not get reported properly. This commit fixes the issue.
@tamird tamird changed the title test: add gotest-fatal-nosummary Fix issue with tests ending with Fatal (without summary) Nov 22, 2016
@tamird
Copy link
Author

tamird commented Nov 22, 2016

@tebeka updated courtesy of @jordanlewis

@tebeka tebeka merged commit 3700482 into tebeka:master Nov 23, 2016
@tebeka
Copy link
Owner

tebeka commented Nov 23, 2016

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants