]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix TestCgoPkgConfig on darwin with pkg-config installed
authorRuss Cox <rsc@golang.org>
Wed, 5 Nov 2025 18:42:44 +0000 (13:42 -0500)
committerGopher Robot <gobot@golang.org>
Wed, 5 Nov 2025 20:36:29 +0000 (12:36 -0800)
commit3ae9e950021d79134146a751531f151a1f02d9bd
treedc7b8b754beb32753ed02a2f10e2001f9049d73c
parenta494a26bc2d0ad52e0e265c2a1b9a3a964118699
cmd/go: fix TestCgoPkgConfig on darwin with pkg-config installed

Most darwin systems don't have pkg-config installed and skip this test.
(And it doesn't run in all.bash because it is skipped during -short.)

But for those systems that have pkg-config and run the non-short tests,
it fails because the code was not writing out the bar.pc on darwin and
then expecting pkg-config to be able to tell us about the bar package.
Change the code to write out the bar entry always.

Fixes one failing case in 'go test cmd/go' on my Mac.

Change-Id: Ibc4e9826a652ce2e7c609b905b159ccf2d5a6444
Reviewed-on: https://go-review.googlesource.com/c/go/+/718182
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/go/go_test.go