This test uses testgo to run 'go list', so it should use the correct
GOROOT for testgo. (This may be particularly relevant when the test
binary itself is build with -trimpath, in which case runtime.GOROOT()
is not valid.)
Updates #51483
Change-Id: I79b310f88e3a200122d6289073df1385e3e97cca
Reviewed-on: https://go-review.googlesource.com/c/go/+/391801
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Daniel Martà <mvdan@mvdan.cc>
Trust: Daniel Martà <mvdan@mvdan.cc>
}{
{"GOARCH", runtime.GOARCH},
{"GOOS", runtime.GOOS},
- {"GOROOT", filepath.Clean(runtime.GOROOT())},
+ {"GOROOT", testGOROOT},
{"GOPATH", os.Getenv("GOPATH")},
{"CgoEnabled", ""},
{"UseAllFiles", ""},