mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 04:30:06 +01:00
meson: run the test suite per group
We can't run this in parallel so it doesn't gain us any speed advantage. If anything, it'll be slower because it's more setup time in between. But: meson doesn't display the result until the test suite finished, so having this broken up into smaller chunks means we're more likely to see a general failure early. And the failure should be quicker to reproduce as well. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
47cf7e0995
commit
7b9affcf4b
2 changed files with 35 additions and 4 deletions
20
meson.build
20
meson.build
|
|
@ -897,10 +897,22 @@ if get_option('tests')
|
|||
install_dir : dir_man1,
|
||||
)
|
||||
|
||||
test('libinput-test-suite-runner',
|
||||
libinput_test_runner,
|
||||
suite : ['all', 'valgrind', 'root', 'hardware'],
|
||||
timeout : 1200)
|
||||
# Update this list and the one in litest.c when new group names are
|
||||
# required
|
||||
groups = [
|
||||
'config', 'context', 'device', 'events', 'gestures', 'keyboard', 'lid',
|
||||
'log', 'misc', 'pad', 'path', 'pointer', 'quirks', 'switch', 'tablet',
|
||||
'tablet-mode', 'tap', 'timer', 'totem', 'touch', 'touchpad', 'trackball',
|
||||
'trackpoint', 'udev',
|
||||
]
|
||||
foreach group : groups
|
||||
test('libinput-test-suite-@0@'.format(group),
|
||||
libinput_test_runner,
|
||||
suite : ['all', 'valgrind', 'root', 'hardware'],
|
||||
args : ['--filter-group=@0@:*'.format(group)],
|
||||
is_parallel : false,
|
||||
timeout : 1200)
|
||||
endforeach
|
||||
|
||||
test('libinput-test-deviceless',
|
||||
libinput_test_runner,
|
||||
|
|
|
|||
|
|
@ -381,6 +381,25 @@ static struct suite *
|
|||
get_suite(const char *name)
|
||||
{
|
||||
struct suite *s;
|
||||
/* this is the list meson calls, ensure we don't miss out on tests */
|
||||
const char * allowed_suites[] = {
|
||||
"config:", "context:", "device:", "events:", "gestures:",
|
||||
"keyboard:", "lid:", "log:", "misc:", "pad:", "path:",
|
||||
"pointer:", "quirks:", "switch:", "tablet:", "tablet-mode:",
|
||||
"tap:", "timer:", "totem:", "touch:", "touchpad:",
|
||||
"trackball:", "trackpoint:", "udev:",
|
||||
};
|
||||
const char **allowed;
|
||||
bool found = false;
|
||||
|
||||
ARRAY_FOR_EACH(allowed_suites, allowed) {
|
||||
if (strneq(name, *allowed, strlen(*allowed))) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
litest_abort_msg("Suite name '%s' is not allowed\n", name);
|
||||
|
||||
list_for_each(s, &all_tests, node) {
|
||||
if (streq(s->name, name))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue