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.

(cherry picked from commit 14f4674f64)
This commit is contained in:
Lubomir Rintel 2015-05-14 14:43:05 +02:00 committed by Thomas Haller
parent 0e20868f4f
commit 30d37abbc0
3 changed files with 2 additions and 5 deletions

View file

@ -97,9 +97,6 @@
#include "gsystem-local-alloc.h"
/* 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 ();