From 2d188bfc9b76afec363fd0dc76fb349660d4f9c2 Mon Sep 17 00:00:00 2001 From: Maik Fischer Date: Sun, 27 Nov 2011 17:24:18 +0100 Subject: [PATCH] complete-run: reorder code to make code flow more clear --- testcases/complete-run.pl | 46 ++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 22 deletions(-) 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