1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
if not get_option('build-tests')
subdir_done()
endif
tests_inc = [
root_inc,
src_inc,
]
env = environment()
env.set('G_TEST_SRCDIR', meson.current_source_dir())
env.set('G_TEST_BUILDDIR', meson.current_build_dir())
env.set('MALLOC_CHECK_', '2')
# For -Db_sanitize=address
env.set('LSAN_OPTIONS',
'suppressions=@0@/leak-suppress.txt'.format(meson.project_source_root()))
test_items = []
test_items = [
'client',
'enc-chat',
'cm-db',
'cm-enc',
'pusher',
'room',
'room-member',
'cm-utils',
]
foreach item: test_items
t = executable(
item,
item + '.c',
include_directories: tests_inc,
link_with: cmatrix_lib,
dependencies: cmatrix_deps,
)
test(item, t, env: env, timeout: 120)
endforeach
|