add better error reporting when tinderbox mail gets bounced.

This commit is contained in:
kestes%walrus.com 2002-05-01 04:12:31 +00:00
Родитель a839dd32fb
Коммит 54c705e70b
3 изменённых файлов: 25 добавлений и 8 удалений

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

@ -12,8 +12,8 @@
# server. No locks are used by the mail processes, data is passed to # server. No locks are used by the mail processes, data is passed to
# the tinderbox server in a maildir like format. # the tinderbox server in a maildir like format.
# $Revision: 1.21 $ # $Revision: 1.22 $
# $Date: 2002/05/01 01:53:50 $ # $Date: 2002/05/01 04:12:31 $
# $Author: kestes%walrus.com $ # $Author: kestes%walrus.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/bin/processmail_builds,v $ # $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/bin/processmail_builds,v $
# $Name: $ # $Name: $
@ -1156,7 +1156,7 @@ sub assemble_files {
$SIG{'__DIE__'} = \&MailProcess::fatal_mailprocessing_error; $SIG{'__DIE__'} = \&MailProcess::fatal_mailprocessing_error;
%MAIL_HEADER = MailProcess::parse_mail_header(); %MAIL_HEADER = MailProcess::parse_mail_header();
%TINDERBOX = MailProcess::parse_tinderbox_vars(); %TINDERBOX = MailProcess::parse_tinderbox_vars( main::hash2string(%MAIL_HEADER) );
@DATE_FIELDS = qw(builddate starttime timenow); @DATE_FIELDS = qw(builddate starttime timenow);
fix_tinderboxvar_time_format(); fix_tinderboxvar_time_format();

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

@ -4,8 +4,8 @@
# mailprocessing program. # mailprocessing program.
# $Revision: 1.10 $ # $Revision: 1.11 $
# $Date: 2001/10/10 15:08:24 $ # $Date: 2002/05/01 04:12:29 $
# $Author: kestes%walrus.com $ # $Author: kestes%walrus.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/MailProcess.pm,v $ # $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/MailProcess.pm,v $
# $Name: $ # $Name: $
@ -170,6 +170,7 @@ sub parse_mail_header {
sub parse_tinderbox_vars { sub parse_tinderbox_vars {
my $error_context = @_;
# Ignore all lines in the mail till we find the tinderbox lines, so # Ignore all lines in the mail till we find the tinderbox lines, so
# the lines we want should be at the top of the mail. We ignore the # the lines we want should be at the top of the mail. We ignore the
@ -227,7 +228,8 @@ sub parse_tinderbox_vars {
# bounce the mail message # bounce the mail message
die("No Tinderbox variables found in message.\n"); die("No Tinderbox variables found in message.\n".
"$error_context\n");
} }

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

@ -3,8 +3,8 @@
# Utils.pm - General purpose utility functions. Every project needs a # Utils.pm - General purpose utility functions. Every project needs a
# kludge bucket for common access. # kludge bucket for common access.
# $Revision: 1.28 $ # $Revision: 1.29 $
# $Date: 2002/04/24 04:00:40 $ # $Date: 2002/05/01 04:12:29 $
# $Author: kestes%walrus.com $ # $Author: kestes%walrus.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/Utils.pm,v $ # $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/Utils.pm,v $
# $Name: $ # $Name: $
@ -513,6 +513,21 @@ sub uniq {
return @out; return @out;
} }
# given a hash return a string suitable for printing.
sub hash2string {
my (%hash) = @_;
my (@keys) = sort keys %hash;
my $str;
foreach $key (@keys) {
$str .= "\t$key=$hash{$key}\n";
}
return $str
}
# load a list of modules # load a list of modules
sub require_modules { sub require_modules {