ctdb-tests: Add tests for takeover helper
[martins/samba.git] / ctdb / wscript
index 8ce43a955b2586d1698f1fdaf64c325235336c62..b951dd69f6c490f9bcad21d95fa358b736842805 100644 (file)
@@ -420,6 +420,7 @@ def build(bld):
                                              client_message_sync.c
                                              client_control_sync.c
                                              client_db.c client_util.c
+                                             client_event.c
                                           '''),
                         includes='include',
                         deps='replace talloc tevent tdb tdb-wrap')
@@ -480,6 +481,12 @@ def build(bld):
                              samba-util replace''',
                      install_path='${CTDB_HELPER_BINDIR}')
 
+    bld.SAMBA_BINARY('ctdb_event',
+                     source='tools/ctdb_event.c',
+                     deps='''ctdb-client2 ctdb-protocol ctdb-util ctdb-system
+                             samba-util replace''',
+                     install_path='${CTDB_HELPER_BINDIR}')
+
     bld.SAMBA_BINARY('ltdbtool',
                      source='tools/ltdbtool.c',
                      includes='include',
@@ -499,18 +506,18 @@ def build(bld):
                      includes='include',
                      install_path='${CTDB_HELPER_BINDIR}')
 
-    bld.SAMBA_BINARY('ctdb_event_helper',
-                     source='server/ctdb_event_helper.c',
-                     includes='include',
-                     deps='samba-util sys_rw ctdb-system replace tdb',
-                     install_path='${CTDB_HELPER_BINDIR}')
-
     bld.SAMBA_BINARY('ctdb_recovery_helper',
                      source='server/ctdb_recovery_helper.c',
                      deps='''ctdb-client2 ctdb-protocol ctdb-util
                              samba-util sys_rw replace tdb''',
                      install_path='${CTDB_HELPER_BINDIR}')
 
+    bld.SAMBA_BINARY('ctdb_takeover_helper',
+                     source='server/ctdb_takeover_helper.c',
+                     deps='''ctdb-client2 ctdb-protocol ctdb-util
+                             samba-util sys_rw replace ctdb-ipalloc popt''',
+                     install_path='${CTDB_HELPER_BINDIR}')
+
     bld.SAMBA_BINARY('ctdb_mutex_fcntl_helper',
                      source='server/ctdb_mutex_fcntl_helper.c',
                      deps='sys_rw ctdb-system',
@@ -798,7 +805,8 @@ def build(bld):
                          install_path='${CTDB_TEST_LIBEXECDIR}')
 
     bld.SAMBA_BINARY('ctdb_takeover_tests',
-                     source='tests/src/ctdb_takeover_tests.c',
+                     source='''tests/src/ctdb_takeover_tests.c
+                               tests/src/ipalloc_read_known_ips.c''',
                      deps='''replace popt tdb tevent talloc ctdb-system
                              samba-util tdb-wrap talloc_report
                              ctdb-ipalloc ctdb-protocol ctdb-util''',
@@ -806,7 +814,8 @@ def build(bld):
                      install_path='${CTDB_TEST_LIBEXECDIR}')
 
     bld.SAMBA_BINARY('fake_ctdbd',
-                     source='tests/src/fake_ctdbd.c',
+                     source='''tests/src/fake_ctdbd.c
+                               tests/src/ipalloc_read_known_ips.c''',
                      deps='''ctdb-util ctdb-protocol ctdb-system
                              samba-util tevent-util LIBASYNC_REQ popt''',
                      install_path='${CTDB_TEST_LIBEXECDIR}')
@@ -822,12 +831,14 @@ def build(bld):
     test_subdirs = [
         'complex',
         'cunit',
+        'eventd',
         'events.d',
         'eventscripts',
         'onnode',
         'shellcheck',
         'simple',
         'takeover',
+        'takeover_helper',
         'tool'
     ]