Commit ffd33449 authored by Dave Cheney's avatar Dave Cheney

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/9528Reviewed-by: 's avatarRob Pike <r@golang.org>
Reviewed-by: 's avatarDave Cheney <dave@cheney.net>
parent bc1410a4
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment