提交 38f5fec6 编写于 作者: G guozhanxin

[utest] 完善代码,添加对tc_num的判断

上级 4af99b0d
......@@ -83,13 +83,16 @@ int utest_init(void)
tc_num = (utest_tc_export_t) &__rt_utest_tc_tab_end - tc_table;
#endif
tc_fail_list = rt_malloc(TC_FAIL_LIST_SIZE);
if(!tc_fail_list)
{
LOG_E("no memory, tc_fail_list init failed!");
}
LOG_I("utest is initialize success.");
LOG_I("total utest testcase num: (%d)", tc_num);
if (tc_num > 0)
{
tc_fail_list = rt_malloc(TC_FAIL_LIST_SIZE);
if(!tc_fail_list)
{
LOG_E("no memory, tc_fail_list init failed!");
}
}
return tc_num;
}
INIT_COMPONENT_EXPORT(utest_init);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册