diff options
author | Ian Lance Taylor <iant@golang.org> | 2017-09-14 17:11:35 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-09-14 17:11:35 +0000 |
commit | bc998d034f45d1828a8663b2eed928faf22a7d01 (patch) | |
tree | 8d262a22ca7318f4bcd64269fe8fe9e45bcf8d0f /libgo/go/internal/testenv | |
parent | a41a6142df74219f596e612d3a7775f68ca6e96f (diff) | |
download | gcc-bc998d034f45d1828a8663b2eed928faf22a7d01.zip gcc-bc998d034f45d1828a8663b2eed928faf22a7d01.tar.gz gcc-bc998d034f45d1828a8663b2eed928faf22a7d01.tar.bz2 |
libgo: update to go1.9
Reviewed-on: https://go-review.googlesource.com/63753
From-SVN: r252767
Diffstat (limited to 'libgo/go/internal/testenv')
-rw-r--r-- | libgo/go/internal/testenv/testenv.go | 16 | ||||
-rw-r--r-- | libgo/go/internal/testenv/testenv_windows.go | 1 |
2 files changed, 16 insertions, 1 deletions
diff --git a/libgo/go/internal/testenv/testenv.go b/libgo/go/internal/testenv/testenv.go index 8d41638..999080b 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. diff --git a/libgo/go/internal/testenv/testenv_windows.go b/libgo/go/internal/testenv/testenv_windows.go index e593f64..eb8d6ac 100644 --- a/libgo/go/internal/testenv/testenv_windows.go +++ b/libgo/go/internal/testenv/testenv_windows.go @@ -30,7 +30,6 @@ func initWinHasSymlink() { winSymlinkErr = err } } - os.Remove("target") } func hasSymlink() (ok bool, reason string) { |