mu-test: add valgrind check
Make it a bit easier to skip some tests when running under valgrind.
This commit is contained in:
@ -42,6 +42,13 @@ Mu::mu_test_mu_hacker()
|
||||
{
|
||||
return !!g_getenv("MU_HACKER");
|
||||
}
|
||||
|
||||
bool
|
||||
Mu::mu_test_mu_valgrind()
|
||||
{
|
||||
return !!g_getenv("MU_VALGRIND");
|
||||
}
|
||||
|
||||
/* LCOV_EXCL_STOP*/
|
||||
|
||||
|
||||
|
||||
@ -43,6 +43,23 @@ void mu_test_init(int *argc, char ***argv);
|
||||
*/
|
||||
bool mu_test_mu_hacker();
|
||||
|
||||
/**
|
||||
* Are we running under Valgrind?
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
bool mu_test_mu_valgrind();
|
||||
|
||||
/**
|
||||
* Skip test when running under valgrind
|
||||
*/
|
||||
#define mu_test_skip_valgrind_return() do { \
|
||||
if (mu_test_mu_valgrind()) { \
|
||||
g_test_skip("skip (valgrind not supported)"); \
|
||||
return; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
/**
|
||||
* set the timezone
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user