File: problems

package info (click to toggle)
anomaly 1.1.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 220 kB
  • sloc: cpp: 404; perl: 81; sh: 43; makefile: 11
file content (24 lines) | stat: -rwxr-xr-x 375 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env perl

use strict;
use warnings;

if (open my $fh, '<', 'all.log')
{
  my $test_file;
  my %errors;

  while (my $line = <$fh>)
  {
    $test_file = $1       if $line =~ /^# (\S+\.t)$/;
    $errors{$test_file}++ if $line =~ /^not /;
  }

  close $fh;

  printf "%-24s %4d\n", $_, $errors{$_}
    for sort {$errors{$b} <=> $errors{$a}} keys %errors;
}

exit 0;