003_package_checks.t 748 Bytes
Newer Older
1 2 3 4 5 6
# Check properties of the installed packages/binaries

use strict;

use lib 't';
use TestLib;
7
use PgCommon qw/$binroot/;
8

9
use Test::More tests => (@MAJORS) * 4;
10 11 12

# Debian/Ubuntu packages are linked against libedit. If your psql binaries are
# linked against libreadline, set PG_READLINE=1 when running this testsuite.
13
$ENV{PG_READLINE} = 1 if ($PgCommon::rpm);
14 15 16
my ($want_lib, $avoid_lib) = $ENV{PG_READLINE} ? qw(libreadline libedit) : qw(libedit libreadline);

foreach my $v (@MAJORS) {
17
    like_program_out (0, "ldd $binroot$v/bin/psql", 0, qr/$want_lib\.so\./,
18
	"psql is linked against $want_lib");
19
    unlike_program_out (0, "ldd $binroot$v/bin/psql", 0, qr/$avoid_lib\.so\./,
20 21 22 23
	"psql is not linked against $avoid_lib");
}

# vim: filetype=perl