summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-10-10 20:59:51 +0000
committerdes <des@FreeBSD.org>2003-10-10 20:59:51 +0000
commit1d057731585f7b9876862a67f36eba40189f4a6f (patch)
treec920b6efffe05cb89afdc8ebf2e108bab7373a2f /tools
parentb73c0f3102b0d51997d78b090f4c11c8a37f325f (diff)
downloadFreeBSD-src-1d057731585f7b9876862a67f36eba40189f4a6f.zip
FreeBSD-src-1d057731585f7b9876862a67f36eba40189f4a6f.tar.gz
Report the version number and hostname at the top of the log. Allow the
user to override the hostname on the command line (for whatever reason). Add a comment to explain why a particular piece of code is commented out.
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/tinderbox/tinderbox.pl9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/tools/tinderbox/tinderbox.pl b/tools/tools/tinderbox/tinderbox.pl
index 600a770..e9e6046 100644
--- a/tools/tools/tinderbox/tinderbox.pl
+++ b/tools/tools/tinderbox/tinderbox.pl
@@ -35,7 +35,7 @@ use Fcntl qw(:DEFAULT :flock);
use POSIX;
use Getopt::Long;
-my $VERSION = "2.1";
+my $VERSION = "2.2";
my $COPYRIGHT = "Copyright (c) 2003 Dag-Erling Smørgrav. " .
"All rights reserved.";
@@ -43,6 +43,7 @@ my $arch; # Target architecture
my $branch; # CVS branch to checkou
my $date; # Date of sources to check out
my $jobs; # Number of paralell jobs
+my $hostname; # Name of the host running the tinderbox
my $logfile; # Path to log file
my $machine; # Target machine
my $patch; # Patch to apply before building
@@ -246,6 +247,7 @@ Parameters:
-b, --branch=BRANCH CVS branch to check out
-d, --date=DATE Date of sources to check out
-j, --jobs=NUM Maximum number of paralell jobs
+ -h, --hostname=NAME Name of the host running the tinderbox
-l, --logfile=FILE Path to log file
-m, --machine=MACHINE Target machine (e.g. pc98)
-p, --patch=PATCH Patch to apply before building
@@ -277,6 +279,8 @@ MAIN:{
# Set defaults
$arch = `/usr/bin/uname -p`;
chomp($arch);
+ $hostname = `/usr/bin/uname -n`;
+ chomp($hostname);
$machine = `/usr/bin/uname -m`;
chomp($machine);
$branch = "CURRENT";
@@ -292,6 +296,7 @@ MAIN:{
"d|date=s" => \$date,
"j|jobs=i" => \$jobs,
"l|logfile=s" => \$logfile,
+ "h|hostname=s" => \$hostname,
"m|machine=s" => \$machine,
"p|patch=s" => \$patch,
"r|repository=s" => \$repository,
@@ -371,6 +376,7 @@ MAIN:{
}
open(STDERR, ">&STDOUT");
$| = 1;
+ logstage("tinderbox $VERSION running on $hostname");
logstage("starting $branch tinderbox run for $arch/$machine");
$SIG{__DIE__} = \&sigdie;
$SIG{__WARN__} = \&sigwarn;
@@ -382,6 +388,7 @@ MAIN:{
or error("unable to remove old source directory");
remove_dir("$sandbox/obj")
or error("unable to remove old object directory");
+# This will fail due to schg files - must clear flags before removing
# remove_dir("$sandbox/root")
# or error("unable to remove old chroot directory");
}
OpenPOWER on IntegriCloud