selftest/selftesthelpers.py: Share configuration variable, strip whitespace.
[nivanova/samba-autobuild/.git] / selftest / wscript
index 563edfb5241957d7373a15c3af7f34a3a56f1a1d..9ea2f6fdd4a7f1485e83bdfd9f4ce8fd96e798bd 100644 (file)
@@ -77,6 +77,10 @@ def configure(conf):
         conf.ADD_LDFLAGS('-lgcov', testflags=True)
         conf.ADD_CFLAGS('--coverage')
 
+    if Options.options.enable_selftest or Options.options.developer:
+        conf.DEFINE('ENABLE_SELFTEST', 1)
+
+
 def cmd_testonly(opt):
     '''run tests without doing a build first'''
     env = LOAD_ENVIRONMENT()
@@ -112,7 +116,8 @@ def cmd_testonly(opt):
 
     binary_mapping = ('nmblookup3:nmblookup,' +
                       'nmblookup4:nmblookup4,' +
-                      'smbclient3:smbclient3,' +
+                      'smbclient3:smbclient,' +
+                      'smbclient4:smbclient4,' +
                       'smbtorture4:smbtorture,' + 
                       'ntlm_auth3:ntlm_auth3')
 
@@ -164,9 +169,6 @@ def cmd_testonly(opt):
     if env.USING_SYSTEM_LDB:
         os.environ['LDB_MODULES_PATH'] = 'bin/modules/ldb'
 
-    if env.BUILD_TDB2:
-        os.environ['BUILD_TDB2'] = '1'
-
     # tell build system where to find config.h
     os.environ['VFSLIBDIR'] = os.path.abspath('bin/modules/vfs')
     os.environ['CONFIG_H'] = 'bin/default/include/config.h'
@@ -178,7 +180,8 @@ def cmd_testonly(opt):
     if not os.path.isdir(env.SELFTEST_PREFIX):
         os.makedirs(env.SELFTEST_PREFIX, int('755', 8))
 
-    env.TESTLISTS = ('--testlist="${PYTHON} ${srcdir}/source3/selftest/tests.py|" ' +
+    env.TESTLISTS = ('--testlist="${PYTHON} ${srcdir}/selftest/tests.py|" ' +
+                     '--testlist="${PYTHON} ${srcdir}/source3/selftest/tests.py|" ' +
                      '--testlist="${PYTHON} ${srcdir}/source4/selftest/tests.py|"')
 
     if CONFIG_SET(opt, 'AD_DC_BUILD_IS_ENABLED'):