Testing: Inherited problems and conversion script from Taskwarrior

This commit is contained in:
Paul Beckingham 2015-05-25 13:48:50 -04:00
parent 1a4a19346e
commit 3f03d0bef5
2 changed files with 31 additions and 3 deletions

13
test/conversion Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh
printf "C++: %5d\n" $(ls *.t.cpp | wc -l)
printf "Python: %5d\n" $(head -n1 *.t | grep -a '\bpython' | wc -l)
printf "Perl: %5d\n" $(head -n1 *.t | grep -a '\bperl\b' | wc -l)
if [ "$1" = "-v" ]; then
echo "Perl left: " $(grep -l '^#\! \?/usr/bin/env perl\b' *.t)
fi
echo
printf "Feature %5d\n" $(ls feature.*.t | wc -l)
printf "Bug %5d\n" $(ls {tw-,bug.}*.t | wc -l)
echo
printf "Total: %5d\n" $(ls *.t | wc -l)

View file

@ -7,17 +7,32 @@ 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 /;
$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;
printf "%-24s %4d\n", $_, $errors{$_}
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;