43 my $CATEGORY_RAPTORWARNING = 'raptor_warning'; |
43 my $CATEGORY_RAPTORWARNING = 'raptor_warning'; |
44 my $CATEGORY_RAPTORWARNING_MISSINGFLAGABIV2 = 'missing_enable_abiv2_mode'; |
44 my $CATEGORY_RAPTORWARNING_MISSINGFLAGABIV2 = 'missing_enable_abiv2_mode'; |
45 |
45 |
46 sub process |
46 sub process |
47 { |
47 { |
48 my ($text, $component, $phase, $recipe, $file, $line) = @_; |
48 my ($text, $logfile, $component, $mmp, $phase, $recipe, $file, $line) = @_; |
49 |
49 |
50 my $category = $CATEGORY_RAPTORWARNING; |
50 my $category = $CATEGORY_RAPTORWARNING; |
51 my $severity = ''; |
51 my $severity = ''; |
52 my $subcategory = ''; |
52 my $subcategory = ''; |
53 |
53 |
54 if ($text =~ m,missing flag ENABLE_ABIV2_MODE,) |
54 if ($text =~ m,missing flag ENABLE_ABIV2_MODE,) |
55 { |
55 { |
56 $severity = $RaptorCommon::SEVERITY_MINOR; |
56 $severity = $RaptorCommon::SEVERITY_MINOR; |
57 my $subcategory = $CATEGORY_RAPTORWARNING_MISSINGFLAGABIV2; |
57 my $subcategory = $CATEGORY_RAPTORWARNING_MISSINGFLAGABIV2; |
58 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
58 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
59 } |
59 } |
60 else # log everything by default |
60 else # log everything by default |
61 { |
61 { |
62 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
62 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
63 } |
63 } |
64 } |
64 } |
65 |
65 |
66 sub on_start_buildlog |
66 sub on_start_buildlog |
67 { |
67 { |
68 RaptorCommon::init(); |
68 RaptorCommon::init(); |
69 |
69 |
70 $filename = "$::basedir/raptor_warning.txt"; |
70 $filename = "$::raptorbitsdir/raptor_warning.txt"; |
71 if (!-f$filename) |
71 if (!-f$filename) |
72 { |
72 { |
73 print "Writing warnings file $filename\n"; |
73 print "Writing warnings file $filename\n"; |
74 open(FILE, ">$filename"); |
74 open(FILE, ">$filename"); |
75 close(FILE); |
75 close(FILE); |
116 open(FILE, ">>$filename"); |
116 open(FILE, ">>$filename"); |
117 print FILE "---failure_item_$failure_item\---\n"; |
117 print FILE "---failure_item_$failure_item\---\n"; |
118 print FILE "$characters\n\n"; |
118 print FILE "$characters\n\n"; |
119 close(FILE); |
119 close(FILE); |
120 |
120 |
121 process($characters, '', '', '', "raptor_warning.txt", $failure_item); |
121 process($characters, $::current_log_file, '', '', '', '', "raptor_warning.txt", $failure_item); |
122 } |
122 } |
123 |
123 |
124 $characters = ''; |
124 $characters = ''; |
125 } |
125 } |
126 |
126 |