diff options
Diffstat (limited to 'tests/meson.build')
-rw-r--r-- | tests/meson.build | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/meson.build b/tests/meson.build new file mode 100644 index 0000000..6995801 --- /dev/null +++ b/tests/meson.build @@ -0,0 +1,35 @@ +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'], + }, +} + +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 |