mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 08:35:26 +00:00
46 lines
1.1 KiB
Perl
Executable File
46 lines
1.1 KiB
Perl
Executable File
#! /usr/bonsaitools/bin/perl
|
|
|
|
$tree = 'SeaMonkey';
|
|
|
|
for $br (last_successful_builds($tree)) {
|
|
next unless $br->{buildname} =~ /^$warning_buildnames_pat$/;
|
|
|
|
my $logfile = "$tree/$br->{logfile}";
|
|
if (-e $logfile) {
|
|
print "Log previously copied for $br->{buildname}, $logfile\n";
|
|
} else {
|
|
chdir "$tree";
|
|
system("wget", "http://tinderbox.mozilla.org/$logfile");
|
|
chdir '..';
|
|
print "Log copied for $br->{buildname}, $logfile\n";
|
|
}
|
|
}
|
|
|
|
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";
|
|
|
|
for (my $ii=0; $ii <= $name_count; $ii++) {
|
|
for (my $tt=0; $tt <= $time_count; $tt++) {
|
|
if (defined($br = $build_table->[$tt][$ii])
|
|
and $br->{buildstatus} eq 'success') {
|
|
push @build_records, $br;
|
|
last;
|
|
} } }
|
|
return @build_records;
|
|
}
|