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

Comments

Projects
None yet
5 participants
@KevinXing
Copy link

commented May 31, 2018

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

@gopherbot gopherbot added the Proposal label 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

This comment has been minimized.

Copy link
Contributor

commented May 31, 2018

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 modified the milestones: Proposal, Go1.11 May 31, 2018

@fterrag

This comment has been minimized.

Copy link

commented Jun 22, 2018

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

@KevinXing

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Jun 25, 2018

Closing, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.