summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-11-30 20:42:14 +0100
committerJelmer Vernooij <jelmer@samba.org>2011-11-30 22:58:05 +0100
commit454c4502f333cedf32e553b649d235e5c6f1dd05 (patch)
tree946c2112d40bec400d24d8a2467477740130a046
parent91c5bd23a76340d9642f7d318bce6ca3f15b2dc9 (diff)
downloadsamba-454c4502f333cedf32e553b649d235e5c6f1dd05.tar.gz
samba-454c4502f333cedf32e553b649d235e5c6f1dd05.tar.bz2
samba-454c4502f333cedf32e553b649d235e5c6f1dd05.zip
selftest: Don't acquire target when --list was specified.
-rwxr-xr-xselftest/selftest.pl52
1 files changed, 27 insertions, 25 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 971baf8fb0..bce7535de2 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -483,32 +483,34 @@ if (defined($ENV{SMBD_MAXTIME}) and $ENV{SMBD_MAXTIME} ne "") {
$server_maxtime = $ENV{SMBD_MAXTIME};
}
-if ($opt_target eq "samba") {
- if ($opt_socket_wrapper and `$bindir/smbd -b | grep SOCKET_WRAPPER` eq "") {
- die("You must include --enable-socket-wrapper when compiling Samba in order to execute 'make test'. Exiting....");
- }
- $testenv_default = "dc";
- require target::Samba;
- $target = new Samba($bindir, \%binary_mapping, $ldap, $srcdir, $exeext, $server_maxtime);
-} elsif ($opt_target eq "samba3") {
- if ($opt_socket_wrapper and `$bindir/smbd -b | grep nOCKET_WRAPPER` eq "") {
- die("You must include --enable-socket-wrapper when compiling Samba in order to execute 'make test'. Exiting....");
+unless ($opt_list) {
+ if ($opt_target eq "samba") {
+ if ($opt_socket_wrapper and `$bindir/smbd -b | grep SOCKET_WRAPPER` eq "") {
+ die("You must include --enable-socket-wrapper when compiling Samba in order to execute 'make test'. Exiting....");
+ }
+ $testenv_default = "dc";
+ require target::Samba;
+ $target = new Samba($bindir, \%binary_mapping, $ldap, $srcdir, $exeext, $server_maxtime);
+ } elsif ($opt_target eq "samba3") {
+ if ($opt_socket_wrapper and `$bindir/smbd -b | grep nOCKET_WRAPPER` eq "") {
+ die("You must include --enable-socket-wrapper when compiling Samba in order to execute 'make test'. Exiting....");
+ }
+ $testenv_default = "member";
+ require target::Samba3;
+ $target = new Samba3($bindir, \%binary_mapping, $srcdir_abs, $exeext, $server_maxtime);
+ } elsif ($opt_target eq "win") {
+ die("Windows tests will not run with socket wrapper enabled.")
+ if ($opt_socket_wrapper);
+ $testenv_default = "dc";
+ require target::Windows;
+ $target = new Windows();
+ } elsif ($opt_target eq "kvm") {
+ die("Kvm tests will not run with socket wrapper enabled.")
+ if ($opt_socket_wrapper);
+ require target::Kvm;
+ die("No image specified") unless ($opt_image);
+ $target = new Kvm($opt_image, undef);
}
- $testenv_default = "member";
- require target::Samba3;
- $target = new Samba3($bindir, \%binary_mapping, $srcdir_abs, $exeext, $server_maxtime);
-} elsif ($opt_target eq "win") {
- die("Windows tests will not run with socket wrapper enabled.")
- if ($opt_socket_wrapper);
- $testenv_default = "dc";
- require target::Windows;
- $target = new Windows();
-} elsif ($opt_target eq "kvm") {
- die("Kvm tests will not run with socket wrapper enabled.")
- if ($opt_socket_wrapper);
- require target::Kvm;
- die("No image specified") unless ($opt_image);
- $target = new Kvm($opt_image, undef);
}
#