Debian Codegraph @

src/libmbim-glib/test/meson.build

raw
1 # SPDX-License-Identifier: GPL-2.0-or-later
2 # Copyright (C) 2021 IƱigo Martinez <[email protected]>
3
4 test_units = [
5 'uuid',
6 'cid',
7 'message',
8 'fragment',
9 'message-fuzzer-samples',
10 'message-parser',
11 'message-builder',
12 'proxy-helpers',
13 ]
14
15 test_env = {
16 'G_DEBUG': 'gc-friendly',
17 'MALLOC_CHECK_': '2',
18 'G_TEST_SRCDIR': meson.current_source_dir(),
19 'G_TEST_BUILDDIR': meson.current_build_dir(),
20 }
21
22 foreach test_unit: test_units
23 test_name = 'test-' + test_unit
24
25 exe = executable(
26 test_name,
27 sources: test_name + '.c',
28 include_directories: top_inc,
29 dependencies: libmbim_glib_core_dep,
30 c_args: '-DLIBMBIM_GLIB_COMPILATION',
31 )
32
33 test(
34 test_unit,
35 exe,
36 env: test_env,
37 )
38 endforeach
39
40 if get_option('fuzzer')
41 fuzzer_name = 'test-message-fuzzer'
42 exe = executable(
43 fuzzer_name,
44 sources: fuzzer_name + '.c',
45 include_directories: top_inc,
46 dependencies: libmbim_glib_core_dep,
47 c_args: '-DLIBMBIM_GLIB_COMPILATION',
48 link_args : '-fsanitize=fuzzer',
49 )
50 endif