]> Cypherpunks repositories - gostls13.git/commit
cmd/go: consolidate TestInstalls into gopath_install script test
authorBryan C. Mills <bcmills@google.com>
Tue, 19 Nov 2019 18:48:35 +0000 (13:48 -0500)
committerBryan C. Mills <bcmills@google.com>
Tue, 19 Nov 2019 19:59:01 +0000 (19:59 +0000)
commit66dd20845675a70e75e8ef04ea14e85a6870b228
tree0bf434f1525917f37a463a6b792231a84fdad7a8
parent2933e938bf9451a6f4551056b672cd7fc467e94d
cmd/go: consolidate TestInstalls into gopath_install script test

TestInstalls was already mostly redundant with
TestInstallInto{GOPATH,GOBIN}, except for one additional check for the
install location of cmd/fix.

We can't assume that GOROOT is writable in general, so we also can't
assume that the test will be able to reinstall cmd/fix at run time.
Moreover, other processes running in parallel may expect to invoke
cmd/fix themselves, so this test temporarily removing it could induce
systemwide flakes.

We could carefully construct a parallel GOROOT and install cmd/fix
into it, but we can get *almost* as much coverage — at a much lower
cost — by checking the output of 'go list' instead of actually
rebuilding and reinstalling the binary.

Updates #28387
Updates #30316

Change-Id: Id49f44a68b0c52dfabb84c665f63c4e7db58dd49
Reviewed-on: https://go-review.googlesource.com/c/go/+/207965
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/go_test.go
src/cmd/go/testdata/script/gopath_install.txt