51 my $CATEGORY_RAPTORERROR_COULDNOTEXPORT = 'missing_source_file'; |
50 my $CATEGORY_RAPTORERROR_COULDNOTEXPORT = 'missing_source_file'; |
52 my $CATEGORY_RAPTORERROR_MISSINGBLDINFFILE = 'missing_bld_inf_file'; |
51 my $CATEGORY_RAPTORERROR_MISSINGBLDINFFILE = 'missing_bld_inf_file'; |
53 |
52 |
54 sub process |
53 sub process |
55 { |
54 { |
56 my ($text, $logfile, $component, $mmp, $phase, $recipe, $file, $line) = @_; |
55 my ($text, $logfile, $component, $mmp, $phase, $recipe, $file) = @_; |
|
56 |
|
57 my $dumped = 1; |
57 |
58 |
58 my $category = $CATEGORY_RAPTORERROR; |
59 my $category = $CATEGORY_RAPTORERROR; |
59 my $severity = ''; |
60 my $severity = ''; |
60 my $subcategory = ''; |
61 my $subcategory = ''; |
61 |
62 |
62 if ($text =~ m,Cannot process schema version .* of file,) |
63 if ($text =~ m,Cannot process schema version .* of file,) |
63 { |
64 { |
64 $severity = $RaptorCommon::SEVERITY_CRITICAL; |
65 $severity = $RaptorCommon::SEVERITY_CRITICAL; |
65 $subcategory = $CATEGORY_RAPTORERROR_CANNOTPROCESSSCHEMAVERSION; |
66 $subcategory = $CATEGORY_RAPTORERROR_CANNOTPROCESSSCHEMAVERSION; |
66 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
67 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file); |
67 } |
68 } |
68 elsif ($text =~ m,No bld\.inf found at,) |
69 elsif ($text =~ m,No bld\.inf found at,) |
69 { |
70 { |
70 $severity = $RaptorCommon::SEVERITY_MAJOR; |
71 $severity = $RaptorCommon::SEVERITY_MAJOR; |
71 $subcategory = $CATEGORY_RAPTORERROR_NOBLDINFFOUND; |
72 $subcategory = $CATEGORY_RAPTORERROR_NOBLDINFFOUND; |
72 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
73 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file); |
73 } |
74 } |
74 elsif ($text =~ m,Can't find mmp file,) |
75 elsif ($text =~ m,Can't find mmp file,) |
75 { |
76 { |
76 $severity = $RaptorCommon::SEVERITY_MAJOR; |
77 $severity = $RaptorCommon::SEVERITY_MAJOR; |
77 $subcategory = $CATEGORY_RAPTORERROR_CANTFINDMMPFILE; |
78 $subcategory = $CATEGORY_RAPTORERROR_CANTFINDMMPFILE; |
78 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
79 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file); |
79 } |
80 } |
80 elsif ($text =~ m,The make-engine exited with errors,) |
81 elsif ($text =~ m,The make-engine exited with errors,) |
81 { |
82 { |
82 $severity = $RaptorCommon::SEVERITY_CRITICAL; |
83 $severity = $RaptorCommon::SEVERITY_CRITICAL; |
83 $subcategory = $CATEGORY_RAPTORERROR_MAKEEXITEDWITHERRORS; |
84 $subcategory = $CATEGORY_RAPTORERROR_MAKEEXITEDWITHERRORS; |
84 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
85 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file); |
85 } |
86 } |
86 elsif ($text =~ m,tool .* from config .* did not return version .* as required,) |
87 elsif ($text =~ m,tool .* from config .* did not return version .* as required,) |
87 { |
88 { |
88 $severity = $RaptorCommon::SEVERITY_CRITICAL; |
89 $severity = $RaptorCommon::SEVERITY_CRITICAL; |
89 $subcategory = $CATEGORY_RAPTORERROR_TOOLDIDNOTRETURNVERSION; |
90 $subcategory = $CATEGORY_RAPTORERROR_TOOLDIDNOTRETURNVERSION; |
90 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
91 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file); |
91 } |
92 } |
92 elsif ($text =~ m,Unknown build configuration '.*',) |
93 elsif ($text =~ m,Unknown build configuration '.*',) |
93 { |
94 { |
94 $severity = $RaptorCommon::SEVERITY_CRITICAL; |
95 $severity = $RaptorCommon::SEVERITY_CRITICAL; |
95 $subcategory = $CATEGORY_RAPTORERROR_UNKNOWNBUILDCONFIG; |
96 $subcategory = $CATEGORY_RAPTORERROR_UNKNOWNBUILDCONFIG; |
96 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
97 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file); |
97 } |
98 } |
98 elsif ($text =~ m,No build configurations given,) |
99 elsif ($text =~ m,No build configurations given,) |
99 { |
100 { |
100 $severity = $RaptorCommon::SEVERITY_CRITICAL; |
101 $severity = $RaptorCommon::SEVERITY_CRITICAL; |
101 $subcategory = $CATEGORY_RAPTORERROR_NOBUILDCONFIGSGIVEN; |
102 $subcategory = $CATEGORY_RAPTORERROR_NOBUILDCONFIGSGIVEN; |
102 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
103 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file); |
103 } |
104 } |
104 elsif ($text =~ m,Could not export .* to .* : \[Errno 2\] No such file or directory: .*,) |
105 elsif ($text =~ m,Could not export .* to .* : \[Errno 2\] No such file or directory: .*,) |
105 { |
106 { |
106 $severity = $RaptorCommon::SEVERITY_MAJOR; |
107 $severity = $RaptorCommon::SEVERITY_MAJOR; |
107 $subcategory = $CATEGORY_RAPTORERROR_COULDNOTEXPORT; |
108 $subcategory = $CATEGORY_RAPTORERROR_COULDNOTEXPORT; |
108 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
109 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file); |
109 } |
110 } |
110 elsif ($text =~ m,win32/mingw/bin/cpp\.exe: .*bld\.inf:.*bld\.inf: No such file or directory,) |
111 elsif ($text =~ m,win32/mingw/bin/cpp\.exe: .*bld\.inf:.*bld\.inf: No such file or directory,) |
111 { |
112 { |
112 $severity = $RaptorCommon::SEVERITY_MAJOR; |
113 $severity = $RaptorCommon::SEVERITY_MAJOR; |
113 $subcategory = $CATEGORY_RAPTORERROR_MISSINGBLDINFFILE; |
114 $subcategory = $CATEGORY_RAPTORERROR_MISSINGBLDINFFILE; |
114 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
115 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file); |
115 } |
116 } |
116 elsif ($text =~ m,^Preprocessor exception: ''Errors in .*bld\.inf'' : in command,) |
117 elsif ($text =~ m,^Preprocessor exception: ''Errors in .*bld\.inf'' : in command,) |
117 { |
118 { |
118 # don't dump |
119 # don't dump |
|
120 $dumped = 0; |
119 } |
121 } |
120 elsif ($text =~ m,Source of export does not exist: .*,) |
122 elsif ($text =~ m,Source of export does not exist: .*,) |
121 { |
123 { |
122 # don't dump |
124 # don't dump |
|
125 $dumped = 0; |
123 } |
126 } |
124 else # log everything by default |
127 else # log everything by default |
125 { |
128 { |
126 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
129 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file); |
127 } |
130 } |
|
131 |
|
132 return $dumped; |
128 } |
133 } |
129 |
134 |
130 sub on_start_buildlog |
135 sub on_start_buildlog |
131 { |
136 { |
132 RaptorCommon::init(); |
137 RaptorCommon::init(); |