Skip to content

Commit

Permalink
runtime/pprof: ignore CPU profile test failures in QEMU
Browse files Browse the repository at this point in the history
Fixes #9605

Change-Id: Iafafa4c1362bbd1940f8e4fb979f72feae3ec3ad
Reviewed-on: https://go-review.googlesource.com/3000
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
rakyll committed Jan 20, 2015
1 parent 5efcbba commit dc72db9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/runtime/pprof/pprof_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"bytes"
"fmt"
"math/big"
"os"
"os/exec"
"regexp"
"runtime"
Expand Down Expand Up @@ -186,6 +187,14 @@ func testCPUProfile(t *testing.T, need []string, f func()) {
t.Skipf("ignoring failure on %s; see golang.org/issue/6047", runtime.GOOS)
return
}
// Ignore the failure if the tests are running in a QEMU-based emulator,
// QEMU is not perfect at emulating everything.
// IN_QEMU environmental variable is set by some of the Go builders.
// IN_QEMU=1 indicates that the tests are running in QEMU. See issue 9605.
if os.Getenv("IN_QEMU") == "1" {
t.Skip("ignore the failure in QEMU; see golang.org/issue/9605")
return
}
t.FailNow()
}
}
Expand Down

0 comments on commit dc72db9

Please sign in to comment.