Create TestLib.pm's tempdir underneath tmp_check/, not out in the open.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 5 Dec 2015 18:23:48 +0000 (13:23 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 5 Dec 2015 18:23:48 +0000 (13:23 -0500)
This way, existing .gitignore entries and makefile clean actions will
automatically apply to the tempdir, should it survive a TAP test run
(which can happen if the user control-C's out of the run, for example).

Michael Paquier, per a complaint from me

src/test/perl/TestLib.pm

index 7edd4c40eac3cdf593aa1238662498632dfafc36..da67f33c7e38929067350c7cf0da8fd8c5c1e43d 100644 (file)
@@ -114,7 +114,7 @@ sub tempdir
 {
    return File::Temp::tempdir(
        'tmp_testXXXX',
-       DIR => $ENV{TESTDIR} || cwd(),
+       DIR => $tmp_check,
        CLEANUP => 1);
 }