diff --git a/tools/tinderbox_build b/tools/tinderbox_build
index 862f1c1d4b6b1684e4da83f2d7fdaab7e753c944..ab4234aa87365a1fba1611447b7186ef12e5b0e1 100755 (executable)
--- a/tools/tinderbox_build
+++ b/tools/tinderbox_build
use Cwd;
use Time::Local;
-my $Version = '$Revision$';
+my $Version = `git describe --abbrev=4 HEAD`;
my $myhost = hostname;
chomp($myhost);
my ($host, $junk) = split(/\./, $myhost);
my $BuildAdministrator = $ENV{TINDERBOX_BUILD_ADMIN} || "$ENV{'USER'}\@$myhost";
+my $TmpDir = $ENV{TMPDIR} || "/tmp";
#Default values of cmdline opts
my $ReportStatus = 0; # Do not send results to server
# Set these to what makes sense for your system
# Set these proper values for your tinderbox server
-my $Tinderbox_server = 'tinderbox2@tinderbox.altinity.org';
+# Have the StrictHostKeyChecking=no so that a new host will automatically add hostkey without
+# prompting. If host key changes, then will get error, so this should still be secure
+my $Tinderbox_server = '-p 1022 -o StrictHostKeyChecking=no tinderbox2@tinderbox.opsera.com';
# These shouldn't really need to be changed
my $BuildTree = 'nagiosplug';
if (-e (my $file = "nagios-plugins.spec")) {
open F, $file;
while (<F>) {
- if (/^Version: HEAD-(\d\d\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) {
- $StartTime = timelocal(0, $5, $4, $3, ($2 - 1), ($1 - 1900));
+ if (/^Version: trunk-(\d\d\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) {
+ $StartTime = timegm(0, $5, $4, $3, ($2 - 1), ($1 - 1900));
last;
}
}
sub maketest {
# Tests
print LOG "LANG=C make test 2>&1\n";
- open( MAKE, "LANG=C make test 2>&1 |");
+ open( MAKE, "LANG=C make test && make install DESTDIR=$TmpDir/tinderbox_build.$$ && make install-strip DESTDIR=$TmpDir/tinderbox_build2.$$ 2>&1 |");
while ( <MAKE> ) {
print $_;
print LOG $_;
}
close( MAKE);
- return ! $?;
+ my $rc = $?;
+ system("rm -fr $TmpDir/tinderbox_build.$$ $TmpDir/tinderbox_build2.$$");
+ return ! $rc;
}
# Main function