Added 3 raptor error categories, adjusted severity of all categories
authorDario Sestito <darios@symbian.org>
Fri, 31 Jul 2009 13:29:10 +0100
changeset 327 61f2add750f0
parent 326 47a6624f927d
child 328 913e5db0bdb6
Added 3 raptor error categories, adjusted severity of all categories
common/tools/raptor/RaptorCommon.pm
common/tools/raptor/RaptorError.pm
--- a/common/tools/raptor/RaptorCommon.pm	Mon Jul 27 17:01:06 2009 +0100
+++ b/common/tools/raptor/RaptorCommon.pm	Fri Jul 31 13:29:10 2009 +0100
@@ -19,9 +19,14 @@
 our $CATEGORY_RAPTORERROR = 'raptor_error';
 our $CATEGORY_RAPTORERROR_CANNOTPROCESSSCHEMAVERSION = 'cannot_process_schema_version';
 our $CATEGORY_RAPTORERROR_NOBLDINFFOUND = 'no_bld_inf_found';
+our $CATEGORY_RAPTORERROR_CANTFINDMMPFILE = 'cant_find_mmp_file';
+our $CATEGORY_RAPTORERROR_MAKEEXITEDWITHERRORS = 'make_exited_with_errors';
 
 our $SEVERITY_UNKNOWN = 'unknown';
 our $SEVERITY_CRITICAL = 'critical';
+our $SEVERITY_MAJOR = 'major';
+our $SEVERITY_NORMAL = 'normal';
+our $SEVERITY_MINOR = 'minor';
 
 sub init
 {
--- a/common/tools/raptor/RaptorError.pm	Mon Jul 27 17:01:06 2009 +0100
+++ b/common/tools/raptor/RaptorError.pm	Fri Jul 31 13:29:10 2009 +0100
@@ -55,13 +55,25 @@
 	}
 	elsif ($text =~ m,No bld\.inf found at,)
 	{
+		$severity = $RaptorCommon::SEVERITY_MAJOR;
+		my $subcategory = $RaptorCommon::CATEGORY_RAPTORERROR_NOBLDINFFOUND;
+		RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
+	}
+	elsif ($text =~ m,Can't find mmp file,)
+	{
+		$severity = $RaptorCommon::SEVERITY_NORMAL;
+		my $subcategory = $RaptorCommon::CATEGORY_RAPTORERROR_CANTFINDMMPFILE;
+		RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
+	}
+	elsif ($text =~ m,The make-engine exited with errors,)
+	{
 		$severity = $RaptorCommon::SEVERITY_CRITICAL;
-		my $subcategory = $RaptorCommon::CATEGORY_RAPTORERROR_NOBLDINFFOUND;
+		my $subcategory = $RaptorCommon::CATEGORY_RAPTORERROR_MAKEEXITEDWITHERRORS;
 		RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
 	}
 	else # log everything by default
 	{
-		$severity = $RaptorCommon::SEVERITY_UNKNOWN;
+		$severity = $RaptorCommon::SEVERITY_NORMAL;
 		my $subcategory = '';
 		RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
 	}