1999-12-06 10:24:33 +03:00
|
|
|
#! /usr/bonsaitools/bin/perl
|
|
|
|
|
|
|
|
$tree = 'SeaMonkey';
|
|
|
|
|
|
|
|
for $br (last_successful_builds($tree)) {
|
2000-02-17 10:09:25 +03:00
|
|
|
next unless $br->{buildname} =~ /^$warning_buildnames_pat$/;
|
1999-12-06 10:24:33 +03:00
|
|
|
|
|
|
|
my $logfile = "$tree/$br->{logfile}";
|
2000-02-18 01:27:00 +03:00
|
|
|
if (-e $logfile) {
|
|
|
|
print "Log previously copied for $br->{buildname}, $logfile\n";
|
|
|
|
} else {
|
1999-12-06 10:24:33 +03:00
|
|
|
chdir "$tree";
|
2001-11-11 12:08:56 +03:00
|
|
|
system("wget", "http://tinderbox.mozilla.org/$logfile");
|
1999-12-06 10:24:33 +03:00
|
|
|
chdir '..';
|
2000-02-18 01:27:00 +03:00
|
|
|
print "Log copied for $br->{buildname}, $logfile\n";
|
1999-12-06 10:24:33 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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...";
|
|
|
|
|
|
|
|
require 'tbglobals.pl';
|
|
|
|
tb_load_data();
|
|
|
|
|
|
|
|
print STDERR "done\n";
|
|
|
|
|
2000-02-18 03:49:45 +03:00
|
|
|
for (my $ii=0; $ii <= $name_count; $ii++) {
|
|
|
|
for (my $tt=0; $tt <= $time_count; $tt++) {
|
1999-12-06 10:24:33 +03:00
|
|
|
if (defined($br = $build_table->[$tt][$ii])
|
|
|
|
and $br->{buildstatus} eq 'success') {
|
|
|
|
push @build_records, $br;
|
|
|
|
last;
|
|
|
|
} } }
|
|
|
|
return @build_records;
|
|
|
|
}
|