From 026a215a6557dd27d708828fdc333743d4c0ef19 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 1 Nov 2017 14:19:21 +1000 Subject: [PATCH] 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 --- test/litest.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/litest.c b/test/litest.c index 63745244..021e19f1 100644 --- a/test/litest.c +++ b/test/litest.c @@ -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);