common/tools/analysis/parse_yarp_files.pl
author Simon Howkins <simonh@symbian.org>
Wed, 20 Oct 2010 15:19:52 +0100
changeset 1313 116cb28ed586
parent 206 62976b2583f7
permissions -rw-r--r--
Removed the tools copy of create-canonical-sysdef-file, as it can use the common version. Removed test for Helium 7 as it's now standard.


my @asYarpFiles = ();
open(FILE, $ARGV[0]);
while ( <FILE> )
{
	if ( m/^[^,]*,[^,]*,([^,]*)/ )
	{
		my $sFile = $1;
		chomp $sFile;
#		print "$sFile\n";
		push(@asYarpFiles, $sFile);
	}
}
close(FILE);
my $nYarpFiles = scalar(@asYarpFiles);
#print "Found $nYarpFiles files to parse\n";

my $nTotalRecipeErrors = 0;
for my $nYarpFile (@asYarpFiles)
{
	my $nRecipeErrors = 0;
#	print "Parsing file $nYarpFile...\n";
	open(FILE, $nYarpFile);
	while ( <FILE> )
	{
		if ( m/^Raptor recipe failures:\s+(\d+)$/ )
		{
#			print "Raptor recipe failures: $1\n";
			$nRecipeErrors = $1;
		}
	}
	close(FILE);
#	print "Recipe errors in $nYarpFile: $nRecipeErrors\n";
	$nTotalRecipeErrors += $nRecipeErrors;
}
#print "Total recipe errors across all files: $nTotalRecipeErrors\n";

print "$nTotalRecipeErrors";