diff options
Diffstat (limited to 'selftest/target')
-rw-r--r-- | selftest/target/Samba.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm index eea1987a4a..445cbb250d 100644 --- a/selftest/target/Samba.pm +++ b/selftest/target/Samba.pm @@ -31,7 +31,7 @@ sub setup_env($$$) if (not defined($env->{target})) { $env->{target} = $self->{samba4}; } - } else { + } elsif (defined($env) and $env eq "UNKNOWN") { $env = $self->{samba3}->setup_env($envname, $path); if (defined($env) and $env ne "UNKNOWN") { if (not defined($env->{target})) { @@ -39,8 +39,12 @@ sub setup_env($$$) } } } - if (not defined $env) { + if (defined($env) and ($env eq "UNKNOWN")) { warn("Samba can't provide environment '$envname'"); + return "UNKNOWN"; + } + if (not defined $env) { + warn("failed to start up environment '$envname'"); return undef; } return $env; |