From af793c9030d0365dc298175cb4bbb05083796c85 Mon Sep 17 00:00:00 2001 From: Maik Fischer Date: Thu, 10 Nov 2011 13:48:21 +0100 Subject: [PATCH] complete-run: wait for all jobs to be finished --- testcases/complete-run.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testcases/complete-run.pl b/testcases/complete-run.pl index 56ed01a5..c62623f1 100755 --- a/testcases/complete-run.pl +++ b/testcases/complete-run.pl @@ -139,7 +139,7 @@ status_init(displays => \@wdisplays, tests => $num); # We start tests concurrently: For each display, one test gets started. Every # test starts another test after completing. -take_job($_) for @wdisplays; +for (@wdisplays) { $cv->begin; take_job($_) } # # Takes a test from the beginning of @testfiles and runs it. @@ -154,8 +154,8 @@ take_job($_) for @wdisplays; sub take_job { my ($display) = @_; - my $test = shift @testfiles; - return unless $test; + my $test = shift @testfiles + or return $cv->end; my $dont_start = (slurp($test) =~ /# !NO_I3_INSTANCE!/); my $basename = basename($test); @@ -288,7 +288,7 @@ sub take_job { undef $_ for @watchers; if (@done == $num) { - $cv->send; + $cv->end; } else { take_job($display); } -- 2.39.5