-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: attribute output to the correct test #34419
Conversation
This PR (HEAD: 271d398) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/196617 to see it. Tip: You can toggle comments from me using the |
Message from Bryan C. Mills: Patch Set 1: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Bryan C. Mills: Patch Set 1: Run-TryBot+1 (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Gobot Gobot: Patch Set 1: TryBots beginning. Status page: https://farmer.golang.org/try?commit=f79bbdd6 Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Gobot Gobot: Patch Set 1: TryBot-Result+1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
271d398
to
d29e9e4
Compare
This PR (HEAD: d29e9e4) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/196617 to see it. Tip: You can toggle comments from me using the |
Message from Daniel Nephin: Patch Set 4: (5 comments) I believe I have addressed all the review comments. Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
53bd915
to
6139019
Compare
4a7ed1f
to
0f992b9
Compare
Hi, anything I can do to help move this along? Is there anything you need from me? |
Message from Ian Lance Taylor: Patch Set 4: Is this still needed now that https://golang.org/cl/127120 has been submitted? Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Daniel Nephin: Patch Set 4:
I believe so, yes.
with the patch applied the tests pass. I don't think https://golang.org/cl/127120 addresses the problem. Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Daniel Nephin: Patch Set 4: Hello, This bug is still present in go1.14.1. I would really like to get this fixed as having test output hidden is causing lots of problems. How can I help move this along? Thank you! Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Bryan C. Mills: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
The behaviour of 'go test' on go1.13 is to use 4 spaces for this output. The indentation character is significant because test2json uses it to determine which test produced the output.
d29e9e4
to
feafbf6
Compare
This PR (HEAD: feafbf6) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/196617 to see it. Tip: You can toggle comments from me using the |
If a test prints output after a subtest has started it was being attributed to the last subtest. This change uses the identation level of the output to determine which test the output comes from.
feafbf6
to
03b1b73
Compare
This PR (HEAD: 03b1b73) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/196617 to see it. Tip: You can toggle comments from me using the |
Message from Daniel Nephin: Patch Set 6: (1 comment) Patchset 6 should address the last issue. Thank you! Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Daniel Nephin: Patch Set 6: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
This PR (HEAD: 898827f) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/196617 to see it. Tip: You can toggle comments from me using the |
Message from Daniel Nephin: Patch Set 7: Checking in again to see if I can help move this along. I added a much longer comment to explain why the second condition is necessary. This continues to be a major problem for anyone using test2json with sub tests. Output is attributed to the wrong test, making it very difficult to debug failures. Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Bryan C. Mills: Patch Set 8: Patch Set 7 was rebased Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Bryan C. Mills: Patch Set 8: Run-TryBot+1 Code-Review+2 (1 comment) Sorry for the delay; I've had a bit of trouble keeping pace with code reviews since April. This change overall looks good to me, although I'm not sure whether it should go in during the code freeze. Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Gobot Gobot: Patch Set 8: TryBots beginning. Status page: https://farmer.golang.org/try?commit=99b7928c Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Gobot Gobot: Patch Set 8: Build is still in progress... Other builds still in progress; subsequent failure notices suppressed until final report. Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test exactly your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed. Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Gobot Gobot: Patch Set 8: TryBot-Result-1 1 of 20 TryBots failed: Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test exactly your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed. Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Bryan C. Mills: Patch Set 9: Patch Set 8 was rebased Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Bryan C. Mills: Patch Set 9: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Gobot Gobot: Patch Set 9: TryBots beginning. Status page: https://farmer.golang.org/try?commit=4eed6fa0 Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Gobot Gobot: Patch Set 9: TryBot-Result+1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Dmitri Shuralyov: Patch Set 9: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Bryan C. Mills: Patch Set 10: Commit message was updated. Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
When printing regular test output check the indentation of the output, and use the report stack to find the appropriate test name for that output. This change includes a whitespace change to some golden test files. The indentation of tests was changed in CL 113177 from tabs to spaces. The golden files have been updated to match the new output format. The tabs in the golden files cause problems because the indentation check looks for 4 spaces. Fixes #29755 Updates #25369 Change-Id: Iebab51816a9755168083a7a665b41497e9dfd85f GitHub-Last-Rev: 898827f GitHub-Pull-Request: #34419 Reviewed-on: https://go-review.googlesource.com/c/go/+/196617 Reviewed-by: Bryan C. Mills <bcmills@google.com>
Message from Bryan C. Mills: Patch Set 12: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
Message from Bryan C. Mills: Patch Set 12: This is a bug-fix and doesn't affect anything outside of cmd/test2json, so ok for 1.15. Merging based on TryBot +1 from PS9. (Only change since then is to the commit messsage). Please don’t reply on this GitHub thread. Visit golang.org/cl/196617. |
This PR is being closed because golang.org/cl/196617 has been merged. |
When printing regular test output check the indentation of the output, and use
the report stack to find the appropriate test name for that output.
This change includes a whitespace change to some golden test files. The
indentation of tests was changed in CL 113177
from tabs to spaces. The golden files have been updated to match the new
output format. The tabs in the golden files cause problems because the indentation check
looks for 4 spaces.
Fixes #29755
Updates #25369