forked from enlightenment/efl
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:
parent
ebf1f71194
commit
abd1db8b1e
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue