-
Notifications
You must be signed in to change notification settings - Fork 18k
"go test -v" and compile test binary outputs are inconsistent for post-completion panics #58979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Duplicate of #23258 |
@seankhliao I don't think this is the duplicate of #23258.
does not behave the same as manually compile the test binary and run test.
The problem is compiled binary doesn't output test summary line, nor does it respect |
The docs say
The summary line is a property of It also says
|
regardless of what mode
I'd understand if it's by design that "they are supposed to behave differently". But shouldn't these inconsistencies be addressed eventually? |
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?
run test that panics post completion
git clone -b testxml-logaftercompletion [email protected]:xytan0056/test.git
go test . -v -count=5
go test -c ./
then./my_module.test -test.v -test.count=5
What did you expect to see?
output of
go test ...
and./compiled_test ...
should be consistentWhat did you see instead?
output of
go test . -v -count=5
output of
go test -c ./
then./my_module.test -test.v -test.count=5
note that
go test
outputsFAIL ...
at the end after the test completes, while executing the test binary doesn't. And their exit codes are different.bazelbuild/rule_go
relies on parsing the output of test binaries to generate junit.xml, which becomes inaccurate if theFAIL
line is missing bazel-contrib/rules_go#3476.On another note, although
go test -json
also contains the correct eventshowever
-test.json
is not recognized in generated test binaryso this statement is not really accurate
The text was updated successfully, but these errors were encountered: