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
|
libgudev_tests = {
'test-enumerator-filter': {
'dependencies': [gio_dep, umockdev_dep],
'environment': ['LD_PRELOAD=libumockdev-preload.so.0'],
},
'test-sysfsattr': {
'dependencies': [gio_dep, umockdev_dep],
'environment': ['LD_PRELOAD=libumockdev-preload.so.0'],
},
'test-double': {
'dependencies': [gio_dep, umockdev_dep],
'environment': ['LD_PRELOAD=libumockdev-preload.so.0', 'LC_NUMERIC=fr_FR.UTF-8'],
},
}
libgudev_tests_deps = [
libgudev_dep,
]
foreach test_name, test_extras: libgudev_tests
test_sources = ['@0@.c'.format(test_name)]
test_deps = libgudev_tests_deps
test_env = []
test_deps += test_extras.get('dependencies', [])
test_env += test_extras.get('environment', [])
test_exe = executable(
test_name,
test_sources,
dependencies: test_deps,
)
test(
test_name,
test_exe,
env: test_env,
)
endforeach
|