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,13 +28,17 @@ sub setup_env($$$)
my $env = $self->{samba4}->setup_env($envname, $path);
if (defined($env)) {
if (not defined($env->{target})) {
$env->{target} = $self->{samba4};
}
} else {
$env = $self->{samba3}->setup_env($envname, $path);
if (defined($env)) {
if (not defined($env->{target})) {
$env->{target} = $self->{samba3};
}
}
}
if (not defined $env) {
warn("Samba can't provide environment '$envname'");
return undef;