From: Maik Fischer Date: Sun, 27 Nov 2011 16:24:18 +0000 (+0100) Subject: complete-run: reorder code to make code flow more clear X-Git-Tag: 4.2~199 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2d188bfc9b76afec363fd0dc76fb349660d4f9c2;p=i3%2Fi3 complete-run: reorder code to make code flow more clear --- diff --git a/testcases/complete-run.pl b/testcases/complete-run.pl index 6a8f69b9..01227106 100755 --- a/testcases/complete-run.pl +++ b/testcases/complete-run.pl @@ -127,6 +127,30 @@ status_init(displays => \@displays, tests => $num); # test starts another test after completing. for (@displays) { $cv->begin; take_job($_) } +$cv->recv; + +$aggregator->stop(); + +# print empty lines to seperate failed tests from statuslines +print "\n\n"; + +for (@done) { + my ($test, $output) = @$_; + Log "output for $test:"; + Log $output; + # print error messages of failed tests + say for $output =~ /^not ok.+\n+((?:^#.+\n)+)/mg +} + +# 4: print summary +$harness->summary($aggregator); + +close $log; + +kill(15, $_) for @childpids; + +exit 0; + # # Takes a test from the beginning of @testfiles and runs it. # @@ -198,28 +222,6 @@ sub take_job { } } -$cv->recv; - -$aggregator->stop(); - -# print empty lines to seperate failed tests from statuslines -print "\n\n"; - -for (@done) { - my ($test, $output) = @$_; - Log "output for $test:"; - Log $output; - # print error messages of failed tests - say for $output =~ /^not ok.+\n+((?:^#.+\n)+)/mg -} - -# 4: print summary -$harness->summary($aggregator); - -close $log; - -kill(15, $_) for @childpids; - __END__ =head1 NAME