scripts/report
changeset 29 052fb1053b2a
parent 28 6aaf7117423d
child 30 4a0f2bfdc733
equal deleted inserted replaced
28:6aaf7117423d 29:052fb1053b2a
     1 #! /usr/bin/perl
     1 #! /usr/bin/perl
     2 use 5.14.0;
     2 use 5.14.0;
     3 use strict;
     3 use strict;
     4 use warnings;
     4 use warnings;
     5 use Template;
     5 use File::Find;
     6 use List::Util qw(max);
     6 use List::Util qw(max);
     7 
     7 
     8 my %fail;
     8 my %fail;
     9 
     9 
    10 foreach my $file (glob "out*/log.*") {
    10 my @files = do {
       
    11     my @r;
       
    12     find(sub {
       
    13 	-f and /^log\./ or return;
       
    14 	push @r, $File::Find::name;
       
    15     }, @ARGV ? @ARGV : glob("out*"));
       
    16     @r;
       
    17 };
       
    18 
       
    19 
       
    20 foreach my $file (@files) {
    11     my ($name, $platform) = $file =~ /out-?(.*?)\/log\.(.*)/;
    21     my ($name, $platform) = $file =~ /out-?(.*?)\/log\.(.*)/;
    12     my ($os) = $platform =~ /(^.*?)-/;
    22     my ($os) = $platform =~ /(^.*?)-/;
    13     $_ = do { local @ARGV = $file; local $/ = undef; <> };
    23     $_ = do { local @ARGV = $file; local $/ = undef; <> };
    14     s/
    24     s/
    15 /\n/g;
    25 /\n/g;