# HG changeset patch # User Dario Sestito # Date 1248256714 -3600 # Node ID f1baeb3f075fd49ada8b27d4009703f2b9af6671 # Parent 5c33f37d47a43292fc7bb376c70250b0ff20dba0 Generate error and summary file even if build reports no error diff -r 5c33f37d47a4 -r f1baeb3f075f common/tools/raptor/RaptorCommon.pm --- 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) = @_; diff -r 5c33f37d47a4 -r f1baeb3f075f common/tools/raptor/RaptorError.pm --- 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"); }