meson: break out the test suites into manual list

If we start having multiple TEST_COLLECTION() in the same file we can
no longer use the file name - so a manually maintained list it is.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1065>
This commit is contained in:
Peter Hutterer 2024-10-17 19:34:11 +10:00
parent 3390f2e647
commit 8cbf535ee5

View file

@ -903,7 +903,6 @@ if get_option('tests')
test_utils, test_utils,
suite : ['all']) suite : ['all'])
# When adding new files to this list, update the CI
tests_sources = [ tests_sources = [
'test/test-udev.c', 'test/test-udev.c',
'test/test-path.c', 'test/test-path.c',
@ -935,10 +934,31 @@ if get_option('tests')
src_man += 'test/libinput-test-suite.man' src_man += 'test/libinput-test-suite.man'
foreach testfile : tests_sources # When adding new TEST_COLLECTION() macros, add to this list and the CI
tfile = testfile.split('test/test-')[1] # $ git grep TEST_COLLECTION test/test-* | sed -e "s|.*TEST_COLLECTION(\(.*\))|\t\t'\1',|" | sort
group = tfile.split('.c')[0] collections = [
group = group.replace('-', '_') 'device',
'gestures',
'keyboard',
'log',
'misc',
'pad',
'path',
'pointer',
'quirks',
'switch',
'tablet',
'totem',
'touch',
'touchpad',
'touchpad_buttons',
'touchpad_tap',
'trackball',
'trackpoint',
'udev',
]
foreach group : collections
test('libinput-test-suite-@0@'.format(group), test('libinput-test-suite-@0@'.format(group),
libinput_test_runner, libinput_test_runner,
suite : ['all', 'valgrind', 'root', 'hardware'], suite : ['all', 'valgrind', 'root', 'hardware'],