From 8eef74b493e48f3dfac6619b01ac7efe26c134b5 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Fri, 1 Mar 2019 08:25:35 +0100 Subject: [PATCH] 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 TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- misc/android/go_android_exec.go | 4 ++++ misc/ios/go_darwin_arm_exec.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/misc/android/go_android_exec.go b/misc/android/go_android_exec.go index 55461df31a..9a4e2afc80 100644 --- a/misc/android/go_android_exec.go +++ b/misc/android/go_android_exec.go @@ -156,6 +156,10 @@ func subdir() (pkgpath string, underGoRoot bool) { if err != nil { log.Fatal(err) } + cwd, err = filepath.EvalSymlinks(cwd) + if err != nil { + log.Fatal(err) + } goroot, err := filepath.EvalSymlinks(runtime.GOROOT()) if err != nil { log.Fatal(err) diff --git a/misc/ios/go_darwin_arm_exec.go b/misc/ios/go_darwin_arm_exec.go index 3eb1757e8f..6a3d9def68 100644 --- a/misc/ios/go_darwin_arm_exec.go +++ b/misc/ios/go_darwin_arm_exec.go @@ -633,6 +633,10 @@ func subdir() (pkgpath string, underGoRoot bool, err error) { if err != nil { return "", false, err } + cwd, err = filepath.EvalSymlinks(cwd) + if err != nil { + log.Fatal(err) + } goroot, err := filepath.EvalSymlinks(runtime.GOROOT()) if err != nil { return "", false, err -- 2.50.0