]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/cover: fix build
authorDave Cheney <dave@cheney.net>
Fri, 1 May 2015 02:38:11 +0000 (12:38 +1000)
committerDave Cheney <dave@cheney.net>
Fri, 1 May 2015 03:32:37 +0000 (03:32 +0000)
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 <r@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
src/cmd/cover/cover_test.go

index 82c1ce5cbff0be0a14b973a6148442f4a0c13726..e5cfccf9df980d71e2116346b7f63519f7e233be 100644 (file)
@@ -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 {