--- a/common/tools/raptor/RaptorCommon.pm Tue Jul 21 13:32:34 2009 +0100
+++ b/common/tools/raptor/RaptorCommon.pm Wed Jul 22 10:58:34 2009 +0100
@@ -23,6 +23,17 @@
our $SEVERITY_UNKNOWN = 'unknown';
our $SEVERITY_CRITICAL = 'critical';
+sub init
+{
+ my $filename = "$::basedir/summary.csv";
+ if (!-f$filename)
+ {
+ print "Writing summary file $filename\n";
+ open(SUMMARY, ">$filename");
+ close(SUMMARY);
+ }
+}
+
sub dump_fault
{
my ($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line) = @_;
--- a/common/tools/raptor/RaptorError.pm Tue Jul 21 13:32:34 2009 +0100
+++ b/common/tools/raptor/RaptorError.pm Wed Jul 22 10:58:34 2009 +0100
@@ -27,6 +27,7 @@
$buildlog_status->{name} = 'buildlog_status';
$buildlog_status->{next_status} = {error=>$buildlog_error_status};
+$buildlog_status->{on_start} = 'RaptorError::on_start_buildlog';
$buildlog_error_status->{name} = 'buildlog_error_status';
$buildlog_error_status->{next_status} = {};
@@ -66,10 +67,21 @@
}
}
+sub on_start_buildlog
+{
+ RaptorCommon::init();
+
+ $filename = "$::basedir/errors.txt";
+ if (!-f$filename)
+ {
+ print "Writing error file $filename\n";
+ open(FILE, ">$filename");
+ close(FILE);
+ }
+}
+
sub on_start_buildlog_error
{
- $filename = "$::basedir/errors.txt";
- print "Writing error file $filename\n" if (!-f$filename);
open(FILE, ">>$filename");
}