author | Dario Sestito <darios@symbian.org> |
Thu, 02 Sep 2010 11:48:45 +0100 | |
changeset 290 | 2ca4533db9fe |
parent 286 | 8e1488905621 |
child 295 | 2b7e66ca13ba |
permissions | -rw-r--r-- |
176 | 1 |
# Copyright (c) 2009 Symbian Foundation Ltd |
2 |
# This component and the accompanying materials are made available |
|
3 |
# under the terms of the License "Eclipse Public License v1.0" |
|
4 |
# which accompanies this distribution, and is available |
|
5 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
6 |
# |
|
7 |
# Initial Contributors: |
|
8 |
# Symbian Foundation Ltd - initial contribution. |
|
9 |
# |
|
10 |
# Contributors: |
|
236
08436a227940
Add author information. Reviewed descriptions
Dario Sestito <darios@symbian.org>
parents:
235
diff
changeset
|
11 |
# Dario Sestito <darios@symbian.org> |
176 | 12 |
# |
13 |
# Description: |
|
14 |
# Unite and HTML-ize Raptor log files |
|
15 |
||
16 |
use strict; |
|
17 |
use FindBin; |
|
18 |
use lib $FindBin::Bin; |
|
19 |
use RaptorError; |
|
20 |
use RaptorWarning; |
|
21 |
use RaptorInfo; |
|
22 |
use RaptorUnreciped; |
|
23 |
use RaptorRecipe; |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
24 |
use releaseables; |
176 | 25 |
|
26 |
use XML::SAX; |
|
27 |
use RaptorSAXHandler; |
|
28 |
use Getopt::Long; |
|
29 |
||
186
ec83a06d23a8
HTML escape failures so that they can be viewed correctly
Dario Sestito <darios@symbian.org>
parents:
185
diff
changeset
|
30 |
use CGI; |
ec83a06d23a8
HTML escape failures so that they can be viewed correctly
Dario Sestito <darios@symbian.org>
parents:
185
diff
changeset
|
31 |
|
176 | 32 |
our $raptorbitsdir = 'raptorbits'; |
33 |
our $basedir = ''; |
|
34 |
my $outputdir = "html"; |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
35 |
our $releaseablesdir = "releaseables"; |
176 | 36 |
our $raptor_config = 'dummy_config'; |
37 |
our $current_log_file = ''; |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
38 |
our $missing = 0; |
176 | 39 |
my $help = 0; |
40 |
GetOptions(( |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
41 |
'missing!' => \$missing, |
176 | 42 |
'basedir=s' => \$basedir, |
43 |
'help!' => \$help |
|
44 |
)); |
|
269
a215187752cf
Allow shell wildcards in input file names
Dario Sestito <darios@symbian.org>
parents:
268
diff
changeset
|
45 |
my @logfiles = (); |
a215187752cf
Allow shell wildcards in input file names
Dario Sestito <darios@symbian.org>
parents:
268
diff
changeset
|
46 |
for my $logfilesarg (@ARGV) |
a215187752cf
Allow shell wildcards in input file names
Dario Sestito <darios@symbian.org>
parents:
268
diff
changeset
|
47 |
{ |
a215187752cf
Allow shell wildcards in input file names
Dario Sestito <darios@symbian.org>
parents:
268
diff
changeset
|
48 |
push(@logfiles, glob($logfilesarg)); |
a215187752cf
Allow shell wildcards in input file names
Dario Sestito <darios@symbian.org>
parents:
268
diff
changeset
|
49 |
} |
176 | 50 |
|
51 |
if ($help) |
|
52 |
{ |
|
259 | 53 |
print <<_EOH; |
54 |
UH parser |
|
270 | 55 |
Reads one or more Raptor log files, extracts the interesting bits and puts them |
56 |
into a set of HTML files, making it easy to spot the failures and see the |
|
57 |
related log snippets. |
|
259 | 58 |
|
59 |
Usage: uh.pl [options] [files] |
|
60 |
||
61 |
Options: |
|
62 |
-h, --help Show this help message and exit |
|
270 | 63 |
-m, --missing Add report on missing binaries. Check is done against |
64 |
the epoc tree at the root of the current drive |
|
259 | 65 |
(Note: it requires Raptor log to include whatlog info) |
66 |
-b OUTDIR, --basedir OUTDIR |
|
67 |
Generate output under OUTDIR (defaults to current dir) |
|
68 |
||
69 |
Files: |
|
270 | 70 |
Accepts one or a list of raptor log files (separated by a space). |
71 |
Shell wildcards are accepted in the file names. |
|
72 |
If no file argument is provided then take the most recent log under |
|
73 |
\\epoc32\\build |
|
74 |
||
75 |
Examples: |
|
76 |
uh.pl -m Launched from the build drive, parses the log file of |
|
77 |
the last call to sbs. Also reports on missing files. |
|
78 |
uh.pl -m \\output\\logs\\*_compile.log |
|
79 |
Parses all files ending in '_compile.log' under the |
|
80 |
\\output\\logs directory. Also reports on missing files. |
|
259 | 81 |
_EOH |
176 | 82 |
exit(0); |
83 |
} |
|
84 |
||
227
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
85 |
if (!@logfiles) |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
86 |
{ |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
87 |
if (-d "\\epoc32\\build") |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
88 |
{ |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
89 |
opendir(BUILDDIR, "\\epoc32\\build"); |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
90 |
my @allfoundlogfiles = grep(/^Makefile.\d{4}-\d{2}-\d{2}-\d{2}-\d{2}-\d{2}\.log$/, readdir(BUILDDIR)); |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
91 |
@allfoundlogfiles = sort {$b cmp $a} @allfoundlogfiles; |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
92 |
push @logfiles, "\\epoc32\\build\\" . shift @allfoundlogfiles; |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
93 |
} |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
94 |
} |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
95 |
|
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
96 |
if (!@logfiles) |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
97 |
{ |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
98 |
print "No files to parse.\n"; |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
99 |
exit(0); |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
100 |
} |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
101 |
|
176 | 102 |
if ($basedir) |
103 |
{ |
|
104 |
$raptorbitsdir = "$basedir/raptorbits"; |
|
105 |
$outputdir = "$basedir/html"; |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
106 |
$releaseablesdir = "$basedir/releaseables"; |
176 | 107 |
} |
108 |
mkdir($basedir) if (!-d$basedir); |
|
109 |
||
110 |
$raptorbitsdir =~ s,/,\\,g; # this is because rmdir doens't cope correctly with the forward slashes |
|
111 |
||
112 |
system("rmdir /S /Q $raptorbitsdir") if (-d $raptorbitsdir); |
|
113 |
mkdir($raptorbitsdir); |
|
114 |
#print "Created dir $raptorbitsdir.\n"; |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
115 |
system("rmdir /S /Q $releaseablesdir") if (-d $releaseablesdir); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
116 |
mkdir("$releaseablesdir"); |
176 | 117 |
|
185
b76adfbc6648
Don't dump failures which aren't reported
Dario Sestito <darios@symbian.org>
parents:
176
diff
changeset
|
118 |
our $failure_item_number = 0; |
b76adfbc6648
Don't dump failures which aren't reported
Dario Sestito <darios@symbian.org>
parents:
176
diff
changeset
|
119 |
|
176 | 120 |
# create empty summary file anyway |
121 |
open(SUMMARY, ">$raptorbitsdir/summary.csv"); |
|
122 |
close(SUMMARY); |
|
123 |
||
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
124 |
|
176 | 125 |
my $saxhandler = RaptorSAXHandler->new(); |
126 |
$saxhandler->add_observer('RaptorError', $RaptorError::reset_status); |
|
127 |
$saxhandler->add_observer('RaptorWarning', $RaptorWarning::reset_status); |
|
128 |
$saxhandler->add_observer('RaptorInfo', $RaptorInfo::reset_status); |
|
129 |
$saxhandler->add_observer('RaptorUnreciped', $RaptorUnreciped::reset_status); |
|
130 |
$saxhandler->add_observer('RaptorRecipe', $RaptorRecipe::reset_status); |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
131 |
$saxhandler->add_observer('releaseables', $releaseables::reset_status); |
176 | 132 |
|
133 |
our $allbldinfs = {}; |
|
232
fde18ad07a01
Add parsed logs and built configs at the top of the main page
Dario Sestito <darios@symbian.org>
parents:
231
diff
changeset
|
134 |
our $allconfigs = {}; |
286
8e1488905621
Add number of releasables (by package) in the missing column
Dario Sestito <darios@symbian.org>
parents:
270
diff
changeset
|
135 |
our $releaseables_by_package = {}; |
176 | 136 |
|
137 |
my $parser = XML::SAX::ParserFactory->parser(Handler=>$saxhandler); |
|
138 |
for (@logfiles) |
|
139 |
{ |
|
140 |
print "Reading file: $_\n"; |
|
141 |
$current_log_file = $_; |
|
142 |
$parser->parse_uri($_); |
|
143 |
} |
|
144 |
||
286
8e1488905621
Add number of releasables (by package) in the missing column
Dario Sestito <darios@symbian.org>
parents:
270
diff
changeset
|
145 |
print "Removing duplicates from missing files\n"; |
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
146 |
releaseables::remove_missing_duplicates(); |
286
8e1488905621
Add number of releasables (by package) in the missing column
Dario Sestito <darios@symbian.org>
parents:
270
diff
changeset
|
147 |
print "Counting releasables\n"; |
8e1488905621
Add number of releasables (by package) in the missing column
Dario Sestito <darios@symbian.org>
parents:
270
diff
changeset
|
148 |
releaseables::count_distinct(); |
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
149 |
|
176 | 150 |
my @allpackages = distinct_packages($allbldinfs); |
151 |
||
286
8e1488905621
Add number of releasables (by package) in the missing column
Dario Sestito <darios@symbian.org>
parents:
270
diff
changeset
|
152 |
print "Generating HTML\n"; |
176 | 153 |
|
154 |
system("rd /S /Q $outputdir") if (-d $outputdir); |
|
155 |
mkdir ($outputdir); |
|
156 |
||
157 |
my $raptor_errors = {}; |
|
158 |
my $raptor_warnings = {}; |
|
159 |
my $raptor_unreciped = {}; |
|
160 |
my $general_failures_num_by_severity = {}; |
|
161 |
my $general_failures_by_category_severity = {}; |
|
162 |
my $recipe_failures_num_by_severity = {}; |
|
163 |
my $recipe_failures_by_package_severity = {}; |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
164 |
my $missing_by_package = {}; |
176 | 165 |
#my $severities = {}; |
166 |
my @severities = ('critical', 'major', 'minor', 'unknown'); |
|
167 |
||
168 |
# READ SUMMARY.CSV FILE |
|
169 |
my $csv_file = "$raptorbitsdir/summary.csv"; |
|
170 |
my $csv_linenum = 0; |
|
171 |
open(CSV, $csv_file); |
|
172 |
while(<CSV>) |
|
173 |
{ |
|
174 |
$csv_linenum ++; |
|
175 |
my $line = $_; |
|
176 |
||
177 |
if ($line =~ /([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*)/) |
|
178 |
{ |
|
179 |
my $failure = {}; |
|
180 |
$failure->{category} = $1; |
|
181 |
$failure->{subcategory} = $2; |
|
182 |
$failure->{severity} = $3; |
|
183 |
$failure->{config} = $4; |
|
184 |
$failure->{component} = $5; |
|
185 |
$failure->{mmp} = $6; |
|
186 |
$failure->{phase} = $7; |
|
187 |
$failure->{recipe} = $8; |
|
188 |
$failure->{file} = $9; |
|
189 |
$failure->{linenum} = $10; |
|
190 |
||
191 |
my $failure_package = ''; |
|
192 |
||
193 |
if (!$failure->{category}) |
|
194 |
{ |
|
195 |
print "WARNING: summary line without a category at $csv_file line $csv_linenum. Skipping\n"; |
|
196 |
next; |
|
197 |
} |
|
198 |
||
199 |
if ($failure->{category} =~ m,^recipe_failure$,i and !$failure->{component}) |
|
200 |
{ |
|
201 |
print "WARNING: recipe_failure with component field empty at $csv_file line $csv_linenum. Skipping\n"; |
|
202 |
next; |
|
203 |
} |
|
204 |
if ($failure->{component}) |
|
205 |
{ |
|
267
a02973783e64
Extend UH parser to cope with tools build
Dario Sestito <darios@symbian.org>
parents:
259
diff
changeset
|
206 |
$failure_package = RaptorCommon::get_package_subpath($failure->{component}); |
a02973783e64
Extend UH parser to cope with tools build
Dario Sestito <darios@symbian.org>
parents:
259
diff
changeset
|
207 |
if (!$failure_package) |
176 | 208 |
{ |
209 |
print "WARNING: summary line with wrong component path at $csv_file line $csv_linenum. Skipping\n"; |
|
210 |
next; |
|
211 |
} |
|
212 |
} |
|
213 |
||
214 |
$failure->{subcategory} = 'uncategorized' if (!$failure->{subcategory}); |
|
215 |
$failure->{severity} = 'unknown' if (!$failure->{severity}); |
|
216 |
$failure->{mmp} = '-' if (!$failure->{mmp}); |
|
209
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
217 |
$failure->{phase} = '-' if (!$failure->{phase}); |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
218 |
$failure->{recipe} = '-' if (!$failure->{recipe}); |
176 | 219 |
|
220 |
# populate severities dynamically. |
|
221 |
#$severities->{$failure->{severity}} = 1; |
|
222 |
||
223 |
# put failure items into their category container |
|
209
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
224 |
if ($failure->{category} =~ /^recipe_failure$/i || $failure->{category} =~ /^raptor_(error|warning|unreciped)$/i && $failure_package) |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
225 |
{ |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
226 |
$recipe_failures_num_by_severity->{$failure_package} = {} if (!defined $recipe_failures_num_by_severity->{$failure_package}); |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
227 |
my $package_failure = $recipe_failures_num_by_severity->{$failure_package}; |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
228 |
|
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
229 |
if (!defined $package_failure->{$failure->{severity}}) |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
230 |
{ |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
231 |
$package_failure->{$failure->{severity}} = 1; |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
232 |
} |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
233 |
else |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
234 |
{ |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
235 |
$package_failure->{$failure->{severity}} ++; |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
236 |
} |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
237 |
|
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
238 |
$recipe_failures_by_package_severity->{$failure_package} = {} if (!defined $recipe_failures_by_package_severity->{$failure_package}); |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
239 |
$recipe_failures_by_package_severity->{$failure_package}->{$failure->{severity}} = [] if (!defined $recipe_failures_by_package_severity->{$failure_package}->{$failure->{severity}}); |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
240 |
push(@{$recipe_failures_by_package_severity->{$failure_package}->{$failure->{severity}}}, $failure); |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
241 |
} |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
242 |
elsif ($failure->{category} =~ /^raptor_(error|warning|unreciped)$/i) |
176 | 243 |
{ |
244 |
$general_failures_num_by_severity->{$failure->{category}} = {} if (!defined $general_failures_num_by_severity->{$failure->{category}}); |
|
245 |
my $general_failure = $general_failures_num_by_severity->{$failure->{category}}; |
|
246 |
||
247 |
if (!defined $general_failure->{$failure->{severity}}) |
|
248 |
{ |
|
249 |
$general_failure->{$failure->{severity}} = 1; |
|
250 |
} |
|
251 |
else |
|
252 |
{ |
|
253 |
$general_failure->{$failure->{severity}} ++; |
|
254 |
} |
|
255 |
||
256 |
$general_failures_by_category_severity->{$failure->{category}} = {} if (!defined $general_failures_by_category_severity->{$failure->{category}}); |
|
257 |
$general_failures_by_category_severity->{$failure->{category}}->{$failure->{severity}} = [] if (!defined $general_failures_by_category_severity->{$failure->{category}}->{$failure->{severity}}); |
|
258 |
push(@{$general_failures_by_category_severity->{$failure->{category}}->{$failure->{severity}}}, $failure); |
|
259 |
} |
|
260 |
} |
|
261 |
else |
|
262 |
{ |
|
263 |
print "WARNING: line does not match expected format at $csv_file line $csv_linenum. Skipping\n"; |
|
264 |
} |
|
265 |
} |
|
266 |
close(CSV); |
|
267 |
||
268 |
# PRINT HTML SUMMARY |
|
269 |
my $aggregated_html = "$outputdir/index.html"; |
|
270 |
open(AGGREGATED, ">$aggregated_html"); |
|
232
fde18ad07a01
Add parsed logs and built configs at the top of the main page
Dario Sestito <darios@symbian.org>
parents:
231
diff
changeset
|
271 |
print AGGREGATED "RAPTOR BUILD SUMMARY<br/><br/>\n"; |
fde18ad07a01
Add parsed logs and built configs at the top of the main page
Dario Sestito <darios@symbian.org>
parents:
231
diff
changeset
|
272 |
|
fde18ad07a01
Add parsed logs and built configs at the top of the main page
Dario Sestito <darios@symbian.org>
parents:
231
diff
changeset
|
273 |
my $allconfigsstring = ''; |
fde18ad07a01
Add parsed logs and built configs at the top of the main page
Dario Sestito <darios@symbian.org>
parents:
231
diff
changeset
|
274 |
for my $raptorconfig (sort {$a cmp $b} keys %{$allconfigs}) { $allconfigsstring .= ", $raptorconfig"; } |
fde18ad07a01
Add parsed logs and built configs at the top of the main page
Dario Sestito <darios@symbian.org>
parents:
231
diff
changeset
|
275 |
$allconfigsstring =~ s/^, //; |
233
71dcc4963b58
Move PARSED FILES section to the bottom. Minor cosmetic changes
Dario Sestito <darios@symbian.org>
parents:
232
diff
changeset
|
276 |
print AGGREGATED "BUILT CONFIGS:<br/>$allconfigsstring<br/>\n"; |
176 | 277 |
|
235
0cefd1662676
Ren 'general failures' title into more appropriate 'floating failures'
Dario Sestito <darios@symbian.org>
parents:
234
diff
changeset
|
278 |
print AGGREGATED "<br/>FLOATING FAILURES<br/>\n"; |
176 | 279 |
print AGGREGATED "<table border='1'>\n"; |
280 |
my $tableheader = "<tr><th>category</th>"; |
|
281 |
for (@severities) { $tableheader .= "<th>$_</th>"; } |
|
282 |
$tableheader .= "</tr>"; |
|
283 |
print AGGREGATED "$tableheader\n"; |
|
284 |
for my $category (keys %{$general_failures_num_by_severity}) |
|
285 |
{ |
|
286 |
print_category_specific_summary($category, $general_failures_by_category_severity->{$category}); |
|
287 |
my $categoryline = "<tr><td><a href='$category.html'>$category</a></td>"; |
|
288 |
for (@severities) |
|
289 |
{ |
|
290 |
my $failuresbyseverity = 0; |
|
291 |
$failuresbyseverity = $general_failures_num_by_severity->{$category}->{$_} if (defined $general_failures_num_by_severity->{$category}->{$_}); |
|
292 |
$categoryline .= "<td>$failuresbyseverity</td>"; |
|
293 |
} |
|
294 |
$categoryline .= "</tr>"; |
|
295 |
print AGGREGATED "$categoryline\n"; |
|
296 |
} |
|
297 |
print AGGREGATED "</table>\n"; |
|
298 |
print AGGREGATED "<br/>\n"; |
|
299 |
||
234
788d181d70a4
Do not display the unknown/unknown package unless there are associated failures
Dario Sestito <darios@symbian.org>
parents:
233
diff
changeset
|
300 |
print AGGREGATED "PACKAGE-SPECIFIC FAILURES<br/>\n"; |
176 | 301 |
print AGGREGATED "<table border='1'>\n"; |
302 |
$tableheader = "<tr><th>package</th>"; |
|
303 |
for (@severities) { $tableheader .= "<th>$_</th>"; } |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
304 |
$tableheader .= "<th>missing</th>" if ($missing); |
176 | 305 |
$tableheader .= "</tr>"; |
306 |
print AGGREGATED "$tableheader\n"; |
|
307 |
for my $package (@allpackages) |
|
308 |
{ |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
309 |
my $mustlink = print_package_specific_summary($package); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
310 |
if ($mustlink) |
176 | 311 |
{ |
312 |
my $packagesummaryhtml = $package; |
|
267
a02973783e64
Extend UH parser to cope with tools build
Dario Sestito <darios@symbian.org>
parents:
259
diff
changeset
|
313 |
$packagesummaryhtml =~ s,/,_,g; |
176 | 314 |
$packagesummaryhtml .= ".html"; |
315 |
my $packageline = "<tr><td><a href='$packagesummaryhtml'>$package</a></td>"; |
|
316 |
for (@severities) |
|
317 |
{ |
|
318 |
my $failuresbyseverity = 0; |
|
319 |
$failuresbyseverity = $recipe_failures_num_by_severity->{$package}->{$_} if (defined $recipe_failures_num_by_severity->{$package}->{$_}); |
|
320 |
$packageline .= "<td>$failuresbyseverity</td>"; |
|
321 |
} |
|
290
2ca4533db9fe
Add debug lines to help understanding why total releasables are not displayed correctly during the builds
Dario Sestito <darios@symbian.org>
parents:
286
diff
changeset
|
322 |
print "package $package, releasables in this package: $releaseables_by_package->{$package}\n"; |
286
8e1488905621
Add number of releasables (by package) in the missing column
Dario Sestito <darios@symbian.org>
parents:
270
diff
changeset
|
323 |
$packageline .= "<td>".$missing_by_package->{$package}."/".$releaseables_by_package->{$package}."</td>" if ($missing); |
204
604012c39141
Minor adjustments to UH parser
Dario Sestito <darios@symbian.org>
parents:
201
diff
changeset
|
324 |
$packageline .= "</tr>\n"; |
176 | 325 |
print AGGREGATED "$packageline\n"; |
326 |
} |
|
234
788d181d70a4
Do not display the unknown/unknown package unless there are associated failures
Dario Sestito <darios@symbian.org>
parents:
233
diff
changeset
|
327 |
# don't display the unknown/unknown package unless there are associated failures |
788d181d70a4
Do not display the unknown/unknown package unless there are associated failures
Dario Sestito <darios@symbian.org>
parents:
233
diff
changeset
|
328 |
elsif ($package eq 'unknown/unknown') {} |
176 | 329 |
else |
330 |
{ |
|
331 |
my $packageline = "<tr><td>$package</td>"; |
|
332 |
for (@severities) { $packageline .= "<td>0</td>"; } |
|
286
8e1488905621
Add number of releasables (by package) in the missing column
Dario Sestito <darios@symbian.org>
parents:
270
diff
changeset
|
333 |
$packageline .= "<td>0/$releaseables_by_package->{$package}</td>" if ($missing); |
204
604012c39141
Minor adjustments to UH parser
Dario Sestito <darios@symbian.org>
parents:
201
diff
changeset
|
334 |
$packageline .= "</tr>\n"; |
176 | 335 |
print AGGREGATED "$packageline\n"; |
336 |
} |
|
337 |
} |
|
338 |
print AGGREGATED "</table>\n"; |
|
233
71dcc4963b58
Move PARSED FILES section to the bottom. Minor cosmetic changes
Dario Sestito <darios@symbian.org>
parents:
232
diff
changeset
|
339 |
print AGGREGATED "<br/>\n"; |
71dcc4963b58
Move PARSED FILES section to the bottom. Minor cosmetic changes
Dario Sestito <darios@symbian.org>
parents:
232
diff
changeset
|
340 |
|
71dcc4963b58
Move PARSED FILES section to the bottom. Minor cosmetic changes
Dario Sestito <darios@symbian.org>
parents:
232
diff
changeset
|
341 |
my $allfilesstring = ''; |
71dcc4963b58
Move PARSED FILES section to the bottom. Minor cosmetic changes
Dario Sestito <darios@symbian.org>
parents:
232
diff
changeset
|
342 |
for my $raptorfile (sort {$a cmp $b} @logfiles) { $allfilesstring .= "<br/>$raptorfile"; } |
71dcc4963b58
Move PARSED FILES section to the bottom. Minor cosmetic changes
Dario Sestito <darios@symbian.org>
parents:
232
diff
changeset
|
343 |
print AGGREGATED "PARSED LOGS:$allfilesstring<br/>\n"; |
71dcc4963b58
Move PARSED FILES section to the bottom. Minor cosmetic changes
Dario Sestito <darios@symbian.org>
parents:
232
diff
changeset
|
344 |
|
176 | 345 |
close(AGGREGATED); |
346 |
||
347 |
translate_detail_files_to_html(); |
|
348 |
||
349 |
print "OK, done. Please open $outputdir/index.html.\n"; |
|
350 |
||
351 |
||
352 |
sub print_category_specific_summary |
|
353 |
{ |
|
354 |
my ($category, $failures_by_severity) = @_; |
|
355 |
||
267
a02973783e64
Extend UH parser to cope with tools build
Dario Sestito <darios@symbian.org>
parents:
259
diff
changeset
|
356 |
my $filenamebase = $category; |
a02973783e64
Extend UH parser to cope with tools build
Dario Sestito <darios@symbian.org>
parents:
259
diff
changeset
|
357 |
$filenamebase =~ s,/,_,g; |
176 | 358 |
|
359 |
open(SPECIFIC, ">$outputdir/$filenamebase.html"); |
|
360 |
print SPECIFIC "FAILURES FOR CATEGORY $category<br/>\n"; |
|
361 |
||
362 |
for my $severity (@severities) |
|
363 |
{ |
|
364 |
if (defined $failures_by_severity->{$severity}) |
|
365 |
{ |
|
366 |
print SPECIFIC "<br/>".uc($severity)."<br/>\n"; |
|
367 |
print SPECIFIC "<table border='1'>\n"; |
|
368 |
# $subcategory, $severity, $mmp, $phase, $recipe, $file, $line |
|
369 |
my $tableheader = "<tr><th>category</th><th>log file</th><th>log snippet</th></tr>"; |
|
370 |
print SPECIFIC "$tableheader\n"; |
|
371 |
||
372 |
for my $failure (@{$failures_by_severity->{$severity}}) |
|
373 |
{ |
|
374 |
my $failureline = "<tr><td>$failure->{subcategory}</td>"; |
|
375 |
$failureline .= "<td>$failure->{config}</td>"; |
|
376 |
$failureline .= "<td><a href='$filenamebase\_failures.html#failure_item_$failure->{linenum}'>item $failure->{linenum}</a></td>"; |
|
377 |
$failureline .= "</tr>"; |
|
378 |
print SPECIFIC "$failureline\n"; |
|
379 |
} |
|
380 |
||
381 |
print SPECIFIC "</table>\n"; |
|
382 |
print SPECIFIC "<br/>\n"; |
|
383 |
} |
|
384 |
} |
|
385 |
||
386 |
close(SPECIFIC); |
|
387 |
} |
|
388 |
||
389 |
sub print_package_specific_summary |
|
390 |
{ |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
391 |
my ($package) = @_; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
392 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
393 |
my $anyfailures = 0; |
176 | 394 |
|
267
a02973783e64
Extend UH parser to cope with tools build
Dario Sestito <darios@symbian.org>
parents:
259
diff
changeset
|
395 |
my $filenamebase = $package; |
a02973783e64
Extend UH parser to cope with tools build
Dario Sestito <darios@symbian.org>
parents:
259
diff
changeset
|
396 |
$filenamebase =~ s,/,_,g; |
176 | 397 |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
398 |
if (defined $recipe_failures_by_package_severity->{$package}) |
176 | 399 |
{ |
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
400 |
$anyfailures = 1; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
401 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
402 |
my $failures_by_severity = $recipe_failures_by_package_severity->{$package}; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
403 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
404 |
open(SPECIFIC, ">$outputdir/$filenamebase.html"); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
405 |
print SPECIFIC "FAILURES FOR PACKAGE $package<br/>\n"; |
176 | 406 |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
407 |
for my $severity (@severities) |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
408 |
{ |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
409 |
if (defined $failures_by_severity->{$severity}) |
176 | 410 |
{ |
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
411 |
print SPECIFIC "<br/>".uc($severity)."<br/>\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
412 |
print SPECIFIC "<table border='1'>\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
413 |
# $subcategory, $severity, $mmp, $phase, $recipe, $file, $line |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
414 |
my $tableheader = "<tr><th>category</th><th>configuration</th><th>mmp</th><th>phase</th><th>recipe</th><th>log snippet</th></tr>"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
415 |
print SPECIFIC "$tableheader\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
416 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
417 |
for my $failure (@{$failures_by_severity->{$severity}}) |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
418 |
{ |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
419 |
my $failureline = "<tr><td>$failure->{subcategory}</td>"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
420 |
$failureline .= "<td>$failure->{config}</td>"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
421 |
$failureline .= "<td>$failure->{mmp}</td>"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
422 |
$failureline .= "<td>$failure->{phase}</td>"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
423 |
$failureline .= "<td>$failure->{recipe}</td>"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
424 |
$failureline .= "<td><a href='$filenamebase\_failures.html#failure_item_$failure->{linenum}'>item $failure->{linenum}</a></td>"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
425 |
$failureline .= "</tr>"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
426 |
print SPECIFIC "$failureline\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
427 |
} |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
428 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
429 |
print SPECIFIC "</table>\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
430 |
print SPECIFIC "<br/>\n"; |
176 | 431 |
} |
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
432 |
} |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
433 |
close(SPECIFIC); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
434 |
} |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
435 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
436 |
if ($missing) |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
437 |
{ |
206
fb5bc19e742d
Fix '0' as number of missing is not shown if there are errors but no missing
Dario Sestito <darios@symbian.org>
parents:
204
diff
changeset
|
438 |
$missing_by_package->{$package} = 0; |
fb5bc19e742d
Fix '0' as number of missing is not shown if there are errors but no missing
Dario Sestito <darios@symbian.org>
parents:
204
diff
changeset
|
439 |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
440 |
my $missinglistfile = $package; |
267
a02973783e64
Extend UH parser to cope with tools build
Dario Sestito <darios@symbian.org>
parents:
259
diff
changeset
|
441 |
$missinglistfile =~ s,/,_,g; |
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
442 |
$missinglistfile .= "_missing.txt"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
443 |
if (open(MISSINGLIST, "$::raptorbitsdir/$missinglistfile")) |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
444 |
{ |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
445 |
my @list = (); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
446 |
while(<MISSINGLIST>) |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
447 |
{ |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
448 |
my $missingfile = $_; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
449 |
chomp $missingfile; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
450 |
$missingfile =~ s,^\s+,,g; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
451 |
$missingfile =~ s,\s+$,,g; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
452 |
push(@list, $missingfile); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
453 |
} |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
454 |
close(MISSINGLIST); |
176 | 455 |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
456 |
$missing_by_package->{$package} = scalar(@list); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
457 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
458 |
if ($missing_by_package->{$package} > 0) |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
459 |
{ |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
460 |
open(SPECIFIC, ">>$outputdir/$filenamebase.html"); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
461 |
print SPECIFIC "FAILURES FOR PACKAGE $package<br/>\n" if(!$anyfailures); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
462 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
463 |
$anyfailures = 1; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
464 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
465 |
print SPECIFIC "<br/>MISSING<br/>\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
466 |
print SPECIFIC "<table border='1'>\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
467 |
# $subcategory, $severity, $mmp, $phase, $recipe, $file, $line |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
468 |
my $tableheader = "<tr><th>file</th></tr>\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
469 |
print SPECIFIC "$tableheader\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
470 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
471 |
for my $missingfile (sort {$a cmp $b} @list) |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
472 |
{ |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
473 |
$missingfile = CGI::escapeHTML($missingfile); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
474 |
print SPECIFIC "<tr><td>$missingfile</td></tr>\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
475 |
} |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
476 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
477 |
print SPECIFIC "</table>\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
478 |
print SPECIFIC "<br/>\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
479 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
480 |
close(SPECIFIC); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
481 |
} |
176 | 482 |
} |
483 |
} |
|
484 |
||
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
485 |
return $anyfailures; |
176 | 486 |
} |
487 |
||
488 |
sub translate_detail_files_to_html |
|
489 |
{ |
|
490 |
opendir(DIR, $raptorbitsdir); |
|
491 |
my @failurefiles = readdir(DIR); |
|
492 |
closedir(DIR); |
|
204
604012c39141
Minor adjustments to UH parser
Dario Sestito <darios@symbian.org>
parents:
201
diff
changeset
|
493 |
@failurefiles = grep($_ =~ /\.txt$/ && $_ !~ /_missing\.txt$/, @failurefiles); |
176 | 494 |
|
495 |
for my $file (@failurefiles) |
|
496 |
{ |
|
497 |
$file =~ /(.*)\.txt$/; |
|
498 |
my $filenamebase = $1; |
|
499 |
||
500 |
my $filecontent = ''; |
|
501 |
open(FILE, "$raptorbitsdir/$file"); |
|
502 |
{ |
|
503 |
local $/=undef; |
|
504 |
$filecontent = <FILE>; |
|
505 |
} |
|
506 |
close(FILE); |
|
507 |
||
186
ec83a06d23a8
HTML escape failures so that they can be viewed correctly
Dario Sestito <darios@symbian.org>
parents:
185
diff
changeset
|
508 |
$filecontent = CGI::escapeHTML($filecontent); |
176 | 509 |
$filecontent =~ s,---(failure_item_\d+)---,<a name="$1">---$1---</a>,g; |
510 |
$filecontent = "<pre>$filecontent</pre>"; |
|
511 |
||
512 |
open(FILE, ">$outputdir/$filenamebase\_failures.html"); |
|
513 |
print FILE $filecontent; |
|
514 |
close(FILE); |
|
515 |
} |
|
516 |
} |
|
517 |
||
518 |
sub distinct_packages |
|
519 |
{ |
|
520 |
my ($allbldinfs) = @_; |
|
521 |
||
522 |
my $allpackages = {}; |
|
523 |
||
524 |
for my $bldinf (keys %{$allbldinfs}) |
|
525 |
{ |
|
267
a02973783e64
Extend UH parser to cope with tools build
Dario Sestito <darios@symbian.org>
parents:
259
diff
changeset
|
526 |
RaptorCommon::normalize_bldinf_path(\$bldinf); |
176 | 527 |
|
528 |
my $package = ''; |
|
268
60fee4a35d67
Comment out some debug info
Dario Sestito <darios@symbian.org>
parents:
267
diff
changeset
|
529 |
#print "bldinf: $bldinf\n"; |
267
a02973783e64
Extend UH parser to cope with tools build
Dario Sestito <darios@symbian.org>
parents:
259
diff
changeset
|
530 |
$package = RaptorCommon::get_package_subpath($bldinf); |
268
60fee4a35d67
Comment out some debug info
Dario Sestito <darios@symbian.org>
parents:
267
diff
changeset
|
531 |
#print "package: $package\n"; |
267
a02973783e64
Extend UH parser to cope with tools build
Dario Sestito <darios@symbian.org>
parents:
259
diff
changeset
|
532 |
if (!$package) |
176 | 533 |
{ |
534 |
print "WARNING: can't understand bldinf attribute of recipe: $bldinf. Won't dump to failed recipes file.\n"; |
|
535 |
} |
|
536 |
||
537 |
$allpackages->{$package} = 1; |
|
538 |
} |
|
539 |
||
230
f593b7acdb37
Fix: some heuristically determined components are wrong. Fix: recipe failures without bldinf attribute are lost
Dario Sestito <darios@symbian.org>
parents:
227
diff
changeset
|
540 |
# sort packages, but set unknown first |
f593b7acdb37
Fix: some heuristically determined components are wrong. Fix: recipe failures without bldinf attribute are lost
Dario Sestito <darios@symbian.org>
parents:
227
diff
changeset
|
541 |
my @sorted = (); |
f593b7acdb37
Fix: some heuristically determined components are wrong. Fix: recipe failures without bldinf attribute are lost
Dario Sestito <darios@symbian.org>
parents:
227
diff
changeset
|
542 |
if (defined $allpackages->{'unknown/unknown'}) |
f593b7acdb37
Fix: some heuristically determined components are wrong. Fix: recipe failures without bldinf attribute are lost
Dario Sestito <darios@symbian.org>
parents:
227
diff
changeset
|
543 |
{ |
f593b7acdb37
Fix: some heuristically determined components are wrong. Fix: recipe failures without bldinf attribute are lost
Dario Sestito <darios@symbian.org>
parents:
227
diff
changeset
|
544 |
push @sorted, 'unknown/unknown'; |
231
b59a964f37ef
Fix: package unknown/unknown appears twice
Dario Sestito <darios@symbian.org>
parents:
230
diff
changeset
|
545 |
delete $allpackages->{'unknown/unknown'}; |
230
f593b7acdb37
Fix: some heuristically determined components are wrong. Fix: recipe failures without bldinf attribute are lost
Dario Sestito <darios@symbian.org>
parents:
227
diff
changeset
|
546 |
} |
f593b7acdb37
Fix: some heuristically determined components are wrong. Fix: recipe failures without bldinf attribute are lost
Dario Sestito <darios@symbian.org>
parents:
227
diff
changeset
|
547 |
push @sorted, sort {$a cmp $b} keys %{$allpackages}; |
f593b7acdb37
Fix: some heuristically determined components are wrong. Fix: recipe failures without bldinf attribute are lost
Dario Sestito <darios@symbian.org>
parents:
227
diff
changeset
|
548 |
|
f593b7acdb37
Fix: some heuristically determined components are wrong. Fix: recipe failures without bldinf attribute are lost
Dario Sestito <darios@symbian.org>
parents:
227
diff
changeset
|
549 |
return @sorted; |
f593b7acdb37
Fix: some heuristically determined components are wrong. Fix: recipe failures without bldinf attribute are lost
Dario Sestito <darios@symbian.org>
parents:
227
diff
changeset
|
550 |
} |