summaryrefslogtreecommitdiff
path: root/selftest/selftest.pl
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-04-19 13:50:40 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-04-19 09:03:07 +0200
commitdfb490d551e9213e957ea547cb399c3ed408bdc9 (patch)
tree904af14cb3d1cacf7432d79ab664424099ff69a7 /selftest/selftest.pl
parent5189cfca4ea230125c7995d30caf2b48a332deb0 (diff)
downloadsamba-dfb490d551e9213e957ea547cb399c3ed408bdc9.tar.gz
samba-dfb490d551e9213e957ea547cb399c3ed408bdc9.tar.bz2
samba-dfb490d551e9213e957ea547cb399c3ed408bdc9.zip
selftest Consolidate server wall clock time limits
This helps ensure that we don't have the Samba3 servers stop before the full make test is finished. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Apr 19 09:03:07 CEST 2011 on sn-devel-104
Diffstat (limited to 'selftest/selftest.pl')
-rwxr-xr-xselftest/selftest.pl15
1 files changed, 12 insertions, 3 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index aa22a57c79..9f937f1655 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -481,24 +481,33 @@ sub bindir_path($$) {
return $path;
}
+# After this many seconds, the server will self-terminate. All tests
+# must terminate in this time, and testenv will only stay alive this
+# long
+
+my $server_maxtime = 7500;
+if (defined($ENV{SMBD_MAXTIME}) and $ENV{SMBD_MAXTIME} ne "") {
+ $server_maxtime = $ENV{SMBD_MAXTIME};
+}
+
if ($opt_target eq "samba") {
if ($opt_socket_wrapper and `$bindir/smbd -b | grep SOCKET_WRAPPER` eq "") {
die("You must include --enable-socket-wrapper when compiling Samba in order to execute 'make test'. Exiting....");
}
$testenv_default = "all";
require target::Samba;
- $target = new Samba($bindir, \%binary_mapping, \&bindir_path, $ldap, $srcdir, $exeext);
+ $target = new Samba($bindir, \%binary_mapping, \&bindir_path, $ldap, $srcdir, $exeext, $server_maxtime);
} elsif ($opt_target eq "samba4") {
$testenv_default = "all";
require target::Samba4;
- $target = new Samba4($bindir, \%binary_mapping, \&bindir_path, $ldap, $srcdir, $exeext);
+ $target = new Samba4($bindir, \%binary_mapping, \&bindir_path, $ldap, $srcdir, $exeext, $server_maxtime);
} elsif ($opt_target eq "samba3") {
if ($opt_socket_wrapper and `$bindir/smbd -b | grep SOCKET_WRAPPER` eq "") {
die("You must include --enable-socket-wrapper when compiling Samba in order to execute 'make test'. Exiting....");
}
$testenv_default = "member";
require target::Samba3;
- $target = new Samba3($bindir, \%binary_mapping, \&bindir_path, $srcdir_abs, $exeext);
+ $target = new Samba3($bindir, \%binary_mapping, \&bindir_path, $srcdir_abs, $exeext, $server_maxtime);
} elsif ($opt_target eq "win") {
die("Windows tests will not run with socket wrapper enabled.")
if ($opt_socket_wrapper);