tools/summarise_gcc_errors.pl
author William Roberts <williamr@symbian.org>
Wed, 14 Apr 2010 09:46:27 +0100
changeset 6 2618a0f10e3e
parent 3 5578c2bec847
child 7 8c4a7869f673
permissions -rw-r--r--
Collate the RVCT "cannot open source input file" errors to list the missing files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
     1
#! perl
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
     2
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
     3
# Copyright (c) 2010 Symbian Foundation Ltd
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
     4
# This component and the accompanying materials are made available
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
     6
# which accompanies this distribution, and is available
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
     8
#
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
     9
# Initial Contributors:
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    10
# Symbian Foundation Ltd - initial contribution.
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    11
# 
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    12
# Contributors:
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    13
#
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    14
# Description:
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    15
# Perl script to summarise GCC logs
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    16
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    17
use strict;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    18
use Getopt::Long;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    19
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    20
sub Usage($)
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    21
  {
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    22
  my ($msg) = @_;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    23
  
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    24
  print "$msg\n\n" if ($msg ne "");
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    25
  
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    26
	print <<'EOF';
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    27
summarise_gcc_errors.pl - simple script for analysing gcc error logs
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    28
	
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    29
This script will read a collection of GCC output logs and summarise
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    30
the error messages in various useful ways.
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    31
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    32
Options:
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    33
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    34
-warnings      process warnings as well as errors
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    35
-verbose       list the files associated with each error
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    36
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    37
EOF
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    38
  exit (1);  
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    39
  }
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    40
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    41
my $warnings = 0;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    42
my $verbose = 0;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    43
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    44
# Analyse the rest of command-line parameters
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    45
if (!GetOptions(
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    46
    "w|warnings" => \$warnings,
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    47
    "v|verbose" => \$verbose,
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    48
    ))
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    49
  {
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    50
  Usage("Invalid argument");
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    51
  }
3
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    52
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    53
my $current_package = ""; 
1
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    54
my %files;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    55
my %errors_by_file;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    56
my %error_count_by_file;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    57
my %errors;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    58
my %message_ids;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    59
my %files_by_message_id;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    60
my %messages_by_id;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    61
my %unique_message_counts;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    62
my %all_message_counts;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    63
my $next_message_id = 1;
3
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    64
my %packages_by_file;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    65
my %package_count_by_file;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    66
1
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    67
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    68
my $line;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    69
while ($line = <>)
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    70
	{
3
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    71
	# </pre>os/usb, usb_CompilerCompatibility.005, SF_builds/usb/builds/CompilerCompatibility/usb_CompilerCompatibility.005/html/os_usb_failures.html
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    72
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    73
	if ($line =~/\/html\/([^\/]+)_failures.html/)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    74
		{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    75
		$current_package = $1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    76
		$current_package =~ s/_/\//;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    77
		next;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    78
		}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    79
1
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    80
	# M:/epoc32/include/elements/nm_interfaces.h:255: warning: dereferencing type-punned pointer will break strict-aliasing rules
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    81
	# M:/epoc32/include/f32file.h:2169: warning: invalid access to non-static data member 'TVolFormatParam::iUId'  of NULL object
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    82
	# M:/epoc32/include/f32file.h:2169: warning: (perhaps the 'offsetof' macro was used incorrectly)
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    83
	# M:/epoc32/include/comms-infras/ss_nodemessages.h:301: error: wrong number of template arguments (3, should be 4)
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    84
	# M:/epoc32/include/elements/nm_signatures.h:496: error: provided for 'template<class TSIGNATURE, int PAYLOADATTRIBOFFSET, class TATTRIBUTECREATIONPOLICY, int PAYLOADBUFFERMAXLEN> class Messages::TSignatureWithPolymorphicPayloadMetaType'
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    85
	# M:/epoc32/include/comms-infras/ss_nodemessages.h:301: error: invalid type in declaration before ';' token
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    86
	
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    87
	if ($line =~ /(^...*):(\d+): ([^:]+): (.*)$/)
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    88
		{
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    89
		my $filename = $1;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    90
		my $lineno = $2;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    91
		my $messagetype = $3;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    92
		my $message = $4;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    93
		
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    94
		if ($messagetype eq "note")
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    95
			{
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    96
			next;		# ignore notes
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    97
			}
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    98
		if ($messagetype eq "warning" && !$warnings)
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
    99
			{
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   100
			next;		# ignore warnings
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   101
			}
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   102
		
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   103
		$filename =~ s/^.://;		# remove drive letter
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   104
		
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   105
		$message =~ s/&amp;/&/g;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   106
		$message =~ s/&gt;/>/g;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   107
		$message =~ s/&lt;/</g;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   108
		$message =~ s/&#39;/'/g;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   109
		my $generic_message = "$messagetype: $message";
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   110
		$generic_message =~ s/'offsetof'/"offsetof"/;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   111
		$generic_message =~ s/'([^a-zA-Z])'/"\1"/g;	# don't catch ';' in next substitution
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   112
		$generic_message =~ s/['`][^']+'/XX/g;	# suppress quoted bits of the actual instance
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   113
		
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   114
		my $message_id = $next_message_id;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   115
		if (!defined $message_ids{$generic_message})
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   116
			{
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   117
			$next_message_id++;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   118
			$message_ids{$generic_message} = $message_id;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   119
			$messages_by_id{$message_id} = $generic_message;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   120
			$all_message_counts{$message_id} = 1;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   121
			}
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   122
		else
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   123
			{
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   124
			$message_id = $message_ids{$generic_message};
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   125
			$all_message_counts{$message_id} += 1;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   126
			}
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   127
		my $instance = sprintf("%s:%d: %s-#%d", $filename, $lineno, $messagetype, $message_id);
3
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   128
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   129
		my $packages = $packages_by_file{$filename};
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   130
		if (!defined $packages)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   131
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   132
			$packages_by_file{$filename} = "\t$current_package\t";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   133
			$package_count_by_file{$filename} = 1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   134
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   135
		else
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   136
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   137
			if (index($packages,"\t$current_package\t") < 0)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   138
				{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   139
				$packages_by_file{$filename} .= "\t$current_package\t";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   140
				$package_count_by_file{$filename} += 1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   141
				}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   142
			}
1
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   143
		
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   144
		if (defined $files{$instance})
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   145
			{
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   146
			# already seen this one
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   147
			next;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   148
			}
3
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   149
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   150
		if (!defined $unique_message_counts{$message_id})
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   151
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   152
			$unique_message_counts{$message_id} = 1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   153
			}
