summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-02-14 09:04:16 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-02-16 15:21:10 +1100
commitc006b9b898e93149f83969d0b1d8e4dafc6fbfeb (patch)
tree11dae17584bd84c07c7e116afe6c1b3587cb0189 /selftest
parent212b3ec1a0a593a5684dfe9cbefc4f3b728f120b (diff)
downloadsamba-c006b9b898e93149f83969d0b1d8e4dafc6fbfeb.tar.gz
samba-c006b9b898e93149f83969d0b1d8e4dafc6fbfeb.tar.bz2
samba-c006b9b898e93149f83969d0b1d8e4dafc6fbfeb.zip
selftest: skip targets that are not compiled in if we do not have ADS
Diffstat (limited to 'selftest')
-rwxr-xr-xselftest/target/Samba3.pm25
1 files changed, 25 insertions, 0 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 70c320bc0e..e8a03e71dc 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -11,6 +11,21 @@ use FindBin qw($RealBin);
use POSIX;
use target::Samba;
+sub have_ads($) {
+ my ($self);
+ my $found_ads = 0;
+ my $smbd_build_options = Samba::bindir_path($self, "smbd") . " -b";
+ my @build_options = `$smbd_build_options`;
+ foreach my $option (@build_options) {
+ if ($option =~ "WITH_ADS") {
+ $found_ads = 1;
+ }
+ }
+
+ # If we were not built with ADS support, pretend we were never even available
+ return $found_ads;
+}
+
sub new($$) {
my ($classname, $bindir, $binary_mapping, $srcdir, $server_maxtime) = @_;
my $self = { vars => {},
@@ -206,6 +221,11 @@ sub setup_admember($$$$)
{
my ($self, $prefix, $dcvars, $iface) = @_;
+ # If we didn't build with ADS, pretend this env was never available
+ if (not $self->have_ads()) {
+ return "UNKNOWN";
+ }
+
print "PROVISIONING S3 AD MEMBER$iface...";
my $member_options = "
@@ -414,6 +434,11 @@ sub setup_ktest($$$)
{
my ($self, $prefix) = @_;
+ # If we didn't build with ADS, pretend this env was never available
+ if (not $self->have_ads()) {
+ return "UNKNOWN";
+ }
+
print "PROVISIONING server with security=ads...";
my $ktest_options = "