pjs/webtools/tinderbox/copylogs

46 строки
1.1 KiB
Plaintext
Исходник Обычный вид История

#! /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$/;
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";
2000-02-18 03:49:45 +03:00
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;
}