]> Cypherpunks.ru repositories - gostls13.git/commit
misc/cgo/testcarchive: don't rely on an erroneous install target in tests
authorBryan C. Mills <bcmills@google.com>
Mon, 11 Jul 2022 17:06:56 +0000 (13:06 -0400)
committerGopher Robot <gobot@golang.org>
Mon, 11 Jul 2022 18:57:03 +0000 (18:57 +0000)
commitad641e8521381886bc6274d78e986f2bb8ac561b
treedadcec77b085ac883b0357b583cdf27d0f77f329
parentbf5898ef53d1693aa572da0da746c05e9a6f15c5
misc/cgo/testcarchive: don't rely on an erroneous install target in tests

Non-main packages in module mode should not be installed to
GOPATH/pkg, but due to #37015 they were installed there anyway.

This change switches the 'go install' command in TestPIE to instead
use 'go build', and switches TestInstall and TestCachedInstall
(which appear to be explicitly testing 'go install') to explicitly
request GOPATH mode (which does have a well-defined install target).

For #37015.

Change-Id: Ifb24657d2781d1e35cf40078e8e3ebf56aab9cc8
Reviewed-on: https://go-review.googlesource.com/c/go/+/416954
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
misc/cgo/testcarchive/carchive_test.go