1
0
mirror of https://github.com/golang/go synced 2024-11-24 03:40:16 -07:00

runtime: clean up profiling data files produced by TestCgoPprof

Fixes #15541

Change-Id: I9b6835157db0eb86de13591e785f971ffe754baa
Reviewed-on: https://go-review.googlesource.com/22783
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Mohit Agarwal 2016-05-05 00:04:54 +05:30 committed by Brad Fitzpatrick
parent bfcb5b6406
commit 4d6788ecae

View File

@ -10,6 +10,7 @@ import (
"bytes"
"fmt"
"internal/testenv"
"os"
"os/exec"
"runtime"
"strings"
@ -250,6 +251,7 @@ func TestCgoPprof(t *testing.T) {
t.Fatal(err)
}
fn := strings.TrimSpace(string(got))
defer os.Remove(fn)
top, err := exec.Command("go", "tool", "pprof", "-top", "-nodecount=1", exe, fn).CombinedOutput()
if err != nil {