postgres.git / summary / log / commit / refs
commit fdb8ea9366785d7e2a31469c1389ca8a6f11889f
Author: Noah Misch <noah@leadboat.com>
Date: Thu Jul 30 02:48:56 2015 +0000
MSVC: Revert most 9.5 changes to pre-9.5 vcregress.pl tests.
The reverted changes did not narrow the semantic gap between the MSVC
build system and the GNU make build system. For targets old and new
that run multiple suites (contribcheck, modulescheck, tapcheck), restore
vcregress.pl to mimicking "make -k" rather than the "make -S" default.
Lack of "-k" would be more burdensome than lack of "-S". Keep changes
reflecting contemporary changes to the GNU make build system, and keep
updates to Makefile parsing. Keep the loss of --psqldir in "check" and
"ecpgcheck" targets; it had been a no-op when used alongside
--temp-install. No log message mentioned any of the reverted changes.
Based on a germ by Michael Paquier. Back-patch to 9.5.
src/tools/msvc/vcregress.pl | 69 ++++++++++++++++++++-------------------------
1 file changed, 30 insertions(+), 39 deletions(-)
diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl
index 1a0ae67d0a3..0d2f5ec8567 100644
--- a/src/tools/msvc/vcregress.pl
+++ b/src/tools/msvc/vcregress.pl
@@ -108,15 +108,12 @@ sub installcheck
sub check
{
- chdir $startdir;
-
InstallTemp();
chdir "${topdir}/src/test/regress";
-
my @args = (
- "${tmp_installdir}/bin/pg_regress",
+ "../../../$Config/pg_regress/pg_regress",
"--dlpath=.",
- "--bindir=${tmp_installdir}/bin",
+ "--bindir=",
"--schedule=${schedule}_schedule",
"--encoding=SQL_ASCII",
"--no-locale",
@@ -136,11 +133,9 @@ sub ecpgcheck
exit $status if $status;
InstallTemp();
chdir "$topdir/src/interfaces/ecpg/test";
-
- $ENV{PATH} = "${tmp_installdir}/bin;${tmp_installdir}/lib;$ENV{PATH}";
$schedule = "ecpg";
my @args = (
- "${tmp_installdir}/bin/pg_regress_ecpg",
+ "../../../../$Config/pg_regress_ecpg/pg_regress_ecpg",
"--bindir=",
"--dbname=regress1,connectdb",
"--create-role=connectuser,connectdb",
@@ -156,14 +151,12 @@ sub ecpgcheck
sub isolationcheck
{
- chdir $startdir;
-
- InstallTemp();
- chdir "${topdir}/src/test/isolation";
-
+ chdir "../isolation";
+ copy("../../../$Config/isolationtester/isolationtester.exe",
+ "../../../$Config/pg_isolation_regress");
my @args = (
- "${tmp_installdir}/bin/pg_isolation_regress",
- "--bindir=${tmp_installdir}/bin",
+ "../../../$Config/pg_isolation_regress/pg_isolation_regress",
+ "--bindir=../../../$Config/psql",
"--inputdir=.",
"--schedule=./isolation_schedule");
push(@args, $maxconn) if $maxconn;
@@ -174,10 +167,7 @@ sub isolationcheck
sub plcheck
{
- chdir $startdir;
-
- InstallTemp();
- chdir "${topdir}/src/pl";
+ chdir "../../pl";
foreach my $pl (glob("*"))
{
@@ -214,8 +204,8 @@ sub plcheck
"============================================================\n";
print "Checking $lang\n";
my @args = (
- "${tmp_installdir}/bin/pg_regress",
- "--bindir=${tmp_installdir}/bin",
+ "../../../$Config/pg_regress/pg_regress",
+ "--bindir=../../../$Config/psql",
"--dbname=pl_regression", @lang_args, @tests);
system(@args);
my $status = $? >> 8;
@@ -230,7 +220,6 @@ sub subdircheck
{
my $subdir = shift;
my $module = shift;
- my $mstat = 0;
if ( !-d "$module/sql"
|| !-d "$module/expected"
@@ -277,24 +266,19 @@ sub subdircheck
print "============================================================\n";
print "Checking $module\n";
my @args = (
- "${tmp_installdir}/bin/pg_regress",
- "--bindir=${tmp_installdir}/bin",
+ "$topdir/$Config/pg_regress/pg_regress",
+ "--bindir=${topdir}/${Config}/psql",
"--dbname=contrib_regression", @opts, @tests);
system(@args);
- my $status = $? >> 8;
- $mstat ||= $status;
chdir "..";
-
- exit $mstat if $mstat;
}
sub contribcheck
{
- InstallTemp();
- chdir "$topdir/contrib";
+ chdir "../../../contrib";
+ my $mstat = 0;
foreach my $module (glob("*"))
{
-
# these configuration-based exclusions must match Install.pm
next if ($module eq "uuid-ossp" && !defined($config->{uuid}));
next if ($module eq "sslinfo" && !defined($config->{openssl}));
@@ -305,26 +289,31 @@ sub contribcheck
next if ($module eq "sepgsql");
subdircheck("$topdir/contrib", $module);
+ my $status = $? >> 8;
+ $mstat ||= $status;
}
+ exit $mstat if $mstat;
}
sub modulescheck
{
- InstallTemp();
- chdir "$topdir/src/test/modules";
+ chdir "../../../src/test/modules";
+ my $mstat = 0;
foreach my $module (glob("*"))
{
subdircheck("$topdir/src/test/modules", $module);
+ my $status = $? >> 8;
+ $mstat ||= $status;
}
+ exit $mstat if $mstat;
}
-
# Run "initdb", then reconfigure authentication.
sub standard_initdb
{
return (
- system("${tmp_installdir}/bin/initdb", '-N') == 0 and system(
- "${tmp_installdir}/bin/pg_regress", '--config-auth',
+ system('initdb', '-N') == 0 and system(
+ "$topdir/$Config/pg_regress/pg_regress", '--config-auth',
$ENV{PGDATA}) == 0);
}
@@ -343,13 +332,14 @@ sub upgradecheck
$ENV{PGPORT} ||= 50432;
my $tmp_root = "$topdir/src/bin/pg_upgrade/tmp_check";
(mkdir $tmp_root || die $!) unless -d $tmp_root;
-
- InstallTemp();
+ my $upg_tmp_install = "$tmp_root/install"; # unshared temp install
+ print "Setting up temp install\n\n";
+ Install($upg_tmp_install, "all", $config);
# Install does a chdir, so change back after that
chdir $cwd;
my ($bindir, $libdir, $oldsrc, $newsrc) =
- ("$tmp_installdir/bin", "$tmp_installdir/lib", $topdir, $topdir);
+ ("$upg_tmp_install/bin", "$upg_tmp_install/lib", $topdir, $topdir);
$ENV{PATH} = "$bindir;$ENV{PATH}";
my $data = "$tmp_root/data";
$ENV{PGDATA} = "$data.old";
@@ -488,6 +478,7 @@ sub InstallTemp
{
print "Setting up temp install\n\n";
Install("$tmp_installdir", "all", $config);
+ $ENV{PATH} = "$tmp_installdir/bin;$ENV{PATH}";
}
sub usage
[parent: 95eb4b265502]