Commit 02d79e95 authored by Quentin Smith's avatar Quentin Smith

cmd/go: skip TestCgoPkgConfig if pkg-config is too old

pkg-config 0.24 adds support for quoting and escaping whitespace;
distros like CentOS 6 are still shipping pkg-config 0.23. Skip the test
there since there's no way to get whitespace into the pkg-config output.

Fixes #17846.

Change-Id: Ie4ea17e9b709372a20178b539498929754bcd51f
Reviewed-on: https://go-review.googlesource.com/33027
Run-TryBot: Quentin Smith <quentin@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
parent a18b4b3f
......@@ -2345,8 +2345,9 @@ func TestCgoPkgConfig(t *testing.T) {
tg.parallel()
tg.run("env", "PKG_CONFIG")
if _, err := exec.LookPath(strings.TrimSpace(tg.getStdout())); err != nil {
t.Skip("skipping because pkg-config could not be found")
pkgConfig := strings.TrimSpace(tg.getStdout())
if out, err := exec.Command(pkgConfig, "--atleast-pkgconfig-version", "0.24").CombinedOutput(); err != nil {
t.Skipf("%s --atleast-pkgconfig-version 0.24: %v\n%s", pkgConfig, err, out)
}
// OpenBSD's pkg-config is strict about whitespace and only
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment