mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime/pprof: ignore CPU profile test failures in QEMU
Fixes #9605 Change-Id: Iafafa4c1362bbd1940f8e4fb979f72feae3ec3ad Reviewed-on: https://go-review.googlesource.com/3000 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
5efcbba9ee
commit
dc72db90ea
1 changed files with 9 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"regexp"
|
"regexp"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
@ -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)
|
t.Skipf("ignoring failure on %s; see golang.org/issue/6047", runtime.GOOS)
|
||||||
return
|
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()
|
t.FailNow()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue