Skip to content

Commit 8eef74b

Browse files
committed
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 4e10ce4 commit 8eef74b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

misc/android/go_android_exec.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ func subdir() (pkgpath string, underGoRoot bool) {
156156
if err != nil {
157157
log.Fatal(err)
158158
}
159+
cwd, err = filepath.EvalSymlinks(cwd)
160+
if err != nil {
161+
log.Fatal(err)
162+
}
159163
goroot, err := filepath.EvalSymlinks(runtime.GOROOT())
160164
if err != nil {
161165
log.Fatal(err)

misc/ios/go_darwin_arm_exec.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,10 @@ func subdir() (pkgpath string, underGoRoot bool, err error) {
633633
if err != nil {
634634
return "", false, err
635635
}
636+
cwd, err = filepath.EvalSymlinks(cwd)
637+
if err != nil {
638+
log.Fatal(err)
639+
}
636640
goroot, err := filepath.EvalSymlinks(runtime.GOROOT())
637641
if err != nil {
638642
return "", false, err

0 commit comments

Comments
 (0)