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
This commit is contained in:
Alvaro Herrera 2016-03-01 19:50:13 -03:00
parent 212bba93ce
commit 88802e0680
1 changed files with 6 additions and 0 deletions

View File

@ -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
#