Blob Blame History Raw
From e164796705693d0fae8d21ffbc24fbb4ba1a3fed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Tue, 26 Nov 2019 20:59:09 +0100
Subject: [PATCH 047/181] tests: Use a loop for generating drivers tests and
 use suites

So we can just run drivers tests with --suite=drivers
---
 tests/meson.build | 22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git a/tests/meson.build b/tests/meson.build
index 0fe8096..d6196be 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -24,25 +24,21 @@ if get_option('introspection')
         )
     endif
 
-    if 'vfs5011' in drivers
-        test('vfs5011',
-            find_program('umockdev-test.py'),
-            args: join_paths(meson.current_source_dir(), 'vfs5011'),
-            env: envs,
-            timeout: 10,
-            depends: libfprint_typelib,
-        )
-    endif
+    drivers_tests = [
+        'vfs5011',
+        'synaptics',
+    ]
 
-    if 'synaptics' in drivers
-        test('synaptics',
+    foreach driver_test: drivers_tests
+        test(driver_test,
             find_program('umockdev-test.py'),
-            args: join_paths(meson.current_source_dir(), 'synaptics'),
+            args: join_paths(meson.current_source_dir(), driver_test),
             env: envs,
+            suite: ['drivers'],
             timeout: 10,
             depends: libfprint_typelib,
         )
-    endif
+    endforeach
 endif
 
 gdb = find_program('gdb', required: false)
-- 
2.24.1