summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-04-27 12:10:12 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-04-28 05:30:21 +0200
commitab46d6610104b899ca8ac7cb695d8d18e5dc34ed (patch)
treef1994e9c6bd9178927d61583fa00c300f340922c /selftest
parent818ec32d0c4dde545199b4462da30b49a19ecc87 (diff)
downloadsamba-ab46d6610104b899ca8ac7cb695d8d18e5dc34ed.tar.gz
samba-ab46d6610104b899ca8ac7cb695d8d18e5dc34ed.tar.bz2
samba-ab46d6610104b899ca8ac7cb695d8d18e5dc34ed.zip
selftest: Make overwrite of $env->{target} optional
This allows a target to be a mix of Samba3 and Samba4, and chose it's own backend for check_env and get_log_env. Andrew Bartlett
Diffstat (limited to 'selftest')
-rw-r--r--selftest/target/Samba.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm
index ec8ab2bec9..820bd9e19c 100644
--- a/selftest/target/Samba.pm
+++ b/selftest/target/Samba.pm
@@ -28,11 +28,15 @@ sub setup_env($$$)
my $env = $self->{samba4}->setup_env($envname, $path);
if (defined($env)) {
- $env->{target} = $self->{samba4};
+ if (not defined($env->{target})) {
+ $env->{target} = $self->{samba4};
+ }
} else {
$env = $self->{samba3}->setup_env($envname, $path);
if (defined($env)) {
- $env->{target} = $self->{samba3};
+ if (not defined($env->{target})) {
+ $env->{target} = $self->{samba3};
+ }
}
}
if (not defined $env) {