From ffc9f2e05de1e350790739ad12dc977318b5b5c0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 8 Oct 2007 12:57:30 +0000 Subject: r25574: Support SMBD_OPTIONS, NMBD_OPTIONS and WINBINDD_OPTIONS environment variables for make test. (This used to be commit 814027146d9a4d309808bda635d5bc8d34974045) --- source4/selftest/env/Samba3.pm | 20 +++++++++++++++++--- source4/selftest/env/Samba4.pm | 3 +++ 2 files changed, 20 insertions(+), 3 deletions(-) (limited to 'source4/selftest') diff --git a/source4/selftest/env/Samba3.pm b/source4/selftest/env/Samba3.pm index fa7bb414443..6fdcd0871c3 100644 --- a/source4/selftest/env/Samba3.pm +++ b/source4/selftest/env/Samba3.pm @@ -162,8 +162,13 @@ sub check_or_start($$$$) { $ENV{WINBINDD_SOCKET_DIR} = $env_vars->{WINBINDD_SOCKET_DIR}; + my @optargs = ("-d0"); + if (defined($ENV{NMBD_OPTIONS})) { + @optargs = split(/ /, $ENV{NMBD_OPTIONS}); + } + $ENV{MAKE_TEST_BINARY} = $self->binpath("nmbd"); - exec($self->binpath("timelimit"), $nmbd_maxtime, $self->binpath("nmbd"), "-F", "-S", "-d0", "--no-process-group", "-s", $env_vars->{SERVERCONFFILE}) or die("Unable to start nmbd: $!"); + exec($self->binpath("timelimit"), $nmbd_maxtime, $self->binpath("nmbd"), "-F", "-S", "--no-process-group", "-s", $env_vars->{SERVERCONFFILE}, @optargs) or die("Unable to start nmbd: $!"); } write_pid($env_vars, "nmbd", $pid); print "DONE\n"; @@ -177,8 +182,13 @@ sub check_or_start($$$$) { $ENV{WINBINDD_SOCKET_DIR} = $env_vars->{WINBINDD_SOCKET_DIR}; + my @optargs = ("-d0"); + if (defined($ENV{WINBINDD_OPTIONS})) { + @optargs = split(/ /, $ENV{WINBINDD_OPTIONS}); + } + $ENV{MAKE_TEST_BINARY} = $self->binpath("winbindd"); - exec($self->binpath("timelimit"), $winbindd_maxtime, $self->binpath("winbindd"), "-F", "-S", "-d0", "--no-process-group", "-s", $env_vars->{SERVERCONFFILE}) or die("Unable to start winbindd: $!"); + exec($self->binpath("timelimit"), $winbindd_maxtime, $self->binpath("winbindd"), "-F", "-S", "--no-process-group", "-s", $env_vars->{SERVERCONFFILE}, @optargs) or die("Unable to start winbindd: $!"); } write_pid($env_vars, "winbindd", $pid); print "DONE\n"; @@ -193,7 +203,11 @@ sub check_or_start($$$$) { $ENV{WINBINDD_SOCKET_DIR} = $env_vars->{WINBINDD_SOCKET_DIR}; $ENV{MAKE_TEST_BINARY} = $self->binpath("smbd"); - exec($self->binpath("timelimit"), $smbd_maxtime, $self->binpath("smbd"), "-F", "-S", "-d0" , "--no-process-group", "-s", $env_vars->{SERVERCONFFILE}) or die("Unable to start smbd: $!"); + my @optargs = ("-d0"); + if (defined($ENV{SMBD_OPTIONS})) { + @optargs = split(/ /, $ENV{SMBD_OPTIONS}); + } + exec($self->binpath("timelimit"), $smbd_maxtime, $self->binpath("smbd"), "-F", "-S", "--no-process-group", "-s", $env_vars->{SERVERCONFFILE}, @optargs) or die("Unable to start smbd: $!"); } write_pid($env_vars, "smbd", $pid); print "DONE\n"; diff --git a/source4/selftest/env/Samba4.pm b/source4/selftest/env/Samba4.pm index a8c24904836..944ed83d589 100644 --- a/source4/selftest/env/Samba4.pm +++ b/source4/selftest/env/Samba4.pm @@ -104,6 +104,9 @@ sub check_or_start($$$) if (defined($max_time)) { $optarg = "--maximum-runtime=$max_time "; } + if (defined($ENV{SMBD_OPTIONS})) { + $optarg.= " $ENV{SMBD_OPTIONS}"; + } my $ret = system("$valgrind $self->{bindir}/smbd $optarg $env_vars->{CONFIGURATION} -M single -i --leak-report-full"); if ($? == -1) { print "Unable to start smbd: $ret: $!\n"; -- cgit