summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/dist/Tie-File/t/29_downcopy.t
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/dist/Tie-File/t/29_downcopy.t')
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/29_downcopy.t8
1 files changed, 5 insertions, 3 deletions
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/29_downcopy.t b/gnu/usr.bin/perl/dist/Tie-File/t/29_downcopy.t
index a86d21f8e2d..1fbc8528212 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/29_downcopy.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/29_downcopy.t
@@ -245,7 +245,7 @@ sub try {
binmode F;
# The record has exactly 17 characters. This will help ensure that
- # even if _downcoopy screws up, the data doesn't coincidentally
+ # even if _downcopy screws up, the data doesn't coincidentally
# look good because the remainder accidentally lines up.
my $d = substr("0123456789abcdef$:", -17);
my $recs = defined($FLEN) ?
@@ -274,13 +274,15 @@ sub try {
}
my $o = tie my @lines, 'Tie::File', $file or die $!;
+ # allocate more time when are running tests in parallel
+ my $alarm_time = $ENV{TEST_JOBS} || $ENV{HARNESS_OPTIONS} ? 20 : 10;
local $SIG{ALRM} = sub { die "Alarm clock" };
- my $a_retval = eval { alarm(5) unless $^P; $o->_downcopy($newdata, $pos, $len) };
+ my $a_retval = eval { alarm($alarm_time) unless $^P; $o->_downcopy($newdata, $pos, $len) };
my $err = $@;
undef $o; untie @lines; alarm(0);
if ($err) {
if ($err =~ /^Alarm clock/) {
- print "# Timeout\n";
+ print STDERR "# $0 Timeout after $alarm_time seconds at test $N\n";
print "not ok $N\n"; $N++;
print "not ok $N\n"; $N++;
if (defined $len) {