summaryrefslogtreecommitdiff
path: root/tests/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'tests/meson.build')
-rw-r--r--tests/meson.build26
1 files changed, 15 insertions, 11 deletions
diff --git a/tests/meson.build b/tests/meson.build
index 55fd09d..8c382ae 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,34 +1,38 @@
libgudev_tests = {
+ 'test-gudevdevice': {
+ 'dependencies': [gio_dep, libgudev_dep],
+ 'link_with': [libgudev],
+ 'sources': ['../gudev/gudevdevice.c'],
+ 'include_directories': [include_directories('../')],
+ },
'test-enumerator-filter': {
- 'dependencies': [gio_dep, umockdev_dep],
+ 'dependencies': [libgudev_dep, gio_dep, umockdev_dep],
'environment': ['LD_PRELOAD=libumockdev-preload.so.0'],
},
'test-sysfsattr': {
- 'dependencies': [gio_dep, umockdev_dep],
+ 'dependencies': [libgudev_dep, gio_dep, umockdev_dep],
'environment': ['LD_PRELOAD=libumockdev-preload.so.0'],
},
'test-double': {
- 'dependencies': [gio_dep, umockdev_dep],
+ 'dependencies': [libgudev_dep, 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_sources += test_extras.get('sources', [])
+ test_deps = test_extras.get('dependencies', [])
+ test_env = test_extras.get('environment', [])
+ test_include = test_extras.get('include_directories', [])
test_exe = executable(
test_name,
test_sources,
dependencies: test_deps,
+ include_directories: test_include,
+ c_args: ['-D_GUDEV_COMPILATION']
)
test(