From dfb490d551e9213e957ea547cb399c3ed408bdc9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 19 Apr 2011 13:50:40 +1000 Subject: 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 Autobuild-Date: Tue Apr 19 09:03:07 CEST 2011 on sn-devel-104 --- selftest/selftest.pl | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'selftest/selftest.pl') 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); -- cgit