Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
9047e7be
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
1 年多 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9047e7be
编写于
4月 28, 2021
作者:
L
lanxueyuan
提交者:
Gitee
4月 28, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change test case to lv1
上级
a63c6e80
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
18 deletion
+18
-18
services/test/unittest/common/cmd_func_test.cpp
services/test/unittest/common/cmd_func_test.cpp
+18
-18
未找到文件。
services/test/unittest/common/cmd_func_test.cpp
浏览文件 @
9047e7be
...
@@ -135,7 +135,7 @@ public:
...
@@ -135,7 +135,7 @@ public:
** @tc.type: FUNC
** @tc.type: FUNC
** @tc.require: AR000F733F
** @tc.require: AR000F733F
**/
**/
HWTEST_F
(
StartupInitUTest
,
cmdFuncParseCmdTest_001
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cmdFuncParseCmdTest_001
,
TestSize
.
Level
1
)
{
{
// do not crash
// do not crash
ParseCmdLine
(
nullptr
,
nullptr
);
ParseCmdLine
(
nullptr
,
nullptr
);
...
@@ -147,7 +147,7 @@ HWTEST_F(StartupInitUTest, cmdFuncParseCmdTest_001, TestSize.Level0)
...
@@ -147,7 +147,7 @@ HWTEST_F(StartupInitUTest, cmdFuncParseCmdTest_001, TestSize.Level0)
** @tc.type: FUNC
** @tc.type: FUNC
** @tc.require: AR000F733F
** @tc.require: AR000F733F
**/
**/
HWTEST_F
(
StartupInitUTest
,
cmdFuncParseCmdTest_002
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cmdFuncParseCmdTest_002
,
TestSize
.
Level
1
)
{
{
CmdLine
curCmdLine
;
CmdLine
curCmdLine
;
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
...
@@ -175,7 +175,7 @@ HWTEST_F(StartupInitUTest, cmdFuncParseCmdTest_002, TestSize.Level0)
...
@@ -175,7 +175,7 @@ HWTEST_F(StartupInitUTest, cmdFuncParseCmdTest_002, TestSize.Level0)
** @tc.type: FUNC
** @tc.type: FUNC
** @tc.require: AR000F733F
** @tc.require: AR000F733F
**/
**/
HWTEST_F
(
StartupInitUTest
,
cmdFuncParseCmdTest_003
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cmdFuncParseCmdTest_003
,
TestSize
.
Level
1
)
{
{
CmdLine
curCmdLine
;
CmdLine
curCmdLine
;
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
...
@@ -193,7 +193,7 @@ HWTEST_F(StartupInitUTest, cmdFuncParseCmdTest_003, TestSize.Level0)
...
@@ -193,7 +193,7 @@ HWTEST_F(StartupInitUTest, cmdFuncParseCmdTest_003, TestSize.Level0)
** @tc.type: FUNC
** @tc.type: FUNC
** @tc.require: AR000F733F
** @tc.require: AR000F733F
**/
**/
HWTEST_F
(
StartupInitUTest
,
cmdFuncParseCmdTest_004
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cmdFuncParseCmdTest_004
,
TestSize
.
Level
1
)
{
{
CmdLine
curCmdLine
;
CmdLine
curCmdLine
;
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
...
@@ -234,7 +234,7 @@ HWTEST_F(StartupInitUTest, cmdFuncParseCmdTest_004, TestSize.Level0)
...
@@ -234,7 +234,7 @@ HWTEST_F(StartupInitUTest, cmdFuncParseCmdTest_004, TestSize.Level0)
** @tc.type: FUNC
** @tc.type: FUNC
** @tc.require: AR000F733E
** @tc.require: AR000F733E
**/
**/
HWTEST_F
(
StartupInitUTest
,
cmdFuncParseCmdTest_005
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cmdFuncParseCmdTest_005
,
TestSize
.
Level
1
)
{
{
CmdLine
curCmdLine
;
CmdLine
curCmdLine
;
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
...
@@ -266,7 +266,7 @@ HWTEST_F(StartupInitUTest, cmdFuncParseCmdTest_005, TestSize.Level0)
...
@@ -266,7 +266,7 @@ HWTEST_F(StartupInitUTest, cmdFuncParseCmdTest_005, TestSize.Level0)
** @tc.type: FUNC
** @tc.type: FUNC
** @tc.require: AR000F733E
** @tc.require: AR000F733E
**/
**/
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoCmdTest_001
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoCmdTest_001
,
TestSize
.
Level
1
)
{
{
// do not crash here
// do not crash here
DoCmd
(
nullptr
);
DoCmd
(
nullptr
);
...
@@ -278,7 +278,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoCmdTest_001, TestSize.Level0)
...
@@ -278,7 +278,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoCmdTest_001, TestSize.Level0)
** @tc.type: FUNC
** @tc.type: FUNC
** @tc.require: AR000F733E
** @tc.require: AR000F733E
**/
**/
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoCmdTest_002
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoCmdTest_002
,
TestSize
.
Level
1
)
{
{
CmdLine
curCmdLine
;
CmdLine
curCmdLine
;
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
...
@@ -297,7 +297,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoCmdTest_002, TestSize.Level0)
...
@@ -297,7 +297,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoCmdTest_002, TestSize.Level0)
** @tc.type: FUNC
** @tc.type: FUNC
** @tc.require: AR000F733E
** @tc.require: AR000F733E
**/
**/
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoCmdTest_003
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoCmdTest_003
,
TestSize
.
Level
1
)
{
{
CmdLine
curCmdLine
;
CmdLine
curCmdLine
;
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
...
@@ -341,7 +341,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoCmdTest_003, TestSize.Level0)
...
@@ -341,7 +341,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoCmdTest_003, TestSize.Level0)
** @tc.type: FUNC
** @tc.type: FUNC
** @tc.require: AR000F732P
** @tc.require: AR000F732P
**/
**/
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoCmdTest_004
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoCmdTest_004
,
TestSize
.
Level
1
)
{
{
CmdLine
curCmdLine
;
CmdLine
curCmdLine
;
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
...
@@ -393,7 +393,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoCmdTest_004, TestSize.Level0)
...
@@ -393,7 +393,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoCmdTest_004, TestSize.Level0)
** @tc.type: FUNC
** @tc.type: FUNC
** @tc.require: AR000F732P
** @tc.require: AR000F732P
**/
**/
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoCmdTest_005
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoCmdTest_005
,
TestSize
.
Level
1
)
{
{
CmdLine
curCmdLine
;
CmdLine
curCmdLine
;
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
...
@@ -434,7 +434,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoCmdTest_005, TestSize.Level0)
...
@@ -434,7 +434,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoCmdTest_005, TestSize.Level0)
** @tc.type: FUNC
** @tc.type: FUNC
** @tc.require: AR000F732P
** @tc.require: AR000F732P
**/
**/
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoCmdTest_006
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoCmdTest_006
,
TestSize
.
Level
1
)
{
{
CmdLine
curCmdLine
;
CmdLine
curCmdLine
;
...
@@ -499,7 +499,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoCmdTest_006, TestSize.Level0)
...
@@ -499,7 +499,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoCmdTest_006, TestSize.Level0)
** @tc.type: FUNC
** @tc.type: FUNC
** @tc.require: AR000F733F
** @tc.require: AR000F733F
**/
**/
HWTEST_F
(
StartupInitUTest
,
cfgCheckStat_001
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cfgCheckStat_001
,
TestSize
.
Level
1
)
{
{
struct
stat
fileStat
=
{
0
};
struct
stat
fileStat
=
{
0
};
EXPECT_EQ
(
0
,
stat
(
CFG_FILE
.
c_str
(),
&
fileStat
));
EXPECT_EQ
(
0
,
stat
(
CFG_FILE
.
c_str
(),
&
fileStat
));
...
@@ -764,7 +764,7 @@ static void CheckJobs(const cJSON* fileRoot)
...
@@ -764,7 +764,7 @@ static void CheckJobs(const cJSON* fileRoot)
** @tc.type: FUNC
** @tc.type: FUNC
** @tc.require: AR000F733F
** @tc.require: AR000F733F
**/
**/
HWTEST_F
(
StartupInitUTest
,
cfgCheckContent_001
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cfgCheckContent_001
,
TestSize
.
Level
1
)
{
{
char
*
fileBuf
=
ReadFileToBuf
();
char
*
fileBuf
=
ReadFileToBuf
();
if
(
fileBuf
==
nullptr
)
{
if
(
fileBuf
==
nullptr
)
{
...
@@ -814,7 +814,7 @@ static void CreateIllegalCfg()
...
@@ -814,7 +814,7 @@ static void CreateIllegalCfg()
* @tc.type: FUNC
* @tc.type: FUNC
* @tc.require: AR000F861Q
* @tc.require: AR000F861Q
*/
*/
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoLoadCfgTest_001
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoLoadCfgTest_001
,
TestSize
.
Level
1
)
{
{
CmdLine
curCmdLine
;
CmdLine
curCmdLine
;
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
memset_s
(
&
curCmdLine
,
sizeof
(
curCmdLine
),
0
,
sizeof
(
curCmdLine
));
...
@@ -830,7 +830,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoLoadCfgTest_001, TestSize.Level0)
...
@@ -830,7 +830,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoLoadCfgTest_001, TestSize.Level0)
* @tc.type: FUNC
* @tc.type: FUNC
* @tc.require: AR000F861Q
* @tc.require: AR000F861Q
*/
*/
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoLoadCfgTest_002
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoLoadCfgTest_002
,
TestSize
.
Level
1
)
{
{
CmdLine
curCmdLine
;
CmdLine
curCmdLine
;
std
::
string
cmdStr
=
"loadcfg "
;
std
::
string
cmdStr
=
"loadcfg "
;
...
@@ -868,7 +868,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoLoadCfgTest_002, TestSize.Level0)
...
@@ -868,7 +868,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoLoadCfgTest_002, TestSize.Level0)
* @tc.type: FUNC
* @tc.type: FUNC
* @tc.require: AR000F861Q
* @tc.require: AR000F861Q
*/
*/
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoLoadCfgTest_003
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cmdFuncDoLoadCfgTest_003
,
TestSize
.
Level
1
)
{
{
CmdLine
curCmdLine
;
CmdLine
curCmdLine
;
std
::
string
cmdStr
=
"loadcfg "
;
std
::
string
cmdStr
=
"loadcfg "
;
...
@@ -916,7 +916,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoLoadCfgTest_003, TestSize.Level0)
...
@@ -916,7 +916,7 @@ HWTEST_F(StartupInitUTest, cmdFuncDoLoadCfgTest_003, TestSize.Level0)
* @tc.type: FUNC
* @tc.type: FUNC
* @tc.require: AR000F733F
* @tc.require: AR000F733F
*/
*/
HWTEST_F
(
StartupInitUTest
,
cmdJobTest_001
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cmdJobTest_001
,
TestSize
.
Level
1
)
{
{
// functions do not crash
// functions do not crash
ParseAllJobs
(
nullptr
);
ParseAllJobs
(
nullptr
);
...
@@ -938,7 +938,7 @@ HWTEST_F(StartupInitUTest, cmdJobTest_001, TestSize.Level0)
...
@@ -938,7 +938,7 @@ HWTEST_F(StartupInitUTest, cmdJobTest_001, TestSize.Level0)
* @tc.type: FUNC
* @tc.type: FUNC
* @tc.require: AR000F733F
* @tc.require: AR000F733F
*/
*/
HWTEST_F
(
StartupInitUTest
,
cmdJobTest_002
,
TestSize
.
Level
0
)
HWTEST_F
(
StartupInitUTest
,
cmdJobTest_002
,
TestSize
.
Level
1
)
{
{
std
::
string
cfgJson
=
"{
\"
jobs
\"
:[{
\"
name
\"
:
\"
pre-init
\"
,
\"
cmds
\"
:[
\"
mkdir "
+
std
::
string
cfgJson
=
"{
\"
jobs
\"
:[{
\"
name
\"
:
\"
pre-init
\"
,
\"
cmds
\"
:[
\"
mkdir "
+
PRE_INIT_DIR
+
"
\"
]},{
\"
name
\"
:
\"
init
\"
,
\"
cmds
\"
:[
\"
mkdir "
+
INIT_DIR
+
PRE_INIT_DIR
+
"
\"
]},{
\"
name
\"
:
\"
init
\"
,
\"
cmds
\"
:[
\"
mkdir "
+
INIT_DIR
+
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录