]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix TestExecutableGOROOT when GOROOT_FINAL is set
authorRuss Cox <rsc@golang.org>
Fri, 23 Jun 2017 00:08:00 +0000 (20:08 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 23 Jun 2017 15:35:55 +0000 (15:35 +0000)
commitc23948a2b83bfbe21d2d721f38a7f18f737ba7bb
treeec2f7d54121a1ea0f6b8b9f569c493ecb76c98a4
parent3445ece2128b0721cae4f6e84b159539acd314ef
cmd/go: fix TestExecutableGOROOT when GOROOT_FINAL is set

If GOROOT_FINAL was set during the build, the default GOROOT
will not be testGOROOT. Determine the default GOROOT by reading
the right source file instead of guessing. (GOROOT_FINAL may no
longer be set when the test is actually run.)

Also refactor a bit.

Fixes #20284.

Change-Id: I2274595a235bee10c3f3a5ffecf4bb976f4d9982
Reviewed-on: https://go-review.googlesource.com/46428
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/go_test.go