]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: fix TestVendorRun when $GOROOT is inside a symlinked path
authorRuss Cox <rsc@golang.org>
Tue, 14 Jul 2015 19:15:37 +0000 (15:15 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 15 Jul 2015 04:30:13 +0000 (04:30 +0000)
Fixes #11305.

Change-Id: Icaa3a009aa4ab214c9aaf74f52c3e622fa266a9d
Reviewed-on: https://go-review.googlesource.com/12194
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/go_test.go

index 98486c5294e46573bea62fe836a5fb8616424062..af5439616f65a5e7134bd250a86011a70550bdce 100644 (file)
@@ -188,7 +188,11 @@ func (tg *testgoData) cd(dir string) {
        if tg.wd == "" {
                tg.wd = tg.pwd()
        }
+       abs, err := filepath.Abs(dir)
        tg.must(os.Chdir(dir))
+       if err == nil {
+               tg.setenv("PWD", abs)
+       }
 }
 
 // sleep sleeps for one tick, where a tick is a conservative estimate