author | Shabe Razvi <shaber@symbian.org> |
Thu, 04 Feb 2010 11:57:22 +0000 | |
changeset 874 | 60a32d297711 |
parent 131 | 1f3285cd5668 |
permissions | -rw-r--r-- |
97
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
1 |
#!/usr/bin/perl |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
2 |
|
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
3 |
# Copyright (c) 2009 Symbian Foundation Ltd |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
4 |
# This component and the accompanying materials are made available |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
5 |
# under the terms of the License "Eclipse Public License v1.0" |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
6 |
# which accompanies this distribution, and is available |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
7 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
8 |
# |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
9 |
# Initial Contributors: |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
10 |
# Symbian Foundation Ltd - initial contribution. |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
11 |
# |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
12 |
# Contributors: |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
13 |
# |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
14 |
# Description: |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
15 |
# Adds info form a file to a CSV |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
16 |
|
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
17 |
use strict; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
18 |
my $csvfile = shift @ARGV; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
19 |
my $filelist = shift @ARGV; |
121
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
20 |
my $zipfile = shift @ARGV; |
97
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
21 |
|
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
22 |
if(! -e $csvfile) |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
23 |
{ |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
24 |
die "cannot find $csvfile\n"; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
25 |
} |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
26 |
|
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
27 |
|
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
28 |
if(!-e $filelist) |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
29 |
{ |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
30 |
die "Cannot find $filelist\n"; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
31 |
} |
121
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
32 |
my %ziptimes; |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
33 |
if(defined $zipfile) |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
34 |
{ |
131
1f3285cd5668
Added analyse_components.pl and related call to build.xml
thomase
parents:
121
diff
changeset
|
35 |
open(ZIP,"7za l $zipfile 2>&1|") or die "Error: Couldn't look in $zipfile\n"; |
1f3285cd5668
Added analyse_components.pl and related call to build.xml
thomase
parents:
121
diff
changeset
|
36 |
#print "time,file\n"; |
121
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
37 |
while( my $line = <ZIP>) |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
38 |
{ |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
39 |
if($line =~ m/^(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s\S{5}\s+(\d+)\s+\d+\s+(.+)$/) #ignoring packed size... |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
40 |
{ |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
41 |
my $name = $3; |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
42 |
my $size = $2; |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
43 |
my $time = $1; |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
44 |
$name =~ s/\\/\//g; |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
45 |
$name = lc($name); |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
46 |
$ziptimes{$name} = $time; |
131
1f3285cd5668
Added analyse_components.pl and related call to build.xml
thomase
parents:
121
diff
changeset
|
47 |
#print "$time,$name\n"; |
121
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
48 |
} |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
49 |
} |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
50 |
close ZIP; |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
51 |
} |
97
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
52 |
my %files; |
121
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
53 |
|
97
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
54 |
open(FILES,"<$filelist") or die "Couldn't open $filelist\n"; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
55 |
while(my $line = <FILES>) |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
56 |
{ |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
57 |
$line =~ s/\\/\//g; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
58 |
|
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
59 |
if($line =~ m/^(.+)\s*:\s(.+\S)\s*$/) |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
60 |
{ |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
61 |
my $group = $1; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
62 |
my $file = $2; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
63 |
|
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
64 |
$file = lc($file); |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
65 |
if($files{$file}) |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
66 |
{ |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
67 |
|
121
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
68 |
$files{$file} = $files{$file}." ".$group; #Stop polluting next column |
97
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
69 |
print "Multi:$file".$files{$file}."\n"; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
70 |
|
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
71 |
} |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
72 |
else |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
73 |
{ |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
74 |
$files{$file} = ",".$group; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
75 |
} |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
76 |
} |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
77 |
} |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
78 |
close FILE; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
79 |
|
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
80 |
open(CSV,"<$csvfile") or die "Couldn't open $csvfile\n"; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
81 |
my $resultsfile = $csvfile."_results.csv"; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
82 |
open(RESULTS,">$resultsfile") or die "Couldn't open write to $resultsfile\n"; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
83 |
my $header = <CSV>; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
84 |
$header =~ s/\n//; |
121
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
85 |
print RESULTS $header.",status,time\n"; |
97
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
86 |
my @fields = split(',',$header); |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
87 |
my $targetindex = 0; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
88 |
my $counter = 0; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
89 |
my $bldinfindex = 0; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
90 |
|
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
91 |
my %failed; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
92 |
my %bldinffiles; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
93 |
foreach my $column (@fields) |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
94 |
{ |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
95 |
if($column =~ m/target/) |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
96 |
{ |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
97 |
$targetindex = $counter; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
98 |
} |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
99 |
elsif($column =~ m/bldinf/) |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
100 |
{ |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
101 |
$bldinfindex = $counter; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
102 |
} |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
103 |
++$counter; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
104 |
} |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
105 |
# print "\ntarget:$targetindex\tbuildinf:$bldinfindex\n"; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
106 |
while(my $line = <CSV>) |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
107 |
{ |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
108 |
$line =~ s/\n//; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
109 |
@fields = split(',',$line); |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
110 |
my $target = $fields[$targetindex]; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
111 |
$target = lc($target); |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
112 |
my $bldinf = $fields[$bldinfindex]; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
113 |
if(!defined $bldinffiles{$bldinf}) |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
114 |
{ |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
115 |
$bldinffiles{$bldinf} = 1; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
116 |
} |
121
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
117 |
my $found = 0; |
97
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
118 |
if(defined $files{$target}) |
121
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
119 |
{ |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
120 |
$found = 1; |
97
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
121 |
$line = $line.$files{$target}; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
122 |
if($files{$target} =~ m/fail/i) |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
123 |
{ |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
124 |
if(!defined $failed{$bldinf}) |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
125 |
{ |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
126 |
$failed{$bldinf} = 1; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
127 |
} |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
128 |
} |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
129 |
} |
121
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
130 |
if(defined $ziptimes{$target}) |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
131 |
{ |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
132 |
if($found) |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
133 |
{ |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
134 |
$line = $line.",".$ziptimes{$target}; |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
135 |
} |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
136 |
else |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
137 |
{ |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
138 |
$line = $line.",,".$ziptimes{$target}; |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
139 |
} |
fc757bffbe1d
merge_csv.pl - Added an optional post-build rnd zip argument which adds a timestamp field to the CSV. Requires '7z' not '7za'.
Matt Davies <mattd@symbian.org>
parents:
97
diff
changeset
|
140 |
} |
97
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
141 |
print RESULTS $line."\n"; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
142 |
|
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
143 |
} |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
144 |
close RESULTS; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
145 |
close CSV; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
146 |
foreach my $bldinf (sort(keys %bldinffiles)) |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
147 |
{ |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
148 |
if(!defined $failed{$bldinf}) |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
149 |
{ |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
150 |
print "OK:\t$bldinf\n"; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
151 |
} |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
152 |
} |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
153 |
foreach my $bldinf (sort(keys %failed)) |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
154 |
{ |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
155 |
print "Failed:\t$bldinf\n"; |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
156 |
} |
4f54ca96b7e8
Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff
changeset
|
157 |