Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
ec38cb9e
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看板
提交
ec38cb9e
编写于
3月 24, 2023
作者:
1
15929983503
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
buildgn add partname and systemname
Signed-off-by:
N
15929983503
<
duanhaizhen@huawei.com
>
上级
f570d894
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
425 addition
and
1 deletion
+425
-1
hiviewdfx/abilityconstanttest/BUILD.gn
hiviewdfx/abilityconstanttest/BUILD.gn
+2
-0
hiviewdfx/apprecoverytest/BUILD.gn
hiviewdfx/apprecoverytest/BUILD.gn
+2
-0
hiviewdfx/bytracetest/BUILD.gn
hiviewdfx/bytracetest/BUILD.gn
+2
-0
hiviewdfx/hiappeventtest/hiappeventcpptest/BUILD.gn
hiviewdfx/hiappeventtest/hiappeventcpptest/BUILD.gn
+2
-0
hiviewdfx/hicheckertest/hicheckerjstest/BUILD.gn
hiviewdfx/hicheckertest/hicheckerjstest/BUILD.gn
+2
-0
hiviewdfx/hidebugtest/hidebugtestjstest/BUILD.gn
hiviewdfx/hidebugtest/hidebugtestjstest/BUILD.gn
+2
-0
hiviewdfx/hilogtest/hilogdomainofftest/BUILD.gn
hiviewdfx/hilogtest/hilogdomainofftest/BUILD.gn
+2
-0
hiviewdfx/hilogtest/hilogdomainontest/BUILD.gn
hiviewdfx/hilogtest/hilogdomainontest/BUILD.gn
+2
-0
hiviewdfx/hilogtest/hilogjstest/BUILD.gn
hiviewdfx/hilogtest/hilogjstest/BUILD.gn
+2
-0
hiviewdfx/hisyseventtest/hisyseventjstest/BUILD.gn
hiviewdfx/hisyseventtest/hisyseventjstest/BUILD.gn
+2
-0
hiviewdfx/hitracechainjstest/BUILD.gn
hiviewdfx/hitracechainjstest/BUILD.gn
+2
-0
hiviewdfx/hitracechainjstest/src/main/js/test/HiTraceChainJs.test.js
...itracechainjstest/src/main/js/test/HiTraceChainJs.test.js
+399
-1
hiviewdfx/hitracemetertest/BUILD.gn
hiviewdfx/hitracemetertest/BUILD.gn
+2
-0
hiviewdfx/hiview/faultlogger/faultloggerjs/BUILD.gn
hiviewdfx/hiview/faultlogger/faultloggerjs/BUILD.gn
+2
-0
未找到文件。
hiviewdfx/abilityconstanttest/BUILD.gn
浏览文件 @
ec38cb9e
...
...
@@ -20,6 +20,8 @@ ohos_js_hap_suite("ActsAbilityConstantTest") {
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAbilityConstantTest"
part_name = "hitrace_native"
subsystem_name = "hiviewdfx"
}
ohos_js_assets("abilityconstant_assets") {
js2abc = true
...
...
hiviewdfx/apprecoverytest/BUILD.gn
浏览文件 @
ec38cb9e
...
...
@@ -20,6 +20,8 @@ ohos_js_hap_suite("ActsAppRecoveryTest") {
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAppRecoveryTest"
part_name = "hitrace_native"
subsystem_name = "hiviewdfx"
}
ohos_js_assets("apprecovery_assets") {
js2abc = true
...
...
hiviewdfx/bytracetest/BUILD.gn
浏览文件 @
ec38cb9e
...
...
@@ -20,6 +20,8 @@ ohos_js_hap_suite("ActsBytraceJsTest") {
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsByTraceJsTest"
part_name = "hitrace_native"
subsystem_name = "hiviewdfx"
}
ohos_js_assets("bytrace_assets") {
js2abc = true
...
...
hiviewdfx/hiappeventtest/hiappeventcpptest/BUILD.gn
浏览文件 @
ec38cb9e
...
...
@@ -38,4 +38,6 @@ ohos_moduletest_suite("ActsHiAppEventCPPTest") {
"//third_party/googletest:gtest_main",
]
configs = [ ":hilogtest_config" ]
part_name = "hisysevent_native"
subsystem_name = "hiviewdfx"
}
hiviewdfx/hicheckertest/hicheckerjstest/BUILD.gn
浏览文件 @
ec38cb9e
...
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("hicheckerjstest") {
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHicheckerTest"
part_name = "hichecker_native"
subsystem_name = "hiviewdfx"
}
ohos_js_assets("hichecker_js_assets") {
js2abc = true
...
...
hiviewdfx/hidebugtest/hidebugtestjstest/BUILD.gn
浏览文件 @
ec38cb9e
...
...
@@ -23,6 +23,8 @@ ohos_js_hap_suite("ActsHiDebugTest") {
#ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHiDebugTest"
part_name = "profiler"
subsystem_name = "developtools"
}
ohos_js_assets("hidebug_js_assets") {
js2abc = true
...
...
hiviewdfx/hilogtest/hilogdomainofftest/BUILD.gn
浏览文件 @
ec38cb9e
...
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("ActsHilogDomainOffJsTest") {
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHilogDomainOffJsTest"
part_name = "hilog_native"
subsystem_name = "hiviewdfx"
}
ohos_js_assets("hilog_js_assets") {
js2abc = true
...
...
hiviewdfx/hilogtest/hilogdomainontest/BUILD.gn
浏览文件 @
ec38cb9e
...
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("ActsHilogDomainOnJsTest") {
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHilogDomainOnJsTest"
part_name = "hilog_native"
subsystem_name = "hiviewdfx"
}
ohos_js_assets("hilog_js_assets") {
js2abc = true
...
...
hiviewdfx/hilogtest/hilogjstest/BUILD.gn
浏览文件 @
ec38cb9e
...
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("ActsHilogJsTest") {
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHilogJsTest"
part_name = "hilog_native"
subsystem_name = "hiviewdfx"
js_build_mode = "debug"
shared_libraries = [ "./src/main/cpp:hilogndk" ]
}
...
...
hiviewdfx/hisyseventtest/hisyseventjstest/BUILD.gn
浏览文件 @
ec38cb9e
...
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("ActsHiSysEventJsTest") {
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHiSysEventJsTest"
part_name = "hisysevent_native"
subsystem_name = "hiviewdfx"
}
ohos_js_assets("hisysevent_js_assets") {
js2abc = true
...
...
hiviewdfx/hitracechainjstest/BUILD.gn
浏览文件 @
ec38cb9e
...
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("ActsHiTraceChainJsTest") {
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHiTraceChainJsTest"
part_name = "hitrace_native"
subsystem_name= "hiviewdfx"
}
ohos_js_assets("hitrace_js_assets") {
js2abc = true
...
...
hiviewdfx/hitracechainjstest/src/main/js/test/HiTraceChainJs.test.js
浏览文件 @
ec38cb9e
...
...
@@ -349,6 +349,404 @@ describe('HiTraceJsTest', function () {
console
.
info
(
'
testHitraceApi12 end
'
)
done
()
});
/**
* @tc.name: 接口测试-跟踪业务名为null
* @tc.number DFX_DFT_Hitrace_JS_01300
* @tc.function A01010
* @tc.feature DFX_DFT_Hitrace
* @tc.level Level3
* @tc.type FUNC
*/
it
(
'
testHitraceApi013
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testHitraceApi013 start
'
);
let
traceId
=
hiTraceChain
.
begin
(
null
);
let
traceIdIsvalid
=
hiTraceChain
.
isValid
(
traceId
);
expect
(
!
traceIdIsvalid
).
assertTrue
()
console
.
info
(
'
testHitraceApi013 end
'
);
done
();
})
/**
* @tc.name: 接口测试-跟踪业务名为undefined
* @tc.number DFX_DFT_Hitrace_JS_01400
* @tc.function A01010
* @tc.feature DFX_DFT_Hitrace
* @tc.level Level3
* @tc.type FUNC
*/
it
(
'
testHitraceApi014
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testHitraceApi014 start
'
);
let
traceId
=
hiTraceChain
.
begin
(
undefined
);
let
traceIdIsvalid
=
hiTraceChain
.
isValid
(
traceId
);
expect
(
!
traceIdIsvalid
).
assertTrue
()
console
.
info
(
'
testHitraceApi014 end
'
);
done
();
})
/**
* @tc.name: 接口测试-跟踪业务名为长度大于32位
* @tc.number DFX_DFT_Hitrace_JS_01500
* @tc.function A01010
* @tc.feature DFX_DFT_Hitrace
* @tc.level Level3
* @tc.type FUNC
*/
it
(
'
testHitraceApi015
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testHitraceApi015 start
'
);
try
{
let
traceId
=
hiTraceChain
.
begin
(
"
1234567890qwertyuiopasdfghjklzxcvbnm
"
);
let
traceIdIsvalid
=
hiTraceChain
.
isValid
(
traceId
);
if
(
!
traceIdIsvalid
){
expect
().
assertFail
();
console
.
log
(
`testHitraceApi015 got an error:
${
JSON
.
stringify
(
error
)}
`
);
}
hiTraceChain
.
end
(
traceId
);
}
catch
(
error
){
console
.
log
(
`testHitraceApi015 got an error:
${
JSON
.
stringify
(
error
)}
`
);
expect
().
assertFail
();
done
();
}
console
.
info
(
'
testHitraceApi015 end
'
);
done
();
})
/**
* @tc.name: 接口测试-跟踪业务名为长度大于1024位
* @tc.number DFX_DFT_Hitrace_JS_01600
* @tc.function A01010
* @tc.feature DFX_DFT_Hitrace
* @tc.level Level3
* @tc.type FUNC
*/
it
(
'
testHitraceApi016
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testHitraceApi016 start
'
);
try
{
let
traceId
=
hiTraceChain
.
begin
(
"
1234567890qwertyuiopasdfghjklzxcvbnm1234567890qwertyuiopasdfghjklzxcvbnm1234567890qwertyuiopasdfghjklzxcvbnm12345678901234567890
"
);
let
traceIdIsvalid
=
hiTraceChain
.
isValid
(
traceId
);
if
(
!
traceIdIsvalid
){
expect
().
assertFail
();
console
.
log
(
`testHitraceApi016 got an error:
${
JSON
.
stringify
(
error
)}
`
);
}
hiTraceChain
.
end
(
traceId
);
}
catch
(
error
){
console
.
log
(
`testHitraceApi016 got an error:
${
JSON
.
stringify
(
error
)}
`
);
expect
().
assertFail
();
done
();
}
console
.
info
(
'
testHitraceApi016 end
'
);
done
();
})
/**
* @tc.name: 接口测试-跟踪业务名为""
* @tc.number DFX_DFT_Hitrace_JS_01700
* @tc.function A01010
* @tc.feature DFX_DFT_Hitrace
* @tc.level Level3
* @tc.type FUNC
*/
it
(
'
testHitraceApi017
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testHitraceApi017 start
'
);
try
{
let
traceId
=
hiTraceChain
.
begin
(
""
);
let
traceIdIsvalid
=
hiTraceChain
.
isValid
(
traceId
);
if
(
!
traceIdIsvalid
){
expect
().
assertFail
();
console
.
log
(
`testHitraceApi017 got an error:
${
JSON
.
stringify
(
error
)}
`
);
}
hiTraceChain
.
end
(
traceId
);
}
catch
(
error
){
console
.
log
(
`testHitraceApi017 got an error:
${
JSON
.
stringify
(
error
)}
`
);
expect
().
assertFail
();
done
();
}
console
.
info
(
'
testHitraceApi017 end
'
);
done
();
})
/**
* @tc.name: 接口测试-跟踪业务名为" "
* @tc.number DFX_DFT_Hitrace_JS_01800
* @tc.function A01010
* @tc.feature DFX_DFT_Hitrace
* @tc.level Level3
* @tc.type FUNC
*/
it
(
'
testHitraceApi018
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testHitraceApi018 start
'
);
try
{
let
traceId
=
hiTraceChain
.
begin
(
"
"
);
let
traceIdIsvalid
=
hiTraceChain
.
isValid
(
traceId
);
if
(
!
traceIdIsvalid
){
expect
().
assertFail
();
console
.
log
(
`testHitraceApi018 got an error:
${
JSON
.
stringify
(
error
)}
`
);
}
hiTraceChain
.
end
(
traceId
);
}
catch
(
error
){
console
.
log
(
`testHitraceApi018 got an error:
${
JSON
.
stringify
(
error
)}
`
);
expect
().
assertFail
();
done
();
}
console
.
info
(
'
testHitraceApi018 end
'
);
done
();
})
/**
* @tc.name: 接口测试-跟踪业务名为"default"
* @tc.number DFX_DFT_Hitrace_JS_01900
* @tc.function A01010
* @tc.feature DFX_DFT_Hitrace
* @tc.level Level3
* @tc.type FUNC
*/
it
(
'
testHitraceApi019
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testHitraceApi019 start
'
);
try
{
let
traceId
=
hiTraceChain
.
begin
(
"
default
"
);
let
traceIdIsvalid
=
hiTraceChain
.
isValid
(
traceId
);
if
(
!
traceIdIsvalid
){
expect
().
assertFail
();
console
.
log
(
`testHitraceApi019 got an error:
${
JSON
.
stringify
(
error
)}
`
);
}
hiTraceChain
.
end
(
traceId
);
}
catch
(
error
){
console
.
log
(
`testHitraceApi019 got an error:
${
JSON
.
stringify
(
error
)}
`
);
expect
().
assertFail
();
done
();
}
console
.
info
(
'
testHitraceApi019 end
'
);
done
();
})
/**
* @tc.name: 接口测试-跟踪业务名为中文字符
* @tc.number DFX_DFT_Hitrace_JS_02000
* @tc.function A01010
* @tc.feature DFX_DFT_Hitrace
* @tc.level Level3
* @tc.type FUNC
*/
it
(
'
testHitraceApi020
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testHitraceApi020 start
'
);
try
{
let
traceId
=
hiTraceChain
.
begin
(
"
华为
"
);
let
traceIdIsvalid
=
hiTraceChain
.
isValid
(
traceId
);
if
(
!
traceIdIsvalid
){
expect
().
assertFail
();
console
.
log
(
`testHitraceApi020 got an error:
${
JSON
.
stringify
(
error
)}
`
);
}
hiTraceChain
.
end
(
traceId
);
}
catch
(
error
){
console
.
log
(
`testHitraceApi020 got an error:
${
JSON
.
stringify
(
error
)}
`
);
expect
().
assertFail
();
done
();
}
console
.
info
(
'
testHitraceApi020 end
'
);
done
();
})
/**
* @tc.name: 接口测试-HiTraceCommunicationMode为DEFAULT
* @tc.number DFX_DFT_Hitrace_JS_02100
* @tc.function A01010
* @tc.feature DFX_DFT_Hitrace
* @tc.level Level3
* @tc.type FUNC
*/
it
(
'
testHitraceApi021
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testHitraceApi021 start
'
);
try
{
let
traceId
=
hiTraceChain
.
begin
(
"
hitrace03
"
,
hiTraceChain
.
HiTraceFlag
.
TP_INFO
);
let
curTraceId
=
hiTraceChain
.
getId
();
if
(
traceId
.
chainId
!=
curTraceId
.
chainId
){
expect
().
assertFail
();
console
.
log
(
`testHitraceApi021 got an error:
${
JSON
.
stringify
(
error
)}
`
);
}
hiTraceChain
.
tracepoint
(
hiTraceChain
.
HiTraceCommunicationMode
.
DEFAULT
,
hiTraceChain
.
HiTraceTracepointType
.
SS
,
traceId
,
"
hitrace api test.
"
);
hiTraceChain
.
end
(
traceId
);
}
catch
(
error
){
console
.
log
(
`testHitraceApi021 got an error:
${
JSON
.
stringify
(
error
)}
`
);
expect
().
assertFail
();
done
();
}
console
.
info
(
'
testHitraceApi021 end
'
);
done
();
})
/**
* @tc.name: 接口测试-HiTraceCommunicationMode为PROCESS
* @tc.number DFX_DFT_Hitrace_JS_02200
* @tc.function A01010
* @tc.feature DFX_DFT_Hitrace
* @tc.level Level3
* @tc.type FUNC
*/
it
(
'
testHitraceApi022
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testHitraceApi022 start
'
);
try
{
let
traceId
=
hiTraceChain
.
begin
(
"
hitrace03
"
,
hiTraceChain
.
HiTraceFlag
.
TP_INFO
);
let
curTraceId
=
hiTraceChain
.
getId
();
if
(
traceId
.
chainId
!=
curTraceId
.
chainId
){
expect
().
assertFail
();
console
.
log
(
`testHitraceApi022 got an error:
${
JSON
.
stringify
(
error
)}
`
);
}
hiTraceChain
.
tracepoint
(
hiTraceChain
.
HiTraceCommunicationMode
.
PROCESS
,
hiTraceChain
.
HiTraceTracepointType
.
SS
,
traceId
,
"
hitrace api test.
"
);
hiTraceChain
.
end
(
traceId
);
}
catch
(
error
){
console
.
log
(
`testHitraceApi022 got an error:
${
JSON
.
stringify
(
error
)}
`
);
expect
().
assertFail
();
done
();
}
console
.
info
(
'
testHitraceApi022 end
'
);
done
();
})
/**
* @tc.name: 接口测试-HiTraceCommunicationMode为DEVICE
* @tc.number DFX_DFT_Hitrace_JS_02300
* @tc.function A01010
* @tc.feature DFX_DFT_Hitrace
* @tc.level Level3
* @tc.type FUNC
*/
it
(
'
testHitraceApi023
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testHitraceApi023 start
'
);
try
{
let
traceId
=
hiTraceChain
.
begin
(
"
testHitraceApi023
"
,
hiTraceChain
.
HiTraceFlag
.
TP_INFO
);
let
curTraceId
=
hiTraceChain
.
getId
();
if
(
traceId
.
chainId
!=
curTraceId
.
chainId
){
expect
().
assertFail
();
console
.
log
(
`testHitraceApi023 got an error:
${
JSON
.
stringify
(
error
)}
`
);
}
hiTraceChain
.
tracepoint
(
hiTraceChain
.
HiTraceCommunicationMode
.
DEVICE
,
hiTraceChain
.
HiTraceTracepointType
.
SS
,
traceId
,
"
hitrace api test.
"
);
hiTraceChain
.
end
(
traceId
);
}
catch
(
error
){
console
.
log
(
`testHitraceApi023 got an error:
${
JSON
.
stringify
(
error
)}
`
);
expect
().
assertFail
();
done
();
}
console
.
info
(
'
testHitraceApi023 end
'
);
done
();
})
/**
* @tc.name: 接口测试-HiTraceTracepointType为CS
* @tc.number DFX_DFT_Hitrace_JS_02400
* @tc.function A01010
* @tc.feature DFX_DFT_Hitrace
* @tc.level Level3
* @tc.type FUNC
*/
it
(
'
testHitraceApi024
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testHitraceApi024 start
'
);
try
{
let
traceId
=
hiTraceChain
.
begin
(
"
testHitraceApi024
"
,
hiTraceChain
.
HiTraceFlag
.
TP_INFO
);
let
curTraceId
=
hiTraceChain
.
getId
();
if
(
traceId
.
chainId
!=
curTraceId
.
chainId
){
expect
().
assertFail
();
console
.
log
(
`testHitraceApi024 got an error:
${
JSON
.
stringify
(
error
)}
`
);
}
hiTraceChain
.
tracepoint
(
hiTraceChain
.
HiTraceCommunicationMode
.
DEVICE
,
hiTraceChain
.
HiTraceTracepointType
.
CS
,
traceId
,
"
hitrace api test.
"
);
hiTraceChain
.
end
(
traceId
);
}
catch
(
error
){
console
.
log
(
`testHitraceApi024 got an error:
${
JSON
.
stringify
(
error
)}
`
);
expect
().
assertFail
();
done
();
}
console
.
info
(
'
testHitraceApi024 end
'
);
done
();
})
/**
* @tc.name: 接口测试-HiTraceTracepointType为CR
* @tc.number DFX_DFT_Hitrace_JS_02500
* @tc.function A01010
* @tc.feature DFX_DFT_Hitrace
* @tc.level Level3
* @tc.type FUNC
*/
it
(
'
testHitraceApi025
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testHitraceApi025 start
'
);
try
{
let
traceId
=
hiTraceChain
.
begin
(
"
testHitraceApi025
"
,
hiTraceChain
.
HiTraceFlag
.
TP_INFO
);
let
curTraceId
=
hiTraceChain
.
getId
();
if
(
traceId
.
chainId
!=
curTraceId
.
chainId
){
expect
().
assertFail
();
console
.
log
(
`testHitraceApi025 got an error:
${
JSON
.
stringify
(
error
)}
`
);
}
hiTraceChain
.
tracepoint
(
hiTraceChain
.
HiTraceCommunicationMode
.
DEVICE
,
hiTraceChain
.
HiTraceTracepointType
.
CR
,
traceId
,
"
hitrace api test.
"
);
hiTraceChain
.
end
(
traceId
);
}
catch
(
error
){
console
.
log
(
`testHitraceApi025 got an error:
${
JSON
.
stringify
(
error
)}
`
);
expect
().
assertFail
();
done
();
}
console
.
info
(
'
testHitraceApi025 end
'
);
done
();
})
/**
* @tc.name: 接口测试-HiTraceTracepointType为SR
* @tc.number DFX_DFT_Hitrace_JS_02600
* @tc.function A01010
* @tc.feature DFX_DFT_Hitrace
* @tc.level Level3
* @tc.type FUNC
*/
it
(
'
testHitraceApi026
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testHitraceApi026 start
'
);
try
{
let
traceId
=
hiTraceChain
.
begin
(
"
testHitraceApi026
"
,
hiTraceChain
.
HiTraceFlag
.
TP_INFO
);
let
curTraceId
=
hiTraceChain
.
getId
();
if
(
traceId
.
chainId
!=
curTraceId
.
chainId
){
expect
().
assertFail
();
console
.
log
(
`testHitraceApi026 got an error:
${
JSON
.
stringify
(
error
)}
`
);
}
hiTraceChain
.
tracepoint
(
hiTraceChain
.
HiTraceCommunicationMode
.
DEVICE
,
hiTraceChain
.
HiTraceTracepointType
.
SR
,
traceId
,
"
hitrace api test.
"
);
hiTraceChain
.
end
(
traceId
);
}
catch
(
error
){
console
.
log
(
`testHitraceApi026 got an error:
${
JSON
.
stringify
(
error
)}
`
);
expect
().
assertFail
();
done
();
}
console
.
info
(
'
testHitraceApi026 end
'
);
done
();
})
/**
* @tc.name: 接口测试-HiTraceTracepointType为GENERAL
* @tc.number DFX_DFT_Hitrace_JS_02700
* @tc.function A01010
* @tc.feature DFX_DFT_Hitrace
* @tc.level Level3
* @tc.type FUNC
*/
it
(
'
testHitraceApi027
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testHitraceApi027 start
'
);
try
{
let
traceId
=
hiTraceChain
.
begin
(
"
testHitraceApi027
"
,
hiTraceChain
.
HiTraceFlag
.
TP_INFO
);
let
curTraceId
=
hiTraceChain
.
getId
();
if
(
traceId
.
chainId
!=
curTraceId
.
chainId
){
expect
().
assertFail
();
console
.
log
(
`testHitraceApi027 got an error:
${
JSON
.
stringify
(
error
)}
`
);
}
hiTraceChain
.
tracepoint
(
hiTraceChain
.
HiTraceCommunicationMode
.
DEVICE
,
hiTraceChain
.
HiTraceTracepointType
.
GENERAL
,
traceId
,
"
hitrace api test.
"
);
hiTraceChain
.
end
(
traceId
);
}
catch
(
error
){
console
.
log
(
`testHitraceApi027 got an error:
${
JSON
.
stringify
(
error
)}
`
);
expect
().
assertFail
();
done
();
}
console
.
info
(
'
testHitraceApi027 end
'
);
done
();
})
})
}
hiviewdfx/hitracemetertest/BUILD.gn
浏览文件 @
ec38cb9e
...
...
@@ -20,6 +20,8 @@ ohos_js_hap_suite("ActsHitraceMeterTest") {
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHitraceMeterTest"
part_name = "hitrace_native"
subsystem_name = "hiviewdfx"
}
ohos_js_assets("hitracemeter_assets") {
js2abc = true
...
...
hiviewdfx/hiview/faultlogger/faultloggerjs/BUILD.gn
浏览文件 @
ec38cb9e
...
...
@@ -20,6 +20,8 @@ ohos_js_hap_suite("faultloggerjs_test") {
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsFaultloggerJsTest"
part_name = "faultloggerd"
subsystem_name = "hiviewdfx"
}
ohos_js_assets("faultloggerjs_assets") {
js2abc = true
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录