Commit 6f2606cd authored by Simon McVittie's avatar Simon McVittie

tests/version: Fix Debianisms

This test asserted that libz.so.1 was in /lib/*-linux-gnu* or
/usr/lib/*-linux-gnu*, but on non-Debian operating systems it could
equally well be in /usr/lib32, /usr/lib, /usr/lib64 or even /usr/libx32.
Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
parent 28e86dd1
Pipeline #6482 passed with stage
in 38 minutes and 59 seconds
......@@ -52,7 +52,7 @@ $path = $4;
is($root, $host);
is($soname, 'libz.so.1');
like($version, qr{^1\.[0-9]+\.[0-9]+$});
like($path, qr{^\Q$host\E(/(?:usr/)?lib/.*-linux-gnu.*/libz\.so\.\Q$version\E)$});
like($path, qr{^\Q$host\E(/(?:usr/)?lib(?:32|64|x32|/.*-linux-gnu.*)?/libz\.so\.\Q$version\E)$});
$path =~ s/^\Q$host\E//;
ok(-e $path);
......@@ -71,7 +71,7 @@ TODO: {
local $TODO = 'returns 1 for some reason';
like($version, qr{^1\.[0-9]+\.[0-9]+$});
}
like($path, qr{^(/?(?:usr/)?lib/.*-linux-gnu.*/libz\.so\.\Q$version\E)$});
like($path, qr{^(/?(?:usr/)?lib(?:32|64|x32|/.*-linux-gnu.*)?/libz\.so\.\Q$version\E)$});
ok(-e $1);
# A different way
......@@ -89,7 +89,7 @@ TODO: {
local $TODO = 'returns 1 for some reason';
like($version, qr{^1\.[0-9]+\.[0-9]+$});
}
like($path, qr{^(/?(?:usr/)?lib/.*-linux-gnu.*/libz\.so\.\Q$version\E)$});
like($path, qr{^(/?(?:usr/)?lib(?:32|64|x32|/.*-linux-gnu.*)?/libz\.so\.\Q$version\E)$});
ok(-e $path);
# Another different way
......@@ -108,7 +108,7 @@ TODO: {
local $TODO = 'returns 1 for some reason';
like($version, qr{^1\.[0-9]+\.[0-9]+$});
}
like($path, qr{^(/?(?:usr/)?lib/.*-linux-gnu.*/libz\.so\.\Q$3\E)$});
like($path, qr{^(/?(?:usr/)?lib(?:32|64|x32|/.*-linux-gnu.*)?/libz\.so\.\Q$3\E)$});
ok(-e $path);
done_testing;
......
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