From 217404e094e384e34aefa09c0d5fea9ed1432a0c Mon Sep 17 00:00:00 2001 From: "slamm%netscape.com" Date: Wed, 23 Jun 1999 20:06:37 +0000 Subject: [PATCH] Read last successful buildlog. git-svn-id: svn://10.0.0.236/trunk@36584 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/build/warnings.pl | 48 ++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/mozilla/webtools/build/warnings.pl b/mozilla/webtools/build/warnings.pl index 37524d709ec..0fa5109ee65 100755 --- a/mozilla/webtools/build/warnings.pl +++ b/mozilla/webtools/build/warnings.pl @@ -8,12 +8,54 @@ $cvsroot = '/u/slamm/tt/cvsroot/mozilla'; @ignore = ( 'long long', '__cmsg_data' ); $ignore_pat = "(?:".join('|',@ignore).")"; -$fh = new FileHandle "{errorparser} eq 'unix'; + next unless $build_record->{buildname} =~ /\b(Clobber|Clbr)\b/; + + print "log is $tree/$builld_record->{logfile}\n"; + exit; + $fh = new FileHandle "gunzip $tree/$builld_record->{logfile} |"; + &gcc_parser($fh, $tree); + + last; +} + #&dump_warning_data; &build_blame; &print_warnings_as_html; +# end of main +# =================================================================== + +sub last_successful_builds { + my $tree = shift; + my @build_records = (); + my $br; + + # tinderbox/globals.pl uses many shameful globals + $form{tree} = $tree; + + $maxdate = time; + $mindate = $maxdate - 8*60*60; # Go back 8 hours + + print STDERR "Loading build data..."; + use Cwd + chdir '../tinderbox'; + require 'globals.pl'; + &load_data; + chdir '../build'; + print STDERR "done\n"; + + for (my $ii=1; $ii <= $name_count; $ii++) { + for (my $tt=1; $tt <= $time_count; $tt++) { + if (defined($br = $build_table->[$tt][$build_index]) + and $br->{buildstatus} eq 'success') { + push @build_records, $br; + } } } + return @build_records; +} + sub gcc_parser { my ($fh, $tree) = @_; my $dir = ''; @@ -139,7 +181,7 @@ sub print_warnings_as_html { print "
  • "; # File link print ""; + .file_url($file,$linenum)."'>"; print "$file:$linenum"; print " "; print "
    ";