From 286157f4aa0cdc704fed1c9aa11895a44c9cab18 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 10 Oct 2007 19:40:19 +0200 Subject: r25615: Honor SMBD_VALGRIND and NMBD_VALGRIND for Samba3. (This used to be commit 9f1e4a44b55feca9ad873f7c0a29c99e76d2ec57) --- source4/selftest/env/Samba3.pm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'source4/selftest') 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"; -- cgit