waf: Only build unit tests with selftest enabled
authorAndreas Schneider <asn@samba.org>
Wed, 5 Jul 2017 08:08:49 +0000 (10:08 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 5 Jul 2017 15:54:10 +0000 (17:54 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12877

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
wscript
wscript_build

diff --git a/wscript b/wscript
index 47d020b1223568f5d942e7f974e09ada7dfc1ddb..e80f7663bbd7291177114d942251ac3f3efcd345 100644 (file)
--- a/wscript
+++ b/wscript
@@ -195,6 +195,7 @@ def configure(conf):
         if Options.options.with_ntvfs_fileserver == False:
             if not (Options.options.without_ad_dc):
                 raise Utils.WafError('--without-ntvfs-fileserver conflicts with --enable-selftest while building the AD DC')
+        conf.RECURSE('testsuite/unittests')
 
     if Options.options.with_ntvfs_fileserver == True:
         if Options.options.without_ad_dc:
@@ -214,7 +215,6 @@ def configure(conf):
     if conf.env.with_ctdb:
         conf.RECURSE('ctdb')
     conf.RECURSE('lib/socket')
-    conf.RECURSE('testsuite/unittests')
     conf.RECURSE('auth')
 
     conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS()
index 2ddcdcc8557011068289f645402f2b3b3c9fe1b0..8758b6d57898d03fab14683b9a1dd485bf22f652 100644 (file)
@@ -124,7 +124,8 @@ bld.RECURSE('libcli/samsync')
 bld.RECURSE('libcli/registry')
 bld.RECURSE('source4/lib/policy')
 bld.RECURSE('libcli/named_pipe_auth')
-bld.RECURSE('testsuite/unittests')
+if bld.CONFIG_GET('ENABLE_SELFTEST'):
+    bld.RECURSE('testsuite/unittests')
 
 if bld.CONFIG_GET('KRB5_VENDOR') in (None, 'heimdal'):
     if bld.CONFIG_GET("HEIMDAL_KRB5_CONFIG") and bld.CONFIG_GET("USING_SYSTEM_KRB5"):