tests: Use a loop for generating drivers tests and use suites

So we can just run drivers tests with --suite=drivers
This commit is contained in:
Marco Trevisan (Treviño) 2019-11-26 20:59:09 +01:00
parent db905a2048
commit 545af23536

View file

@ -24,25 +24,21 @@ if get_option('introspection')
) )
endif endif
if 'vfs5011' in drivers drivers_tests = [
test('vfs5011', 'vfs5011',
find_program('umockdev-test.py'), 'synaptics',
args: join_paths(meson.current_source_dir(), 'vfs5011'), ]
env: envs,
timeout: 10,
depends: libfprint_typelib,
)
endif
if 'synaptics' in drivers foreach driver_test: drivers_tests
test('synaptics', test(driver_test,
find_program('umockdev-test.py'), find_program('umockdev-test.py'),
args: join_paths(meson.current_source_dir(), 'synaptics'), args: join_paths(meson.current_source_dir(), driver_test),
env: envs, env: envs,
suite: ['drivers'],
timeout: 10, timeout: 10,
depends: libfprint_typelib, depends: libfprint_typelib,
) )
endif endforeach
endif endif
gdb = find_program('gdb', required: false) gdb = find_program('gdb', required: false)