Debian Codegraph @

subprojects/libglnx/tests/meson.build

raw
1 # Copyright 2019 Endless OS Foundation LLC
2 # Copyright 2019 Collabora Ltd.
3 # SPDX-License-Identifier: LGPL-2.1-or-later
4
5 libglnx_testlib = static_library(
6 'glnx-testlib',
7 'libglnx-testlib.c',
8 'libglnx-testlib.h',
9 dependencies : [
10 libglnx_dep,
11 libglnx_deps,
12 ],
13 install : false,
14 )
15 libglnx_testlib_dep = declare_dependency(
16 dependencies : [
17 libglnx_dep,
18 libglnx_deps,
19 ],
20 include_directories : include_directories('.'),
21 link_with : libglnx_testlib,
22 )
23
24 if get_option('tests')
25 testing_helper = executable(
26 'testing-helper',
27 'testing-helper.c',
28 dependencies : [
29 libglnx_dep,
30 libglnx_deps,
31 ],
32 install : false,
33 )
34
35 test_names = [
36 'backports',
37 'chase',
38 'errors',
39 'fdio',
40 'macros',
41 'shutil',
42 'testing',
43 'xattrs',
44 ]
45
46 foreach test_name : test_names
47 exe = executable(test_name,
48 [
49 'test-libglnx-' + test_name + '.c',
50 ],
51 dependencies: [
52 libglnx_dep,
53 libglnx_deps,
54 libglnx_testlib_dep,
55 ],
56 )
57 test(test_name, exe, depends: testing_helper)
58 endforeach
59 endif