diff options
| author | Noah Misch | 2019-05-28 19:58:30 +0000 |
|---|---|---|
| committer | Noah Misch | 2019-05-28 19:58:30 +0000 |
| commit | 10b72deafea5972edcafb9eb3f97154f32ccd340 (patch) | |
| tree | 800e9c938f86025a8eb9cc3081537ced612901a2 /src/tools | |
| parent | d5ec46bf224d2ea1b010b2bc10a65e44d4456553 (diff) | |
In the pg_upgrade test suite, remove and recreate "tmp_check".
This allows "vcregress upgradecheck" to pass twice in immediate
succession, and it's more like how $(prove_check) works. Back-patch to
9.5, where pg_upgrade moved to src/bin.
Discussion: https://postgr.es/m/20190520012436.GA1480421@rfd.leadboat.com
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/msvc/vcregress.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 30b86e7521f..388c9d6d140 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -546,7 +546,8 @@ sub upgradecheck $ENV{PGHOST} = 'localhost'; $ENV{PGPORT} ||= 50432; my $tmp_root = "$topdir/src/bin/pg_upgrade/tmp_check"; - (mkdir $tmp_root || die $!) unless -d $tmp_root; + rmtree($tmp_root); + mkdir $tmp_root || die $!; my $upg_tmp_install = "$tmp_root/install"; # unshared temp install print "Setting up temp install\n\n"; Install($upg_tmp_install, "all", $config); @@ -559,7 +560,8 @@ sub upgradecheck my $data = "$tmp_root/data"; $ENV{PGDATA} = "$data.old"; my $logdir = "$topdir/src/bin/pg_upgrade/log"; - (mkdir $logdir || die $!) unless -d $logdir; + rmtree($logdir); + mkdir $logdir || die $!; print "\nRunning initdb on old cluster\n\n"; standard_initdb() or exit 1; print "\nStarting old cluster\n\n"; |
