test: prevent duplicate event_enable_debug_mode() for TT_ENABLE_DEBUG_MODE

(cherry picked from commit 70daa93a514075eb0102eec4c6e5002b114264a9)
This commit is contained in:
Jan Kasiak 2019-08-27 01:00:56 -04:00 committed by Azat Khuzhin
parent 0126814f2f
commit 23af76de0a

View File

@ -197,8 +197,9 @@ basic_test_setup(const struct testcase_t *testcase)
if (testcase->flags & TT_ENABLE_IOCP_FLAG) if (testcase->flags & TT_ENABLE_IOCP_FLAG)
return (void*)TT_SKIP; return (void*)TT_SKIP;
#endif #endif
if (testcase->flags & TT_ENABLE_DEBUG_MODE) { if (testcase->flags & TT_ENABLE_DEBUG_MODE &&
!libevent_tests_running_in_debug_mode) {
event_enable_debug_mode(); event_enable_debug_mode();
libevent_tests_running_in_debug_mode = 1; libevent_tests_running_in_debug_mode = 1;
} }