Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEL-6243 Fix unit tests #346

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
TEL-6243 Fix initialization of test suite.
damirn committed Dec 2, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 0460e53696449931d93564ecd63efa109e5f980a
10 changes: 10 additions & 0 deletions src/include/test/switch_test.h
Original file line number Diff line number Diff line change
@@ -260,7 +260,10 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
switch_time_t fst_time_start = 0; \
switch_timer_t fst_timer = { 0 }; \
switch_memory_pool_t *fst_pool = NULL; \
switch_memory_pool_t *telnyx_pool = NULL; \
int fst_timer_started = 0; \
switch_core_new_memory_pool(&telnyx_pool); \
switch_telnyx_init(telnyx_pool); \
fst_getenv_default("FST_SUPPRESS_UNUSED_STATIC_WARNING", NULL, SWITCH_FALSE); \
if (fst_core) { \
fst_init_core_and_modload(NULL, NULL, 0, 0); /* shuts up compiler */ \
@@ -288,7 +291,10 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
switch_time_t fst_time_start = 0; \
switch_timer_t fst_timer = { 0 }; \
switch_memory_pool_t *fst_pool = NULL; \
switch_memory_pool_t *telnyx_pool = NULL; \
int fst_timer_started = 0; \
switch_core_new_memory_pool(&telnyx_pool); \
switch_telnyx_init(telnyx_pool); \
fst_getenv_default("FST_SUPPRESS_UNUSED_STATIC_WARNING", NULL, SWITCH_FALSE); \
if (fst_init_core_and_modload(confdir, confdir, 0, flags | SCF_LOG_DISABLE) == SWITCH_STATUS_SUCCESS) { \
fst_core = 2; \
@@ -309,6 +315,7 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
/* shut up compiler */ \
fst_time_start = 0; \
} \
switch_core_destroy_memory_pool(&telnyx_pool); \
} \
FCT_END()

@@ -325,7 +332,10 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
switch_time_t fst_time_start = 0; \
switch_timer_t fst_timer = { 0 }; \
switch_memory_pool_t *fst_pool = NULL; \
switch_memory_pool_t *telnyx_pool = NULL; \
int fst_timer_started = 0; \
switch_core_new_memory_pool(&telnyx_pool); \
switch_telnyx_init(telnyx_pool); \
fst_getenv_default("FST_SUPPRESS_UNUSED_STATIC_WARNING", NULL, SWITCH_FALSE); \
if (fst_init_core_and_modload(confdir, NULL, 1, 0 | SCF_LOG_DISABLE) == SWITCH_STATUS_SUCCESS) { /* minimal load */ \
fst_core = 1; \