1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
Description: Add additional delay loop to test.pl, for ridiculously slow machines
(like heavily loaded m68k/arm buildds)
Author: Angus Lees <gus@debian.org>
Forwarded: yes
--- a/test.pl
+++ b/test.pl
@@ -2847,6 +2847,7 @@
}
my $tries = ($opt_gdb || $opt_ddd)?30:15 ;
+ my $delay = 1 ;
$httpdpid = 0 ;
my $herr = 0 ;
@@ -2870,7 +2871,7 @@
}
}
- sleep (1) ;
+ sleep ($delay++) ;
}
close HERR if ($herr) ;
@@ -2879,6 +2880,19 @@
print "pid = $httpdpid ok\n" ;
+ # additional delay step for really slow machines (m68k/arm)
+ $tries = 0 ;
+ while ($tries++ < 8)
+ {
+ use IO::Socket::INET;
+ my $sock = new IO::Socket::INET
+ PeerAddr => $host,
+ PeerPort => $port,
+ Timeout => 10;
+ last if $sock; # connected successfully
+ sleep(1.5**$tries);
+ }
+
close ERR ;
if (!open (ERR, "$httpderr"))
{
|