glib-aux/tests: add nmtst_test_skip_slow() helper

This commit is contained in:
Thomas Haller 2022-01-17 17:48:45 +01:00
parent eda2c5ac48
commit ee3e2e0bb6
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -709,6 +709,17 @@ nmtst_test_quick(void)
return __nmtst_internal.test_quick;
}
static inline gboolean
nmtst_test_skip_slow(void)
{
if (!nmtst_test_quick())
return FALSE;
g_print("Skipping test: don't run long running test %s (NMTST_DEBUG=slow)\n", g_get_prgname());
g_test_skip("Skip long running test");
return TRUE;
}
#if GLIB_CHECK_VERSION(2, 34, 0)
#undef g_test_expect_message
#define g_test_expect_message(...) \