tests: call g_test_run() even when skipping the test

It will return the 77 exit code itself. For TAP output it will also generate
the proper test skip marker.
This commit is contained in:
Lubomir Rintel 2015-05-14 14:43:05 +02:00
parent d0e25ac8be
commit 14f4674f64
3 changed files with 2 additions and 5 deletions

View file

@ -103,9 +103,6 @@
#include "nm-keyfile-internal.h"
#endif
/* Analog to EXIT_SUCCESS and EXIT_FAILURE. */
#define EXIT_SKIP (77)
/*******************************************************************************/
/* general purpose functions that have no dependency on other nmtst functions */

View file

@ -295,7 +295,7 @@ main (int argc, char **argv)
return EXIT_FAILURE;
#else
g_print ("Skipping test: requires root privileges (%s)\n", program);
return EXIT_SKIP;
return g_test_run ();
#endif
}

View file

@ -439,7 +439,7 @@ main (int argc, char **argv)
if (nmtst_test_quick ()) {
g_print ("Skipping test: don't run long running test %s (NMTST_DEBUG=slow)\n", str_if_set (g_get_prgname (), "test-rdisc-fake"));
return EXIT_SKIP;
return g_test_run ();
}
nm_fake_platform_setup ();