summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-30 13:05:15 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:17 +1000
commit77a4fe495ef8056d186d5b6d24f895ff64db77ee (patch)
tree391fc8e9622d2d834b0b721c714b2d70d583882f
parent7da57cc94b8e6ddfac1b9e1f35956667ebee2abc (diff)
downloadsamba-77a4fe495ef8056d186d5b6d24f895ff64db77ee.tar.gz
samba-77a4fe495ef8056d186d5b6d24f895ff64db77ee.tar.bz2
samba-77a4fe495ef8056d186d5b6d24f895ff64db77ee.zip
s4-waf: added a --enable-selftest option as a shortcut
This is equiavalent to --enable-uid-wrapper --enable-nss-wrapper --enable-socket-wrapper but is easier to remember!
-rw-r--r--lib/nss_wrapper/wscript4
-rw-r--r--lib/socket_wrapper/wscript4
-rw-r--r--lib/uid_wrapper/wscript4
-rw-r--r--source4/selftest/wscript10
4 files changed, 19 insertions, 3 deletions
diff --git a/lib/nss_wrapper/wscript b/lib/nss_wrapper/wscript
index c6e8e0d306..44da63339f 100644
--- a/lib/nss_wrapper/wscript
+++ b/lib/nss_wrapper/wscript
@@ -8,6 +8,8 @@ def set_options(opt):
action="store_true", dest='enable_nss_wrapper', default=False)
def configure(conf):
- if Options.options.enable_nss_wrapper or Options.options.developer:
+ if (Options.options.enable_nss_wrapper or
+ Options.options.developer or
+ Options.options.enable_selftest):
conf.DEFINE('NSS_WRAPPER', 1)
diff --git a/lib/socket_wrapper/wscript b/lib/socket_wrapper/wscript
index f4fdff2ab9..6d9a95795d 100644
--- a/lib/socket_wrapper/wscript
+++ b/lib/socket_wrapper/wscript
@@ -8,7 +8,9 @@ def set_options(opt):
action="store_true", dest='enable_socket_wrapper', default=False)
def configure(conf):
- if Options.options.enable_socket_wrapper or Options.options.developer:
+ if (Options.options.enable_socket_wrapper or
+ Options.options.developer or
+ Options.options.enable_selftest):
conf.DEFINE('SOCKET_WRAPPER', 1)
conf.ADD_GLOBAL_DEPENDENCY('SOCKET_WRAPPER')
diff --git a/lib/uid_wrapper/wscript b/lib/uid_wrapper/wscript
index 0937176c1f..9eb828866f 100644
--- a/lib/uid_wrapper/wscript
+++ b/lib/uid_wrapper/wscript
@@ -8,6 +8,8 @@ def set_options(opt):
action="store_true", dest='enable_uid_wrapper', default=False)
def configure(conf):
- if Options.options.enable_uid_wrapper or Options.options.developer:
+ if (Options.options.enable_uid_wrapper or
+ Options.options.developer or
+ Options.options.enable_selftest):
conf.DEFINE('UID_WRAPPER', 1)
diff --git a/source4/selftest/wscript b/source4/selftest/wscript
index 8969d4694d..d7bc04fdf9 100644
--- a/source4/selftest/wscript
+++ b/source4/selftest/wscript
@@ -4,6 +4,7 @@
import Scripting, os, Options, Utils, Environment, optparse, sys
from samba_utils import *
+from samba_autoconf import *
def set_options(opt):
opt.ADD_COMMAND('test', cmd_test)
@@ -11,6 +12,9 @@ def set_options(opt):
gr = opt.add_option_group('test options')
+ gr.add_option('--enable-selftest',
+ help=("enable options necessary for selftest"),
+ action="store_true", dest='enable_selftest', default=False)
gr.add_option('--with-selftest-prefix',
help=("specify location of selftest directory"),
action="store", dest='SELFTEST_PREFIX', default='./st')
@@ -42,6 +46,12 @@ def cmd_testonly(opt):
env = LOAD_ENVIRONMENT()
opt.env = env
+ if (not CONFIG_SET(opt, 'NSS_WRAPPER') or
+ not CONFIG_SET(opt, 'UID_WRAPPER') or
+ not CONFIG_SET(opt, 'SOCKET_WRAPPER')):
+ print "ERROR: You must use --enable-selftest to enable selftest"
+ sys.exit(1)
+
env.TESTS = Options.options.TESTS
env.SUBUNIT_FORMATTER = '${PERL} ../selftest/format-subunit --prefix=${SELFTEST_PREFIX} --immediate'