Skip to content

Commit ee6bec9

Browse files
author
Bryan C. Mills
committed
misc/cgo/test: set PWD when executing 'go test' in an alternate GOPATH
That makes the test more friendly to the Android exec script, since it won't have to evaluate symlinks to find the directory. Change-Id: I06aae3224d489eed6d7fac7e462361f3bf1dd3da Reviewed-on: https://go-review.googlesource.com/c/164624 Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Elias Naur <[email protected]>
1 parent 820ad17 commit ee6bec9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

misc/cgo/test/pkg_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func TestCrossPackageTests(t *testing.T) {
5959
cmd.Args = append(cmd.Args, "-short")
6060
}
6161
cmd.Dir = modRoot
62-
cmd.Env = append(os.Environ(), "GOPATH="+GOPATH)
62+
cmd.Env = append(os.Environ(), "GOPATH="+GOPATH, "PWD="+cmd.Dir)
6363
out, err := cmd.CombinedOutput()
6464
if err == nil {
6565
t.Logf("%s:\n%s", strings.Join(cmd.Args, " "), out)

0 commit comments

Comments
 (0)