57 my $CATEGORY_RECIPEFAILURE_ARMCC_CONTROLLINGEXPRESSIONISCONSTANT = 'armcc_controlling_expression_is_constant'; |
57 my $CATEGORY_RECIPEFAILURE_ARMCC_CONTROLLINGEXPRESSIONISCONSTANT = 'armcc_controlling_expression_is_constant'; |
58 my $CATEGORY_RECIPEFAILURE_ARMCC_INTERNALFAULT = 'armcc_internal_fault'; |
58 my $CATEGORY_RECIPEFAILURE_ARMCC_INTERNALFAULT = 'armcc_internal_fault'; |
59 my $CATEGORY_RECIPEFAILURE_ARMCC_GENERICWARNINGSERRORS = 'armcc_generic_warnings_errors'; |
59 my $CATEGORY_RECIPEFAILURE_ARMCC_GENERICWARNINGSERRORS = 'armcc_generic_warnings_errors'; |
60 my $CATEGORY_RECIPEFAILURE_ELF2E32_SYMBOLMISSINGFROMELFFILE = 'elf2e32_symbol_missing_from_elf_file'; |
60 my $CATEGORY_RECIPEFAILURE_ELF2E32_SYMBOLMISSINGFROMELFFILE = 'elf2e32_symbol_missing_from_elf_file'; |
61 |
61 |
|
62 my $mmp_with_issues = {}; |
|
63 |
62 |
64 |
63 sub process |
65 sub process |
64 { |
66 { |
65 my ($text, $component, $phase, $recipe, $file, $line) = @_; |
67 my ($text, $config, $component, $mmp, $phase, $recipe, $file, $line) = @_; |
66 |
68 |
67 my $category = $CATEGORY_RECIPEFAILURE; |
69 my $category = $CATEGORY_RECIPEFAILURE; |
68 my $severity = ''; |
70 my $severity = ''; |
69 my $subcategory = ''; |
71 my $subcategory = ''; |
70 |
72 |
|
73 # if mmp is defined assign severity=MAJOR for the first failure |
|
74 # then severity=MINOR to all other (for each logfile) |
|
75 if ($mmp and defined $mmp_with_issues->{$::current_log_file}->{$mmp}) |
|
76 { |
|
77 $severity = $RaptorCommon::SEVERITY_MINOR; |
|
78 } |
|
79 elsif ($mmp) |
|
80 { |
|
81 $mmp_with_issues->{$::current_log_file} = {} if (!defined $mmp_with_issues->{$::current_log_file}); |
|
82 $mmp_with_issues->{$::current_log_file}->{$mmp} = 1; |
|
83 $severity = $RaptorCommon::SEVERITY_MAJOR; |
|
84 } |
|
85 else |
|
86 { |
|
87 $severity = $RaptorCommon::SEVERITY_MAJOR; |
|
88 } |
|
89 |
|
90 |
71 if ($text =~ m,Error: #5: cannot open source input file .*: No such file or directory,) |
91 if ($text =~ m,Error: #5: cannot open source input file .*: No such file or directory,) |
72 { |
92 { |
73 $severity = $RaptorCommon::SEVERITY_MAJOR; |
|
74 my $subcategory = $CATEGORY_RECIPEFAILURE_ARMCC_CANNOTOPENSOURCEINPUTFILE; |
93 my $subcategory = $CATEGORY_RECIPEFAILURE_ARMCC_CANNOTOPENSOURCEINPUTFILE; |
75 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
94 RaptorCommon::dump_fault($category, $subcategory, $severity, $config, $component, $mmp, $phase, $recipe, $file, $line); |
76 } |
95 } |
77 elsif ($text =~ m,Fatal error: L6002U: Could not open file .*: No such file or directory,) |
96 elsif ($text =~ m,Fatal error: L6002U: Could not open file .*: No such file or directory,) |
78 { |
97 { |
79 $severity = $RaptorCommon::SEVERITY_MAJOR; |
|
80 my $subcategory = $CATEGORY_RECIPEFAILURE_ARMLINK_COULDNOTOPENFILE; |
98 my $subcategory = $CATEGORY_RECIPEFAILURE_ARMLINK_COULDNOTOPENFILE; |
81 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
99 RaptorCommon::dump_fault($category, $subcategory, $severity, $config, $component, $mmp, $phase, $recipe, $file, $line); |
82 } |
100 } |
83 elsif ($text =~ m,elf2e32 : Error: E1001: Could not open file : .*.,) |
101 elsif ($text =~ m,elf2e32 : Error: E1001: Could not open file : .*.,) |
84 { |
102 { |
85 $severity = $RaptorCommon::SEVERITY_MAJOR; |
|
86 my $subcategory = $CATEGORY_RECIPEFAILURE_ELF2E32_COULDNOTOPENFILE; |
103 my $subcategory = $CATEGORY_RECIPEFAILURE_ELF2E32_COULDNOTOPENFILE; |
87 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
104 RaptorCommon::dump_fault($category, $subcategory, $severity, $config, $component, $mmp, $phase, $recipe, $file, $line); |
88 } |
105 } |
89 elsif ($text =~ m,elf2e32 : Error: E1036: Symbol .* Missing from ELF File,) |
106 elsif ($text =~ m,elf2e32 : Error: E1036: Symbol .* Missing from ELF File,) |
90 { |
107 { |
91 $severity = $RaptorCommon::SEVERITY_MAJOR; |
|
92 my $subcategory = $CATEGORY_RECIPEFAILURE_ELF2E32_SYMBOLMISSINGFROMELFFILE; |
108 my $subcategory = $CATEGORY_RECIPEFAILURE_ELF2E32_SYMBOLMISSINGFROMELFFILE; |
93 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
109 RaptorCommon::dump_fault($category, $subcategory, $severity, $config, $component, $mmp, $phase, $recipe, $file, $line); |
94 } |
110 } |
95 elsif ($text =~ m,Error: L6833E: File '.*' does not exist,) |
111 elsif ($text =~ m,Error: L6833E: File '.*' does not exist,) |
96 { |
112 { |
97 $severity = $RaptorCommon::SEVERITY_MAJOR; |
|
98 my $subcategory = $CATEGORY_RECIPEFAILURE_ARMAR_FILEDOESNOTEXIST; |
113 my $subcategory = $CATEGORY_RECIPEFAILURE_ARMAR_FILEDOESNOTEXIST; |
99 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
114 RaptorCommon::dump_fault($category, $subcategory, $severity, $config, $component, $mmp, $phase, $recipe, $file, $line); |
100 } |
115 } |
101 elsif ($text =~ m,: Warning: #236-D: controlling expression is constant,) |
116 elsif ($text =~ m,: Warning: #236-D: controlling expression is constant,) |
102 { |
117 { |
103 $severity = $RaptorCommon::SEVERITY_MAJOR; |
|
104 my $subcategory = $CATEGORY_RECIPEFAILURE_ARMCC_CONTROLLINGEXPRESSIONISCONSTANT; |
118 my $subcategory = $CATEGORY_RECIPEFAILURE_ARMCC_CONTROLLINGEXPRESSIONISCONSTANT; |
105 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
119 RaptorCommon::dump_fault($category, $subcategory, $severity, $config, $component, $mmp, $phase, $recipe, $file, $line); |
106 } |
120 } |
107 elsif ($text =~ m,/armcc.exe , and $text =~ m,Internal fault: ,) |
121 elsif ($text =~ m,/armcc.exe , and $text =~ m,Internal fault: ,) |
108 { |
122 { |
109 $severity = $RaptorCommon::SEVERITY_MAJOR; |
|
110 my $subcategory = $CATEGORY_RECIPEFAILURE_ARMCC_INTERNALFAULT; |
123 my $subcategory = $CATEGORY_RECIPEFAILURE_ARMCC_INTERNALFAULT; |
111 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
124 RaptorCommon::dump_fault($category, $subcategory, $severity, $config, $component, $mmp, $phase, $recipe, $file, $line); |
112 } |
125 } |
113 # the following captures generic armcc error/warnings, not captured by regexps above |
126 # the following captures generic armcc error/warnings, not captured by regexps above |
114 elsif ($text =~ m,/armcc.exe , and $text =~ m,: \d+ warnings\, \d+ errors$,) |
127 elsif ($text =~ m,/armcc.exe , and $text =~ m,: \d+ warnings\, \d+ errors$,) |
115 { |
128 { |
116 $severity = $RaptorCommon::SEVERITY_MAJOR; |
|
117 my $subcategory = $CATEGORY_RECIPEFAILURE_ARMCC_GENERICWARNINGSERRORS; |
129 my $subcategory = $CATEGORY_RECIPEFAILURE_ARMCC_GENERICWARNINGSERRORS; |
118 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
130 RaptorCommon::dump_fault($category, $subcategory, $severity, $config, $component, $mmp, $phase, $recipe, $file, $line); |
119 } |
131 } |
120 else # log everything by default |
132 else # log everything by default |
121 { |
133 { |
122 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
134 RaptorCommon::dump_fault($category, $subcategory, $severity, $config, $component, $mmp, $phase, $recipe, $file, $line); |
123 } |
135 } |
124 } |
136 } |
125 |
137 |
126 sub on_start_buildlog |
138 sub on_start_buildlog |
127 { |
139 { |