summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-02-15 19:32:52 +0000
committerdes <des@FreeBSD.org>2003-02-15 19:32:52 +0000
commit91e02c65157e1676268fc886ffac60bd69764f16 (patch)
tree1ad07f29c5ab0233351abf7ba91da08528a2161c /tools
parent404529158214435946c27f522612d2e34ae4175f (diff)
downloadFreeBSD-src-91e02c65157e1676268fc886ffac60bd69764f16.zip
FreeBSD-src-91e02c65157e1676268fc886ffac60bd69764f16.tar.gz
Log to stdout if no file was specified.
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/tinderbox/tinderbox.pl17
1 files changed, 8 insertions, 9 deletions
diff --git a/tools/tools/tinderbox/tinderbox.pl b/tools/tools/tinderbox/tinderbox.pl
index 2baad7c..8476fc2 100644
--- a/tools/tools/tinderbox/tinderbox.pl
+++ b/tools/tools/tinderbox/tinderbox.pl
@@ -301,9 +301,6 @@ MAIN:{
error("invalid target machine");
}
$machine = $1;
- if (!defined($logfile)) {
- $logfile = "tinderbox-$branch-$arch-$machine.log";
- }
if (!@ARGV) {
usage();
@@ -334,13 +331,15 @@ MAIN:{
# Open logfile
open(STDIN, '<', "/dev/null")
or error("/dev/null: $!\n");
- if ($logfile !~ m|([\w./-]+)$|) {
- error("invalid log file name");
+ if (defined($logfile)) {
+ if ($logfile !~ m|([\w./-]+)$|) {
+ error("invalid log file name");
+ }
+ $logfile = $1;
+ unlink($logfile);
+ open(STDOUT, '>', $logfile)
+ or error("$logfile: $!");
}
- $logfile = $1;
- unlink($logfile);
- open(STDOUT, '>', $logfile)
- or error("$logfile: $!");
open(STDERR, ">&STDOUT");
$| = 1;
logstage("starting $branch tinderbox run for $arch/$machine");
OpenPOWER on IntegriCloud