diff options
-rwxr-xr-x | selftest/selftest.pl | 6 | ||||
-rw-r--r-- | selftest/target/Samba4.pm | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl index 1c8436bb04..aa22a57c79 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -878,10 +878,14 @@ sub setup_env($$) } else { $testenv_vars = $target->setup_env($envname, $prefix); if (defined($testenv_vars) && not defined($testenv_vars->{target})) { - $testenv_vars->{target} = $target; + $testenv_vars->{target} = $target; + } + if (not defined($testenv_vars)) { + warn("$opt_target can't provide environment '$envname'"); } } + return undef unless defined($testenv_vars); $running_envs{$envname} = $testenv_vars; diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index dd7daf736d..602a134982 100644 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -1352,7 +1352,6 @@ sub setup_env($$$) } return $ret; } else { - warn("Samba4 can't provide environment '$envname'"); return undef; } } |