ctdb-build: Don't build/install tests in top-level build by default
authorMartin Schwenke <martin@meltin.net>
Thu, 16 Feb 2017 08:23:44 +0000 (19:23 +1100)
committerMartin Schwenke <martins@samba.org>
Wed, 22 Jul 2020 07:53:35 +0000 (07:53 +0000)
The standalone build still includes tests, as does the top-level build
when --enable-selftest is used.  The latter is consistent with the use
of --enable-selftest in the rest of the tree.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/wscript

index 5f93f3a06688cc070a9892408590d86a2786d134..35c8c0622fc4b9e381e2519844dc5892fc7562a3 100644 (file)
@@ -868,6 +868,13 @@ def build(bld):
     for d in ['volatile', 'persistent', 'state']:
         bld.INSTALL_DIR(os.path.join(bld.env.CTDB_VARDIR, d))
 
+    #
+    # Test-only below this point
+    #
+
+    if not bld.env.standalone_ctdb and not bld.CONFIG_GET('ENABLE_SELFTEST'):
+        return
+
     bld.SAMBA_BINARY('errcode',
                      source='tests/src/errcode.c',
                      deps='replace',