test: if we don't have a uinput device node, skip the test suite

When running ninja dist in a container, we cannot create devices.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2017-11-01 14:19:21 +10:00
parent 8a2177b3ba
commit 026a215a65

View file

@ -3583,6 +3583,13 @@ main(int argc, char **argv)
return 77;
}
if (access("/dev/uinput", F_OK) == -1 &&
access("/dev/input/uinput", F_OK) == -1) {
fprintf(stderr,
"uinput device is missing, skipping tests.\n");
return 77;
}
litest_init_test_devices();
list_init(&all_tests);