Commit 8eef74b4 authored by Elias Naur's avatar Elias Naur

misc/android,misc/ios: evaluate current working directory symlinks

Previous CLs added symlink evaulation to GOROOT and GOPATH.
Unfortunately that only fixed tests that ran outside GOROOT.

To fix the standard library tests, evaluate symlinks in the current
working directory as well.

Change-Id: Ia406a968235ae4321a1002567520105998582d15
Reviewed-on: https://go-review.googlesource.com/c/164699
Run-TryBot: Elias Naur <mail@eliasnaur.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 4e10ce45
...@@ -156,6 +156,10 @@ func subdir() (pkgpath string, underGoRoot bool) { ...@@ -156,6 +156,10 @@ func subdir() (pkgpath string, underGoRoot bool) {
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
cwd, err = filepath.EvalSymlinks(cwd)
if err != nil {
log.Fatal(err)
}
goroot, err := filepath.EvalSymlinks(runtime.GOROOT()) goroot, err := filepath.EvalSymlinks(runtime.GOROOT())
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
......
...@@ -633,6 +633,10 @@ func subdir() (pkgpath string, underGoRoot bool, err error) { ...@@ -633,6 +633,10 @@ func subdir() (pkgpath string, underGoRoot bool, err error) {
if err != nil { if err != nil {
return "", false, err return "", false, err
} }
cwd, err = filepath.EvalSymlinks(cwd)
if err != nil {
log.Fatal(err)
}
goroot, err := filepath.EvalSymlinks(runtime.GOROOT()) goroot, err := filepath.EvalSymlinks(runtime.GOROOT())
if err != nil { if err != nil {
return "", false, err return "", false, err
......
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