author | Tahir Mahmood <tahirm@symbian.org> |
Thu, 27 May 2010 12:31:39 +0100 | |
changeset 247 | 99b1b1689a29 |
parent 238 | 09b83ca8e0cf |
child 259 | 83443e6675cd |
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 |
)); |
|
45 |
my @logfiles = @ARGV; |
|
46 |
||
47 |
if ($help) |
|
48 |
{ |
|
49 |
print "Unite and HTML-ize Raptor log files.\n"; |
|
50 |
print "Usage: perl uh.pl [OPTIONS] FILE1 FILE2 ...\n"; |
|
227
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
51 |
print "where FILE1 FILE2 ... are Raptor log files.\n"; |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
52 |
print "If no file argument is provided then UH takes the latest under \\epoc32\\build\n"; |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
53 |
print "OPTIONS:\n"; |
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
54 |
print "\t-m, --missing\tAlso add the list of missing binaries (Raptor log should include whatlog info).\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
55 |
print "\t\t\tCheck is done against the epoc tree at the root of the current drive\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
56 |
print "\t-b DIR, --basedir DIR\tGenerate output under DIR (defaults to current dir)\n"; |
176 | 57 |
exit(0); |
58 |
} |
|
59 |
||
227
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
60 |
if (!@logfiles) |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
61 |
{ |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
62 |
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
|
63 |
{ |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
64 |
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
|
65 |
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
|
66 |
@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
|
67 |
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
|
68 |
} |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
69 |
} |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
70 |
|
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
71 |
if (!@logfiles) |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
72 |
{ |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
73 |
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
|
74 |
exit(0); |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
75 |
} |
f0ed429f31b7
Make UH parse the latest file under \epoc32\build by default
Dario Sestito <darios@symbian.org>
parents:
209
diff
changeset
|
76 |
|
176 | 77 |
if ($basedir) |
78 |
{ |
|
79 |
$raptorbitsdir = "$basedir/raptorbits"; |
|
80 |
$outputdir = "$basedir/html"; |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
81 |
$releaseablesdir = "$basedir/releaseables"; |
176 | 82 |
} |
83 |
mkdir($basedir) if (!-d$basedir); |
|
84 |
||
85 |
$raptorbitsdir =~ s,/,\\,g; # this is because rmdir doens't cope correctly with the forward slashes |
|
86 |
||
87 |
system("rmdir /S /Q $raptorbitsdir") if (-d $raptorbitsdir); |
|
88 |
mkdir($raptorbitsdir); |
|
89 |
#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
|
90 |
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
|
91 |
mkdir("$releaseablesdir"); |
176 | 92 |
|
185
b76adfbc6648
Don't dump failures which aren't reported
Dario Sestito <darios@symbian.org>
parents:
176
diff
changeset
|
93 |
our $failure_item_number = 0; |
b76adfbc6648
Don't dump failures which aren't reported
Dario Sestito <darios@symbian.org>
parents:
176
diff
changeset
|
94 |
|
176 | 95 |
# create empty summary file anyway |
96 |
open(SUMMARY, ">$raptorbitsdir/summary.csv"); |
|
97 |
close(SUMMARY); |
|
98 |
||
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
99 |
|
176 | 100 |
my $saxhandler = RaptorSAXHandler->new(); |
101 |
$saxhandler->add_observer('RaptorError', $RaptorError::reset_status); |
|
102 |
$saxhandler->add_observer('RaptorWarning', $RaptorWarning::reset_status); |
|
103 |
$saxhandler->add_observer('RaptorInfo', $RaptorInfo::reset_status); |
|
104 |
$saxhandler->add_observer('RaptorUnreciped', $RaptorUnreciped::reset_status); |
|
105 |
$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
|
106 |
$saxhandler->add_observer('releaseables', $releaseables::reset_status); |
176 | 107 |
|
108 |
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
|
109 |
our $allconfigs = {}; |
176 | 110 |
|
111 |
my $parser = XML::SAX::ParserFactory->parser(Handler=>$saxhandler); |
|
112 |
for (@logfiles) |
|
113 |
{ |
|
114 |
print "Reading file: $_\n"; |
|
115 |
$current_log_file = $_; |
|
116 |
$parser->parse_uri($_); |
|
117 |
} |
|
118 |
||
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
119 |
releaseables::remove_missing_duplicates(); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
120 |
|
176 | 121 |
my @allpackages = distinct_packages($allbldinfs); |
122 |
||
123 |
print "Generating HTML...\n"; |
|
124 |
||
125 |
system("rd /S /Q $outputdir") if (-d $outputdir); |
|
126 |
mkdir ($outputdir); |
|
127 |
||
128 |
my $raptor_errors = {}; |
|
129 |
my $raptor_warnings = {}; |
|
130 |
my $raptor_unreciped = {}; |
|
131 |
my $general_failures_num_by_severity = {}; |
|
132 |
my $general_failures_by_category_severity = {}; |
|
133 |
my $recipe_failures_num_by_severity = {}; |
|
134 |
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
|
135 |
my $missing_by_package = {}; |
176 | 136 |
#my $severities = {}; |
137 |
my @severities = ('critical', 'major', 'minor', 'unknown'); |
|
138 |
||
139 |
# READ SUMMARY.CSV FILE |
|
140 |
my $csv_file = "$raptorbitsdir/summary.csv"; |
|
141 |
my $csv_linenum = 0; |
|
142 |
open(CSV, $csv_file); |
|
143 |
while(<CSV>) |
|
144 |
{ |
|
145 |
$csv_linenum ++; |
|
146 |
my $line = $_; |
|
147 |
||
148 |
if ($line =~ /([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*)/) |
|
149 |
{ |
|
150 |
my $failure = {}; |
|
151 |
$failure->{category} = $1; |
|
152 |
$failure->{subcategory} = $2; |
|
153 |
$failure->{severity} = $3; |
|
154 |
$failure->{config} = $4; |
|
155 |
$failure->{component} = $5; |
|
156 |
$failure->{mmp} = $6; |
|
157 |
$failure->{phase} = $7; |
|
158 |
$failure->{recipe} = $8; |
|
159 |
$failure->{file} = $9; |
|
160 |
$failure->{linenum} = $10; |
|
161 |
||
162 |
my $failure_package = ''; |
|
163 |
||
164 |
if (!$failure->{category}) |
|
165 |
{ |
|
166 |
print "WARNING: summary line without a category at $csv_file line $csv_linenum. Skipping\n"; |
|
167 |
next; |
|
168 |
} |
|
169 |
||
170 |
if ($failure->{category} =~ m,^recipe_failure$,i and !$failure->{component}) |
|
171 |
{ |
|
172 |
print "WARNING: recipe_failure with component field empty at $csv_file line $csv_linenum. Skipping\n"; |
|
173 |
next; |
|
174 |
} |
|
175 |
if ($failure->{component}) |
|
176 |
{ |
|
238
09b83ca8e0cf
Revert to version 236 as 237 breaks the parser
Dario Sestito <darios@symbian.org>
parents:
237
diff
changeset
|
177 |
if ($failure->{component} =~ m,/((os|mw|app|tools|ostools|adaptation|unknown)/[a-zA-Z]+),) |
176 | 178 |
{ |
179 |
$failure_package = $1; |
|
180 |
} |
|
181 |
else |
|
182 |
{ |
|
183 |
print "WARNING: summary line with wrong component path at $csv_file line $csv_linenum. Skipping\n"; |
|
184 |
next; |
|
185 |
} |
|
186 |
} |
|
187 |
||
188 |
$failure->{subcategory} = 'uncategorized' if (!$failure->{subcategory}); |
|
189 |
$failure->{severity} = 'unknown' if (!$failure->{severity}); |
|
190 |
$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
|
191 |
$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
|
192 |
$failure->{recipe} = '-' if (!$failure->{recipe}); |
176 | 193 |
|
194 |
# populate severities dynamically. |
|
195 |
#$severities->{$failure->{severity}} = 1; |
|
196 |
||
197 |
# 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
|
198 |
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
|
199 |
{ |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
200 |
$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
|
201 |
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
|
202 |
|
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
203 |
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
|
204 |
{ |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
205 |
$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
|
206 |
} |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
207 |
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
|
208 |
{ |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
209 |
$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
|
210 |
} |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
211 |
|
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
212 |
$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
|
213 |
$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
|
214 |
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
|
215 |
} |
ba90e30c0f3c
Use the bldinf attribute to assign Raptor errors and warnings to the related package
Dario Sestito <darios@symbian.org>
parents:
206
diff
changeset
|
216 |
elsif ($failure->{category} =~ /^raptor_(error|warning|unreciped)$/i) |
176 | 217 |
{ |
218 |
$general_failures_num_by_severity->{$failure->{category}} = {} if (!defined $general_failures_num_by_severity->{$failure->{category}}); |
|
219 |
my $general_failure = $general_failures_num_by_severity->{$failure->{category}}; |
|
220 |
||
221 |
if (!defined $general_failure->{$failure->{severity}}) |
|
222 |
{ |
|
223 |
$general_failure->{$failure->{severity}} = 1; |
|
224 |
} |
|
225 |
else |
|
226 |
{ |
|
227 |
$general_failure->{$failure->{severity}} ++; |
|
228 |
} |
|
229 |
||
230 |
$general_failures_by_category_severity->{$failure->{category}} = {} if (!defined $general_failures_by_category_severity->{$failure->{category}}); |
|
231 |
$general_failures_by_category_severity->{$failure->{category}}->{$failure->{severity}} = [] if (!defined $general_failures_by_category_severity->{$failure->{category}}->{$failure->{severity}}); |
|
232 |
push(@{$general_failures_by_category_severity->{$failure->{category}}->{$failure->{severity}}}, $failure); |
|
233 |
} |
|
234 |
} |
|
235 |
else |
|
236 |
{ |
|
237 |
print "WARNING: line does not match expected format at $csv_file line $csv_linenum. Skipping\n"; |
|
238 |
} |
|
239 |
} |
|
240 |
close(CSV); |
|
241 |
||
242 |
# PRINT HTML SUMMARY |
|
243 |
my $aggregated_html = "$outputdir/index.html"; |
|
244 |
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
|
245 |
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
|
246 |
|
fde18ad07a01
Add parsed logs and built configs at the top of the main page
Dario Sestito <darios@symbian.org>
parents:
231
diff
changeset
|
247 |
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
|
248 |
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
|
249 |
$allconfigsstring =~ s/^, //; |
233
71dcc4963b58
Move PARSED FILES section to the bottom. Minor cosmetic changes
Dario Sestito <darios@symbian.org>
parents:
232
diff
changeset
|
250 |
print AGGREGATED "BUILT CONFIGS:<br/>$allconfigsstring<br/>\n"; |
176 | 251 |
|
235
0cefd1662676
Ren 'general failures' title into more appropriate 'floating failures'
Dario Sestito <darios@symbian.org>
parents:
234
diff
changeset
|
252 |
print AGGREGATED "<br/>FLOATING FAILURES<br/>\n"; |
176 | 253 |
print AGGREGATED "<table border='1'>\n"; |
254 |
my $tableheader = "<tr><th>category</th>"; |
|
255 |
for (@severities) { $tableheader .= "<th>$_</th>"; } |
|
256 |
$tableheader .= "</tr>"; |
|
257 |
print AGGREGATED "$tableheader\n"; |
|
258 |
for my $category (keys %{$general_failures_num_by_severity}) |
|
259 |
{ |
|
260 |
print_category_specific_summary($category, $general_failures_by_category_severity->{$category}); |
|
261 |
my $categoryline = "<tr><td><a href='$category.html'>$category</a></td>"; |
|
262 |
for (@severities) |
|
263 |
{ |
|
264 |
my $failuresbyseverity = 0; |
|
265 |
$failuresbyseverity = $general_failures_num_by_severity->{$category}->{$_} if (defined $general_failures_num_by_severity->{$category}->{$_}); |
|
266 |
$categoryline .= "<td>$failuresbyseverity</td>"; |
|
267 |
} |
|
268 |
$categoryline .= "</tr>"; |
|
269 |
print AGGREGATED "$categoryline\n"; |
|
270 |
} |
|
271 |
print AGGREGATED "</table>\n"; |
|
272 |
print AGGREGATED "<br/>\n"; |
|
273 |
||
234
788d181d70a4
Do not display the unknown/unknown package unless there are associated failures
Dario Sestito <darios@symbian.org>
parents:
233
diff
changeset
|
274 |
print AGGREGATED "PACKAGE-SPECIFIC FAILURES<br/>\n"; |
176 | 275 |
print AGGREGATED "<table border='1'>\n"; |
276 |
$tableheader = "<tr><th>package</th>"; |
|
277 |
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
|
278 |
$tableheader .= "<th>missing</th>" if ($missing); |
176 | 279 |
$tableheader .= "</tr>"; |
280 |
print AGGREGATED "$tableheader\n"; |
|
281 |
for my $package (@allpackages) |
|
282 |
{ |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
283 |
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
|
284 |
if ($mustlink) |
176 | 285 |
{ |
286 |
my $packagesummaryhtml = $package; |
|
287 |
$packagesummaryhtml =~ s,/,_,; |
|
288 |
$packagesummaryhtml .= ".html"; |
|
289 |
my $packageline = "<tr><td><a href='$packagesummaryhtml'>$package</a></td>"; |
|
290 |
for (@severities) |
|
291 |
{ |
|
292 |
my $failuresbyseverity = 0; |
|
293 |
$failuresbyseverity = $recipe_failures_num_by_severity->{$package}->{$_} if (defined $recipe_failures_num_by_severity->{$package}->{$_}); |
|
294 |
$packageline .= "<td>$failuresbyseverity</td>"; |
|
295 |
} |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
296 |
$packageline .= "<td>".$missing_by_package->{$package}."</td>" if ($missing); |
204
604012c39141
Minor adjustments to UH parser
Dario Sestito <darios@symbian.org>
parents:
201
diff
changeset
|
297 |
$packageline .= "</tr>\n"; |
176 | 298 |
print AGGREGATED "$packageline\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 |
# 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
|
301 |
elsif ($package eq 'unknown/unknown') {} |
176 | 302 |
else |
303 |
{ |
|
304 |
my $packageline = "<tr><td>$package</td>"; |
|
305 |
for (@severities) { $packageline .= "<td>0</td>"; } |
|
204
604012c39141
Minor adjustments to UH parser
Dario Sestito <darios@symbian.org>
parents:
201
diff
changeset
|
306 |
$packageline .= "<td>0</td>" if ($missing); |
604012c39141
Minor adjustments to UH parser
Dario Sestito <darios@symbian.org>
parents:
201
diff
changeset
|
307 |
$packageline .= "</tr>\n"; |
176 | 308 |
print AGGREGATED "$packageline\n"; |
309 |
} |
|
310 |
} |
|
311 |
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
|
312 |
print AGGREGATED "<br/>\n"; |
71dcc4963b58
Move PARSED FILES section to the bottom. Minor cosmetic changes
Dario Sestito <darios@symbian.org>
parents:
232
diff
changeset
|
313 |
|
71dcc4963b58
Move PARSED FILES section to the bottom. Minor cosmetic changes
Dario Sestito <darios@symbian.org>
parents:
232
diff
changeset
|
314 |
my $allfilesstring = ''; |
71dcc4963b58
Move PARSED FILES section to the bottom. Minor cosmetic changes
Dario Sestito <darios@symbian.org>
parents:
232
diff
changeset
|
315 |
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
|
316 |
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
|
317 |
|
176 | 318 |
close(AGGREGATED); |
319 |
||
320 |
translate_detail_files_to_html(); |
|
321 |
||
322 |
print "OK, done. Please open $outputdir/index.html.\n"; |
|
323 |
||
324 |
||
325 |
sub print_category_specific_summary |
|
326 |
{ |
|
327 |
my ($category, $failures_by_severity) = @_; |
|
328 |
||
329 |
my $filenamebase = $category; |
|
330 |
$filenamebase =~ s,/,_,; |
|
331 |
||
332 |
open(SPECIFIC, ">$outputdir/$filenamebase.html"); |
|
333 |
print SPECIFIC "FAILURES FOR CATEGORY $category<br/>\n"; |
|
334 |
||
335 |
for my $severity (@severities) |
|
336 |
{ |
|
337 |
if (defined $failures_by_severity->{$severity}) |
|
338 |
{ |
|
339 |
print SPECIFIC "<br/>".uc($severity)."<br/>\n"; |
|
340 |
print SPECIFIC "<table border='1'>\n"; |
|
341 |
# $subcategory, $severity, $mmp, $phase, $recipe, $file, $line |
|
342 |
my $tableheader = "<tr><th>category</th><th>log file</th><th>log snippet</th></tr>"; |
|
343 |
print SPECIFIC "$tableheader\n"; |
|
344 |
||
345 |
for my $failure (@{$failures_by_severity->{$severity}}) |
|
346 |
{ |
|
347 |
my $failureline = "<tr><td>$failure->{subcategory}</td>"; |
|
348 |
$failureline .= "<td>$failure->{config}</td>"; |
|
349 |
$failureline .= "<td><a href='$filenamebase\_failures.html#failure_item_$failure->{linenum}'>item $failure->{linenum}</a></td>"; |
|
350 |
$failureline .= "</tr>"; |
|
351 |
print SPECIFIC "$failureline\n"; |
|
352 |
} |
|
353 |
||
354 |
print SPECIFIC "</table>\n"; |
|
355 |
print SPECIFIC "<br/>\n"; |
|
356 |
} |
|
357 |
} |
|
358 |
||
359 |
close(SPECIFIC); |
|
360 |
} |
|
361 |
||
362 |
sub print_package_specific_summary |
|
363 |
{ |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
364 |
my ($package) = @_; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
365 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
366 |
my $anyfailures = 0; |
176 | 367 |
|
368 |
my $filenamebase = $package; |
|
369 |
$filenamebase =~ s,/,_,; |
|
370 |
||
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
371 |
if (defined $recipe_failures_by_package_severity->{$package}) |
176 | 372 |
{ |
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
373 |
$anyfailures = 1; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
374 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
375 |
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
|
376 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
377 |
open(SPECIFIC, ">$outputdir/$filenamebase.html"); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
378 |
print SPECIFIC "FAILURES FOR PACKAGE $package<br/>\n"; |
176 | 379 |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
380 |
for my $severity (@severities) |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
381 |
{ |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
382 |
if (defined $failures_by_severity->{$severity}) |
176 | 383 |
{ |
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
384 |
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
|
385 |
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
|
386 |
# $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
|
387 |
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
|
388 |
print SPECIFIC "$tableheader\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
389 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
390 |
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
|
391 |
{ |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
392 |
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
|
393 |
$failureline .= "<td>$failure->{config}</td>"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
394 |
$failureline .= "<td>$failure->{mmp}</td>"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
395 |
$failureline .= "<td>$failure->{phase}</td>"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
396 |
$failureline .= "<td>$failure->{recipe}</td>"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
397 |
$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
|
398 |
$failureline .= "</tr>"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
399 |
print SPECIFIC "$failureline\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
400 |
} |
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 |
print SPECIFIC "</table>\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
403 |
print SPECIFIC "<br/>\n"; |
176 | 404 |
} |
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
405 |
} |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
406 |
close(SPECIFIC); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
407 |
} |
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 ($missing) |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
410 |
{ |
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
|
411 |
$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
|
412 |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
413 |
my $missinglistfile = $package; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
414 |
$missinglistfile =~ s,/,_,; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
415 |
$missinglistfile .= "_missing.txt"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
416 |
if (open(MISSINGLIST, "$::raptorbitsdir/$missinglistfile")) |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
417 |
{ |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
418 |
my @list = (); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
419 |
while(<MISSINGLIST>) |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
420 |
{ |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
421 |
my $missingfile = $_; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
422 |
chomp $missingfile; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
423 |
$missingfile =~ s,^\s+,,g; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
424 |
$missingfile =~ s,\s+$,,g; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
425 |
push(@list, $missingfile); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
426 |
} |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
427 |
close(MISSINGLIST); |
176 | 428 |
|
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
429 |
$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
|
430 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
431 |
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
|
432 |
{ |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
433 |
open(SPECIFIC, ">>$outputdir/$filenamebase.html"); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
434 |
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
|
435 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
436 |
$anyfailures = 1; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
437 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
438 |
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
|
439 |
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
|
440 |
# $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
|
441 |
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
|
442 |
print SPECIFIC "$tableheader\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
443 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
444 |
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
|
445 |
{ |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
446 |
$missingfile = CGI::escapeHTML($missingfile); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
447 |
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
|
448 |
} |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
449 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
450 |
print SPECIFIC "</table>\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
451 |
print SPECIFIC "<br/>\n"; |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
452 |
|
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
453 |
close(SPECIFIC); |
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
454 |
} |
176 | 455 |
} |
456 |
} |
|
457 |
||
201
2c2dbe93b84b
Uh parser to report on list of missing releaseables
Dario Sestito <darios@symbian.org>
parents:
186
diff
changeset
|
458 |
return $anyfailures; |
176 | 459 |
} |
460 |
||
461 |
sub translate_detail_files_to_html |
|
462 |
{ |
|
463 |
opendir(DIR, $raptorbitsdir); |
|
464 |
my @failurefiles = readdir(DIR); |
|
465 |
closedir(DIR); |
|
204
604012c39141
Minor adjustments to UH parser
Dario Sestito <darios@symbian.org>
parents:
201
diff
changeset
|
466 |
@failurefiles = grep($_ =~ /\.txt$/ && $_ !~ /_missing\.txt$/, @failurefiles); |
176 | 467 |
|
468 |
for my $file (@failurefiles) |
|
469 |
{ |
|
470 |
$file =~ /(.*)\.txt$/; |
|
471 |
my $filenamebase = $1; |
|
472 |
||
473 |
my $filecontent = ''; |
|
474 |
open(FILE, "$raptorbitsdir/$file"); |
|
475 |
{ |
|
476 |
local $/=undef; |
|
477 |
$filecontent = <FILE>; |
|
478 |
} |
|
479 |
close(FILE); |
|
480 |
||
186
ec83a06d23a8
HTML escape failures so that they can be viewed correctly
Dario Sestito <darios@symbian.org>
parents:
185
diff
changeset
|
481 |
$filecontent = CGI::escapeHTML($filecontent); |
176 | 482 |
$filecontent =~ s,---(failure_item_\d+)---,<a name="$1">---$1---</a>,g; |
483 |
$filecontent = "<pre>$filecontent</pre>"; |
|
484 |
||
485 |
open(FILE, ">$outputdir/$filenamebase\_failures.html"); |
|
486 |
print FILE $filecontent; |
|
487 |
close(FILE); |
|
488 |
} |
|
489 |
} |
|
490 |
||
491 |
sub distinct_packages |
|
492 |
{ |
|
493 |
my ($allbldinfs) = @_; |
|
494 |
||
495 |
my $allpackages = {}; |
|
496 |
||
497 |
for my $bldinf (keys %{$allbldinfs}) |
|
498 |
{ |
|
499 |
# normalize bldinf path |
|
500 |
$bldinf = lc($bldinf); |
|
501 |
$bldinf =~ s,^[A-Za-z]:,,; |
|
502 |
$bldinf =~ s,[\\],/,g; |
|
503 |
||
504 |
my $package = ''; |
|
238
09b83ca8e0cf
Revert to version 236 as 237 breaks the parser
Dario Sestito <darios@symbian.org>
parents:
237
diff
changeset
|
505 |
if ($bldinf =~ m,/((os|mw|app|tools|ostools|adaptation|unknown)/[a-zA-Z]+),) |
176 | 506 |
{ |
507 |
$package = $1; |
|
508 |
} |
|
509 |
else |
|
510 |
{ |
|
511 |
print "WARNING: can't understand bldinf attribute of recipe: $bldinf. Won't dump to failed recipes file.\n"; |
|
512 |
} |
|
513 |
||
514 |
$allpackages->{$package} = 1; |
|
515 |
} |
|
516 |
||
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
|
517 |
# 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
|
518 |
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
|
519 |
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
|
520 |
{ |
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
|
521 |
push @sorted, 'unknown/unknown'; |
231
b59a964f37ef
Fix: package unknown/unknown appears twice
Dario Sestito <darios@symbian.org>
parents:
230
diff
changeset
|
522 |
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
|
523 |
} |
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
|
524 |
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
|
525 |
|
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
|
526 |
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
|
527 |
} |