mirror of https://github.com/golang/go.git
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: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
parent
820ad17303
commit
ee6bec958d
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue