check: run skipped tests if explicitly requested via GST_CHECKS

If a test that's disabled with tcase_skip_broken_test() is listed
in the GST_CHECKS environment variable, run it anyway.
This commit is contained in:
Tim-Philipp Müller 2013-04-18 00:19:23 +01:00
parent 8f8036f344
commit e2b09b1ab9

View file

@ -570,9 +570,15 @@ __gst_tcase_add_test (TCase * tc, TFun tf, const char * fname, int signal,
/* add define to skip broken tests */
#define tcase_skip_broken_test(chain,test_func) \
if (0) { tcase_add_test(chain,test_func); } else { \
G_STMT_START { \
const char *env = g_getenv ("GST_CHECKS"); \
\
if (env != NULL && strstr (env, G_STRINGIFY (test_func))) { \
tcase_add_test(chain,test_func); \
} else { \
g_printerr ("FIXME: skipping test %s because it's broken\n", G_STRINGIFY (test_func)); \
}
} \
} G_STMT_END
G_END_DECLS