From 5189cfca4ea230125c7995d30caf2b48a332deb0 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 19 Apr 2011 12:43:54 +1000 Subject: selftest: move warning about invalid environments up to selftest.pl --- selftest/selftest.pl | 6 +++++- 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; } } -- cgit