mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-21 16:50:42 +01:00
test/path: Avoid creating ignored test devices
Some tests doesn't use or doesn't need to use the test device automatically created when adding a test case for certain types of devices. For these tests, to shorten test run time, don't create the test devices that would be ignored. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
125e98a1f8
commit
ea1d2d6348
1 changed files with 15 additions and 15 deletions
30
test/path.c
30
test/path.c
|
|
@ -243,12 +243,11 @@ END_TEST
|
|||
|
||||
START_TEST(path_add_invalid_path)
|
||||
{
|
||||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
struct libinput *li;
|
||||
struct libinput_event *event;
|
||||
struct libinput_device *device;
|
||||
|
||||
litest_drain_events(li);
|
||||
li = litest_create_context();
|
||||
|
||||
device = libinput_path_add_device(li, "/tmp/");
|
||||
ck_assert(device == NULL);
|
||||
|
|
@ -257,6 +256,8 @@ START_TEST(path_add_invalid_path)
|
|||
|
||||
while ((event = libinput_get_event(li)))
|
||||
ck_abort();
|
||||
|
||||
libinput_unref(li);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
|
@ -794,24 +795,23 @@ END_TEST
|
|||
|
||||
int main (int argc, char **argv) {
|
||||
|
||||
litest_add("path:create", path_create_NULL, LITEST_ANY, LITEST_ANY);
|
||||
litest_add("path:create", path_create_invalid, LITEST_ANY, LITEST_ANY);
|
||||
litest_add("path:create", path_create_destroy, LITEST_ANY, LITEST_ANY);
|
||||
litest_add("path:suspend", path_suspend, LITEST_ANY, LITEST_ANY);
|
||||
litest_add("path:suspend", path_double_suspend, LITEST_ANY, LITEST_ANY);
|
||||
litest_add("path:suspend", path_double_resume, LITEST_ANY, LITEST_ANY);
|
||||
litest_add("path:suspend", path_add_device_suspend_resume, LITEST_ANY, LITEST_ANY);
|
||||
litest_add("path:suspend", path_add_device_suspend_resume_fail, LITEST_ANY, LITEST_ANY);
|
||||
litest_add("path:suspend", path_add_device_suspend_resume_remove_device, LITEST_ANY, LITEST_ANY);
|
||||
litest_add_no_device("path:create", path_create_NULL);
|
||||
litest_add_no_device("path:create", path_create_invalid);
|
||||
litest_add_no_device("path:create", path_create_destroy);
|
||||
litest_add_no_device("path:suspend", path_suspend);
|
||||
litest_add_no_device("path:suspend", path_double_suspend);
|
||||
litest_add_no_device("path:suspend", path_double_resume);
|
||||
litest_add_no_device("path:suspend", path_add_device_suspend_resume);
|
||||
litest_add_no_device("path:suspend", path_add_device_suspend_resume_fail);
|
||||
litest_add_no_device("path:suspend", path_add_device_suspend_resume_remove_device);
|
||||
litest_add("path:seat events", path_added_seat, LITEST_ANY, LITEST_ANY);
|
||||
litest_add("path:device events", path_added_device, LITEST_ANY, LITEST_ANY);
|
||||
litest_add("path:device events", path_device_sysname, LITEST_ANY, LITEST_ANY);
|
||||
litest_add("path:device events", path_add_device, LITEST_ANY, LITEST_ANY);
|
||||
litest_add("path:device events", path_add_invalid_path, LITEST_ANY, LITEST_ANY);
|
||||
litest_add_no_device("path:device events", path_add_invalid_path);
|
||||
litest_add("path:device events", path_remove_device, LITEST_ANY, LITEST_ANY);
|
||||
litest_add("path:device events", path_double_remove_device, LITEST_ANY, LITEST_ANY);
|
||||
litest_add("path:seat", path_seat_recycle,
|
||||
LITEST_DISABLE_DEVICE, LITEST_DISABLE_DEVICE);
|
||||
litest_add_no_device("path:seat", path_seat_recycle);
|
||||
|
||||
return litest_run(argc, argv);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue