From 22a2c46f844f8c0897bc3d3ef2f613bfc885873a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 15 Feb 2012 08:55:05 +1100 Subject: selftest: Do not start up an already-running test environment Otherwise we may re-provision the dc just because we started it via s3member or s4member first. Andrew Bartlett --- selftest/target/Samba3.pm | 4 ++++ selftest/target/Samba4.pm | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'selftest') diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 7ecb481a46..704d15d632 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -89,6 +89,10 @@ sub setup_env($$$) { my ($self, $envname, $path) = @_; + if (defined($self->{vars}->{$envname})) { + return $self->{vars}->{$envname}; + } + if ($envname eq "s3dc") { return $self->setup_s3dc("$path/s3dc"); } elsif ($envname eq "secshare") { diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index 1838a893c5..87964a265c 100644 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -1388,6 +1388,10 @@ sub setup_env($$$) $ENV{ENVNAME} = $envname; + if (defined($self->{vars}->{$envname})) { + return $self->{vars}->{$envname}; + } + if ($envname eq "dc") { return $self->setup_dc("$path/dc"); } elsif ($envname eq "fl2000dc") { -- cgit