Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (37 sloc) 1.09 KB
use strict;
use POSIX qw/strftime/;
use TAP::Parser qw/all/;
use TAP::Parser::Aggregator qw/all/;
use TAP::Parser::Source;
use File::OldSlurp;
my @files = sort(read_dir("results"));
# my $aggregate = TAP::Parser::Aggregator->new;
foreach my $file (@files) {
if (@ARGV) {
next unless $file =~ /$ARGV[0]/;
}
my $s = TAP::Parser::Source->new;
$s->source([ '/bin/cat', "results/$file" ]);
my $parser = TAP::Parser->new( { source => $s });
while ( my $result = $parser->next ) {
# print "$file results: $result->as_string\n";
}
# $aggregate->add( $file, $parser );
printf "%-30s ", $file;
if ($parser->failed) {
print "Failed\n";
} elsif ($parser->todo_passed) {
print "Todo passed\n";
} elsif ($parser->skip_all) {
print "Skipped\n";
} elsif (! $parser->is_good_plan) {
printf "Planned %d, ran %d\n", $parser->tests_planned, $parser->tests_run;
} elsif ($parser->passed) {
print "ok\n";
} else {
print "????\n";
}
}
# print "\nTOTAL\n";
# printf "\n\tPassed: %s\n\tFailed: %s\n", scalar $aggregate->passed, scalar $aggregate->failed;
print "DONE\n";