Commit ee6bec95 authored by Bryan C. Mills's avatar Bryan C. Mills

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 <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarElias Naur <mail@eliasnaur.com>
parent 820ad173
......@@ -59,7 +59,7 @@ func TestCrossPackageTests(t *testing.T) {
cmd.Args = append(cmd.Args, "-short")
}
cmd.Dir = modRoot
cmd.Env = append(os.Environ(), "GOPATH="+GOPATH)
cmd.Env = append(os.Environ(), "GOPATH="+GOPATH, "PWD="+cmd.Dir)
out, err := cmd.CombinedOutput()
if err == nil {
t.Logf("%s:\n%s", strings.Join(cmd.Args, " "), out)
......
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