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>
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 @@
 	mainCanDie = false // reset for next invocation
 
 	defer func() {
+		t.Helper()
+
 		runLog = runLogTrap
 		testStdout = stdoutTrap
 		testStderr = stderrTrap
@@ -344,6 +346,13 @@
 			}
 			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() {