49 my $CATEGORY_RAPTORUNRECIPED_IGNORINGOLDCOMMANDSFORTARGET = 'ignoring_old_commands_for_target'; |
49 my $CATEGORY_RAPTORUNRECIPED_IGNORINGOLDCOMMANDSFORTARGET = 'ignoring_old_commands_for_target'; |
50 my $CATEGORY_RAPTORUNRECIPED_OVERRIDINGCOMMANDSFORTARGET = 'overriding_commands_for_target'; |
50 my $CATEGORY_RAPTORUNRECIPED_OVERRIDINGCOMMANDSFORTARGET = 'overriding_commands_for_target'; |
51 |
51 |
52 sub process |
52 sub process |
53 { |
53 { |
54 my ($text, $component, $phase, $recipe, $file, $line) = @_; |
54 my ($text, $logfile, $component, $mmp, $phase, $recipe, $file, $line) = @_; |
55 |
55 |
56 my $category = $CATEGORY_RAPTORUNRECIPED; |
56 my $category = $CATEGORY_RAPTORUNRECIPED; |
57 my $severity = ''; |
57 my $severity = ''; |
58 my $subcategory = ''; |
58 my $subcategory = ''; |
59 |
59 |
60 if ($text =~ m,make\.exe: \*\*\* No rule to make target,) |
60 if ($text =~ m,make\.exe: \*\*\* No rule to make target,) |
61 { |
61 { |
62 $severity = $RaptorCommon::SEVERITY_MAJOR; |
62 $severity = $RaptorCommon::SEVERITY_MAJOR; |
63 my $subcategory = $CATEGORY_RAPTORUNRECIPED_NORULETOMAKETARGET; |
63 my $subcategory = $CATEGORY_RAPTORUNRECIPED_NORULETOMAKETARGET; |
64 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
64 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
65 } |
65 } |
66 elsif ($text =~ m,make\.exe: Target .* not remade because of errors,) |
66 elsif ($text =~ m,make\.exe: Target .* not remade because of errors,) |
67 { |
67 { |
68 $severity = $RaptorCommon::SEVERITY_MINOR; |
68 $severity = $RaptorCommon::SEVERITY_MINOR; |
69 my $subcategory = $CATEGORY_RAPTORUNRECIPED_TARGETNOTREMADEFORERRORS; |
69 my $subcategory = $CATEGORY_RAPTORUNRECIPED_TARGETNOTREMADEFORERRORS; |
70 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
70 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
71 } |
71 } |
72 elsif ($text =~ m,: warning: ignoring old commands for target,) |
72 elsif ($text =~ m,: warning: ignoring old commands for target,) |
73 { |
73 { |
74 $severity = $RaptorCommon::SEVERITY_MINOR; |
74 $severity = $RaptorCommon::SEVERITY_MINOR; |
75 my $subcategory = $CATEGORY_RAPTORUNRECIPED_IGNORINGOLDCOMMANDSFORTARGET; |
75 my $subcategory = $CATEGORY_RAPTORUNRECIPED_IGNORINGOLDCOMMANDSFORTARGET; |
76 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
76 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
77 } |
77 } |
78 elsif ($text =~ m,: warning: overriding commands for target,) |
78 elsif ($text =~ m,: warning: overriding commands for target,) |
79 { |
79 { |
80 $severity = $RaptorCommon::SEVERITY_MINOR; |
80 $severity = $RaptorCommon::SEVERITY_MINOR; |
81 my $subcategory = $CATEGORY_RAPTORUNRECIPED_OVERRIDINGCOMMANDSFORTARGET; |
81 my $subcategory = $CATEGORY_RAPTORUNRECIPED_OVERRIDINGCOMMANDSFORTARGET; |
82 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
82 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
83 } |
83 } |
84 elsif ($text =~ m,make\.exe: Nothing to be done for .*,) |
84 elsif ($text =~ m,make\.exe: Nothing to be done for .*,) |
85 { |
85 { |
86 $severity = $RaptorCommon::SEVERITY_MINOR; |
86 $severity = $RaptorCommon::SEVERITY_MINOR; |
87 my $subcategory = $CATEGORY_RAPTORUNRECIPED_NOTHINGTOBEDONEFOR; |
87 my $subcategory = $CATEGORY_RAPTORUNRECIPED_NOTHINGTOBEDONEFOR; |
88 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
88 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
89 } |
89 } |
90 elsif ($text =~ m,^(true|false)$,) |
90 elsif ($text =~ m,^(true|false)$,) |
91 { |
91 { |
92 # don't dump |
92 # don't dump |
93 } |
93 } |
94 else # log everything by default |
94 else # log everything by default |
95 { |
95 { |
96 RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line); |
96 RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line); |
97 } |
97 } |
98 } |
98 } |
99 |
99 |
100 sub on_start_buildlog |
100 sub on_start_buildlog |
101 { |
101 { |
102 RaptorCommon::init(); |
102 RaptorCommon::init(); |
103 |
103 |
104 $filename = "$::basedir/raptor_unreciped.txt"; |
104 $filename = "$::raptorbitsdir/raptor_unreciped.txt"; |
105 if (!-f$filename) |
105 if (!-f$filename) |
106 { |
106 { |
107 print "Writing unreciped file $filename\n"; |
107 print "Writing unreciped file $filename\n"; |
108 open(FILE, ">$filename"); |
108 open(FILE, ">$filename"); |
109 close(FILE); |
109 close(FILE); |