diff --git a/tests/runtests.pl b/tests/runtests.pl index 3798b1aee6..32e0680378 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -2762,6 +2762,7 @@ my $total=0; my $lasttest=0; my @at = split(" ", $TESTCASES); my $count=0; +my $endwaitcnt=0; $start = time(); @@ -2922,6 +2923,16 @@ while () { delete $runnersrunning{$riderror} if(defined $runnersrunning{$riderror}); $globalabort = 1; } + if(!scalar(@runtests) && ++$endwaitcnt == (240 + $jobs)) { + # Once all tests have been scheduled on a runner at the end of a test + # run, we just wait for their results to come in. If we're still + # waiting after a couple of minutes ($endwaitcnt multiplied by + # $runnerwait, plus $jobs because that number won't time out), display + # the same test runner status as we give with a SIGUSR1. This will + # likely point to a single test that has hung. + logmsg "Hmmm, the tests are taking a while to finish. Here is the status:\n"; + catch_usr1(); + } } my $sofar = time() - $start;