mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00

Before they were being treated as "passing" tests. Since this might cause them to be silently ignored, classifying them under "skipped" will ensure they won't go unnoticed. Expected failures != skipped. The former will always be executed.
39 lines
851 B
Perl
Executable file
39 lines
851 B
Perl
Executable file
#!/usr/bin/env perl
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
if (open my $fh, '<', 'all.log')
|
|
{
|
|
my $test_file;
|
|
my %errors;
|
|
my %skipped;
|
|
my %expected;
|
|
|
|
while (my $line = <$fh>)
|
|
{
|
|
$test_file = $1 if $line =~ /^# (\S+\.t)$/;
|
|
$errors{$test_file}++ if $line =~ /^not /;
|
|
$skipped{$test_file}++ if $line =~ /^skip /;
|
|
$expected{$test_file}++ if $line =~ /^# EXPECTED_FAILURE: /;
|
|
}
|
|
|
|
close $fh;
|
|
|
|
print "Failed\n";
|
|
printf "%-32s %4d\n", $_, $errors{$_}
|
|
for sort {$errors{$b} <=> $errors{$a}} keys %errors;
|
|
|
|
print "\n";
|
|
print "Skipped\n";
|
|
printf "%-32s %4d\n", $_, $skipped{$_}
|
|
for sort {$skipped{$b} <=> $skipped{$a}} keys %skipped;
|
|
|
|
print "\n";
|
|
print "Expected failures (part of skipped)\n";
|
|
printf "%-32s %4d\n", $_, $expected{$_}
|
|
for sort {$expected{$b} <=> $expected{$a}} keys %expected;
|
|
}
|
|
|
|
exit 0;
|
|
|