diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-02-15 08:55:05 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-02-16 15:21:10 +1100 |
commit | 22a2c46f844f8c0897bc3d3ef2f613bfc885873a (patch) | |
tree | 83e4c919ab893979e2c14edae36816d950c11e34 /selftest | |
parent | e1f9fb79c79e6a1ef72b07c8df6256caa291e957 (diff) | |
download | samba-22a2c46f844f8c0897bc3d3ef2f613bfc885873a.tar.gz samba-22a2c46f844f8c0897bc3d3ef2f613bfc885873a.tar.xz samba-22a2c46f844f8c0897bc3d3ef2f613bfc885873a.zip |
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
Diffstat (limited to 'selftest')
-rwxr-xr-x | selftest/target/Samba3.pm | 4 | ||||
-rw-r--r-- | selftest/target/Samba4.pm | 4 |
2 files changed, 8 insertions, 0 deletions
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") { |