func testCPUProfile(t *testing.T, need []string, f func()) {
switch runtime.GOOS {
case "darwin":
- if runtime.GOARCH != "arm" {
+ switch runtime.GOARCH {
+ case "arm", "arm64":
+ // nothing
+ default:
out, err := exec.Command("uname", "-a").CombinedOutput()
if err != nil {
t.Fatal(err)
// Ensure that we do not do this.
func TestCPUProfileWithFork(t *testing.T) {
if runtime.GOOS == "darwin" {
- if runtime.GOARCH == "arm" {
- t.Skipf("skipping on darwin/arm")
+ switch runtime.GOARCH {
+ case "arm", "arm64":
+ t.Skipf("skipping on %s/%s, cannot fork", runtime.GOOS, runtime.GOARCH)
}
}
switch runtime.GOOS {
case "solaris":
t.Skip("skipping: solaris timer can go backwards (http://golang.org/issue/8976)")
+ case "darwin":
+ switch runtime.GOARCH {
+ case "arm", "arm64":
+ t.Skipf("skipping on %s/%s, cannot fork", runtime.GOOS, runtime.GOARCH)
+ }
}
switch runtime.GOARCH {