common/tools/analysis/yarp.pl
author matt.davies@SYM-BUILD02.ad-sfpd.intra
Mon, 15 Jun 2009 14:34:28 +0100
changeset 154 10c7559f5d31
parent 138 d3c5dd0ae0b0
child 203 011f16c9778b
permissions -rw-r--r--
'sf-unpack-rnd' target: changed to overwrite mode, due to TEF being present earlier in build.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
138
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
     1
#!/usr/bin/perl
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
     2
# Copyright (c) 2009 Symbian Foundation Ltd
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
     3
# This component and the accompanying materials are made available
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
     4
# under the terms of the License "Eclipse Public License v1.0"
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
     5
# which accompanies this distribution, and is available
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
     7
#
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
     8
# Initial Contributors:
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
     9
# Symbian Foundation Ltd - initial contribution.
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    10
#
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    11
# Contributors:
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    12
# Matt Davies <mattd@symbian.org>
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    13
#
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    14
# Description:
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    15
# YARP - Yet Another Recipe Parser
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    16
# This tool parses Raptor logs looking for failures, and writes a CSV file of the results
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    17
#
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    18
# Usage:
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    19
# perl yarp.pl <logfile> <csvfile>
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    20
#
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    21
# Notes:
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    22
# Currently it won't tell you any info about why it fails, with the exception of arm licence issues.
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    23
# It also uses a lot of memory, so while there is a subroutine for doing multiple files, it's not used, and is out of date.
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    24
# Writing output to a file is hacked in, so it's not too pretty.
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    25
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    26
use strict;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    27
use XML::Simple;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    28
use Data::Dumper;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    29
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    30
my @header = qw(line layer component name armlicence platform phase code bldinf mmp target source);
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    31
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    32
main();
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    33
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    34
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    35
sub main()
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    36
{
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    37
  my $filename = shift @ARGV;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    38
  my $output = shift @ARGV;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    39
  open(OUT,">$output") or die "Coudn't open $output\n";
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    40
  foreach my $key (@header)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    41
  {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    42
    print OUT $key.",";
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    43
  } 
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    44
  print OUT "\n";
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    45
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    46
  parsefile($filename);
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    47
  close OUT;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    48
}
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    49
sub scandir()
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    50
{
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    51
  my $path = shift @ARGV;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    52
  my @files = glob($path."/*compile.log");
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    53
   
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    54
  foreach my $filename (@files)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    55
  {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    56
#    print $filename."\n";
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    57
    parsefile($filename);
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    58
  }  
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    59
}
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    60
  
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    61
sub  parsefile($filename)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    62
{
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    63
    my $filename = shift;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    64
#    print "Scanning $filename\n";
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    65
    open(FILE,"<$filename") or die "Couldn't open filename\n";
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    66
    my $recipe;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    67
    my %attempts;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    68
    my %licenceattempts;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    69
    my $counter = 0;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    70
    my $licence = 0;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    71
    while( my $line = <FILE>)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    72
    {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    73
      ++$counter;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    74
      if($line =~ m/^<recipe\s+(\S.+)>/)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    75
      {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    76
        $recipe = XMLin($line."</recipe>");
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    77
        $recipe->{'line'} = $counter;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    78
#        print Dumper($recipe);
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    79
      }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    80
      elsif($line =~ m/<\/recipe>/)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    81
      {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    82
        if(defined $recipe)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    83
        {         
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    84
#          if($recipe->{'exit'} !~ m/ok/)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    85
          if($recipe->{'exit'} =~ m/failed/)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    86
          {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    87
#            if($recipe->{'target'} =~ m/\S:epoc32\//i) 
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    88
#               && $recipe->{'target'} !~ m/\S:epoc32\/build/i)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    89
            {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    90
              DumpRecipe($recipe);
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    91
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    92
            }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    93
          }         
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    94
        $recipe = undef;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    95
        }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    96
      }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    97
      elsif($line =~ m/Error:\sC3397E:\s/) #ARM Licence error code...
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    98
      {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    99
        ++$licence;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   100
        if(defined $recipe)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   101
        {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   102
          $recipe->{'armlicence'} = 1;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   103
        }  
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   104
      }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   105
      elsif($line =~ m/(<status\s.+\/>)/)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   106
      {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   107
        my $status = XMLin($1);
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   108
        if(defined $recipe)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   109
        {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   110
          $recipe->{'exit'} = $status->{'exit'};
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   111
          $recipe->{'attempt'} = $status->{'attempt'};
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   112
          if(defined $status->{'code'})
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   113
          {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   114
            $recipe->{'code'} = $status->{'code'}; 
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   115
          }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   116
          if(!defined $attempts{$status->{'attempt'}})
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   117
            {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   118
              $attempts{$status->{'attempt'}} = 0;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   119
            }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   120
          $attempts{$status->{'attempt'}} = $attempts{$status->{'attempt'}} + 1;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   121
          if(defined $recipe->{'armlicence'})
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   122
          {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   123
            if(!defined $licenceattempts{$status->{'attempt'}})
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   124
              {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   125
                $licenceattempts{$status->{'attempt'}} = 0;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   126
              }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   127
            $licenceattempts{$status->{'attempt'}} = $licenceattempts{$status->{'attempt'}} + 1;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   128
          }               
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   129
        }      
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   130
      }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   131
    }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   132
  close FILE;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   133
  print OUT "\n\nSummaries\n\n";
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   134
  foreach my $attempt (sort keys %attempts)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   135
  {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   136
    print OUT "Overall attempts: $attempt,".$attempts{$attempt}.",\n";
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   137
  }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   138
  foreach my $attempt (sort keys %licenceattempts)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   139
  {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   140
    print OUT "ARM Licence Fail attempts: $attempt,".$licenceattempts{$attempt}.",\n";
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   141
  }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   142
  print OUT "Total ARM Licence failures,$licence\n";
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   143
  
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   144
   
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   145
}
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   146
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   147
sub DumpRecipe($)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   148
{
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   149
  my $recipe = shift;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   150
  foreach my $key (@header)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   151
  {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   152
    if(defined $recipe->{$key})
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   153
    {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   154
      print OUT $recipe->{$key};
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   155
    }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   156
    print OUT ",";
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   157
  }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   158
  print OUT "\n";            
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   159
  #print Dumper($recipe);
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   160
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   161
}