1
0
mirror of https://github.com/golang/go synced 2024-11-17 14:34:46 -07:00
go/misc/cgo/testcshared
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
..
testdata cmd/go: cgo export header to be compatible with MSVC complex types 2022-04-08 14:13:32 +00:00
cshared_test.go misc/cgo/testcshared: don't rely on an erroneous install target in tests 2022-07-13 20:43:20 +00:00
overlaydir_test.go