summaryrefslogtreecommitdiff
path: root/source4/selftest/wscript
diff options
context:
space:
mode:
Diffstat (limited to 'source4/selftest/wscript')
-rw-r--r--source4/selftest/wscript10
1 files changed, 10 insertions, 0 deletions
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'