author | Simon Howkins <simonh@symbian.org> |
Fri, 02 Oct 2009 12:25:56 +0100 | |
changeset 570 | e5e6ae6bf38f |
parent 383 | 52675b624b66 |
child 714 | 5a7140020d52 |
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 raptor errors i.e. content of <error> tags from a raptor log file |
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 RaptorError; |
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_error_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} = {error=>$buildlog_error_status}; |
324
f1baeb3f075f
Generate error and summary file even if build reports no error
Dario Sestito <darios@symbian.org>
parents:
244
diff
changeset
|
30 |
$buildlog_status->{on_start} = 'RaptorError::on_start_buildlog'; |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
31 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
32 |
$buildlog_error_status->{name} = 'buildlog_error_status'; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
33 |
$buildlog_error_status->{next_status} = {}; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
34 |
$buildlog_error_status->{on_start} = 'RaptorError::on_start_buildlog_error'; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
35 |
$buildlog_error_status->{on_end} = 'RaptorError::on_end_buildlog_error'; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
36 |
$buildlog_error_status->{on_chars} = 'RaptorError::on_chars_buildlog_error'; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
37 |
|
244
9544c55a7fd0
Raptor parser to provide summary csv file so that faults can be readily put into db
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
38 |
my $filename = ''; |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
39 |
my $failure_item = 0; |
244
9544c55a7fd0
Raptor parser to provide summary csv file so that faults can be readily put into db
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
40 |
|
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
41 |
my $characters = ''; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
42 |
|
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
43 |
my $CATEGORY_RAPTORERROR = 'raptor_error'; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
44 |
my $CATEGORY_RAPTORERROR_CANNOTPROCESSSCHEMAVERSION = 'cannot_process_schema_version'; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
45 |
my $CATEGORY_RAPTORERROR_NOBLDINFFOUND = 'no_bld_inf_found'; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
46 |
my $CATEGORY_RAPTORERROR_CANTFINDMMPFILE = 'cant_find_mmp_file'; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
47 |
my $CATEGORY_RAPTORERROR_MAKEEXITEDWITHERRORS = 'make_exited_with_errors'; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
48 |
my $CATEGORY_RAPTORERROR_TOOLDIDNOTRETURNVERSION = 'tool_didnot_return_version'; |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
49 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
50 |
sub process |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
51 |
{ |
244
9544c55a7fd0
Raptor parser to provide summary csv file so that faults can be readily put into db
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
52 |
my ($text, $component, $phase, $recipe, $file, $line) = @_; |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
53 |
|
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
54 |
my $category = $CATEGORY_RAPTORERROR; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
55 |
my $severity = ''; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
56 |
my $subcategory = ''; |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
57 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
58 |
if ($text =~ m,Cannot process schema version .* of file,) |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
59 |
{ |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
60 |
$severity = $RaptorCommon::SEVERITY_CRITICAL; |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
61 |
$subcategory = $CATEGORY_RAPTORERROR_CANNOTPROCESSSCHEMAVERSION; |
244
9544c55a7fd0
Raptor parser to provide summary csv file so that faults can be readily put into db
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
62 |
RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
9544c55a7fd0
Raptor parser to provide summary csv file so that faults can be readily put into db
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
63 |
} |
9544c55a7fd0
Raptor parser to provide summary csv file so that faults can be readily put into db
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
64 |
elsif ($text =~ m,No bld\.inf found at,) |
9544c55a7fd0
Raptor parser to provide summary csv file so that faults can be readily put into db
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
65 |
{ |
327
61f2add750f0
Added 3 raptor error categories, adjusted severity of all categories
Dario Sestito <darios@symbian.org>
parents:
324
diff
changeset
|
66 |
$severity = $RaptorCommon::SEVERITY_MAJOR; |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
67 |
$subcategory = $CATEGORY_RAPTORERROR_NOBLDINFFOUND; |
327
61f2add750f0
Added 3 raptor error categories, adjusted severity of all categories
Dario Sestito <darios@symbian.org>
parents:
324
diff
changeset
|
68 |
RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
61f2add750f0
Added 3 raptor error categories, adjusted severity of all categories
Dario Sestito <darios@symbian.org>
parents:
324
diff
changeset
|
69 |
} |
61f2add750f0
Added 3 raptor error categories, adjusted severity of all categories
Dario Sestito <darios@symbian.org>
parents:
324
diff
changeset
|
70 |
elsif ($text =~ m,Can't find mmp file,) |
61f2add750f0
Added 3 raptor error categories, adjusted severity of all categories
Dario Sestito <darios@symbian.org>
parents:
324
diff
changeset
|
71 |
{ |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
72 |
$severity = $RaptorCommon::SEVERITY_MINOR; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
73 |
$subcategory = $CATEGORY_RAPTORERROR_CANTFINDMMPFILE; |
327
61f2add750f0
Added 3 raptor error categories, adjusted severity of all categories
Dario Sestito <darios@symbian.org>
parents:
324
diff
changeset
|
74 |
RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
61f2add750f0
Added 3 raptor error categories, adjusted severity of all categories
Dario Sestito <darios@symbian.org>
parents:
324
diff
changeset
|
75 |
} |
61f2add750f0
Added 3 raptor error categories, adjusted severity of all categories
Dario Sestito <darios@symbian.org>
parents:
324
diff
changeset
|
76 |
elsif ($text =~ m,The make-engine exited with errors,) |
61f2add750f0
Added 3 raptor error categories, adjusted severity of all categories
Dario Sestito <darios@symbian.org>
parents:
324
diff
changeset
|
77 |
{ |
244
9544c55a7fd0
Raptor parser to provide summary csv file so that faults can be readily put into db
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
78 |
$severity = $RaptorCommon::SEVERITY_CRITICAL; |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
79 |
$subcategory = $CATEGORY_RAPTORERROR_MAKEEXITEDWITHERRORS; |
244
9544c55a7fd0
Raptor parser to provide summary csv file so that faults can be readily put into db
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
80 |
RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
9544c55a7fd0
Raptor parser to provide summary csv file so that faults can be readily put into db
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
81 |
} |
339
7297abc8565b
Add new raptor error category to raptor parser (tool_didnt_return_version)
Dario Sestito <darios@symbian.org>
parents:
327
diff
changeset
|
82 |
elsif ($text =~ m,tool .* from config .* did not return version .* as required,) |
7297abc8565b
Add new raptor error category to raptor parser (tool_didnt_return_version)
Dario Sestito <darios@symbian.org>
parents:
327
diff
changeset
|
83 |
{ |
7297abc8565b
Add new raptor error category to raptor parser (tool_didnt_return_version)
Dario Sestito <darios@symbian.org>
parents:
327
diff
changeset
|
84 |
$severity = $RaptorCommon::SEVERITY_CRITICAL; |
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
85 |
$subcategory = $CATEGORY_RAPTORERROR_TOOLDIDNOTRETURNVERSION; |
339
7297abc8565b
Add new raptor error category to raptor parser (tool_didnt_return_version)
Dario Sestito <darios@symbian.org>
parents:
327
diff
changeset
|
86 |
RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
7297abc8565b
Add new raptor error category to raptor parser (tool_didnt_return_version)
Dario Sestito <darios@symbian.org>
parents:
327
diff
changeset
|
87 |
} |
244
9544c55a7fd0
Raptor parser to provide summary csv file so that faults can be readily put into db
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
88 |
else # log everything by default |
9544c55a7fd0
Raptor parser to provide summary csv file so that faults can be readily put into db
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
89 |
{ |
9544c55a7fd0
Raptor parser to provide summary csv file so that faults can be readily put into db
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
90 |
RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
91 |
} |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
92 |
} |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
93 |
|
324
f1baeb3f075f
Generate error and summary file even if build reports no error
Dario Sestito <darios@symbian.org>
parents:
244
diff
changeset
|
94 |
sub on_start_buildlog |
f1baeb3f075f
Generate error and summary file even if build reports no error
Dario Sestito <darios@symbian.org>
parents:
244
diff
changeset
|
95 |
{ |
f1baeb3f075f
Generate error and summary file even if build reports no error
Dario Sestito <darios@symbian.org>
parents:
244
diff
changeset
|
96 |
RaptorCommon::init(); |
f1baeb3f075f
Generate error and summary file even if build reports no error
Dario Sestito <darios@symbian.org>
parents:
244
diff
changeset
|
97 |
|
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
98 |
$filename = "$::basedir/raptor_error.txt"; |
324
f1baeb3f075f
Generate error and summary file even if build reports no error
Dario Sestito <darios@symbian.org>
parents:
244
diff
changeset
|
99 |
if (!-f$filename) |
f1baeb3f075f
Generate error and summary file even if build reports no error
Dario Sestito <darios@symbian.org>
parents:
244
diff
changeset
|
100 |
{ |
364
4dc3b5b1577c
Enable analysis of Raptor warnings. Publish to Diamonds
Dario Sestito <darios@symbian.org>
parents:
339
diff
changeset
|
101 |
print "Writing errors file $filename\n"; |
324
f1baeb3f075f
Generate error and summary file even if build reports no error
Dario Sestito <darios@symbian.org>
parents:
244
diff
changeset
|
102 |
open(FILE, ">$filename"); |
f1baeb3f075f
Generate error and summary file even if build reports no error
Dario Sestito <darios@symbian.org>
parents:
244
diff
changeset
|
103 |
close(FILE); |
f1baeb3f075f
Generate error and summary file even if build reports no error
Dario Sestito <darios@symbian.org>
parents:
244
diff
changeset
|
104 |
} |
f1baeb3f075f
Generate error and summary file even if build reports no error
Dario Sestito <darios@symbian.org>
parents:
244
diff
changeset
|
105 |
} |
f1baeb3f075f
Generate error and summary file even if build reports no error
Dario Sestito <darios@symbian.org>
parents:
244
diff
changeset
|
106 |
|
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
107 |
sub on_start_buildlog_error |
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 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
111 |
sub on_chars_buildlog_error |
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 |
my ($ch) = @_; |
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 |
#print "on_chars_buildlog_error\n"; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
116 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
117 |
$characters .= $ch->{Data}; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
118 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
119 |
#print "characters is now -->$characters<--\n"; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
120 |
} |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
121 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
122 |
sub on_end_buildlog_error |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
123 |
{ |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
124 |
#print "on_end_buildlog_error\n"; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
125 |
|
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
126 |
$characters =~ s,^[\r\n]*,,; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
127 |
$characters =~ s,[\r\n]*$,,; |
244
9544c55a7fd0
Raptor parser to provide summary csv file so that faults can be readily put into db
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
128 |
|
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
129 |
if ($characters =~ m,[^\s^\r^\n],) |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
130 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
131 |
if ($failure_item == 0 and -f "$filename") |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
132 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
133 |
open(FILE, "$filename"); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
134 |
{ |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
135 |
local $/ = undef; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
136 |
my $filecontent = <FILE>; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
137 |
$failure_item = $1 if ($filecontent =~ m/.*---failure_item_(\d+)/s); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
138 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
139 |
close(FILE); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
140 |
} |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
141 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
142 |
$failure_item++; |
244
9544c55a7fd0
Raptor parser to provide summary csv file so that faults can be readily put into db
Dario Sestito <darios@symbian.org>
parents:
242
diff
changeset
|
143 |
|
383
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
144 |
open(FILE, ">>$filename"); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
145 |
print FILE "---failure_item_$failure_item\---\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
146 |
print FILE "$characters\n\n"; |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
147 |
close(FILE); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
148 |
|
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
149 |
process($characters, '', '', '', "raptor_error.txt", $failure_item); |
52675b624b66
Add raptor build html summary computation
Dario Sestito <darios@symbian.org>
parents:
364
diff
changeset
|
150 |
} |
242
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
151 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
152 |
$characters = ''; |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
153 |
} |
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
154 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
155 |
|
51e429810aba
Modularized Raptor parser scripts
Dario Sestito <darios@symbian.org>
parents:
diff
changeset
|
156 |
1; |