tests: Always add dummy skipping tests

Just hiding tests that cannot be run does not seem like the best idea.
So add dummy tests that are skipped, to denote that we could test more
than we actually do (even if it is just for drivers that are not
enabled).
This commit is contained in:
Benjamin Berg 2020-01-08 18:40:41 +01:00
parent 6716359fe8
commit ba07c74006

View file

@ -16,6 +16,12 @@ envs.set('FP_DRIVERS_WHITELIST', 'virtual_image')
envs.set('NO_AT_BRIDGE', '1')
drivers_tests = [
'elan',
'vfs5011',
'synaptics',
]
if get_option('introspection')
envs.prepend('GI_TYPELIB_PATH', join_paths(meson.build_root(), 'libfprint'))
@ -26,18 +32,18 @@ if get_option('introspection')
env: envs,
depends: libfprint_typelib,
)
else
test('virtual-image',
find_program('sh'),
args: ['-c', 'exit 77']
)
endif
drivers_tests = [
'elan',
'vfs5011',
'synaptics',
]
foreach driver_test: drivers_tests
driver_envs = envs
driver_envs.set('FP_DRIVERS_WHITELIST', driver_test)
if driver_test in drivers
test(driver_test,
find_program('umockdev-test.py'),
args: join_paths(meson.current_source_dir(), driver_test),
@ -46,6 +52,25 @@ if get_option('introspection')
timeout: 10,
depends: libfprint_typelib,
)
else
test(driver_test,
find_program('sh'),
args: ['-c', 'exit 77']
)
endif
endforeach
else
warning('Skipping all driver tests as introspection bindings are missing')
test('virtual-image',
find_program('sh'),
args: ['-c', 'exit 77']
)
foreach driver_test: drivers_tests
test(driver_test,
find_program('sh'),
args: ['-c', 'exit 77']
)
endforeach
endif