-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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: test: -bench
never buffers output
#13194
Comments
-bench
never buffers output-bench
never buffers output
Why should it be removed? |
In our case, the stuff under test likes to log more verbosely than is useful for passing tests and benchmarks. For the same reason that we like having these logs elided when the tests are passing, we also want the logs elided when the benchmarks pass. |
But benchmarks neither pass nor fail. Having the go tool stream output when benchmarking seems clearly useful. And as far as I can tell, simply deleting testBench from the conditional means that benchmarking output will not be shown by default, which seems clearly not useful. If we had a way for the go tool to distinguish test and bench output, perhaps we could do something; that leads us toward issues #2981 and #12826. I'm going to close this issue in favor of those, but feel free to reopen if you think I have misunderstood. |
Benchmarks can fail just like tests; https://godoc.org/testing#B.Error
Ah, yes, that's indeed the result. |
From
src/cmd/go/test.go
:I think the
testBench
exemption should be removed, but I thought I'd file an issue before submitting the change.The text was updated successfully, but these errors were encountered: