diff options
| author | Elias Naur <elias.naur@gmail.com> | 2017-03-08 22:54:52 +0100 |
|---|---|---|
| committer | Elias Naur <elias.naur@gmail.com> | 2017-03-08 22:31:00 +0000 |
| commit | 3a1271dad7617a9766d21987b2c3cc0e683d2010 (patch) | |
| tree | 81b48ba64d16ae2c4142d3a7c830178394d8d35b /src/internal/testenv | |
| parent | 23be728950be7973a4c4852449e1987c64dc2739 (diff) | |
| download | go-3a1271dad7617a9766d21987b2c3cc0e683d2010.tar.xz | |
go/internal/srcimporter: skip tests on iOS
The iOS test harness only includes the current test directory in its
app bundles, but the tests need access to all source code.
Change-Id: I8a902b183bc2745b4fbfffef867002d573abb1f5
Reviewed-on: https://go-review.googlesource.com/37961
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/internal/testenv')
| -rw-r--r-- | src/internal/testenv/testenv.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/internal/testenv/testenv.go b/src/internal/testenv/testenv.go index 10384b6206..4cd8a2b541 100644 --- a/src/internal/testenv/testenv.go +++ b/src/internal/testenv/testenv.go @@ -114,6 +114,19 @@ 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 + } + } + 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. |
