Add recipe-failure categories armcc_controlling_expression_is_constant and armcc_generic_warnings_errors
authorDario Sestito <darios@symbian.org>
Mon, 02 Nov 2009 13:12:44 +0000
changeset 723 6b540cc85619
parent 722 d34d2cabd32d
child 724 dc3b9f6bf48c
Add recipe-failure categories armcc_controlling_expression_is_constant and armcc_generic_warnings_errors
common/tools/raptor/RaptorRecipe.pm
--- a/common/tools/raptor/RaptorRecipe.pm	Mon Nov 02 11:23:32 2009 +0000
+++ b/common/tools/raptor/RaptorRecipe.pm	Mon Nov 02 13:12:44 2009 +0000
@@ -54,6 +54,8 @@
 my $CATEGORY_RECIPEFAILURE_ARMLINK_COULDNOTOPENFILE = 'armlink_could_not_open_file';
 my $CATEGORY_RECIPEFAILURE_ELF2E32_COULDNOTOPENFILE = 'elf2e32_could_not_open_file';
 my $CATEGORY_RECIPEFAILURE_ARMAR_FILEDOESNOTEXIST = 'armar_file_does_not_exist';
+my $CATEGORY_RECIPEFAILURE_ARMCC_CONTROLLINGEXPRESSIONISCONSTANT = 'armcc_controlling_expression_is_constant';
+my $CATEGORY_RECIPEFAILURE_ARMCC_GENERICWARNINGSERRORS = 'armcc_generic_warnings_errors';
 
 sub process
 {
@@ -87,6 +89,19 @@
 		my $subcategory = $CATEGORY_RECIPEFAILURE_ARMAR_FILEDOESNOTEXIST;
 		RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
 	}
+	elsif ($text =~ m,: Warning:  #236-D: controlling expression is constant,)
+	{
+		$severity = $RaptorCommon::SEVERITY_MAJOR;
+		my $subcategory = $CATEGORY_RECIPEFAILURE_ARMCC_CONTROLLINGEXPRESSIONISCONSTANT;
+		RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
+	}
+	# the following captures generic armcc error/warnings, not captured by regexps above
+	elsif ($text =~ m,/armcc.exe , and $text =~ m,: \d+ warnings\, \d+ errors$,)
+	{
+		$severity = $RaptorCommon::SEVERITY_MAJOR;
+		my $subcategory = $CATEGORY_RECIPEFAILURE_ARMCC_GENERICWARNINGSERRORS;
+		RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
+	}
 	else # log everything by default
 	{
 		RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);