s4/selftest: enable samba.tests.samba_tool.ntacl for Py3
[nivanova/samba-autobuild/.git] / ctdb / wscript
index 73fd5bd3d00fee337501905e6fdcd7b820aa8b27..686a8381f4a28a33853e8700f0f92a34650dec52 100644 (file)
@@ -85,6 +85,10 @@ def set_options(opt):
     opt.add_option('--enable-etcd-reclock',
                    help=("Enable etcd recovery lock helper (default=no)"),
                    action="store_true", dest='ctdb_etcd_reclock', default=False)
+
+    opt.add_option('--with-libcephfs',
+                   help=("Directory under which libcephfs is installed"),
+                   action="store", dest='libcephfs_dir', default=None)
     opt.add_option('--enable-ceph-reclock',
                    help=("Enable Ceph CTDB recovery lock helper (default=no)"),
                    action="store_true", dest='ctdb_ceph_reclock', default=False)
@@ -237,8 +241,16 @@ def configure(conf):
     conf.env.etcd_reclock = have_etcd_reclock
 
     if Options.options.ctdb_ceph_reclock:
+        # Use custom libcephfs library path if provided. XXX The top level build
+        # explicitly sets LIBPATH_CEPH-COMMON when libcephfs_dir isn't provided.
+        if Options.options.libcephfs_dir:
+            conf.env['CPPPATH_RADOS'] = Options.options.libcephfs_dir + '/include'
+            conf.env['LIBPATH_RADOS'] = Options.options.libcephfs_dir + '/lib'
+            conf.env['LIBPATH_CEPH-COMMON'] = conf.env['LIBPATH_RADOS'] + '/ceph'
+
         if (conf.CHECK_HEADERS('rados/librados.h', False, False, 'rados') and
                                        conf.CHECK_LIB('rados', shlib=True)):
+            conf.CHECK_LIB('ceph-common', shlib=True)
             Logs.info('Building with Ceph librados recovery lock support')
             conf.define('HAVE_LIBRADOS', 1)
         else:
@@ -402,9 +414,10 @@ def build(bld):
                                              pkt_read.c pkt_write.c comm.c
                                              logging.c rb_tree.c tunable.c
                                              pidfile.c run_proc.c
-                                             hash_count.c run_event.c
+                                             hash_count.c
+                                             run_event.c event_script.c
                                              sock_client.c version.c
-                                             cmdline.c path.c conf.c
+                                             cmdline.c path.c conf.c line.c
                                           '''),
                         deps='''samba-util sys_rw tevent-util
                                 replace talloc tevent tdb popt''')
@@ -434,7 +447,7 @@ def build(bld):
 
     bld.SAMBA_SUBSYSTEM('ctdb-protocol-util',
                         source='protocol/protocol_util.c',
-                        deps='replace talloc tdb')
+                        deps='ctdb-util replace talloc tdb')
 
     bld.SAMBA_SUBSYSTEM('ctdb-client',
                         source=bld.SUBDIR('client',
@@ -483,6 +496,10 @@ def build(bld):
                         source='event/event_conf.c',
                         deps='ctdb-util')
 
+    bld.SAMBA_SUBSYSTEM('ctdb-failover-conf',
+                        source='failover/failover_conf.c',
+                        deps='ctdb-util')
+
     bld.SAMBA_SUBSYSTEM('ctdb-legacy-conf',
                         source='server/legacy_conf.c',
                         deps='ctdb-util')
@@ -494,6 +511,7 @@ def build(bld):
                              ctdb-event-conf
                              ctdb-cluster-conf
                              ctdb-database-conf
+                             ctdb-failover-conf
                              ctdb-legacy-conf
                              ctdb-util samba-util talloc replace popt''',
                      install_path='${CTDB_HELPER_BINDIR}')
@@ -559,6 +577,7 @@ def build(bld):
                              ctdb-cluster-conf
                              ctdb-database-conf
                              ctdb-event-conf
+                             ctdb-failover-conf
                              ctdb-legacy-conf
                              ctdb-event-protocol
                              talloc tevent tdb-wrap tdb talloc_report''' +
@@ -664,7 +683,7 @@ def build(bld):
     if bld.env.HAVE_LIBRADOS:
         bld.SAMBA_BINARY('ctdb_mutex_ceph_rados_helper',
                          source='utils/ceph/ctdb_mutex_ceph_rados_helper.c',
-                        deps='talloc tevent rados',
+                        deps='talloc tevent rados ceph-common',
                         includes='include',
                         install_path='${CTDB_HELPER_BINDIR}')
 
@@ -842,6 +861,16 @@ def build(bld):
     for d in ['volatile', 'persistent', 'state']:
         bld.install_dir(os.path.join(bld.env.CTDB_VARDIR, d))
 
+    bld.SAMBA_BINARY('errcode',
+                     source='tests/src/errcode.c',
+                     deps='replace',
+                     install_path='${CTDB_TEST_LIBEXECDIR}')
+
+    bld.SAMBA_BINARY('sigcode',
+                     source='tests/src/sigcode.c',
+                     deps='replace',
+                     install_path='${CTDB_TEST_LIBEXECDIR}')
+
     # Unit tests
     ctdb_unit_tests = [
         'db_hash_test',
@@ -858,6 +887,8 @@ def build(bld):
         'run_event_test',
         'cmdline_test',
         'conf_test',
+        'line_test',
+        'event_script_test',
     ]
 
     for target in ctdb_unit_tests:
@@ -884,6 +915,11 @@ def build(bld):
                      deps='talloc tevent tdb ctdb-protocol',
                      install_path='${CTDB_TEST_LIBEXECDIR}')
 
+    bld.SAMBA_BINARY('system_socket_test',
+                     source='tests/src/system_socket_test.c',
+                     deps='talloc ctdb-protocol-util pcap',
+                     install_path='${CTDB_TEST_LIBEXECDIR}')
+
     bld.SAMBA_BINARY('porting_tests',
                      source='tests/src/porting_tests.c',
                      deps='samba-util ctdb-system popt',
@@ -927,7 +963,7 @@ def build(bld):
         bld.SAMBA_BINARY(target,
                          source=src,
                          deps='''ctdb-protocol-tests-common
-                                 samba-util talloc tdb''',
+                                 samba-util ctdb-util talloc tdb''',
                          install_path='${CTDB_TEST_LIBEXECDIR}')
 
     bld.SAMBA_BINARY('event_protocol_test',