The gpio-mockup helper library checks the kernel version itself when
creating the context object. We then check the version again (as the
minimum versions for libgpiomockup and the test-suite may differ) in
the test-suite's main function. Make sure the library runs the check
first as we don't want to tell the user the version is OK and then
fail because it isn't...
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
msg("libgpiod test suite");
msg("%u tests registered", globals.num_tests);
- check_kernel();
- check_tool_path();
-
globals.mockup = gpio_mockup_new();
if (!globals.mockup)
die_perr("error checking the availability of gpio-mockup");
+ check_kernel();
+ check_tool_path();
+
msg("running tests");
for (test = globals.test_list_head; test; test = test->_next) {