Commit ea1d2d63 authored by Jonas Ådahl's avatar Jonas Ådahl

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's avatarJonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 125e98a1
......@@ -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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment