common/tools/analysis/parse_yarp_files.pl
author Dario Sestito <darios@symbian.org>
Thu, 18 Jun 2009 15:12:05 +0100
changeset 201 ec45c0fcc26e
parent 200 0b9c56a7a618
child 202 66da43a8fbf8
permissions -rw-r--r--
Moved location of build results to \\v800008\g$
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
200
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     1
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     2
my @asYarpFiles = ();
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     3
open(FILE, $ARGV[0]);
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     4
while ( <FILE> )
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     5
{
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     6
	if ( m/[^,]*,([^,]*)/ )
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     7
	{
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     8
		my $sFile = $1;
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     9
		chomp $sFile;
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    10
#		print "$sFile\n";
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    11
		push(@asYarpFiles, $sFile);
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    12
	}
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    13
}
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    14
close(FILE);
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    15
my $nYarpFiles = scalar(@asYarpFiles);
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    16
#print "Found $nYarpFiles files to parse\n";
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    17
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    18
my $nTotalRecipeErrors = 0;
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    19
for my $nYarpFile (@asYarpFiles)
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    20
{
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    21
	my $nRecipeErrors = 0;
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    22
#	print "Parsing file $nYarpFile...\n";
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    23
	open(FILE, $nYarpFile);
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    24
	while ( <FILE> )
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    25
	{
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    26
		if ( m/Overall attempts:\s*(\d+),(\d+)/ )
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    27
		{
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    28
			print "Attempt: $1 Errors: $2\n";
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    29
			$nRecipeErrors = $2;
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    30
		}
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    31
	}
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    32
	close(FILE);
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    33
#	print "Recipe errors in $nYarpFile: $nRecipeErrors\n";
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    34
	$nTotalRecipeErrors += $nRecipeErrors;
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    35
}
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    36
#print "Total recipe errors across all files: $nTotalRecipeErrors\n";
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    37
0b9c56a7a618 Add missing file pare_yarp_files.pl
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    38
print "$nTotalRecipeErrors";