Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3b8d721

Browse files
committed
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
1 parent a892234 commit 3b8d721

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/test/perl/TestLib.pm

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,17 @@ INIT
110110
END
111111
{
112112
# Preserve temporary directory for this test on failure
113-
$File::Temp::KEEP_ALL = 1 unless Test::More->builder->is_passing;
113+
$File::Temp::KEEP_ALL = 1 unless all_tests_passing();
114+
}
115+
116+
sub all_tests_passing
117+
{
118+
my $fail_count = 0;
119+
foreach my $status (Test::More->builder->summary)
120+
{
121+
return 0 unless $status;
122+
}
123+
return 1;
114124
}
115125

116126
#

0 commit comments

Comments
 (0)