reed%reedloden.com 8eb5d2f530 Change /usr/bonsaitools/bin/perl to /usr/bin/perl [p=reed r=justdave]
git-svn-id: svn://10.0.0.236/trunk@216633 18797224-902f-48f8-a5cc-f745e15eee43
2006-12-07 04:59:39 +00:00

46 lines
1.0 KiB
Perl
Executable File

#! /usr/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;
}