1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

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
This commit is contained in:
Andrew Bartlett 2011-04-27 12:10:12 +10:00
parent 818ec32d0c
commit ab46d66101

View File

@ -28,11 +28,15 @@ sub setup_env($$$)
my $env = $self->{samba4}->setup_env($envname, $path); my $env = $self->{samba4}->setup_env($envname, $path);
if (defined($env)) { if (defined($env)) {
$env->{target} = $self->{samba4}; if (not defined($env->{target})) {
$env->{target} = $self->{samba4};
}
} else { } else {
$env = $self->{samba3}->setup_env($envname, $path); $env = $self->{samba3}->setup_env($envname, $path);
if (defined($env)) { if (defined($env)) {
$env->{target} = $self->{samba3}; if (not defined($env->{target})) {
$env->{target} = $self->{samba3};
}
} }
} }
if (not defined $env) { if (not defined $env) {