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: add flag to show only test names, not other -test.v output #21926
Comments
Can you pipe the output through grep to filter out the lines you're not interested in?
… On 19 Sep 2017, at 06:37, Nate Finch ***@***.***> wrote:
I want to be able to show individual tests being run without printing out t.Log messages unless a test fails. There's currently no way to do that AFAICT.
I use t.Log a lot to write debugging info to make it easier to figure out why tests fail, including dumping server log messages into t.Log. Printing this out for passing tests makes the output far too noisy. However, I really value being able to see the list of all individual tests that are run and their execution times. This can make it easier to look back at old test runs and see if a test has gotten slower over time, etc.
Adding a new flag that'll work like -v for the purposes of showing what tests are run would be super awesome IMO.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I don't think that (grep) is really possible. I still want to see log output when a test fails. That's the great thing about t.Log. I don't think there's any way to grep such that I still get log output. Note that I am mainly thinking of using this on a CI server. Locally, I may be able to come up with a grep call that would strip all logging... But I'd have to rerun tests to get log output once I notice some failing. And that's not really an option on a CI server. |
I'm not completely opposed but it does sound a lot like featuritis to me. Grep is your friend. Let other tools do some of the lifting. |
I'd be happy to grep if there's some way to distinguish between log
messages written during a failing test and those written during a passing
test. I just don't think there's any way to do that. I'd be happy to be
proven wrong.
…On Tue, Sep 19, 2017, 2:31 AM Rob Pike ***@***.***> wrote:
I'm not completely opposed but it does sound a lot like featuritis to me.
Grep is your friend. Let other tools do some of the lifting.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#21926 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADCcyLxbGFLQDW2vNffDZKExPAqaQFicks5sj1_WgaJpZM4Pbfhq>
.
|
How about this?
|
Or this
|
The former requires me to run my tests twice and still forces me to wade through masses of logs to find log output for the failing tests. The second mostly works (if I then run go test without -v), it at least gives me the list of tests that'll run, but doesn't give me execution times of individual tests. I just wish the two features were separated - the "always show logging" and "show individual tests being run". |
Once we do machine-readable test output you can split this as many different ways as you want. Let's plan for that instead of adding more control knobs here. |
I want to be able to show individual tests being run without printing out t.Log messages unless a test fails. There's currently no way to do that AFAICT.
I use t.Log a lot to write debugging info to make it easier to figure out why tests fail, including dumping server log messages into t.Log. Printing this out for passing tests makes the output far too noisy. However, I really value being able to see the list of all individual tests that are run and their execution times. This can make it easier to look back at old test runs and see if a test has gotten slower over time, etc.
Adding a new flag that'll work like -v for the purposes of showing what tests are run would be super awesome IMO.
The text was updated successfully, but these errors were encountered: