mirror of
https://github.com/cuberite/libevent.git
synced 2025-08-04 01:36:23 -04:00
test: introduce TT_ENABLE_DEBUG_MODE flag
(cherry picked from commit 6186d3126f124494dd90b14f62c17b47f7a7f484)
This commit is contained in:
parent
4a6f1ccfae
commit
0126814f2f
@ -95,6 +95,7 @@ extern int libevent_tests_running_in_debug_mode;
|
||||
#define TT_NO_LOGS (TT_FIRST_USER_FLAG<<5)
|
||||
#define TT_ENABLE_IOCP_FLAG (TT_FIRST_USER_FLAG<<6)
|
||||
#define TT_ENABLE_IOCP (TT_ENABLE_IOCP_FLAG|TT_NEED_THREADS)
|
||||
#define TT_ENABLE_DEBUG_MODE (TT_ENABLE_IOCP_FLAG<<7)
|
||||
|
||||
/* All the flags that a legacy test needs. */
|
||||
#define TT_ISOLATED TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_BASE
|
||||
|
@ -197,6 +197,11 @@ basic_test_setup(const struct testcase_t *testcase)
|
||||
if (testcase->flags & TT_ENABLE_IOCP_FLAG)
|
||||
return (void*)TT_SKIP;
|
||||
#endif
|
||||
|
||||
if (testcase->flags & TT_ENABLE_DEBUG_MODE) {
|
||||
event_enable_debug_mode();
|
||||
libevent_tests_running_in_debug_mode = 1;
|
||||
}
|
||||
|
||||
if (testcase->flags & TT_NEED_THREADS) {
|
||||
if (!(testcase->flags & TT_FORK))
|
||||
|
Loading…
x
Reference in New Issue
Block a user