mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-01 11:01:21 +02:00
Fix TAP tests for older Perls.
Commit 7132810c (Retain tempdirs for failed tests) used Test::More's is_passing method, but that was added in Test::More 0.89_01 which is sometime later than Perl 5.10.1. Popular platforms such as RHEL6 don't have that, nevermind some of our older dinosaurs. Do it the hard way. Michael Paquier, based on research by Craig Ringer
This commit is contained in:
parent
a892234f83
commit
3b8d721553
@ -110,7 +110,17 @@ INIT
|
|||||||
END
|
END
|
||||||
{
|
{
|
||||||
# Preserve temporary directory for this test on failure
|
# Preserve temporary directory for this test on failure
|
||||||
$File::Temp::KEEP_ALL = 1 unless Test::More->builder->is_passing;
|
$File::Temp::KEEP_ALL = 1 unless all_tests_passing();
|
||||||
|
}
|
||||||
|
|
||||||
|
sub all_tests_passing
|
||||||
|
{
|
||||||
|
my $fail_count = 0;
|
||||||
|
foreach my $status (Test::More->builder->summary)
|
||||||
|
{
|
||||||
|
return 0 unless $status;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user