|
|
|
|
@ -31,7 +31,7 @@ if (-e "src/tools/msvc/buildenv.pl") |
|
|
|
|
|
|
|
|
|
my $what = shift || ""; |
|
|
|
|
if ($what =~ |
|
|
|
|
/^(check|installcheck|plcheck|contribcheck|ecpgcheck|isolationcheck|upgradecheck)$/i |
|
|
|
|
/^(check|installcheck|plcheck|contribcheck|modulescheck|ecpgcheck|isolationcheck|upgradecheck)$/i |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
$what = uc $what; |
|
|
|
|
@ -49,7 +49,7 @@ copy("$Config/autoinc/autoinc.dll", "src/test/regress"); |
|
|
|
|
copy("$Config/regress/regress.dll", "src/test/regress"); |
|
|
|
|
copy("$Config/dummy_seclabel/dummy_seclabel.dll", "src/test/regress"); |
|
|
|
|
|
|
|
|
|
$ENV{PATH} = "../../../$Config/libpq;../../$Config/libpq;$ENV{PATH}"; |
|
|
|
|
$ENV{PATH} = "$topdir/$Config/libpq;$topdir/$Config/libpq;$ENV{PATH}"; |
|
|
|
|
|
|
|
|
|
my $schedule = shift; |
|
|
|
|
unless ($schedule) |
|
|
|
|
@ -76,6 +76,7 @@ my %command = ( |
|
|
|
|
INSTALLCHECK => \&installcheck, |
|
|
|
|
ECPGCHECK => \&ecpgcheck, |
|
|
|
|
CONTRIBCHECK => \&contribcheck, |
|
|
|
|
MODULESCHECK => \&modulescheck, |
|
|
|
|
ISOLATIONCHECK => \&isolationcheck, |
|
|
|
|
UPGRADECHECK => \&upgradecheck,); |
|
|
|
|
|
|
|
|
|
@ -213,10 +214,39 @@ sub plcheck |
|
|
|
|
chdir "../../.."; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sub contribcheck |
|
|
|
|
sub subdircheck |
|
|
|
|
{ |
|
|
|
|
chdir "../../../contrib"; |
|
|
|
|
my $subdir = shift; |
|
|
|
|
my $module = shift; |
|
|
|
|
my $mstat = 0; |
|
|
|
|
|
|
|
|
|
if ( ! -d "$module/sql" || |
|
|
|
|
! -d "$module/expected" || |
|
|
|
|
( ! -f "$module/GNUmakefile" && ! -f "$module/Makefile")) |
|
|
|
|
{ |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
chdir $module; |
|
|
|
|
print |
|
|
|
|
"============================================================\n"; |
|
|
|
|
print "Checking $module\n"; |
|
|
|
|
my @tests = fetchTests(); |
|
|
|
|
my @opts = fetchRegressOpts(); |
|
|
|
|
my @args = ( |
|
|
|
|
"$topdir/$Config/pg_regress/pg_regress", |
|
|
|
|
"--psqldir=$topdir/$Config/psql", |
|
|
|
|
"--dbname=contrib_regression", @opts, @tests); |
|
|
|
|
system(@args); |
|
|
|
|
my $status = $? >> 8; |
|
|
|
|
$mstat ||= $status; |
|
|
|
|
chdir ".."; |
|
|
|
|
|
|
|
|
|
exit $mstat if $mstat; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sub contribcheck |
|
|
|
|
{ |
|
|
|
|
chdir "$topdir/contrib"; |
|
|
|
|
foreach my $module (glob("*")) |
|
|
|
|
{ |
|
|
|
|
# these configuration-based exclusions must match Install.pm |
|
|
|
|
@ -225,28 +255,20 @@ sub contribcheck |
|
|
|
|
next if ($module eq "xml2" && !defined($config->{xml})); |
|
|
|
|
next if ($module eq "sepgsql"); |
|
|
|
|
|
|
|
|
|
next |
|
|
|
|
unless -d "$module/sql" |
|
|
|
|
&& -d "$module/expected" |
|
|
|
|
&& (-f "$module/GNUmakefile" || -f "$module/Makefile"); |
|
|
|
|
chdir $module; |
|
|
|
|
print |
|
|
|
|
"============================================================\n"; |
|
|
|
|
print "Checking $module\n"; |
|
|
|
|
my @tests = fetchTests(); |
|
|
|
|
my @opts = fetchRegressOpts(); |
|
|
|
|
my @args = ( |
|
|
|
|
"../../$Config/pg_regress/pg_regress", |
|
|
|
|
"--psqldir=../../$Config/psql", |
|
|
|
|
"--dbname=contrib_regression", @opts, @tests); |
|
|
|
|
system(@args); |
|
|
|
|
my $status = $? >> 8; |
|
|
|
|
$mstat ||= $status; |
|
|
|
|
chdir ".."; |
|
|
|
|
subdircheck("$topdir/contrib", $module); |
|
|
|
|
} |
|
|
|
|
exit $mstat if $mstat; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sub modulescheck |
|
|
|
|
{ |
|
|
|
|
chdir "$topdir/src/test/modules"; |
|
|
|
|
foreach my $module (glob("*")) |
|
|
|
|
{ |
|
|
|
|
subdircheck("$topdir/src/test/modules", $module); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Run "initdb", then reconfigure authentication. |
|
|
|
|
sub standard_initdb |
|
|
|
|
{ |
|
|
|
|
|