diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2016-03-01 19:50:13 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2016-03-01 19:50:13 -0300 |
commit | 88802e068017bee8cea7a5502a712794e761c7b5 (patch) | |
tree | 25aaba0bd3e435d9b0025b9465f6294e48ea5956 /src | |
parent | 212bba93ce52e5605f8b7fc1ede2e7aef797c372 (diff) | |
download | postgresql-88802e068017bee8cea7a5502a712794e761c7b5.tar.gz postgresql-88802e068017bee8cea7a5502a712794e761c7b5.zip |
TAP tests: retain temp dirs on test failure
This makes it easier to study the reason for the failure.
Author: Kyotaro Horiguchi
Reviewed-By: Craig Ringer
Diffstat (limited to 'src')
-rw-r--r-- | src/test/perl/TestLib.pm | 6 |
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 # |