mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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 <bradfitz@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
047f07a285
commit
7bc3e58806
21 changed files with 163 additions and 233 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue