File: problems

package info (click to toggle)
task 2.3.0%2Bdfsg-3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,728 kB
  • ctags: 4,813
  • sloc: cpp: 34,267; perl: 18,509; python: 298; sh: 257; makefile: 73; ruby: 32
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;