author | Simon Howkins <simonh@symbian.org> |
Fri, 12 Feb 2010 11:54:33 +0000 | |
changeset 895 | 5b76b79b6713 |
parent 868 | a2ab739ff0b0 |
permissions | -rw-r--r-- |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
1 |
# Copyright (c) 2009 Symbian Foundation Ltd |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
2 |
# This component and the accompanying materials are made available |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
3 |
# under the terms of the License "Eclipse Public License v1.0" |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
4 |
# which accompanies this distribution, and is available |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
5 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
6 |
# |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
7 |
# Initial Contributors: |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
8 |
# Symbian Foundation Ltd - initial contribution. |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
9 |
# |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
10 |
# Contributors: |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
11 |
# |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
12 |
# Description: |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
13 |
# Raptor parser module. |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
14 |
# Extract, analyzes and dumps text in <buildlog> context which doesn't belong to any <recipe> tags |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
15 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
16 |
package RaptorUnreciped; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
17 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
18 |
use strict; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
19 |
use RaptorCommon; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
20 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
21 |
our $reset_status = {}; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
22 |
my $buildlog_status = {}; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
23 |
my $buildlog_subtag_status = {}; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
24 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
25 |
$reset_status->{name} = 'reset_status'; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
26 |
$reset_status->{next_status} = {buildlog=>$buildlog_status}; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
27 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
28 |
$buildlog_status->{name} = 'buildlog_status'; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
29 |
$buildlog_status->{next_status} = {'?default?'=>$buildlog_subtag_status}; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
30 |
$buildlog_status->{on_start} = 'RaptorUnreciped::on_start_buildlog'; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
31 |
$buildlog_status->{on_end} = 'RaptorUnreciped::on_end_buildlog'; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
32 |
$buildlog_status->{on_chars} = 'RaptorUnreciped::on_chars_buildlog'; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
33 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
34 |
$buildlog_subtag_status->{name} = 'buildlog_subtag_status'; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
35 |
$buildlog_subtag_status->{next_status} = {}; |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
36 |
$buildlog_subtag_status->{on_start} = 'RaptorUnreciped::on_start_buildlog_subtag'; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
37 |
$buildlog_subtag_status->{on_end} = 'RaptorUnreciped::on_end_buildlog_subtag'; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
38 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
39 |
my $filename = ''; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
40 |
my $failure_item = 0; |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
41 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
42 |
my $characters = ''; |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
43 |
my $store_chars = 1; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
44 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
45 |
my $CATEGORY_RAPTORUNRECIPED = 'raptor_unreciped'; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
46 |
my $CATEGORY_RAPTORUNRECIPED_NORULETOMAKETARGET = 'no_rule_to_make_target'; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
47 |
my $CATEGORY_RAPTORUNRECIPED_TARGETNOTREMADEFORERRORS = 'target_not_remade_for_errors'; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
48 |
my $CATEGORY_RAPTORUNRECIPED_IGNORINGOLDCOMMANDSFORTARGET = 'ignoring_old_commands_for_target'; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
49 |
my $CATEGORY_RAPTORUNRECIPED_OVERRIDINGCOMMANDSFORTARGET = 'overriding_commands_for_target'; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
50 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
51 |
sub process |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
52 |
{ |
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
53 |
my ($text, $logfile, $component, $mmp, $phase, $recipe, $file, $line) = @_; |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
54 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
55 |
my $category = $CATEGORY_RAPTORUNRECIPED; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
56 |
my $severity = ''; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
57 |
my $subcategory = ''; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
58 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
59 |
if ($text =~ m,make\.exe: \*\*\* No rule to make target,) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
60 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
61 |
$severity = $RaptorCommon::SEVERITY_MAJOR; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
62 |
my $subcategory = $CATEGORY_RAPTORUNRECIPED_NORULETOMAKETARGET; |
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
63 |
RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
64 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
65 |
elsif ($text =~ m,make\.exe: Target .* not remade because of errors,) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
66 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
67 |
$severity = $RaptorCommon::SEVERITY_MINOR; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
68 |
my $subcategory = $CATEGORY_RAPTORUNRECIPED_TARGETNOTREMADEFORERRORS; |
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
69 |
RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
70 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
71 |
elsif ($text =~ m,: warning: ignoring old commands for target,) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
72 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
73 |
$severity = $RaptorCommon::SEVERITY_MINOR; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
74 |
my $subcategory = $CATEGORY_RAPTORUNRECIPED_IGNORINGOLDCOMMANDSFORTARGET; |
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
75 |
RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
76 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
77 |
elsif ($text =~ m,: warning: overriding commands for target,) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
78 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
79 |
$severity = $RaptorCommon::SEVERITY_MINOR; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
80 |
my $subcategory = $CATEGORY_RAPTORUNRECIPED_OVERRIDINGCOMMANDSFORTARGET; |
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
81 |
RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
82 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
83 |
elsif ($text =~ m,make\.exe: Nothing to be done for .*,) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
84 |
{ |
868
a2ab739ff0b0
Updated to ignore messages of the form "Nothing to be done for ..." as these do not represent a problem of any kind at all.
Simon Howkins <simonh@symbian.org>
parents:
764
diff
changeset
|
85 |
# don't dump |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
86 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
87 |
elsif ($text =~ m,^(true|false)$,) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
88 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
89 |
# don't dump |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
90 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
91 |
else # log everything by default |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
92 |
{ |
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
93 |
RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
94 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
95 |
} |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
96 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
97 |
sub on_start_buildlog |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
98 |
{ |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
99 |
RaptorCommon::init(); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
100 |
|
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
101 |
$filename = "$::raptorbitsdir/raptor_unreciped.txt"; |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
102 |
if (!-f$filename) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
103 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
104 |
print "Writing unreciped file $filename\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
105 |
open(FILE, ">$filename"); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
106 |
close(FILE); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
107 |
} |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
108 |
} |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
109 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
110 |
sub on_chars_buildlog |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
111 |
{ |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
112 |
my ($ch) = @_; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
113 |
|
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
114 |
#print "on_chars_buildlog\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
115 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
116 |
if ($store_chars) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
117 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
118 |
$characters .= $ch->{Data}; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
119 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
120 |
#print "characters is now -->$characters<--\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
121 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
122 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
123 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
124 |
sub on_end_buildlog_subtag |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
125 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
126 |
$store_chars = 1; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
127 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
128 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
129 |
sub process_characters |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
130 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
131 |
#print "process_characters\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
132 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
133 |
$characters =~ s,^[\r\n]*,,; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
134 |
$characters =~ s,[\r\n]*$,,; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
135 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
136 |
#print "characters is -->$characters<--\n"; |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
137 |
|
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
138 |
my @lines = split(/[\r\n]/, $characters); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
139 |
for my $line (@lines) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
140 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
141 |
if ($line =~ m,[^\s^\r^\n],) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
142 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
143 |
#print "dumping chars\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
144 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
145 |
if ($failure_item == 0 and -f "$filename") |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
146 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
147 |
open(FILE, "$filename"); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
148 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
149 |
local $/ = undef; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
150 |
my $filecontent = <FILE>; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
151 |
$failure_item = $1 if ($filecontent =~ m/.*---failure_item_(\d+)/s); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
152 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
153 |
close(FILE); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
154 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
155 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
156 |
$failure_item++; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
157 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
158 |
open(FILE, ">>$filename"); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
159 |
print FILE "---failure_item_$failure_item\---\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
160 |
print FILE "$line\n\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
161 |
close(FILE); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
162 |
|
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
163 |
process($line, $::current_log_file, '', '', '', '', "raptor_unreciped.txt", $failure_item); |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
164 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
165 |
} |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
166 |
|
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
167 |
$characters = ''; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
168 |
$store_chars = 0; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
169 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
170 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
171 |
sub on_start_buildlog_subtag |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
172 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
173 |
#print "on_start_buildlog_subtag\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
174 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
175 |
process_characters(); |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
176 |
} |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
177 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
178 |
sub on_end_buildlog |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
179 |
{ |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
180 |
process_characters(); |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
181 |
} |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
182 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
183 |
|
868
a2ab739ff0b0
Updated to ignore messages of the form "Nothing to be done for ..." as these do not represent a problem of any kind at all.
Simon Howkins <simonh@symbian.org>
parents:
764
diff
changeset
|
184 |
1; |