# HG changeset patch # User Dario Sestito # Date 1249043350 -3600 # Node ID 61f2add750f042373c1c4a7d5130ce99d3b3662f # Parent 47a6624f927d9f9e81dab82f276fd2e76d6c99b9 Added 3 raptor error categories, adjusted severity of all categories diff -r 47a6624f927d -r 61f2add750f0 common/tools/raptor/RaptorCommon.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 { diff -r 47a6624f927d -r 61f2add750f0 common/tools/raptor/RaptorError.pm --- 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); }