tests: Allow multiple tests per driver
Allow multiple tests per driver by using the first section of the directory name, before the separating '-', as the driver name.
This commit is contained in:
parent
4ef13d971d
commit
01663c1fb5
2 changed files with 11 additions and 2 deletions
|
@ -20,6 +20,10 @@ A new 'capture' test is created by means of `capture.py` script:
|
|||
|
||||
`mkdir DRIVER`
|
||||
|
||||
Note that the name must be the exact name of the libfprint driver,
|
||||
or the exact name of the driver followed by a `-` and a unique identifier
|
||||
of your choosing.
|
||||
|
||||
2. Prepare your execution environment.
|
||||
|
||||
In the next step a working and up to date libfprint is needed. This can be
|
||||
|
|
|
@ -83,10 +83,15 @@ if get_option('introspection')
|
|||
endforeach
|
||||
|
||||
foreach driver_test: drivers_tests
|
||||
if driver_test.contains('-')
|
||||
driver_name = driver_test.split('-')[0]
|
||||
else
|
||||
driver_name = driver_test
|
||||
endif
|
||||
driver_envs = envs
|
||||
driver_envs.set('FP_DRIVERS_WHITELIST', driver_test)
|
||||
driver_envs.set('FP_DRIVERS_WHITELIST', driver_name)
|
||||
|
||||
if (driver_test in supported_drivers and
|
||||
if (driver_name in supported_drivers and
|
||||
gusb_dep.version().version_compare('>= 0.3.0'))
|
||||
test(driver_test,
|
||||
find_program('umockdev-test.py'),
|
||||
|
|
Loading…
Reference in a new issue