Tests: change ctdb_takeover_tests.c to include ctdbd code
authorMartin Schwenke <martin@meltin.net>
Fri, 11 Nov 2011 03:15:52 +0000 (14:15 +1100)
committerMartin Schwenke <martin@meltin.net>
Fri, 11 Nov 2011 03:31:50 +0000 (14:31 +1100)
commitbbe7cfd28f08d29b33669b17d4232a1a2be5cb49
tree49984e6b23673fd80c753f26cd80ecd976ad2966
parenta2ba5342f56aaac186f7e0cb6eddccea73976ad4
Tests: change ctdb_takeover_tests.c to include ctdbd code

Do this instead of linking to it.  This means that, after previous
cleanups, we can fix ctdb_takeover.c to use static functions when
appropriate and simply include all the code we need to run tests.

To make this reusable in other tests, new file ctdbd_tests.c does all
of the relevant including.  ctdb_takeover_tests.c just includes that
file.

Test objects built in this way can depend on new Makefile macro
$(CTDB_TEST_C), which contains ctdbd_tests.c and everything it
includes.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 41869d42194b74db43a176a068e96e411007e5f2)
ctdb/Makefile.in
ctdb/tests/src/ctdb_takeover_tests.c
ctdb/tests/src/ctdbd_test.c [new file with mode: 0644]