From 7bc3e5880675ce4aae245f46d193924cff5efdfb Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 5 Jun 2015 11:01:53 -0400 Subject: all: extract "can I exec?" check from tests into internal/testenv Change-Id: I7b54be9d8b50b39e01c6be21f310ae9a10404e9d Reviewed-on: https://go-review.googlesource.com/10753 Reviewed-by: Brad Fitzpatrick Reviewed-by: David Crawshaw Reviewed-by: Ian Lance Taylor --- src/syscall/exec_unix_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/syscall/exec_unix_test.go') diff --git a/src/syscall/exec_unix_test.go b/src/syscall/exec_unix_test.go index ff8261111e..9bb95c0f39 100644 --- a/src/syscall/exec_unix_test.go +++ b/src/syscall/exec_unix_test.go @@ -7,11 +7,11 @@ package syscall_test import ( + "internal/testenv" "io" "os" "os/exec" "os/signal" - "runtime" "syscall" "testing" "unsafe" @@ -48,9 +48,8 @@ func (c *command) Stop() { } func create(t *testing.T) *command { - if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") { - t.Skipf("skipping on %s/%s, cannot fork", runtime.GOOS, runtime.GOARCH) - } + testenv.MustHaveExec(t) + proc := exec.Command("cat") stdin, err := proc.StdinPipe() if err != nil { -- cgit v1.3-6-g1900