mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: print output on failure in TestMemPprof
If running testprog fails, print the output. For #60901. Change-Id: Iee80fb09412ce13bae6ac3589779a8cdf7761765 Reviewed-on: https://go-review.googlesource.com/c/go/+/507978 Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
449ef3795d
commit
e6ec2a34dc
1 changed files with 1 additions and 1 deletions
|
|
@ -534,7 +534,7 @@ func TestMemPprof(t *testing.T) {
|
|||
|
||||
got, err := testenv.CleanCmdEnv(exec.Command(exe, "MemProf")).CombinedOutput()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
t.Fatalf("testprog failed: %s, output:\n%s", err, got)
|
||||
}
|
||||
fn := strings.TrimSpace(string(got))
|
||||
defer os.Remove(fn)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue