mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
6f4f8c51e0
Add cmocka unit tests to exercise the error handling in the JSON routines. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
57 lines
1.5 KiB
Python
57 lines
1.5 KiB
Python
#!/usr/bin/env python
|
|
|
|
bld.SAMBA_SUBSYSTEM(
|
|
'audit_logging',
|
|
deps='''MESSAGING_SEND
|
|
jansson
|
|
samba-debug
|
|
LIBTSOCKET''',
|
|
source='audit_logging.c'
|
|
)
|
|
|
|
if bld.AD_DC_BUILD_IS_ENABLED() and bld.CONFIG_GET('ENABLE_SELFTEST'):
|
|
bld.SAMBA_BINARY(
|
|
'audit_logging_test',
|
|
source='tests/audit_logging_test.c',
|
|
deps='''
|
|
audit_logging
|
|
jansson
|
|
cmocka
|
|
talloc
|
|
samba-util
|
|
LIBTSOCKET
|
|
''',
|
|
install=False
|
|
)
|
|
|
|
if bld.AD_DC_BUILD_IS_ENABLED() and bld.CONFIG_GET('ENABLE_SELFTEST'):
|
|
bld.SAMBA_BINARY(
|
|
'audit_logging_error_test',
|
|
source='tests/audit_logging_error_test.c',
|
|
deps='''
|
|
audit_logging
|
|
jansson
|
|
cmocka
|
|
talloc
|
|
samba-util
|
|
LIBTSOCKET
|
|
''',
|
|
install=False,
|
|
ldflags='''
|
|
-Wl,--wrap,json_object_set_new
|
|
-Wl,--wrap,json_object_update
|
|
-Wl,--wrap,json_array_append_new
|
|
-Wl,--wrap,json_array_extend
|
|
-Wl,--wrap,json_object
|
|
-Wl,--wrap,json_string
|
|
-Wl,--wrap,json_integer
|
|
-Wl,--wrap,json_array
|
|
-Wl,--wrap,json_dumps
|
|
-Wl,--wrap,gettimeofday
|
|
-Wl,--wrap,localtime
|
|
-Wl,--wrap,talloc_named_const
|
|
-Wl,--wrap,talloc_strdup
|
|
-Wl,--wrap,tsocket_address_string
|
|
'''
|
|
)
|