add support for including a ftp url as a part of the tinderbox completion

message. if you include:
tinderbox: binaryurl: url
then a "D" link will show up in the status pane of a build, which is
a link to the binary. r=slamm,terry
This commit is contained in:
cyeh%netscape.com 2000-02-25 18:19:56 +00:00
Родитель 6eab5432f9
Коммит 2f5adb4862
4 изменённых файлов: 19 добавлений и 20 удалений

Просмотреть файл

@ -63,7 +63,7 @@ if (defined $tree && defined $start && defined $end) {
while (<IN>) { while (<IN>) {
chomp; chomp;
my ($mailtime, $buildtime, $buildname, $errorparser, my ($mailtime, $buildtime, $buildname, $errorparser,
$buildstatus, $logfile, $binaryname) = $buildstatus, $logfile, $binaryurl) =
split( /\|/ ); split( /\|/ );
if ($buildtime >= $first && $buildtime <= $last) { if ($buildtime >= $first && $buildtime <= $last) {
if (!defined $stats{$buildname}) { if (!defined $stats{$buildname}) {

Просмотреть файл

@ -190,7 +190,7 @@ sub write_build_data {
$process_time = time; $process_time = time;
open BUILDDATA, ">>$tbx->{tree}/build.dat" open BUILDDATA, ">>$tbx->{tree}/build.dat"
or die "can't open $! for writing"; or die "can't open $! for writing";
print BUILDDATA "$process_time|$tbx->{builddate}|$tbx->{build}|$tbx->{errorparser}|$tbx->{status}|$tbx->{logfile}|$tbx->{binaryname}\n"; print BUILDDATA "$process_time|$tbx->{builddate}|$tbx->{build}|$tbx->{errorparser}|$tbx->{status}|$tbx->{logfile}|$tbx->{binaryurl}\n";
close BUILDDATA; close BUILDDATA;
} }
@ -210,7 +210,6 @@ sub compress_log_file {
open ZIPLOG, "| $gzip -c > $tbx->{tree}/$tbx->{logfile}" open ZIPLOG, "| $gzip -c > $tbx->{tree}/$tbx->{logfile}"
or die "can't open $! for writing"; or die "can't open $! for writing";
my $inBinary = 0; my $inBinary = 0;
my $hasBinary = ($tbx->{binaryname} ne '');
while (<LOG2>) { while (<LOG2>) {
unless ($inBinary) { unless ($inBinary) {
print ZIPLOG $_; print ZIPLOG $_;
@ -224,16 +223,4 @@ sub compress_log_file {
} }
close ZIPLOG; close ZIPLOG;
close LOG2; close LOG2;
# If a uuencoded binary is part of the build, unpack it.
#
if ($hasBinary) {
$bin_dir = "$tbx->{tree}/bin/$tbx->{builddate}/$tbx->{build}";
$bin_dir =~ s/ //g;
system("mkdir -m 0777 -p $bin_dir");
# LTNOTE: I'm not sure this is cross platform.
system("/tools/ns/bin/uudecode --output-file=$bin_dir/$tbx->{binaryname} < $ARGV[0]");
}
} }

Просмотреть файл

@ -196,6 +196,10 @@ sub print_page_head {
<td align=center><TT>C</TT></td> <td align=center><TT>C</TT></td>
<td>= Show Checkins</td> <td>= Show Checkins</td>
</tr> </tr>
<tr>
<td align=center><TT>D</TT></td>
<td>= Download Build</td>
</tr>
<tr> <tr>
<td align=center> <td align=center>
<img src="$images{star}"></td><td>= Show Log comments <img src="$images{star}"></td><td>= Show Log comments
@ -345,6 +349,14 @@ BEGIN {
} }
} }
# Binary URL
#
# Only add the "D" link if there is a url to a downloadable binary
if( $br->{binaryurl} ){
$binaryurl = $br->{binaryurl};
print" <A HREF=$binaryurl>D</A>";
}
# Leak/Bloat # Leak/Bloat
if (defined $td->{bloaty}{$logfile}) { if (defined $td->{bloaty}{$logfile}) {
my ($leaks, $bloat, $leaks_cmp, $bloat_cmp) my ($leaks, $bloat, $leaks_cmp, $bloat_cmp)

Просмотреть файл

@ -261,7 +261,7 @@ sub tb_find_build_record {
chomp($log_entry); chomp($log_entry);
# Skip the logfile in the parse since it is already known. # Skip the logfile in the parse since it is already known.
my ($mailtime, $buildtime, $buildname, $errorparser, my ($mailtime, $buildtime, $buildname, $errorparser,
$buildstatus, $binaryname) = (split /\|/, $log_entry)[0..4,6]; $buildstatus, $binaryurl) = (split /\|/, $log_entry)[0..4,6];
$buildrec = { $buildrec = {
mailtime => $mailtime, mailtime => $mailtime,
@ -270,7 +270,7 @@ sub tb_find_build_record {
errorparser => $errorparser, errorparser => $errorparser,
buildstatus => $buildstatus, buildstatus => $buildstatus,
logfile => $logfile, logfile => $logfile,
binaryname => $binaryname, binaryurl => $binaryurl,
td => undef td => undef
}; };
return $buildrec; return $buildrec;
@ -308,7 +308,7 @@ sub load_buildlog {
while( $_ = $bw->readline ) { while( $_ = $bw->readline ) {
chomp; chomp;
my ($mailtime, $buildtime, $buildname, my ($mailtime, $buildtime, $buildname,
$errorparser, $buildstatus, $logfile, $binaryname) = split /\|/; $errorparser, $buildstatus, $logfile, $binaryurl) = split /\|/;
# Ignore stuff in the future. # Ignore stuff in the future.
next if $buildtime > $maxdate; next if $buildtime > $maxdate;
@ -331,7 +331,7 @@ sub load_buildlog {
errorparser => $errorparser, errorparser => $errorparser,
buildstatus => $buildstatus, buildstatus => $buildstatus,
logfile => $logfile, logfile => $logfile,
binaryname => $binaryname, binaryurl => $binaryurl,
td => $treedata td => $treedata
}; };
push @{$build_list}, $buildrec; push @{$build_list}, $buildrec;