Debian Codegraph @

src/libsysprof-capture/tests/meson.build

raw
1 libsysprof_capture_test_env = [
2 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
3 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
4 'G_DEBUG=gc-friendly',
5 'GSETTINGS_BACKEND=memory',
6 'MALLOC_CHECK_=2',
7 'NO_AT_BRIDGE=1',
8 ]
9
10 libsysprof_capture_testsuite_c_args = [
11 '-DSYSPROF_COMPILATION',
12 '-DG_ENABLE_DEBUG',
13 '-UG_DISABLE_ASSERT',
14 '-UG_DISABLE_CAST_CHECKS',
15 ]
16
17 libsysprof_capture_testsuite = {
18 'allocs-by-size' : {'skip': true},
19 'cross-thread-frees' : {'skip': true},
20 'find-temp-allocs' : {'skip': true},
21 'rewrite-pid' : {'skip': true},
22 'test-capture' : {},
23 'test-capture-cursor' : {},
24 'test-cplusplus' : {'cpp': true},
25 'test-mapped-ring-buffer' : {},
26 }
27
28 libsysprof_capture_testsuite_deps = [
29 gio_dep,
30 libsysprof_capture_dep,
31 ]
32
33 foreach test, params: libsysprof_capture_testsuite
34 if params.get('cpp', false)
35 test_exe = executable(test, '@[email protected]'.format(test),
36 cpp_args: libsysprof_capture_testsuite_c_args,
37 dependencies: libsysprof_capture_testsuite_deps,
38 )
39 else
40 test_exe = executable(test, '@[email protected]'.format(test),
41 c_args: libsysprof_capture_testsuite_c_args,
42 dependencies: libsysprof_capture_testsuite_deps,
43 )
44 endif
45
46 if not params.get('skip', false)
47 test(test, test_exe, env: libsysprof_capture_test_env)
48 endif
49 endforeach