author | Maciej Seroka <maciejs@symbian.org> |
Mon, 23 Nov 2009 09:08:01 +0000 | |
changeset 787 | bfafbde70ba1 |
parent 764 | d00048f1b036 |
child 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_NOTHINGTOBEDONEFOR = 'nothing_to_be_done_for'; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
49 |
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
|
50 |
my $CATEGORY_RAPTORUNRECIPED_OVERRIDINGCOMMANDSFORTARGET = 'overriding_commands_for_target'; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
51 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
52 |
sub process |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
53 |
{ |
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
54 |
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
|
55 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
56 |
my $category = $CATEGORY_RAPTORUNRECIPED; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
57 |
my $severity = ''; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
58 |
my $subcategory = ''; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
59 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
60 |
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
|
61 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
62 |
$severity = $RaptorCommon::SEVERITY_MAJOR; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
63 |
my $subcategory = $CATEGORY_RAPTORUNRECIPED_NORULETOMAKETARGET; |
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
64 |
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
|
65 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
66 |
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
|
67 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
68 |
$severity = $RaptorCommon::SEVERITY_MINOR; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
69 |
my $subcategory = $CATEGORY_RAPTORUNRECIPED_TARGETNOTREMADEFORERRORS; |
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
70 |
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
|
71 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
72 |
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
|
73 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
74 |
$severity = $RaptorCommon::SEVERITY_MINOR; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
75 |
my $subcategory = $CATEGORY_RAPTORUNRECIPED_IGNORINGOLDCOMMANDSFORTARGET; |
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
76 |
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
|
77 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
78 |
elsif ($text =~ m,: warning: overriding commands for target,) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
79 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
80 |
$severity = $RaptorCommon::SEVERITY_MINOR; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
81 |
my $subcategory = $CATEGORY_RAPTORUNRECIPED_OVERRIDINGCOMMANDSFORTARGET; |
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
82 |
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
|
83 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
84 |
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
|
85 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
86 |
$severity = $RaptorCommon::SEVERITY_MINOR; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
87 |
my $subcategory = $CATEGORY_RAPTORUNRECIPED_NOTHINGTOBEDONEFOR; |
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
88 |
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
|
89 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
90 |
elsif ($text =~ m,^(true|false)$,) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
91 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
92 |
# don't dump |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
93 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
94 |
else # log everything by default |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
95 |
{ |
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
96 |
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
|
97 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
98 |
} |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
99 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
100 |
sub on_start_buildlog |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
101 |
{ |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
102 |
RaptorCommon::init(); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
103 |
|
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
104 |
$filename = "$::raptorbitsdir/raptor_unreciped.txt"; |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
105 |
if (!-f$filename) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
106 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
107 |
print "Writing unreciped file $filename\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
108 |
open(FILE, ">$filename"); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
109 |
close(FILE); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
110 |
} |
242
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 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
113 |
sub on_chars_buildlog |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
114 |
{ |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
115 |
my ($ch) = @_; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
116 |
|
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
117 |
#print "on_chars_buildlog\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
118 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
119 |
if ($store_chars) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
120 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
121 |
$characters .= $ch->{Data}; |
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 |
#print "characters is now -->$characters<--\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
124 |
} |
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 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
127 |
sub on_end_buildlog_subtag |
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 |
$store_chars = 1; |
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 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
132 |
sub process_characters |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
133 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
134 |
#print "process_characters\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 |
$characters =~ s,^[\r\n]*,,; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
137 |
$characters =~ s,[\r\n]*$,,; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
138 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
139 |
#print "characters is -->$characters<--\n"; |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
140 |
|
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
141 |
my @lines = split(/[\r\n]/, $characters); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
142 |
for my $line (@lines) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
143 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
144 |
if ($line =~ m,[^\s^\r^\n],) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
145 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
146 |
#print "dumping chars\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
147 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
148 |
if ($failure_item == 0 and -f "$filename") |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
149 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
150 |
open(FILE, "$filename"); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
151 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
152 |
local $/ = undef; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
153 |
my $filecontent = <FILE>; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
154 |
$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
|
155 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
156 |
close(FILE); |
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 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
159 |
$failure_item++; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
160 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
161 |
open(FILE, ">>$filename"); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
162 |
print FILE "---failure_item_$failure_item\---\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
163 |
print FILE "$line\n\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
164 |
close(FILE); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
165 |
|
764
d00048f1b036
Improved Raptor parser, now "uh"
Dario Sestito <darios@symbian.org>
parents:
383
diff
changeset
|
166 |
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
|
167 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
168 |
} |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
169 |
|
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
170 |
$characters = ''; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
171 |
$store_chars = 0; |
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 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
174 |
sub on_start_buildlog_subtag |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
175 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
176 |
#print "on_start_buildlog_subtag\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
177 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
178 |
process_characters(); |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
179 |
} |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
180 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
181 |
sub on_end_buildlog |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
182 |
{ |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
183 |
process_characters(); |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
184 |
} |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
185 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
186 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
187 |
1; |