fp-context: Use an env to define a whitelist of drivers to enable

This avoids that we pick unwanted drivers when running the tests in a
machine that has some supported device attached.
This commit is contained in:
Marco Trevisan (Treviño)
2019-12-13 20:34:08 +01:00
parent 09576e5209
commit 43a8c909bf
2 changed files with 52 additions and 1 deletions

View File

@@ -11,6 +11,9 @@ envs.prepend('LD_LIBRARY_PATH', join_paths(meson.build_root(), 'libfprint'))
# random numbers rather than proper ones)
envs.set('FP_DEVICE_EMULATION', '1')
# Set a colon-separated list of native drivers we enable in tests
envs.set('FP_DRIVERS_WHITELIST', 'virtual_image')
envs.set('NO_AT_BRIDGE', '1')
if get_option('introspection')
@@ -31,10 +34,13 @@ if get_option('introspection')
]
foreach driver_test: drivers_tests
driver_envs = envs
driver_envs.set('FP_DRIVERS_WHITELIST', driver_test)
test(driver_test,
find_program('umockdev-test.py'),
args: join_paths(meson.current_source_dir(), driver_test),
env: envs,
env: driver_envs,
suite: ['drivers'],
timeout: 10,
depends: libfprint_typelib,