diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-10-08 12:57:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:07:57 -0500 |
commit | ffc9f2e05de1e350790739ad12dc977318b5b5c0 (patch) | |
tree | 2fed4326fcba8fad1f72637c2863f7c5560b6728 /source4/selftest | |
parent | f7c3cd1350a40efbac362f72fe2d9dcde1bce7ad (diff) | |
download | samba-ffc9f2e05de1e350790739ad12dc977318b5b5c0.tar.gz samba-ffc9f2e05de1e350790739ad12dc977318b5b5c0.tar.xz samba-ffc9f2e05de1e350790739ad12dc977318b5b5c0.zip |
r25574: Support SMBD_OPTIONS, NMBD_OPTIONS and WINBINDD_OPTIONS environment variables for make test.
(This used to be commit 814027146d9a4d309808bda635d5bc8d34974045)
Diffstat (limited to 'source4/selftest')
-rw-r--r-- | source4/selftest/env/Samba3.pm | 20 | ||||
-rw-r--r-- | source4/selftest/env/Samba4.pm | 3 |
2 files changed, 20 insertions, 3 deletions
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"; |