aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/perl/TestLib.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm
index 3d11cbb4535..4fb43fee21c 100644
--- a/src/test/perl/TestLib.pm
+++ b/src/test/perl/TestLib.pm
@@ -107,6 +107,12 @@ INIT
autoflush TESTLOG 1;
}
+END
+{
+ # Preserve temporary directory for this test on failure
+ $File::Temp::KEEP_ALL = 1 unless Test::More->builder->is_passing;
+}
+
#
# Helper functions
#