Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
testing: output failure report to stderr as per docu instead of stdout #16138
Please answer these questions before submitting your issue. Thanks!
Run a simple test case that fails, outputting a t.Fatal(err).
https://golang.org/pkg/testing/#T indicates that testing logs are accumulated and output to stderr so I expect the t.Fatal() output report to be on stderr.
The report output is on stdout.
It seems like something as trivial as tpepper@c60fccd (which is on top of tip's changes to allow subtests) could bring the report output in line with the documentation. But as noted in that tentative commit message, this might break users who have coded to the behavior without reporting the inconsistency. Perhaps the answer is to change the documentation, except the enabling the distinction between stdout and stderr is actually useful.
./all.bash fails with my above referenced "fix", highlighting existing test cases are indeed coded to expect other than the documented behavior: