Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
2a56c9e2
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2a56c9e2
编写于
7月 14, 2021
作者:
Y
youyouyuai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
codeing style
Signed-off-by:
N
youyouyuai
<
youyouyuailj@163.com
>
上级
9312a1be
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
33 addition
and
67 deletion
+33
-67
hiviewdfx/hilogtest/libhilogtest/flowcontroltest/flowcontroltest.cpp
...ilogtest/libhilogtest/flowcontroltest/flowcontroltest.cpp
+20
-46
hiviewdfx/hilogtest/libhilogtest/libhilogTooltest/libhilogTooltest.cpp
...ogtest/libhilogtest/libhilogTooltest/libhilogTooltest.cpp
+13
-21
未找到文件。
hiviewdfx/hilogtest/libhilogtest/flowcontroltest/flowcontroltest.cpp
浏览文件 @
2a56c9e2
...
@@ -29,24 +29,23 @@ namespace {
...
@@ -29,24 +29,23 @@ namespace {
}
}
static
const
long
long
NSEC_PER_SEC
=
1000000000ULL
;
static
const
long
long
NSEC_PER_SEC
=
1000000000ULL
;
class
TestTool
:
public
testing
::
Test
{
class
Flowcontroltest
:
public
testing
::
Test
{
public:
public:
static
void
SetUpTestCase
();
static
void
SetUpTestCase
();
static
void
TearDownTestCase
();
static
void
TearDownTestCase
();
void
SetUp
();
void
SetUp
();
void
TearDown
();
void
TearDown
();
char
buff
[
RESULT_MAX_LEN
];
char
buff
[
RESULT_MAX_LEN
];
std
::
string
input
,
result
,
expect
;
std
::
string
input
,
result
,
expect
;
};
};
void
TestTool
::
SetUp
()
void
Flowcontroltest
::
SetUp
()
{
{
}
}
void
TestTool
::
TearDown
()
void
Flowcontroltest
::
TearDown
()
{
{
}
}
void
TestTool
::
SetUpTestCase
()
void
Flowcontroltest
::
SetUpTestCase
()
{
{
ExeCmd
(
"hilog -p on"
);
ExeCmd
(
"hilog -p on"
);
ExeCmd
(
"hilog -Q domainoff"
);
ExeCmd
(
"hilog -Q domainoff"
);
...
@@ -59,7 +58,7 @@ void TestTool::SetUpTestCase()
...
@@ -59,7 +58,7 @@ void TestTool::SetUpTestCase()
ExeCmd
(
"hilog -S -t all"
);
ExeCmd
(
"hilog -S -t all"
);
ExeCmd
(
"hilog -S -D 218116608"
);
ExeCmd
(
"hilog -S -D 218116608"
);
}
}
void
TestTool
::
TearDownTestCase
()
void
Flowcontroltest
::
TearDownTestCase
()
{
{
ExeCmd
(
"hilog -p on"
);
ExeCmd
(
"hilog -p on"
);
ExeCmd
(
"hilog -Q domainoff"
);
ExeCmd
(
"hilog -Q domainoff"
);
...
@@ -76,7 +75,6 @@ void TestTool::TearDownTestCase()
...
@@ -76,7 +75,6 @@ void TestTool::TearDownTestCase()
static
long
long
HiLogTimespecSub
(
struct
timespec
a
,
struct
timespec
b
)
static
long
long
HiLogTimespecSub
(
struct
timespec
a
,
struct
timespec
b
)
{
{
long
long
ret
=
NSEC_PER_SEC
*
b
.
tv_sec
+
b
.
tv_nsec
;
long
long
ret
=
NSEC_PER_SEC
*
b
.
tv_sec
+
b
.
tv_nsec
;
ret
-=
NSEC_PER_SEC
*
a
.
tv_sec
+
a
.
tv_nsec
;
ret
-=
NSEC_PER_SEC
*
a
.
tv_sec
+
a
.
tv_nsec
;
return
ret
;
return
ret
;
}
}
...
@@ -87,7 +85,7 @@ static long long HiLogTimespecSub(struct timespec a, struct timespec b)
...
@@ -87,7 +85,7 @@ static long long HiLogTimespecSub(struct timespec a, struct timespec b)
* Flow control values can be independently set for trustlisted processes.
* Flow control values can be independently set for trustlisted processes.
* @tc.number DFX_DFT_HilogCPP_70
* @tc.number DFX_DFT_HilogCPP_70
*/
*/
HWTEST_F(
TestTool
, process_flowctrl_trustlist, TestSize.Level3)
HWTEST_F(
Flowcontroltest
, process_flowctrl_trustlist, TestSize.Level3)
{
{
#ifndef LOCALTEST
#ifndef LOCALTEST
int i = 0;
int i = 0;
...
@@ -136,7 +134,7 @@ HWTEST_F(TestTool, process_flowctrl_trustlist, TestSize.Level3)
...
@@ -136,7 +134,7 @@ HWTEST_F(TestTool, process_flowctrl_trustlist, TestSize.Level3)
* Flow control values can be independently set for trustlisted processes.
* Flow control values can be independently set for trustlisted processes.
* @tc.number DFX_DFT_HilogCPP_71
* @tc.number DFX_DFT_HilogCPP_71
*/
*/
HWTEST_F(
TestTool
, process_flowctrl_trustlist2, TestSize.Level3)
HWTEST_F(
Flowcontroltest
, process_flowctrl_trustlist2, TestSize.Level3)
{
{
#ifndef LOCALTEST
#ifndef LOCALTEST
int i = 0;
int i = 0;
...
@@ -173,11 +171,8 @@ HWTEST_F(TestTool, process_flowctrl_trustlist2, TestSize.Level3)
...
@@ -173,11 +171,8 @@ HWTEST_F(TestTool, process_flowctrl_trustlist2, TestSize.Level3)
ExeCmd("hilog -r -t all");
ExeCmd("hilog -r -t all");
ExeCmd("hilog -G 1m -t all");
ExeCmd("hilog -G 1m -t all");
}
}
#else
#else
HWTEST_F
(
Flowcontroltest
,
process_flowctrl_open
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
TestTool
,
process_flowctrl_open
,
Function
|
MediumTest
|
Level4
)
{
{
#ifndef LOCALTEST
#ifndef LOCALTEST
int
i
=
0
;
int
i
=
0
;
...
@@ -221,8 +216,7 @@ HWTEST_F(TestTool, process_flowctrl_open, Function|MediumTest|Level4)
...
@@ -221,8 +216,7 @@ HWTEST_F(TestTool, process_flowctrl_open, Function|MediumTest|Level4)
ExeCmd
(
"hilog -G 1m -t all"
);
ExeCmd
(
"hilog -G 1m -t all"
);
}
}
HWTEST_F
(
Flowcontroltest
,
process_flowctrl_close
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
TestTool
,
process_flowctrl_close
,
Function
|
MediumTest
|
Level4
)
{
{
#ifndef LOCALTEST
#ifndef LOCALTEST
int
i
=
0
;
int
i
=
0
;
...
@@ -246,9 +240,7 @@ HWTEST_F(TestTool, process_flowctrl_close, Function|MediumTest|Level4)
...
@@ -246,9 +240,7 @@ HWTEST_F(TestTool, process_flowctrl_close, Function|MediumTest|Level4)
ExeCmd
(
"hilog -G 1m -t all"
);
ExeCmd
(
"hilog -G 1m -t all"
);
}
}
HWTEST_F
(
Flowcontroltest
,
domain_flowctrl_open
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
TestTool
,
domain_flowctrl_open
,
Function
|
MediumTest
|
Level4
)
{
{
#ifndef LOCALTEST
#ifndef LOCALTEST
int
i
=
0
;
int
i
=
0
;
...
@@ -292,9 +284,7 @@ HWTEST_F(TestTool, domain_flowctrl_open, Function|MediumTest|Level4)
...
@@ -292,9 +284,7 @@ HWTEST_F(TestTool, domain_flowctrl_open, Function|MediumTest|Level4)
ExeCmd
(
"hilog -G 1m -t all"
);
ExeCmd
(
"hilog -G 1m -t all"
);
}
}
HWTEST_F
(
Flowcontroltest
,
domain_flowctrl_close
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
TestTool
,
domain_flowctrl_close
,
Function
|
MediumTest
|
Level4
)
{
{
#ifndef LOCALTEST
#ifndef LOCALTEST
int
i
=
0
;
int
i
=
0
;
...
@@ -318,9 +308,7 @@ HWTEST_F(TestTool, domain_flowctrl_close, Function|MediumTest|Level4)
...
@@ -318,9 +308,7 @@ HWTEST_F(TestTool, domain_flowctrl_close, Function|MediumTest|Level4)
ExeCmd
(
"hilog -G 1m -t all"
);
ExeCmd
(
"hilog -G 1m -t all"
);
}
}
HWTEST_F
(
Flowcontroltest
,
flowctrl_switch_illegal
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
TestTool
,
flowctrl_switch_illegal
,
Function
|
MediumTest
|
Level4
)
{
{
#ifndef LOCALTEST
#ifndef LOCALTEST
result
=
ExecuteCmd
(
"hilog -Q abc"
);
result
=
ExecuteCmd
(
"hilog -Q abc"
);
...
@@ -334,10 +322,7 @@ HWTEST_F(TestTool, flowctrl_switch_illegal, Function|MediumTest|Level4)
...
@@ -334,10 +322,7 @@ HWTEST_F(TestTool, flowctrl_switch_illegal, Function|MediumTest|Level4)
#endif
#endif
}
}
HWTEST_F
(
Flowcontroltest
,
process_flowctrl
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
TestTool
,
process_flowctrl
,
Function
|
MediumTest
|
Level4
)
{
{
#ifndef LOCALTEST
#ifndef LOCALTEST
int
i
=
0
;
int
i
=
0
;
...
@@ -367,18 +352,15 @@ HWTEST_F(TestTool, process_flowctrl, Function|MediumTest|Level4)
...
@@ -367,18 +352,15 @@ HWTEST_F(TestTool, process_flowctrl, Function|MediumTest|Level4)
result
=
ExecuteCmd
(
"hilog -x -t core | wc -l"
);
result
=
ExecuteCmd
(
"hilog -x -t core | wc -l"
);
expect
=
to_string
(
i
);
expect
=
to_string
(
i
);
EXPECT_GE
(
stoi
(
result
),
stoi
(
expect
));
// result include drop log ,may more than expect
EXPECT_GE
(
stoi
(
result
),
stoi
(
expect
));
// result include drop log ,may more than expect
#endif
#endif
// test end close switch
// test end close switch
ExeCmd
(
"hilog -Q domainoff"
);
ExeCmd
(
"hilog -Q domainoff"
);
ExeCmd
(
"hilog -Q pidoff"
);
ExeCmd
(
"hilog -Q pidoff"
);
ExeCmd
(
"hilog -r -t all"
);
ExeCmd
(
"hilog -r -t all"
);
ExeCmd
(
"hilog -G 1m -t all"
);
ExeCmd
(
"hilog -G 1m -t all"
);
}
}
HWTEST_F
(
Flowcontroltest
,
process_flowctrl2
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
TestTool
,
process_flowctrl2
,
Function
|
MediumTest
|
Level4
)
{
{
#ifndef LOCALTEST
#ifndef LOCALTEST
int
i
=
0
;
int
i
=
0
;
...
@@ -423,8 +405,7 @@ HWTEST_F(TestTool, process_flowctrl2, Function|MediumTest|Level4)
...
@@ -423,8 +405,7 @@ HWTEST_F(TestTool, process_flowctrl2, Function|MediumTest|Level4)
ExeCmd
(
"hilog -G 1m -t all"
);
ExeCmd
(
"hilog -G 1m -t all"
);
}
}
HWTEST_F
(
Flowcontroltest
,
domain_flowctrl
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
TestTool
,
domain_flowctrl
,
Function
|
MediumTest
|
Level4
)
{
{
#ifndef LOCALTEST
#ifndef LOCALTEST
int
i
=
0
;
int
i
=
0
;
...
@@ -462,9 +443,7 @@ HWTEST_F(TestTool, domain_flowctrl, Function|MediumTest|Level4)
...
@@ -462,9 +443,7 @@ HWTEST_F(TestTool, domain_flowctrl, Function|MediumTest|Level4)
ExeCmd
(
"hilog -G 1m -t all"
);
ExeCmd
(
"hilog -G 1m -t all"
);
}
}
HWTEST_F
(
Flowcontroltest
,
domain_flowctrl2
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
TestTool
,
domain_flowctrl2
,
Function
|
MediumTest
|
Level4
)
{
{
#ifndef LOCALTEST
#ifndef LOCALTEST
int
i
=
0
;
int
i
=
0
;
...
@@ -509,12 +488,10 @@ HWTEST_F(TestTool, domain_flowctrl2, Function|MediumTest|Level4)
...
@@ -509,12 +488,10 @@ HWTEST_F(TestTool, domain_flowctrl2, Function|MediumTest|Level4)
ExeCmd
(
"hilog -G 1m -t all"
);
ExeCmd
(
"hilog -G 1m -t all"
);
}
}
HWTEST_F
(
Flowcontroltest
,
domain_flowctrl_quit_info
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
TestTool
,
domain_flowctrl_quit_info
,
Function
|
MediumTest
|
Level4
)
{
{
#ifndef LOCALTEST
#ifndef LOCALTEST
bool
ret
;
bool
ret
=
true
;
int
i
=
0
;
int
i
=
0
;
struct
timespec
startTime
=
{
0
,
0
};
struct
timespec
startTime
=
{
0
,
0
};
struct
timespec
realTime
=
{
0
,
0
};
struct
timespec
realTime
=
{
0
,
0
};
...
@@ -560,8 +537,7 @@ HWTEST_F(TestTool, domain_flowctrl_quit_info, Function|MediumTest|Level4)
...
@@ -560,8 +537,7 @@ HWTEST_F(TestTool, domain_flowctrl_quit_info, Function|MediumTest|Level4)
}
}
HWTEST_F
(
Flowcontroltest
,
flowctrl_logtype
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
TestTool
,
flowctrl_logtype
,
Function
|
MediumTest
|
Level4
)
{
{
#ifndef LOCALTEST
#ifndef LOCALTEST
int
i
=
0
;
int
i
=
0
;
...
@@ -605,9 +581,7 @@ HWTEST_F(TestTool, flowctrl_logtype, Function|MediumTest|Level4)
...
@@ -605,9 +581,7 @@ HWTEST_F(TestTool, flowctrl_logtype, Function|MediumTest|Level4)
ExeCmd
(
"hilog -G 1m -t all"
);
ExeCmd
(
"hilog -G 1m -t all"
);
}
}
HWTEST_F
(
Flowcontroltest
,
flowctrl_logtype2
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
TestTool
,
flowctrl_logtype2
,
Function
|
MediumTest
|
Level4
)
{
{
#ifndef LOCALTEST
#ifndef LOCALTEST
int
i
=
0
;
int
i
=
0
;
...
...
hiviewdfx/hilogtest/libhilogtest/libhilogTooltest/libhilogTooltest.cpp
浏览文件 @
2a56c9e2
...
@@ -39,8 +39,6 @@ using namespace OHOS;
...
@@ -39,8 +39,6 @@ using namespace OHOS;
using
namespace
HiviewDFX
;
using
namespace
HiviewDFX
;
using
namespace
testing
::
ext
;
using
namespace
testing
::
ext
;
using
namespace
std
;
using
namespace
std
;
const
int
g_logPerThread
=
1000
;
class
LibhilogTooltest
:
public
testing
::
Test
{
class
LibhilogTooltest
:
public
testing
::
Test
{
public:
public:
...
@@ -49,10 +47,6 @@ public:
...
@@ -49,10 +47,6 @@ public:
static
void
TearDownTestCase
();
static
void
TearDownTestCase
();
void
SetUp
();
void
SetUp
();
void
TearDown
();
void
TearDown
();
string
gHilogtoolExecutable
=
"hilog "
;
string
g_logContent
=
"123456789_1234567890_public and private log test is:\
%{public}d, %{private}lf, %{public}.2f, %s, %{private}c"
;
string
g_commonContent
=
"03200/HILOGTOOLTEST: 123456789_1234567890_public and private log test is:"
;
private:
private:
};
};
...
@@ -824,7 +818,7 @@ HWTEST_F(LibhilogTooltest, log_clear_illegal2, Function|MediumTest|Level4)
...
@@ -824,7 +818,7 @@ HWTEST_F(LibhilogTooltest, log_clear_illegal2, Function|MediumTest|Level4)
*/
*/
HWTEST_F
(
LibhilogTooltest
,
log_leval_global_set
,
Function
|
MediumTest
|
Level2
)
HWTEST_F
(
LibhilogTooltest
,
log_leval_global_set
,
Function
|
MediumTest
|
Level2
)
{
{
bool
ret
;
bool
ret
=
true
;
int
i
=
1
;
int
i
=
1
;
ExeCmd
(
"hilog -b fatal"
);
ExeCmd
(
"hilog -b fatal"
);
ExeCmd
(
"hilog -r -t all"
);
ExeCmd
(
"hilog -r -t all"
);
...
@@ -853,7 +847,7 @@ HWTEST_F(LibhilogTooltest, log_leval_global_set, Function|MediumTest|Level2)
...
@@ -853,7 +847,7 @@ HWTEST_F(LibhilogTooltest, log_leval_global_set, Function|MediumTest|Level2)
*/
*/
HWTEST_F
(
LibhilogTooltest
,
log_level_global_set2
,
Function
|
MediumTest
|
Level3
)
HWTEST_F
(
LibhilogTooltest
,
log_level_global_set2
,
Function
|
MediumTest
|
Level3
)
{
{
bool
ret
;
bool
ret
=
true
;
int
i
=
1
;
int
i
=
1
;
#ifndef LOCALTEST
#ifndef LOCALTEST
ExeCmd
(
"hilog -b fatal"
);
ExeCmd
(
"hilog -b fatal"
);
...
@@ -883,7 +877,7 @@ HWTEST_F(LibhilogTooltest, log_level_global_set2, Function|MediumTest|Level3)
...
@@ -883,7 +877,7 @@ HWTEST_F(LibhilogTooltest, log_level_global_set2, Function|MediumTest|Level3)
*/
*/
HWTEST_F
(
LibhilogTooltest
,
log_leveal_global_set3
,
Function
|
MediumTest
|
Level2
)
HWTEST_F
(
LibhilogTooltest
,
log_leveal_global_set3
,
Function
|
MediumTest
|
Level2
)
{
{
bool
ret
;
bool
ret
=
true
;
int
i
=
1
;
int
i
=
1
;
ExeCmd
(
"hilog -b debug"
);
ExeCmd
(
"hilog -b debug"
);
ExeCmd
(
"hilog -r -t all"
);
ExeCmd
(
"hilog -r -t all"
);
...
@@ -911,7 +905,7 @@ HWTEST_F(LibhilogTooltest, log_leveal_global_set3, Function|MediumTest|Level2)
...
@@ -911,7 +905,7 @@ HWTEST_F(LibhilogTooltest, log_leveal_global_set3, Function|MediumTest|Level2)
*/
*/
HWTEST_F
(
LibhilogTooltest
,
log_leval_tag_set
,
Function
|
MediumTest
|
Level3
)
HWTEST_F
(
LibhilogTooltest
,
log_leval_tag_set
,
Function
|
MediumTest
|
Level3
)
{
{
bool
ret
;
bool
ret
=
true
;
int
i
=
1
;
int
i
=
1
;
ExeCmd
(
"hilog -b fatal -T HILOGTOOLTEST"
);
ExeCmd
(
"hilog -b fatal -T HILOGTOOLTEST"
);
ExeCmd
(
"hilog -r -t all"
);
ExeCmd
(
"hilog -r -t all"
);
...
@@ -940,7 +934,7 @@ HWTEST_F(LibhilogTooltest, log_leval_tag_set, Function|MediumTest|Level3)
...
@@ -940,7 +934,7 @@ HWTEST_F(LibhilogTooltest, log_leval_tag_set, Function|MediumTest|Level3)
*/
*/
HWTEST_F
(
LibhilogTooltest
,
log_leval_tag_set2
,
Function
|
MediumTest
|
Level3
)
HWTEST_F
(
LibhilogTooltest
,
log_leval_tag_set2
,
Function
|
MediumTest
|
Level3
)
{
{
bool
ret
;
bool
ret
=
true
;
int
i
=
1
;
int
i
=
1
;
#ifndef LOCALTEST
#ifndef LOCALTEST
ExeCmd
(
"hilog -b fatal -T HILOGTOOLTEST"
);
ExeCmd
(
"hilog -b fatal -T HILOGTOOLTEST"
);
...
@@ -971,7 +965,7 @@ HWTEST_F(LibhilogTooltest, log_leval_tag_set2, Function|MediumTest|Level3)
...
@@ -971,7 +965,7 @@ HWTEST_F(LibhilogTooltest, log_leval_tag_set2, Function|MediumTest|Level3)
*/
*/
HWTEST_F
(
LibhilogTooltest
,
log_level_tag_set3
,
Function
|
MediumTest
|
Level3
)
HWTEST_F
(
LibhilogTooltest
,
log_level_tag_set3
,
Function
|
MediumTest
|
Level3
)
{
{
bool
ret
;
bool
ret
=
true
;
int
i
=
1
;
int
i
=
1
;
ExeCmd
(
"hilog -b debug -T HILOGTOOLTEST"
);
ExeCmd
(
"hilog -b debug -T HILOGTOOLTEST"
);
ExeCmd
(
"hilog -r -t all"
);
ExeCmd
(
"hilog -r -t all"
);
...
@@ -999,7 +993,7 @@ HWTEST_F(LibhilogTooltest, log_level_tag_set3, Function|MediumTest|Level3)
...
@@ -999,7 +993,7 @@ HWTEST_F(LibhilogTooltest, log_level_tag_set3, Function|MediumTest|Level3)
*/
*/
HWTEST_F
(
LibhilogTooltest
,
log_level_domain_set
,
Function
|
MediumTest
|
Level3
)
HWTEST_F
(
LibhilogTooltest
,
log_level_domain_set
,
Function
|
MediumTest
|
Level3
)
{
{
bool
ret
;
bool
ret
=
true
;
int
i
=
1
;
int
i
=
1
;
ExeCmd
(
"hilog -b fatal -D 218116608"
);
ExeCmd
(
"hilog -b fatal -D 218116608"
);
ExeCmd
(
"hilog -r -t all"
);
ExeCmd
(
"hilog -r -t all"
);
...
@@ -1028,7 +1022,7 @@ HWTEST_F(LibhilogTooltest, log_level_domain_set, Function|MediumTest|Level3)
...
@@ -1028,7 +1022,7 @@ HWTEST_F(LibhilogTooltest, log_level_domain_set, Function|MediumTest|Level3)
*/
*/
HWTEST_F
(
LibhilogTooltest
,
log_level_domain_set2
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
LibhilogTooltest
,
log_level_domain_set2
,
Function
|
MediumTest
|
Level4
)
{
{
bool
ret
;
bool
ret
=
true
;
int
i
=
1
;
int
i
=
1
;
#ifndef LOCALTEST
#ifndef LOCALTEST
ExeCmd
(
"hilog -b fatal -D 218116608"
);
ExeCmd
(
"hilog -b fatal -D 218116608"
);
...
@@ -1059,7 +1053,7 @@ HWTEST_F(LibhilogTooltest, log_level_domain_set2, Function|MediumTest|Level4)
...
@@ -1059,7 +1053,7 @@ HWTEST_F(LibhilogTooltest, log_level_domain_set2, Function|MediumTest|Level4)
*/
*/
HWTEST_F
(
LibhilogTooltest
,
log_level_domain_set3
,
Function
|
MediumTest
|
Level3
)
HWTEST_F
(
LibhilogTooltest
,
log_level_domain_set3
,
Function
|
MediumTest
|
Level3
)
{
{
bool
ret
;
bool
ret
=
true
;
int
i
=
1
;
int
i
=
1
;
ExeCmd
(
"hilog -b debug -D 218116608"
);
ExeCmd
(
"hilog -b debug -D 218116608"
);
ExeCmd
(
"hilog -r -t all"
);
ExeCmd
(
"hilog -r -t all"
);
...
@@ -1088,7 +1082,7 @@ HWTEST_F(LibhilogTooltest, log_level_domain_set3, Function|MediumTest|Level3)
...
@@ -1088,7 +1082,7 @@ HWTEST_F(LibhilogTooltest, log_level_domain_set3, Function|MediumTest|Level3)
*/
*/
HWTEST_F
(
LibhilogTooltest
,
log_level_all_set
,
Function
|
MediumTest
|
Level3
)
HWTEST_F
(
LibhilogTooltest
,
log_level_all_set
,
Function
|
MediumTest
|
Level3
)
{
{
bool
ret
;
bool
ret
=
true
;
int
i
=
1
;
int
i
=
1
;
ExeCmd
(
"hilog -b info"
);
ExeCmd
(
"hilog -b info"
);
ExeCmd
(
"hilog -b warn -D 218116608"
);
ExeCmd
(
"hilog -b warn -D 218116608"
);
...
@@ -1119,7 +1113,7 @@ HWTEST_F(LibhilogTooltest, log_level_all_set, Function|MediumTest|Level3)
...
@@ -1119,7 +1113,7 @@ HWTEST_F(LibhilogTooltest, log_level_all_set, Function|MediumTest|Level3)
*/
*/
HWTEST_F
(
LibhilogTooltest
,
log_level_all_set2
,
Function
|
MediumTest
|
Level3
)
HWTEST_F
(
LibhilogTooltest
,
log_level_all_set2
,
Function
|
MediumTest
|
Level3
)
{
{
bool
ret
;
bool
ret
=
true
;
int
i
=
1
;
int
i
=
1
;
#ifndef LOCALTEST
#ifndef LOCALTEST
ExeCmd
(
"hilog -b info"
);
ExeCmd
(
"hilog -b info"
);
...
@@ -1162,7 +1156,7 @@ HWTEST_F(LibhilogTooltest, log_level_set_illegal, Function|MediumTest|Level4)
...
@@ -1162,7 +1156,7 @@ HWTEST_F(LibhilogTooltest, log_level_set_illegal, Function|MediumTest|Level4)
HWTEST_F
(
LibhilogTooltest
,
private_open
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
LibhilogTooltest
,
private_open
,
Function
|
MediumTest
|
Level4
)
{
{
bool
ret
;
bool
ret
=
true
;
int
i
=
1
;
int
i
=
1
;
#ifndef LOCALTEST
#ifndef LOCALTEST
ExeCmd
(
"hilog -p on"
);
ExeCmd
(
"hilog -p on"
);
...
@@ -1186,7 +1180,7 @@ HWTEST_F(LibhilogTooltest, private_open, Function|MediumTest|Level4)
...
@@ -1186,7 +1180,7 @@ HWTEST_F(LibhilogTooltest, private_open, Function|MediumTest|Level4)
HWTEST_F
(
LibhilogTooltest
,
private_close
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
LibhilogTooltest
,
private_close
,
Function
|
MediumTest
|
Level4
)
{
{
bool
ret
;
bool
ret
=
true
;
int
i
=
1
;
int
i
=
1
;
ExeCmd
(
"hilog -p off"
);
ExeCmd
(
"hilog -p off"
);
ExeCmd
(
"hilog -r -t all"
);
ExeCmd
(
"hilog -r -t all"
);
...
@@ -1212,5 +1206,3 @@ HWTEST_F(LibhilogTooltest, private_switch_illegal, Function|MediumTest|Level4)
...
@@ -1212,5 +1206,3 @@ HWTEST_F(LibhilogTooltest, private_switch_illegal, Function|MediumTest|Level4)
expect
=
"set private switch operation error!
\n
"
;
expect
=
"set private switch operation error!
\n
"
;
EXPECT_EQ
(
result
,
expect
);
EXPECT_EQ
(
result
,
expect
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录