cmd/go: make pkg-config check less picky

CL 529219 tweaked the list_pkgconfig_error script test currently to
expect pkg-config to fail with "Package .* not found$", but on several
OSes (at least OpenBSD, AIX, and Solaris), pkg-config prints "Package
libnot-a-valid-cgo-library was not found in the pkg-config search
path". Fix the test on these OSes by dropping the "$" so the test
doesn't require the line to end with "not found".

Change-Id: I40c577521f34c360a1d62355596958f6f969eb54
Reviewed-on: https://go-review.googlesource.com/c/go/+/536195
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Austin Clements <austin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Austin Clements 2023-10-18 10:48:50 -04:00 committed by Gopher Robot
parent 4bf4c7d2e2
commit 144252d2e6

View file

@ -2,7 +2,7 @@
[!exec:pkg-config] skip 'test requires pkg-config tool'
! go list -export .
stderr '^go build example:\n# pkg-config (.*\n)+Package .* not found$'
stderr '^go build example:\n# pkg-config (.*\n)+Package .* not found'
-- go.mod --
module example