diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-10-10 19:40:19 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:42:54 +0100 |
commit | 286157f4aa0cdc704fed1c9aa11895a44c9cab18 (patch) | |
tree | 42915503dd220e405a4ee81b77490f368d7a8ce6 /source4 | |
parent | 61931ca643d5262dad53d1d69d993b26d3825b99 (diff) | |
download | samba-286157f4aa0cdc704fed1c9aa11895a44c9cab18.tar.gz samba-286157f4aa0cdc704fed1c9aa11895a44c9cab18.tar.bz2 samba-286157f4aa0cdc704fed1c9aa11895a44c9cab18.zip |
r25615: Honor SMBD_VALGRIND and NMBD_VALGRIND for Samba3.
(This used to be commit 9f1e4a44b55feca9ad873f7c0a29c99e76d2ec57)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/selftest/env/Samba3.pm | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source4/selftest/env/Samba3.pm b/source4/selftest/env/Samba3.pm index 951fbee4ec..b0c4eb22bd 100644 --- a/source4/selftest/env/Samba3.pm +++ b/source4/selftest/env/Samba3.pm @@ -168,7 +168,13 @@ sub check_or_start($$$$) { } $ENV{MAKE_TEST_BINARY} = $self->binpath("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: $!"); + + my @preargs = ($self->binpath("timelimit"), $nmbd_maxtime); + if(defined($ENV{NMBD_VALGRIND})) { + @preargs = split(/ /, $ENV{NMBD_VALGRIND}); + } + + exec(@preargs, $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"; @@ -189,7 +195,7 @@ sub check_or_start($$$$) { # } # # $ENV{MAKE_TEST_BINARY} = $self->binpath("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: $!"); +# exec($self->binpath("timelimit"), $winbindd_maxtime, $ENV{WINBINDD_VALGRIND}, $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"; @@ -208,7 +214,11 @@ sub check_or_start($$$$) { 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: $!"); + my @preargs = ($self->binpath("timelimit"), $smbd_maxtime); + if(defined($ENV{SMBD_VALGRIND})) { + @preargs = split(/ /,$ENV{SMBD_VALGRIND}); + } + exec(@preargs, $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"; |