Follow-up fixes for "Make all Perl warnings fatal"
Mostly, we need to check whether $ENV{PG_TEST_EXTRA} is set before doing regular expression matches against it.
This commit is contained in:
parent
2c321ceaa9
commit
9d49837d71
src
interfaces/libpq/t
test
kerberos/t
ldap/t
modules
ldap_password_func/t
xid_wraparound/t
ssl/t
@ -6,7 +6,7 @@ use PostgreSQL::Test::Utils;
|
||||
use PostgreSQL::Test::Cluster;
|
||||
use Test::More;
|
||||
|
||||
if ($ENV{PG_TEST_EXTRA} !~ /\bload_balance\b/)
|
||||
if (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bload_balance\b/)
|
||||
{
|
||||
plan skip_all =>
|
||||
'Potentially unsafe test load_balance not enabled in PG_TEST_EXTRA';
|
||||
|
@ -28,7 +28,7 @@ if ($ENV{with_gssapi} ne 'yes')
|
||||
{
|
||||
plan skip_all => 'GSSAPI/Kerberos not supported by this build';
|
||||
}
|
||||
elsif ($ENV{PG_TEST_EXTRA} !~ /\bkerberos\b/)
|
||||
elsif (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bkerberos\b/)
|
||||
{
|
||||
plan skip_all =>
|
||||
'Potentially unsafe test GSSAPI/Kerberos not enabled in PG_TEST_EXTRA';
|
||||
@ -203,7 +203,7 @@ system_or_bail $krb5kdc, '-P', $kdc_pidfile;
|
||||
|
||||
END
|
||||
{
|
||||
kill 'INT', `cat $kdc_pidfile` if -f $kdc_pidfile;
|
||||
kill 'INT', `cat $kdc_pidfile` if defined($kdc_pidfile) && -f $kdc_pidfile;
|
||||
}
|
||||
|
||||
note "setting up PostgreSQL instance";
|
||||
|
@ -18,7 +18,7 @@ if ($ENV{with_ldap} ne 'yes')
|
||||
{
|
||||
plan skip_all => 'LDAP not supported by this build';
|
||||
}
|
||||
elsif ($ENV{PG_TEST_EXTRA} !~ /\bldap\b/)
|
||||
elsif (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bldap\b/)
|
||||
{
|
||||
plan skip_all =>
|
||||
'Potentially unsafe test LDAP not enabled in PG_TEST_EXTRA';
|
||||
|
@ -18,7 +18,7 @@ if ($ENV{with_ldap} ne 'yes')
|
||||
{
|
||||
plan skip_all => 'LDAP not supported by this build';
|
||||
}
|
||||
elsif ($ENV{PG_TEST_EXTRA} !~ /\bldap\b/)
|
||||
elsif (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bldap\b/)
|
||||
{
|
||||
plan skip_all =>
|
||||
'Potentially unsafe test LDAP not enabled in PG_TEST_EXTRA';
|
||||
|
@ -20,7 +20,7 @@ if ($ENV{with_ldap} ne 'yes')
|
||||
{
|
||||
plan skip_all => 'LDAP not supported by this build';
|
||||
}
|
||||
elsif ($ENV{PG_TEST_EXTRA} !~ /\bldap\b/)
|
||||
elsif (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bldap\b/)
|
||||
{
|
||||
plan skip_all =>
|
||||
'Potentially unsafe test LDAP not enabled in PG_TEST_EXTRA';
|
||||
|
@ -7,7 +7,7 @@ use PostgreSQL::Test::Cluster;
|
||||
use PostgreSQL::Test::Utils;
|
||||
use Test::More;
|
||||
|
||||
if ($ENV{PG_TEST_EXTRA} !~ /\bxid_wraparound\b/)
|
||||
if (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bxid_wraparound\b/)
|
||||
{
|
||||
plan skip_all => "test xid_wraparound not enabled in PG_TEST_EXTRA";
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ use PostgreSQL::Test::Utils;
|
||||
use Test::More;
|
||||
use Time::HiRes qw(usleep);
|
||||
|
||||
if ($ENV{PG_TEST_EXTRA} !~ /\bxid_wraparound\b/)
|
||||
if (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bxid_wraparound\b/)
|
||||
{
|
||||
plan skip_all => "test xid_wraparound not enabled in PG_TEST_EXTRA";
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ use PostgreSQL::Test::Utils;
|
||||
use Test::More;
|
||||
use Time::HiRes qw(usleep);
|
||||
|
||||
if ($ENV{PG_TEST_EXTRA} !~ /\bxid_wraparound\b/)
|
||||
if (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bxid_wraparound\b/)
|
||||
{
|
||||
plan skip_all => "test xid_wraparound not enabled in PG_TEST_EXTRA";
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ if ($ENV{with_ssl} ne 'openssl')
|
||||
{
|
||||
plan skip_all => 'OpenSSL not supported by this build';
|
||||
}
|
||||
elsif ($ENV{PG_TEST_EXTRA} !~ /\bssl\b/)
|
||||
elsif (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bssl\b/)
|
||||
{
|
||||
plan skip_all =>
|
||||
'Potentially unsafe test SSL not enabled in PG_TEST_EXTRA';
|
||||
|
@ -20,7 +20,7 @@ if ($ENV{with_ssl} ne 'openssl')
|
||||
{
|
||||
plan skip_all => 'OpenSSL not supported by this build';
|
||||
}
|
||||
elsif ($ENV{PG_TEST_EXTRA} !~ /\bssl\b/)
|
||||
elsif (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bssl\b/)
|
||||
{
|
||||
plan skip_all =>
|
||||
'Potentially unsafe test SSL not enabled in PG_TEST_EXTRA';
|
||||
|
@ -18,7 +18,7 @@ if ($ENV{with_ssl} ne 'openssl')
|
||||
{
|
||||
plan skip_all => 'OpenSSL not supported by this build';
|
||||
}
|
||||
elsif ($ENV{PG_TEST_EXTRA} !~ /\bssl\b/)
|
||||
elsif (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bssl\b/)
|
||||
{
|
||||
plan skip_all =>
|
||||
'Potentially unsafe test SSL not enabled in PG_TEST_EXTRA';
|
||||
|
Loading…
x
Reference in New Issue
Block a user