1
0
mirror of https://github.com/golang/go synced 2024-11-23 17:50:06 -07:00

runtime: skip tests that need fork on darwin/arm

Change-Id: I1bb0b8b11e8c7686b85657050fd7cf926afe4d29
Reviewed-on: https://go-review.googlesource.com/6200
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
David Crawshaw 2015-02-26 18:05:47 -05:00
parent e7a7352e52
commit 95bf77bc68
2 changed files with 15 additions and 9 deletions

View File

@ -57,15 +57,17 @@ func TestCgoExternalThreadSIGPROF(t *testing.T) {
case "plan9", "windows":
t.Skipf("no pthreads on %s", runtime.GOOS)
case "darwin":
// static constructor needs external linking, but we don't support
// external linking on OS X 10.6.
out, err := exec.Command("uname", "-r").Output()
if err != nil {
t.Fatalf("uname -r failed: %v", err)
}
// OS X 10.6 == Darwin 10.x
if strings.HasPrefix(string(out), "10.") {
t.Skipf("no external linking on OS X 10.6")
if runtime.GOARCH != "arm" {
// static constructor needs external linking, but we don't support
// external linking on OS X 10.6.
out, err := exec.Command("uname", "-r").Output()
if err != nil {
t.Fatalf("uname -r failed: %v", err)
}
// OS X 10.6 == Darwin 10.x
if strings.HasPrefix(string(out), "10.") {
t.Skipf("no external linking on OS X 10.6")
}
}
}
if runtime.GOARCH == "ppc64" || runtime.GOARCH == "ppc64le" {

View File

@ -41,6 +41,10 @@ func executeTest(t *testing.T, templ string, data interface{}, extra ...string)
switch runtime.GOOS {
case "android", "nacl":
t.Skipf("skipping on %s", runtime.GOOS)
case "darwin":
if runtime.GOARCH == "arm" {
t.Skipf("skipping on %s/%s", runtime.GOOS, runtime.GOARCH)
}
}
checkStaleRuntime(t)