Skip to content
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/go: don't mess up stdout when run go tests with "-json" #25651

Closed
KevinXing opened this issue May 31, 2018 · 5 comments
Closed

cmd/go: don't mess up stdout when run go tests with "-json" #25651

KevinXing opened this issue May 31, 2018 · 5 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@KevinXing
Copy link

Currently, we can get a machine readable output through go test -json which a side effect to mess up stdout.
So could we add an option to make the screen clean again?

@gopherbot gopherbot added this to the Proposal milestone May 31, 2018
@ianlancetaylor ianlancetaylor changed the title proposal: don't mess up stdout when run go tests with "-json" proposal: cmd/go: don't mess up stdout when run go tests with "-json" May 31, 2018
@ianlancetaylor
Copy link
Contributor

This doesn't seem to be a proposal, so dropping the proposal label.

Please tell us 1) what you did; 2) what happened; 3) what you wanted to happen instead.

@ianlancetaylor ianlancetaylor changed the title proposal: cmd/go: don't mess up stdout when run go tests with "-json" cmd/go: don't mess up stdout when run go tests with "-json" May 31, 2018
@ianlancetaylor ianlancetaylor added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed Proposal labels May 31, 2018
@ianlancetaylor ianlancetaylor modified the milestones: Proposal, Go1.11 May 31, 2018
@agnivade agnivade added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label May 31, 2018
@fterrag
Copy link

fterrag commented Jun 22, 2018

@KevinXing would you be able to provide more information around what you mean by "mess up stdout"? Thanks!

@KevinXing
Copy link
Author

KevinXing commented Jun 23, 2018

Sorry for the delay. When we run go test -json, it implicit run with -verbose, which will output too much detail info to my screen. My original idea is that when we run go test -json, the stdout will be same as go test and we can dump the -json result in a separate log file.
Since we have worked around this problem, it is fine to close the issue too.
Thanks.

@fterrag
Copy link

fterrag commented Jun 23, 2018

@KevinXing Ah, I think I understand now. You are looking for the -json flag (without -verbose) to display a JSON formatted summary of test results instead of full output. I believe the current behavior is the intended functionality as the output produced by -json is supposed to be used for automated processing.

@ianlancetaylor Should this issue be closed given the information gathered?

@ianlancetaylor
Copy link
Contributor

Closing, thanks.

@golang golang locked and limited conversation to collaborators Jun 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants