Don't try to shutdown servers that have not been started in regression tests.

This avoids spurious output from failing shutdowns and uninitialized
variable warnings if pg_regress_multi.pl fails before starting servers.
pull/917/head
Andres Freund 2016-10-26 06:51:16 -07:00
parent 03c06a3b68
commit c3e1d49e34
1 changed files with 5 additions and 1 deletions

View File

@ -47,6 +47,8 @@ my %fdwServers = ();
my %functions = ();
my %operators = ();
my $serversAreShutdown = "TRUE";
GetOptions(
'bindir=s' => \$bindir,
'libdir=s' => \$libdir,
@ -170,7 +172,6 @@ for my $port (@workerPorts)
}
# Routine to shutdown servers at failure/exit
my $serversAreShutdown = "FALSE";
sub ShutdownServers()
{
if ($serversAreShutdown eq "FALSE")
@ -204,6 +205,9 @@ END
}
}
# Signal that servers should be shutdown
$serversAreShutdown = "FALSE";
# Start servers
system("$bindir/pg_ctl",
('start', '-w',