summaryrefslogtreecommitdiff
path: root/libgo/go/internal/testenv/testenv.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/internal/testenv/testenv.go')
-rw-r--r--libgo/go/internal/testenv/testenv.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/libgo/go/internal/testenv/testenv.go b/libgo/go/internal/testenv/testenv.go
index 8d416384022..999080bcc52 100644
--- a/libgo/go/internal/testenv/testenv.go
+++ b/libgo/go/internal/testenv/testenv.go
@@ -128,6 +128,22 @@ func HasExec() bool {
return true
}
+// HasSrc reports whether the entire source tree is available under GOROOT.
+func HasSrc() bool {
+ switch runtime.GOOS {
+ case "nacl":
+ return false
+ case "darwin":
+ if strings.HasPrefix(runtime.GOARCH, "arm") {
+ return false
+ }
+ }
+ if runtime.Compiler == "gccgo" {
+ return false
+ }
+ return true
+}
+
// MustHaveExec checks that the current system can start new processes
// using os.StartProcess or (more commonly) exec.Command.
// If not, MustHaveExec calls t.Skip with an explanation.