meson: break out the test suites into manual list
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 17 Oct 2024 09:34:11 +0000 (19:34 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Fri, 18 Oct 2024 00:49:47 +0000 (10:49 +1000)
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>

meson.build

index 23947b4efb44dc6566aa04a8182cedb7b987b08d..fae140eb36e11cb35a05df50e5d940cfdc32ca0b 100644 (file)
@@ -903,7 +903,6 @@ if get_option('tests')
             test_utils,
             suite : ['all'])
 
-       # When adding new files to this list, update the CI
        tests_sources = [
                'test/test-udev.c',
                'test/test-path.c',
@@ -935,10 +934,31 @@ if get_option('tests')
 
        src_man += 'test/libinput-test-suite.man'
 
-       foreach testfile : tests_sources
-               tfile = testfile.split('test/test-')[1]
-               group = tfile.split('.c')[0]
-               group = group.replace('-', '_')
+       # When adding new TEST_COLLECTION() macros, add to this list and the CI
+       # $ git grep TEST_COLLECTION test/test-* | sed -e "s|.*TEST_COLLECTION(\(.*\))|\t\t'\1',|" | sort
+       collections = [
+               '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),
                     libinput_test_runner,
                     suite : ['all', 'valgrind', 'root', 'hardware'],