diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/tinderbox/tinderbox.pl | 17 |
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"); |