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