1
0
mirror of https://github.com/golang/go synced 2024-11-17 12:44:49 -07:00
go/misc/cgo
Bryan C. Mills feada53661 misc/cgo/testcshared: 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 createHeaders to
instead use 'go build' (with an extension determined by the install
target for 'runtime/cgo', which is well-defined at least for the
moment), and switches TestCachedInstall (which appears to be
explicitly testing 'go install') to explicitly request GOPATH mode
(which provides a well-defined install target for the library).

This change follows a similar structure to CL 416954.

For #37015.

Change-Id: I22ae4af0f0d4c50adc9e0f0dc279859d1f258cc8
Reviewed-on: https://go-review.googlesource.com/c/go/+/417096
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-07-13 20:43:20 +00:00
..
errors cmd/go: prepend builtin prolog when checking for preamble errors 2022-06-25 19:07:01 +00:00
fortran
gmp all: gofmt main repo 2022-04-11 16:34:30 +00:00
life all: update references to symbols moved from io/ioutil to io 2021-04-05 17:51:15 +00:00
nocgo
stdio all: update references to symbols moved from io/ioutil to io 2021-04-05 17:51:15 +00:00
test misc/cgo/test: make TestSetgidStress cheaper 2022-07-06 14:23:50 +00:00
testasan
testcarchive misc/cgo/testcarchive: don't rely on an erroneous install target in tests 2022-07-11 18:57:03 +00:00
testcshared misc/cgo/testcshared: don't rely on an erroneous install target in tests 2022-07-13 20:43:20 +00:00
testgodefs cmd/cgo: retain original file paths in godefs generated comment 2022-04-03 07:18:10 +00:00
testplugin misc/cgo/testplugin: set the package name in TestIssue19534 2022-05-19 15:38:08 +00:00
testsanitizers misc/cgo/testsanitizers: buffer the signal channel in TestTSAN/tsan11 2022-05-27 15:58:52 +00:00
testshared misc/cgo: invoke "go" from $GOROOT/bin instead of $PATH 2022-05-19 15:04:11 +00:00
testsigfwd
testso all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
testsovar all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
testtls all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00