complete-run: reorder code to make code flow more clear

This commit is contained in:
Maik Fischer 2011-11-27 17:24:18 +01:00
parent 6a5ca32c5a
commit 2d188bfc9b
1 changed files with 24 additions and 22 deletions

View File

@ -127,6 +127,30 @@ status_init(displays => \@displays, tests => $num);
# test starts another test after completing. # test starts another test after completing.
for (@displays) { $cv->begin; take_job($_) } 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. # 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__ __END__
=head1 NAME =head1 NAME