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:
Bastien Nocera
2020-12-04 16:40:18 +01:00
committed by Benjamin Berg
parent 4ef13d971d
commit 01663c1fb5
2 changed files with 11 additions and 2 deletions

View File

@@ -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'),