From ffd334493c69bb39bf12ec639f33f8718bff998b Mon Sep 17 00:00:00 2001 From: Dave Cheney Date: Fri, 1 May 2015 12:38:11 +1000 Subject: [PATCH] cmd/cover: fix build Fix the various builds which don't have a real filesystem or don't support forking. Change-Id: I3075c662fe6191ecbe70ba359b73d9a88bb06f35 Reviewed-on: https://go-review.googlesource.com/9528 Reviewed-by: Rob Pike Reviewed-by: Dave Cheney --- src/cmd/cover/cover_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/cmd/cover/cover_test.go b/src/cmd/cover/cover_test.go index 82c1ce5cbf..e5cfccf9df 100644 --- a/src/cmd/cover/cover_test.go +++ b/src/cmd/cover/cover_test.go @@ -11,6 +11,7 @@ import ( "os" "os/exec" "path/filepath" + "runtime" "testing" ) @@ -40,6 +41,15 @@ var debug = false // Keeps the rewritten files around if set. // go run ./testdata/main.go ./testdata/test.go // func TestCover(t *testing.T) { + switch runtime.GOOS { + case "nacl": + t.Skipf("skipping; %v/%v no support for forking", runtime.GOOS, runtime.GOARCH) + case "darwin", "android": + switch runtime.GOARCH { + case "arm", "arm64": + t.Skipf("skipping; %v/%v no support for forking", runtime.GOOS, runtime.GOARCH) + } + } // Read in the test file (testTest) and write it, with LINEs specified, to coverInput. file, err := ioutil.ReadFile(testTest) if err != nil { -- 2.48.1