]> Cypherpunks repositories - gostls13.git/commit
cmd/go: in script tests, avoid checking non-main packages for staleness
authorBryan C. Mills <bcmills@google.com>
Mon, 11 Jul 2022 19:12:06 +0000 (15:12 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 12 Jul 2022 21:54:06 +0000 (21:54 +0000)
commitbf2ef26be3593d24487311576d85ec601185fbf4
treedb99531019947bd8bbfc202c49a53343fa1a9b4a
parent5f5cae7200b544bfc250ad0676a98db1f7e7df31
cmd/go: in script tests, avoid checking non-main packages for staleness

Non-main packages in module mode should not be installed to
GOPATH/pkg, but due to #37015 they were installed there anyway.
Lacking a proper install location, 'go install' becomes a no-op
for non-main packages in module mode.

This change switches the 'go install' commands in the test_fuzz_cache
and build_overlay tests to instead use 'go build', using the '-x' flag
to check for compile commands instead of querying 'go list' about
staleness.

For #37015.

Change-Id: I56d80cf2a43efb6163c62082c86cd3e4f0ff73c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/417095
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/go/testdata/script/build_overlay.txt
src/cmd/go/testdata/script/test_fuzz_cache.txt