Various tweaks to the summarising tools default tip
authorWilliam Roberts <williamr@symbian.org>
Mon, 26 Jul 2010 11:39:25 +0100
changeset 11 3dcb71781467
parent 10 375cb23d95ba
Various tweaks to the summarising tools
tools/summarise_gcc_errors.pl
tools/summarise_rvct_errors.pl
--- a/tools/summarise_gcc_errors.pl	Fri Jul 16 11:44:48 2010 +0100
+++ b/tools/summarise_gcc_errors.pl	Mon Jul 26 11:39:25 2010 +0100
@@ -33,6 +33,7 @@
 
 -warnings      process warnings as well as errors
 -verbose       list the files associated with each error
+-notfound      process "no such file" errors as well as compilation errors
 
 EOF
   exit (1);  
@@ -40,11 +41,13 @@
 
 my $warnings = 0;
 my $verbose = 0;
+my $notfound = 0;
 
 # Analyse the rest of command-line parameters
 if (!GetOptions(
     "w|warnings" => \$warnings,
     "v|verbose" => \$verbose,
+    "notfound" => \$notfound,
     ))
   {
   Usage("Invalid argument");
@@ -251,9 +254,9 @@
 			{
 			next;		# ignore Qt code generation warnings
 			}
-		if ($message =~ /.*: No such file/ && !$warnings)
+		if ($message =~ /.*: No such file/ && !$notfound)
 			{
-			# next;		# ignore "no such file", as these aren't likely to be GCC-specific
+			next;		# ignore "no such file", as these aren't likely to be GCC-specific
 			}
 
 		handle_message($current_package,$filename,$lineno,$messagetype,$message);	
--- a/tools/summarise_rvct_errors.pl	Fri Jul 16 11:44:48 2010 +0100
+++ b/tools/summarise_rvct_errors.pl	Mon Jul 26 11:39:25 2010 +0100
@@ -33,6 +33,7 @@
 
 -warnings      process warnings as well as errors
 -verbose       list the files associated with each error
+-ignore EXP    ignore input lines which match EXP
 
 EOF
   exit (1);  
@@ -40,11 +41,13 @@
 
 my $warnings = 0;
 my $verbose = 0;
+my $ignore_exp = "";
 
 # Analyse the rest of command-line parameters
 if (!GetOptions(
     "w|warnings" => \$warnings,
     "v|verbose" => \$verbose,
+    "ignore=s" => \$ignore_exp,
     ))
   {
   Usage("Invalid argument");
@@ -80,11 +83,14 @@
 		next;
 		}
 
+	next if ($ignore_exp ne "" && $line =~ /$ignore_exp/io);
+	
 	# Error: #5: cannot open source input file "lbs/epos_cposprivacynotifier.h":
 	
 	if ($line =~ /cannot open source input file (\"|&quot;)(.*)(\"|&quot)/)
 		{
 		my $missing_file = $2;
+		$missing_file =~ s/\\/\//g;	# Unix file separators please
 		my $count = $missing_files{$missing_file};
 		$count = 0 if (!defined $count);
 		$missing_files{$missing_file} = $count + 1;
@@ -140,6 +146,7 @@
 			}
 		
 		$filename =~ s/^.://;		# remove drive letter
+		$filename =~ s/\\/\//g;	# Unix file separators please
 		
 		$message =~ s/&quot;/\"/g;
 		$message =~ s/&amp;/&/g;