Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
MSVC: Remove any tmp_check directory before running a TAP test suite.
authorNoah Misch <noah@leadboat.com>
Sun, 19 Aug 2018 08:12:22 +0000 (01:12 -0700)
committerNoah Misch <noah@leadboat.com>
Sun, 19 Aug 2018 08:12:22 +0000 (01:12 -0700)
Back-patch to v11, where commit 90627cf98a8e7d0531789391fd798c9bfcc3bc1a
made the GNU make build system do likewise.  Without this, when a
typical PostgresNode-using test failed, subsequent runs bailed out with
a "File exists" error.

src/tools/msvc/vcregress.pl

index 4dc051aa62812507579d4033f35312856d544e78..ce5c976c16efefa91b026d3bd9680e91d417adbc 100644 (file)
@@ -10,6 +10,7 @@ use Cwd;
 use File::Basename;
 use File::Copy;
 use File::Find ();
+use File::Path qw(rmtree);
 
 use Install qw(Install);
 
@@ -205,6 +206,7 @@ sub tap_check
 
    $ENV{TESTDIR} = "$dir";
 
+   rmtree('tmp_check');
    system(@args);
    my $status = $? >> 8;
    return $status;