test: skip the test-suite runner based on SKIP_LIBINPUT_TEST_SUITE_RUNNER
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 21 Jun 2018 05:32:02 +0000 (15:32 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 21 Jun 2018 05:46:04 +0000 (15:46 +1000)
The current /dev/input/* check isn't reliable enough. So rather than adding
extra heuristics prone to fail add an environment variable that says "do not
run the test suite runner". All other tests are run since they do not
require/modify any specific system setup.

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/62

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/litest.c

index 23a9cde..2080157 100644 (file)
@@ -3887,6 +3887,9 @@ main(int argc, char **argv)
        int tty_mode = -1;
        int failed_tests;
 
+       if (getenv("SKIP_LIBINPUT_TEST_SUITE_RUNNER"))
+               return 77;
+
        if (getuid() != 0) {
                fprintf(stderr,
                        "%s must be run as root.\n",