summaryrefslogtreecommitdiff
path: root/tests/meson.build
diff options
context:
space:
mode:
authorMartin Blanchard <martin.blanchard@codethink.co.uk>2018-03-13 13:47:25 +0000
committerBastien Nocera <hadess@hadess.net>2020-11-20 13:41:28 +0100
commit334f31b3cf0837ffb2298f498686905e8ba14f7b (patch)
tree30b347319d209617284e68b3ebab9cca0859c60e /tests/meson.build
parente9342ee019482a08fe435d6b656f8a6bdd196bce (diff)
downloadlibgudev-334f31b3cf0837ffb2298f498686905e8ba14f7b.tar.gz
Port to meson build system
The meson build system focuses on speed an ease of use, which helps speeding up the software development.
Diffstat (limited to 'tests/meson.build')
-rw-r--r--tests/meson.build35
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