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 02533ebde538bae0a9b7938cb7358f378f9406d3..478f855462ff05632c3a8d1caa6aa0c56544561e 100644 (file)
@@ -112,7 +112,7 @@ sub tempdir
 {
        return File::Temp::tempdir(
                'tmp_testXXXX',
-               DIR => $ENV{TESTDIR} || cwd(),
+               DIR => $tmp_check,
                CLEANUP => 1);
 }