1
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   154
		else
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   155
			{
3
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   156
			$unique_message_counts{$message_id} += 1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   157
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   158
		$files{$instance} = $message;
1
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   159
3
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   160
		if (!defined $files_by_message_id{$message_id})
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   161
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   162
			$files_by_message_id{$message_id} = $filename;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   163
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   164
		else
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   165
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   166
			$files_by_message_id{$message_id} .= "\n$filename";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   167
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   168
				
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   169
		my $error = sprintf "%-5d: %s: %s", $lineno, $messagetype, $message;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   170
		if (!defined $errors_by_file{$filename})
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   171
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   172
			$errors_by_file{$filename} = $error;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   173
			$error_count_by_file{$filename} = 1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   174
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   175
		else
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   176
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   177
			$errors_by_file{$filename} .= "\n$error";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   178
			$error_count_by_file{$filename} += 1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   179
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   180
1
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   181
		next;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   182
		}
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   183
	}
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   184
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   185
# clean up the file lists
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   186
my %filecount_by_message_id;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   187
foreach my $id (keys %files_by_message_id)
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   188
	{
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   189
	my @longlist = split /\n/, $files_by_message_id{$id};
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   190
	my %uniq;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   191
	foreach my $file (@longlist)
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   192
		{
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   193
		$uniq{$file} = 1;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   194
		}
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   195
	my $uniqlist = join( "\n\t", sort keys %uniq);
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   196
	$files_by_message_id{$id} = $uniqlist;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   197
	$filecount_by_message_id{$id} = scalar keys %uniq;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   198
	}
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   199
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   200
print "\n\n====Occurrences of messages (distinct, all)\n";
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   201
foreach my $id ( sort {$unique_message_counts{$b} <=> $unique_message_counts{$a}} keys %unique_message_counts)
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   202
	{
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   203
	printf "%-6d\t%-6d\t%s\n", $unique_message_counts{$id}, $all_message_counts{$id}, $messages_by_id{$id};
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   204
	}
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   205
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   206
print "\n\n====Files affected per message\n";
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   207
foreach my $id ( sort {$filecount_by_message_id{$b} <=> $filecount_by_message_id{$a}} keys %filecount_by_message_id)
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   208
	{
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   209
	printf "%-6d\t%s\n", $filecount_by_message_id{$id}, $messages_by_id{$id};
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   210
	if ($verbose)
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   211
		{
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   212
		print "\t", $files_by_message_id{$id};
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   213
		}
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   214
	}
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   215
3
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   216
print "\n\n====Packages impacted (if > 1)\n";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   217
foreach my $file ( sort {$package_count_by_file{$b} <=> $package_count_by_file{$a}} keys %package_count_by_file)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   218
	{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   219
	if ($package_count_by_file{$file} < 2)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   220
		{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   221
		next;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   222
		}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   223
	my ($empty,@packages) = split /\t+/, $packages_by_file{$file};
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   224
	printf "%-6d\t%s\n\t(%s)\n",$package_count_by_file{$file}, $file, join(", ", @packages);
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   225
	}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   226
1
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   227
print "\n\n====Affected files by package\n";
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   228
my $current_package = "";
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   229
my @currentfiles;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   230
foreach my $file (sort keys %error_count_by_file)
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   231
	{
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   232
	my ($root, $sf, $layer, $packagename, @rest) = split /[\/\\]/, $file;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   233
	my $package = "$sf/$layer/$packagename";
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   234
	if ($layer eq "include")
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   235
		{
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   236
		$package = "$sf/$layer";
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   237
		}
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   238
	if ($package ne $current_package)
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   239
		{
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   240
		if ($current_package ne "")
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   241
			{
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   242
			printf "%-6d\t%s\n", scalar @currentfiles, $current_package;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   243
			print join("\n",@currentfiles);
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   244
			print "\n";
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   245
			}
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   246
		$current_package = $package;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   247
		@currentfiles = ();
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   248
		}
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   249
	my $filedetails = sprintf "\t%-6d\t%s", $error_count_by_file{$file}, $file;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   250
	push @currentfiles, $filedetails;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   251
	}
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   252
printf "%-6d\t%s\n", scalar @currentfiles, $current_package;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   253
print join("\n",@currentfiles);
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   254
print "\n";
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   255
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   256
print "\n\n====Messages by file\n";
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   257
foreach my $file ( sort keys %error_count_by_file)
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   258
	{
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   259
	my @details = split "\n", $errors_by_file{$file};
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   260
	printf "%-6d\t%s\n\t", $error_count_by_file{$file}, $file;
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   261
	print join("\n\t", @details);
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   262
	print "\n";
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   263
	}
fd0863fd52e5 Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs
William Roberts <williamr@symbian.org>
parents:
diff changeset
   264