summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-04-19 12:43:54 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-04-19 16:13:42 +1000
commit5189cfca4ea230125c7995d30caf2b48a332deb0 (patch)
treec3a135589f9d1612e52b5055cea87bf6f6f49fa8
parent5439553c96bd906e19be7060552cb59bdaec3eb1 (diff)
downloadsamba-5189cfca4ea230125c7995d30caf2b48a332deb0.tar.gz
samba-5189cfca4ea230125c7995d30caf2b48a332deb0.tar.bz2
samba-5189cfca4ea230125c7995d30caf2b48a332deb0.zip
selftest: move warning about invalid environments up to selftest.pl
-rwxr-xr-xselftest/selftest.pl6
-rw-r--r--selftest/target/Samba4.pm1
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;
}
}