1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

ctdb-build: Separate test backtrace support into separate subsystem

A convention when testing members of ctdb-util is to include the .c
file so that static functions can potentially be tested.  This means
that such tests can't be linked against ctdb-util or duplicate symbols
will be encountered.

ctdb-tests-common depends on ctdb-client, which depends in turn on
ctdb-util, so this can't be used to pull in backtrace support.
Instead, make ctdb-tests-backtrace its own subsystem.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2022-05-04 09:02:12 +10:00 committed by Martin Schwenke
parent b195e8c0d0
commit 7a1c43fc74

View File

@ -956,7 +956,7 @@ def build(bld):
bld.SAMBA_BINARY('system_socket_test',
source='tests/src/system_socket_test.c',
deps='''ctdb-tests-common
deps='''ctdb-tests-backtrace
talloc
ctdb-protocol-util
pcap
@ -1030,7 +1030,6 @@ def build(bld):
source=bld.SUBDIR('tests/src',
'''cluster_wait.c
test_options.c
test_backtrace.c
'''),
deps='''ctdb-client
samba-util
@ -1040,6 +1039,12 @@ def build(bld):
tevent
tdb''')
bld.SAMBA_SUBSYSTEM('ctdb-tests-backtrace',
source=bld.SUBDIR('tests/src',
'test_backtrace.c'),
deps='''samba-util
replace''')
# Test binaries
ctdb_tests = [
'g_lock_loop',
@ -1087,7 +1092,7 @@ def build(bld):
bld.SAMBA_BINARY('cluster_mutex_test',
source='tests/src/cluster_mutex_test.c',
deps='''ctdb-tests-common
deps='''ctdb-tests-backtrace
samba-util
talloc
tevent