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>
"os"
"os/exec"
"path/filepath"
+ "runtime"
"testing"
)
// 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 {