-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
cmd/test2json: tests that panic are marked as passing #40132
Comments
CC @eliben @mvdan (by way of #31969) Perhaps Since test functions that call |
This issue sounds related to #38382
I had to write that logic in |
@gopherbot, please backport to Go 1.15. This seems like a significant regression. |
Backport issue(s) opened: #40805 (for 1.15). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Change https://golang.org/cl/248624 mentions this issue: |
Change https://golang.org/cl/248725 mentions this issue: |
…the result is not known If we are parsing a test output, and the test does not end in the usual PASS or FAIL line (say, because it panicked), then we need the exit status of the test binary in order to determine whether the test passed or failed. If we don't have that status available, we shouldn't guess arbitrarily — instead, we should omit the final "pass" or "fail" action entirely. (In practice, we nearly always DO have the final status, such as when running 'go test' or 'go tool test2json some.exe'.) Updates #40132 Fixes #40805 Change-Id: Iae482577361a6033395fe4a05d746b980e18c3de Reviewed-on: https://go-review.googlesource.com/c/go/+/248624 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> (cherry picked from commit 1b86bdb) Reviewed-on: https://go-review.googlesource.com/c/go/+/248725
…the result is not known If we are parsing a test output, and the test does not end in the usual PASS or FAIL line (say, because it panicked), then we need the exit status of the test binary in order to determine whether the test passed or failed. If we don't have that status available, we shouldn't guess arbitrarily — instead, we should omit the final "pass" or "fail" action entirely. (In practice, we nearly always DO have the final status, such as when running 'go test' or 'go tool test2json some.exe'.) Updates golang#40132 Fixes golang#40805 Change-Id: Iae482577361a6033395fe4a05d746b980e18c3de Reviewed-on: https://go-review.googlesource.com/c/go/+/248624 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> (cherry picked from commit 1b86bdb) Reviewed-on: https://go-review.googlesource.com/c/go/+/248725
There have been some updates to test2json.go since d47526ed777958aa4a2542382e931eb7b3c4c6a9, most notably a fix for golang/go#40132 that was important enough to recevie a backport. Update rules_go's copy of test2json.go to the latest.
There have been some updates to test2json.go since d47526ed777958aa4a2542382e931eb7b3c4c6a9, most notably a fix for golang/go#40132 that was important enough to recevie a backport. Update rules_go's copy of test2json.go to the latest.
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?
go test -c
run it with
test2json
toolget the output like that
What did you expect to see?
The last event will be
fail
What did you see instead?
The last event is
pass
The text was updated successfully, but these errors were encountered: