diff options
| author | Bryan C. Mills <bcmills@google.com> | 2021-12-01 10:41:55 -0500 |
|---|---|---|
| committer | Bryan Mills <bcmills@google.com> | 2021-12-03 04:14:03 +0000 |
| commit | 4305ba78f05fd75ba1bc3be8457fcc2501da2c5e (patch) | |
| tree | 51361cdbd4915abc7c81395d2b07770ddf3aeaec | |
| parent | 39ade5b068b47ea1606fc580f217ecd0cf940f8b (diff) | |
| download | go-x-review-4305ba78f05fd75ba1bc3be8457fcc2501da2c5e.tar.xz | |
git-codereview: log stderr and stdout from successful commands
The reason for the failures in golang/go#49899 is not clear.
Perhaps the stderr output will shed some light on what is happening.
For golang/go#49899
Change-Id: I37c6339c8ebd4a37e4ff5b3b813572193903cee4
Reviewed-on: https://go-review.googlesource.com/c/review/+/368174
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
| -rw-r--r-- | git-codereview/util_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/git-codereview/util_test.go b/git-codereview/util_test.go index fd419a2..2d3bebe 100644 --- a/git-codereview/util_test.go +++ b/git-codereview/util_test.go @@ -324,6 +324,8 @@ func testMain(t *testing.T, args ...string) { mainCanDie = false // reset for next invocation defer func() { + t.Helper() + runLog = runLogTrap testStdout = stdoutTrap testStderr = stderrTrap @@ -344,6 +346,13 @@ func testMain(t *testing.T, args ...string) { } t.Fatalf("%s\nstdout:\n%sstderr:\n%s", msg, testStdout, testStderr) } + + if testStdout.Len() > 0 { + t.Logf("stdout:\n%s", testStdout) + } + if testStderr.Len() > 0 { + t.Logf("stderr:\n%s", testStderr) + } }() exitTrap = func() { |
