tests: add macros to selectively disable aborting on critical log messages

in many cases, a test will intentionally trigger an error to verify that it
is handled correctly. when the test is manually run with EINA_LOG_ABORT set,
this may cause the test to abort, preventing further debugging. by wrapping
intentional cases where critical errors are triggered, debugging tests
becomes easier

ref T7002

Differential Revision: https://phab.enlightenment.org/D6269
This commit is contained in:
Mike Blumenkrantz 2018-06-12 16:57:48 -04:00 committed by Marcel Hollerbach
parent ebf1f71194
commit abd1db8b1e
1 changed files with 9 additions and 0 deletions

View File

@ -38,6 +38,15 @@
# endif
#endif
#define DISABLE_ABORT_ON_CRITICAL_START \
do { \
int ___val = eina_log_abort_on_critical_get(); \
eina_log_abort_on_critical_set(0)
#define DISABLE_ABORT_ON_CRITICAL_END \
eina_log_abort_on_critical_set(___val); \
} while (0)
typedef struct _Efl_Test_Case Efl_Test_Case;
struct _Efl_Test_Case
{