diff options
| author | David Crawshaw <crawshaw@golang.org> | 2015-04-11 19:23:05 -0400 |
|---|---|---|
| committer | David Crawshaw <crawshaw@golang.org> | 2015-04-13 11:53:09 +0000 |
| commit | 5ad83082c02160905f1184df777e2b32c0a75698 (patch) | |
| tree | 536788c028d699ebc9ba66d287ebd13e5e7e1da1 /src/os/exec | |
| parent | 8c5f66bce4bc95eb6ab1506c37446d18e51e683f (diff) | |
| download | go-5ad83082c02160905f1184df777e2b32c0a75698.tar.xz | |
os/exec: skip fork test on darwin/arm64
Just like darwin/arm.
Change-Id: Ia8c912e91259a5073aa3ab2b6509a18aa9a1fce7
Reviewed-on: https://go-review.googlesource.com/8818
Reviewed-by: Minux Ma <minux@golang.org>
Diffstat (limited to 'src/os/exec')
| -rw-r--r-- | src/os/exec/exec_test.go | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go index d3dec57992..db84eabf26 100644 --- a/src/os/exec/exec_test.go +++ b/src/os/exec/exec_test.go @@ -27,10 +27,12 @@ import ( "time" ) +// iOS cannot fork +var iOS = runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") + func helperCommand(t *testing.T, s ...string) *exec.Cmd { - if runtime.GOOS == "nacl" || (runtime.GOOS == "darwin" && runtime.GOARCH == "arm") { - // iOS cannot fork - t.Skipf("skipping on %s/%s", runtime.GOOS, runtime.GOARCH) + if runtime.GOOS == "nacl" || iOS { + t.Skipf("skipping on %s/%s, cannot fork", runtime.GOOS, runtime.GOARCH) } cs := []string{"-test.run=TestHelperProcess", "--"} cs = append(cs, s...) @@ -50,8 +52,8 @@ func TestEcho(t *testing.T) { } func TestCommandRelativeName(t *testing.T) { - if runtime.GOOS == "darwin" && runtime.GOARCH == "arm" { - t.Skip("skipping on darwin/arm") + if iOS { + t.Skip("skipping on darwin/%s, cannot fork", runtime.GOARCH) } // Run our own binary as a relative path @@ -428,10 +430,9 @@ func TestExtraFiles(t *testing.T) { switch runtime.GOOS { case "nacl", "windows": t.Skipf("skipping test on %q", runtime.GOOS) - case "darwin": - if runtime.GOARCH == "arm" { - t.Skipf("skipping test on %s/%s", runtime.GOOS, runtime.GOARCH) - } + } + if iOS { + t.Skipf("skipping test on %s/%s, cannot fork", runtime.GOOS, runtime.GOARCH) } // Ensure that file descriptors have not already been leaked into |
