Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
3c11fa96
提交
3c11fa96
authored
4月 27, 2019
作者:
Chris Rienzo
提交者:
Andrey Volk
7月 09, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-11781 [test] try again with the test fix- need to have pool allocated sooner
上级
d4f1af83
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
15 行增加
和
7 行删除
+15
-7
switch_test.h
src/include/test/switch_test.h
+15
-7
没有找到文件。
src/include/test/switch_test.h
浏览文件 @
3c11fa96
...
@@ -253,6 +253,7 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
...
@@ -253,6 +253,7 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
switch_time_t fst_time_start = 0; \
switch_time_t fst_time_start = 0; \
switch_timer_t fst_timer = { 0 }; \
switch_timer_t fst_timer = { 0 }; \
switch_memory_pool_t *fst_pool = NULL; \
switch_memory_pool_t *fst_pool = NULL; \
int fst_timer_started = 0; \
fst_getenv_default("FST_SUPPRESS_UNUSED_STATIC_WARNING", NULL, SWITCH_FALSE); \
fst_getenv_default("FST_SUPPRESS_UNUSED_STATIC_WARNING", NULL, SWITCH_FALSE); \
if (fst_core) { \
if (fst_core) { \
fst_init_core_and_modload(NULL, NULL, 0);
/* shuts up compiler */
\
fst_init_core_and_modload(NULL, NULL, 0);
/* shuts up compiler */
\
...
@@ -280,6 +281,7 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
...
@@ -280,6 +281,7 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
switch_time_t fst_time_start = 0; \
switch_time_t fst_time_start = 0; \
switch_timer_t fst_timer = { 0 }; \
switch_timer_t fst_timer = { 0 }; \
switch_memory_pool_t *fst_pool = NULL; \
switch_memory_pool_t *fst_pool = NULL; \
int fst_timer_started = 0; \
fst_getenv_default("FST_SUPPRESS_UNUSED_STATIC_WARNING", NULL, SWITCH_FALSE); \
fst_getenv_default("FST_SUPPRESS_UNUSED_STATIC_WARNING", NULL, SWITCH_FALSE); \
if (fst_init_core_and_modload(confdir, confdir, 0) == SWITCH_STATUS_SUCCESS) { \
if (fst_init_core_and_modload(confdir, confdir, 0) == SWITCH_STATUS_SUCCESS) { \
fst_core = 2; \
fst_core = 2; \
...
@@ -313,6 +315,7 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
...
@@ -313,6 +315,7 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
switch_time_t fst_time_start = 0; \
switch_time_t fst_time_start = 0; \
switch_timer_t fst_timer = { 0 }; \
switch_timer_t fst_timer = { 0 }; \
switch_memory_pool_t *fst_pool = NULL; \
switch_memory_pool_t *fst_pool = NULL; \
int fst_timer_started = 0; \
fst_getenv_default("FST_SUPPRESS_UNUSED_STATIC_WARNING", NULL, SWITCH_FALSE); \
fst_getenv_default("FST_SUPPRESS_UNUSED_STATIC_WARNING", NULL, SWITCH_FALSE); \
if (fst_init_core_and_modload(".", NULL, 1) == SWITCH_STATUS_SUCCESS) {
/* minimal load */
\
if (fst_init_core_and_modload(".", NULL, 1) == SWITCH_STATUS_SUCCESS) {
/* minimal load */
\
fst_core = 1; \
fst_core = 1; \
...
@@ -387,7 +390,14 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
...
@@ -387,7 +390,14 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
/**
/**
* Define the test suite setup. This is run before each test or session test.
* Define the test suite setup. This is run before each test or session test.
*/
*/
#define FST_SETUP_BEGIN FCT_SETUP_BGN
#define FST_SETUP_BEGIN() \
FCT_SETUP_BGN() \
if (fst_core) { \
switch_core_new_memory_pool(&fst_pool); \
if (fst_core > 1) { \
fst_timer_started = (switch_core_timer_init(&fst_timer, "soft", 20, 160, fst_pool) == SWITCH_STATUS_SUCCESS); \
} \
}
/**
/**
* Define the end of test suite setup.
* Define the end of test suite setup.
...
@@ -401,9 +411,9 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
...
@@ -401,9 +411,9 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
#define FST_TEARDOWN_BEGIN() \
#define FST_TEARDOWN_BEGIN() \
FCT_TEARDOWN_BGN() \
FCT_TEARDOWN_BGN() \
if (fst_core) { \
if (fst_core) { \
switch_core_destroy_memory_pool(&fst_pool); \
if (fst_pool)
switch_core_destroy_memory_pool(&fst_pool); \
if (fst_core > 1) { \
if (fst_core > 1) { \
switch_core_timer_destroy(&fst_timer); \
if (fst_timer_started)
switch_core_timer_destroy(&fst_timer); \
} \
} \
}
}
...
@@ -422,10 +432,9 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
...
@@ -422,10 +432,9 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
#define FST_TEST_BEGIN(name) \
#define FST_TEST_BEGIN(name) \
FCT_TEST_BGN(name) \
FCT_TEST_BGN(name) \
if (fst_core) { \
if (fst_core) { \
switch_core_new_memory_pool(&fst_pool); \
fst_requires(fst_pool != NULL); \
fst_requires(fst_pool != NULL); \
if (fst_core > 1) { \
if (fst_core > 1) { \
fst_requires(
switch_core_timer_init(&fst_timer, "soft", 20, 160, fst_pool) == SWITCH_STATUS_SUCCESS
); \
fst_requires(
fst_timer_started
); \
} \
} \
fst_time_mark(); \
fst_time_mark(); \
} \
} \
...
@@ -460,10 +469,9 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
...
@@ -460,10 +469,9 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
FCT_TEST_BGN(name) \
FCT_TEST_BGN(name) \
{ \
{ \
if (fst_core) { \
if (fst_core) { \
switch_core_new_memory_pool(&fst_pool); \
fst_requires(fst_pool != NULL); \
fst_requires(fst_pool != NULL); \
if (fst_core > 1) { \
if (fst_core > 1) { \
fst_requires(
switch_core_timer_init(&fst_timer, "soft", 20, 160, fst_pool) == SWITCH_STATUS_SUCCESS
); \
fst_requires(
fst_timer_started
); \
} \
} \
fst_time_mark(); \
fst_time_mark(); \
} \
} \
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论