common/tools/analysis/yarp.pl
author Simon Howkins <simonh@symbian.org>
Mon, 05 Oct 2009 10:20:32 +0100
changeset 578 75fa4158340a
parent 288 58affcc6c40e
permissions -rw-r--r--
Fixed handling or regular expression strings, so the regular expression functiuonality works, not just substring detection! Added special handling if the severity marker is "ignore". Unsuprisingly, it ignores that line.
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.
288
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
    23
# XML::Simple leaks memory, so there is now a manual parsing mode which is enabled by the '$manualparsing' global variable.
138
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);
288
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
    31
my $manualparsing = 1; #XML::Simple leaks memory. Manual parsing doesn't, but may not be as robust if Raptor changes it's output...
138
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    32
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    33
main();
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
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    36
sub main()
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    37
{
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    38
  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
    39
  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
    40
  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
    41
  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
    42
  {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    43
    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
    44
  } 
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    45
  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
    46
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    47
  parsefile($filename);
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    48
  close OUT;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    49
}
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    50
sub scandir()
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    51
{
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    52
  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
    53
  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
    54
   
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    55
  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
    56
  {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    57
#    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
    58
    parsefile($filename);
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
  
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    62
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
    63
{
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    64
    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
    65
#    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
    66
    open(FILE,"<$filename") or die "Couldn't open filename\n";
288
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
    67
    my $recipe = undef;
138
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    68
    my %attempts;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    69
    my %licenceattempts;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    70
    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
    71
    my $licence = 0;
203
011f16c9778b Yarp to print failures
Dario Sestito <darios@symbian.org>
parents: 138
diff changeset
    72
    my $failures = 0;
288
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
    73
138
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    74
    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
    75
    {
284
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
    76
      if(defined $recipe)
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
    77
      {
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
    78
        if(defined $recipe->{'content'})
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
    79
        {
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
    80
          my $ref = $recipe->{'content'}; 
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
    81
          push(@$ref, $line);
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
    82
        }
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
    83
      }
138
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    84
      ++$counter;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    85
      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
    86
      {
288
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
    87
        $recipe = parseline($line."</recipe>");
138
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    88
        $recipe->{'line'} = $counter;
284
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
    89
        my @content;
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
    90
        push(@content, $line);
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
    91
        $recipe->{'content'} = \@content;
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
    92
        
138
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    93
#        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
    94
      }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    95
      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
    96
      {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    97
        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
    98
        {         
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
    99
#          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
   100
          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
   101
          {
203
011f16c9778b Yarp to print failures
Dario Sestito <darios@symbian.org>
parents: 138
diff changeset
   102
	          ++$failures;
138
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   103
#            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
   104
#               && $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
   105
            {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   106
              DumpRecipe($recipe);
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   107
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   108
            }
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 = undef;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   111
        }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   112
      }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   113
      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
   114
      {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   115
        ++$licence;
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 $recipe)
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
          $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
   119
        }  
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   120
      }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   121
      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
   122
      {
288
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   123
        my $status = parseline($1);
138
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   124
        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
   125
        {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   126
          $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
   127
          $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
   128
          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
   129
          {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   130
            $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
   131
          }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   132
          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
   133
            {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   134
              $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
   135
            }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   136
          $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
   137
          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
   138
          {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   139
            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
   140
              {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   141
                $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
   142
              }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   143
            $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
   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
    }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   148
  close FILE;
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   149
  print OUT "\n\nSummaries\n\n";
203
011f16c9778b Yarp to print failures
Dario Sestito <darios@symbian.org>
parents: 138
diff changeset
   150
  
205
863cc9c0bf03 Added output stream to failures line in yarp. Made the failure string more robust
Dario Sestito <darios@symbian.org>
parents: 203
diff changeset
   151
  print OUT "Raptor recipe failures: $failures\n";
863cc9c0bf03 Added output stream to failures line in yarp. Made the failure string more robust
Dario Sestito <darios@symbian.org>
parents: 203
diff changeset
   152
  
138
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   153
  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
   154
  {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   155
    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
   156
  }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   157
  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
   158
  {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   159
    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
   160
  }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   161
  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
   162
  
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   163
   
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   164
}
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   165
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   166
sub DumpRecipe($)
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   167
{
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   168
  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
   169
  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
   170
  {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   171
    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
   172
    {
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   173
      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
   174
    }
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   175
    print OUT ",";
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   176
  }
284
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
   177
  print OUT "\n";
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
   178
  my $content = $recipe->{'content'};
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
   179
  for my $line (@$content)
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
   180
  {
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
   181
    print $line;
e5f3b53baae0 Yarp - Modified to output failed recipes to STDOUT instead of having to use dump_recipe_at_line.pl, and modified build.xml to save these logs.
Matt Davies <mattd@symbian.org>
parents: 205
diff changeset
   182
  }              
138
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   183
  #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
   184
d3c5dd0ae0b0 Added yarp.pl - (Yet Another Raptor Parser) and dump_recipe_at_line.pl
Matt Davies <mattd@symbian.org>
parents:
diff changeset
   185
}
288
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   186
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   187
sub parseline($line)
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   188
{
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   189
  my $line = shift;
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   190
#  print "\t$line\n";
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   191
  my $val;
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   192
  if($manualparsing)
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   193
  {
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   194
    my $strippedline;    
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   195
    if($line =~ m/<\S+(.+)\/>/)
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   196
    {
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   197
      $strippedline = $1;
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   198
    }
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   199
    elsif($line =~ m/<\S+(.+)>\s*<\/\S+>/)
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   200
    {
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   201
      $strippedline = $1;
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   202
    }
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   203
#    print $strippedline."\n";
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   204
    my @stuff = split('\s+', $strippedline);
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   205
    my %results;
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   206
    foreach my $pair (@stuff)
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   207
    {
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   208
#      print $pair."\n";
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   209
      if($pair =~ m/^(\S+)=\'(\S+)\'$/)
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   210
      {
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   211
        $results{$1}=$2;
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   212
      }
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   213
    }
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   214
    $val = \%results;
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   215
  }  
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   216
  else
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   217
  {
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   218
    $val = XMLin($line);
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   219
  }   
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   220
  return $val; 
58affcc6c40e Yarp.pl - Added manual XML parsing. Memory leaks using XML::Simple cause perl to run out of memory when parsing a large raptor log.
MattD <mattd@symbian.org>
parents: 284
diff changeset
   221
}