Skip to content

Commit

Permalink
runtime: clean up profiling data files produced by TestCgoPprof
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
0xmohit authored and bradfitz committed May 4, 2016
1 parent bfcb5b6 commit 4d6788e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/runtime/crash_cgo_test.go
Expand Up @@ -10,6 +10,7 @@ import (
"bytes"
"fmt"
"internal/testenv"
"os"
"os/exec"
"runtime"
"strings"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 4d6788e

Please sign in to comment.