On Sun, Apr 23, 2017 at 7:48 AM, Daniel Gustafsson <dan...@yesql.se> wrote:
> Skipping the tempdir and instead using ${testname}_data_${name} without a
> random suffix, we can achieve this with something along the lines of the
> attached PoC.  It works as now (retain of failure, remove on success unless
> overridden) but that logic can easily be turned around if we want that.  If
> it’s of interest I can pursue this after some sleep (tomorrow has become today
> at this point).

Yes, something like that may make sense as well for readability.

Keeping folders in case of failures is something that I have been
advocating in favor of for some time, but this never got into the tree

There is a patch from Horiguchi-san that allows actually such a thing,
have a look at patch 0006 on this email:

The same concept rebased gives the attached. I didn't double-check the
compatibility with past versions of Test:More though..
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm
index cb84f1f2c6..b902df4dc7 100644
--- a/src/test/perl/PostgresNode.pm
+++ b/src/test/perl/PostgresNode.pm
@@ -918,6 +918,9 @@ END
+	# Preserve temporary directory for this test on failure
+	$File::Temp::KEEP_ALL = 1 unless Test::More->builder->is_passing;
 	$? = $exit_code;
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to