diff options
author | des <des@FreeBSD.org> | 2003-05-16 14:01:02 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-05-16 14:01:02 +0000 |
commit | 9e8ba6de4ebc9d928b3dc86e6f37554c3f562c57 (patch) | |
tree | 7be2bdd19fe665c5c258d410278a9fc028dccb31 | |
parent | f6d4663ab8b7857afd31c9e898a2cade66fe5434 (diff) | |
download | FreeBSD-src-9e8ba6de4ebc9d928b3dc86e6f37554c3f562c57.zip FreeBSD-src-9e8ba6de4ebc9d928b3dc86e6f37554c3f562c57.tar.gz |
More configuration tweaks. Rename %CONFIGS to %SETUPS to make the code
clearer (particularly to someone who has read the man page). Don't print
anything on stderr.
-rw-r--r-- | tools/tools/tinderbox/tbmaster.pl | 49 |
1 files changed, 22 insertions, 27 deletions
diff --git a/tools/tools/tinderbox/tbmaster.pl b/tools/tools/tinderbox/tbmaster.pl index 86bbf36..9e4a981 100644 --- a/tools/tools/tinderbox/tbmaster.pl +++ b/tools/tools/tinderbox/tbmaster.pl @@ -34,7 +34,7 @@ use strict; use POSIX qw(tzset); use Sys::Hostname; -my %CONFIGS = ( +my %SETUPS = ( # Global settings 'global' => { 'SANDBOX' => '/home/des/tinderbox', @@ -43,7 +43,6 @@ my %CONFIGS = ( 'SENDER' => 'Tinderbox <des+tinderbox@freebsd.org>', 'RECIPIENT' => 'des+%%arch%%-%%branch%%@freebsd.org', 'SUBJECT' => '[%%COMMENT%%] failure on %%arch%%/%%machine%%', - 'ENV' => { }, }, @@ -95,12 +94,14 @@ my %CONFIGS = ( 'ARCHES' => { 'i386' => [ 'i386' ], }, - 'ENV' => { - 'NOLIBC_R' => 'YES', - 'NOPROFILE' => 'YES', - 'NO_BIND' => 'YES', - 'NO_FORTRAN' => 'YES', - 'NO_SENDMAIL' => 'YES', + }, + + 'dsa' => { + 'COMMENT' => "Tinderbox development", + 'BRANCHES' => [ 'CURRENT' ], + 'TARGETS' => [ 'update', 'world', 'lint', 'release' ], + 'ARCHES' => { + 'alpha' => [ 'alpha' ], }, }, @@ -111,14 +112,6 @@ my %CONFIGS = ( 'ARCHES' => { 'i386' => [ 'i386' ], }, - 'ENV' => { - 'NOCRYPT' => 'YES', - 'NOLIBC_R' => 'YES', - 'NOPROFILE' => 'YES', - 'NO_BIND' => 'YES', - 'NO_FORTRAN' => 'YES', - 'NO_SENDMAIL' => 'YES', - }, }, ); my $config; # Name of current config @@ -139,7 +132,6 @@ sub report($$$$) { print(PIPE "Subject: $subject\n"); print(PIPE "\n"); print(PIPE "$message\n"); - print(STDERR "mailed report to $recipient\n"); close(PIPE); } else { print(STDERR "[failed to send report by email]\n\n"); @@ -258,23 +250,26 @@ sub tinderbox($$$) { $summary .= join('', @lines); print(BRIEF join('', @lines)); } - close(BRIEF); - close(FULL); # Done... if (waitpid($pid, 0) == -1) { warn("waitpid(): $!\n"); } elsif ($? & 0xff) { - warn("tinderbox caught signal ", $? & 0x7f, "\n"); + my $msg = "tinderbox caught signal " . ($? & 0x7f) . "\n"; + print(BRIEF $msg); + print(FULL $msg); $error = 1; } elsif ($? >> 8) { - warn("tinderbox returned exit code ", $? >> 8, "\n"); + my $msg = "tinderbox returned exit code " . ($? >> 8) . "\n"; + print(BRIEF $msg); + print(FULL $msg); $error = 1; } + close(BRIEF); + close(FULL); # Mail out error reports if ($error) { - warn("$branch tinderbox failed for $arch/$machine\n"); my $sender = expand($CONFIG{'SENDER'}); my $recipient = expand($CONFIG{'RECIPIENT'}); my $subject = expand($CONFIG{'SUBJECT'}); @@ -288,7 +283,7 @@ sub tinderbox($$$) { sub usage() { my @configs = (); - foreach my $config (sort(keys(%CONFIGS))) { + foreach my $config (sort(keys(%SETUPS))) { push(@configs, $config) unless ($config eq 'global'); } @@ -304,10 +299,10 @@ MAIN:{ $config =~ s/\..*//; } usage() - unless (exists($CONFIGS{$config}) && $config ne 'global'); - %CONFIG = %{$CONFIGS{$config}}; - foreach my $key (keys(%{$CONFIGS{'global'}})) { - $CONFIG{$key} = $CONFIGS{'global'}->{$key} + unless (exists($SETUPS{$config}) && $config ne 'global'); + %CONFIG = %{$SETUPS{$config}}; + foreach my $key (keys(%{$SETUPS{'global'}})) { + $CONFIG{$key} = $SETUPS{'global'}->{$key} unless (exists($CONFIG{$key})); } |