提交 ec38cb9e 编写于 作者: 1 15929983503

buildgn add partname and systemname

Signed-off-by: N15929983503 <duanhaizhen@huawei.com>
上级 f570d894
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -38,4 +38,6 @@ ohos_moduletest_suite("ActsHiAppEventCPPTest") {
"//third_party/googletest:gtest_main",
]
configs = [ ":hilogtest_config" ]
part_name = "hisysevent_native"
subsystem_name = "hiviewdfx"
}
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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" ]
}
......
......@@ -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
......
......@@ -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
......
......@@ -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();
})
})
}
......@@ -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
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册