Merge branch 'master' of gitee.com:openharmony/ability_dmsfwk into master

Signed-off-by: zjucx <chengxiang4@huawei.com>
This commit is contained in:
zjucx 2023-06-21 06:21:59 +00:00 committed by Gitee
commit b5a38cbe98
10 changed files with 108 additions and 23 deletions

View File

@ -43,15 +43,14 @@
"device_security_level",
"device_manager",
"distributed_bundle_framework",
"distributeddatamgr",
"dmsfwk",
"dsoftbus",
"efficiency_manager",
"eventhandler",
"form_fwk",
"hisysevent_native",
"hitrace_native",
"hiviewdfx_hilog_native",
"hisysevent",
"hitrace",
"hilog",
"init",
"ipc",
"kv_store",
@ -60,7 +59,6 @@
"os_account",
"safwk",
"samgr",
"startup_l2",
"ffrt"
],
"third_party": []

View File

@ -42,7 +42,7 @@ ohos_shared_library("common_sdk") {
external_deps = [
"c_utils:utils",
"hiviewdfx_hilog_native:libhilog",
"hilog:libhilog",
"ipc:ipc_core",
"samgr:samgr_proxy",
]

View File

@ -40,7 +40,7 @@ ohos_shared_library("continuation_manager") {
external_deps = [
"c_utils:utils",
"hiviewdfx_hilog_native:libhilog",
"hilog:libhilog",
"ipc:ipc_core",
]

View File

@ -49,7 +49,7 @@ ohos_shared_library("continuationmanager_napi") {
"ability_runtime:napi_common",
"ability_runtime:runtime",
"c_utils:utils",
"hiviewdfx_hilog_native:libhilog",
"hilog:libhilog",
"ipc:ipc_core",
"napi:ace_napi",
]

View File

@ -63,7 +63,7 @@ ohos_shared_library("distributed_ability_manager_svr") {
"c_utils:utils",
"eventhandler:libeventhandler",
"ffrt:libffrt",
"hiviewdfx_hilog_native:libhilog",
"hilog:libhilog",
"init:libbegetutil",
"ipc:ipc_core",
"os_account:os_account_innerkits",

View File

@ -48,7 +48,7 @@ dtbabilitymgr_external_deps = [
"dmsfwk:continuation_manager",
"eventhandler:libeventhandler",
"ffrt:libffrt",
"hiviewdfx_hilog_native:libhilog",
"hilog:libhilog",
"init:libbegetutil",
"ipc:ipc_core",
"kv_store:distributeddata_inner",

View File

@ -108,10 +108,10 @@ ohos_shared_library("distributedschedsvr") {
"distributed_bundle_framework:dbms_fwk",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
"hisysevent_native:libhisysevent",
"hitrace_native:hitrace_meter",
"hitrace_native:libhitracechain",
"hiviewdfx_hilog_native:libhilog",
"hilog:libhilog",
"hisysevent:libhisysevent",
"hitrace:hitrace_meter",
"hitrace:libhitracechain",
"init:libbegetutil",
"ipc:ipc_core",
"kv_store:distributeddata_inner",

View File

@ -52,10 +52,10 @@ dsched_external_deps = [
"distributed_bundle_framework:dbms_fwk",
"dmsfwk:continuation_manager",
"eventhandler:libeventhandler",
"hisysevent_native:libhisysevent",
"hitrace_native:hitrace_meter",
"hitrace_native:libhitracechain",
"hiviewdfx_hilog_native:libhilog",
"hilog:libhilog",
"hisysevent:libhisysevent",
"hitrace:hitrace_meter",
"hitrace:libhitracechain",
"init:libbegetutil",
"ipc:ipc_core",
"kv_store:distributeddata_inner",
@ -469,6 +469,7 @@ group("unittest") {
":dmsfreeinstallcbtest",
":dschedconnecttest",
":dschedcontinuetest",
":softbusadaptertest",
]
if (dmsfwk_mission_manager) {
deps += [

View File

@ -53,7 +53,7 @@ HWTEST_F(SoftbusAdapterTest, SendSoftbusEvent_001, TestSize.Level3)
uint8_t* sendData = nullptr;
uint32_t sendDataLen = 1;
uint32_t result = SoftbusAdapter::GetInstance().SendSoftbusEvent(sendData, sendDataLen);
EXPECT_NE(result, SOFTBUS_OK);
EXPECT_EQ(result, SOFTBUS_OK);
DTEST_LOG << "SoftbusAdapterTest SendSoftbusEvent_001 end" << std::endl;
}
@ -66,7 +66,7 @@ HWTEST_F(SoftbusAdapterTest, StopSoftbusEvent_001, TestSize.Level3)
{
DTEST_LOG << "SoftbusAdapterTest StopSoftbusEvent_001 begin" << std::endl;
uint32_t result = SoftbusAdapter::GetInstance().StopSoftbusEvent();
EXPECT_NE(result, SOFTBUS_OK);
EXPECT_EQ(result, SOFTBUS_OK);
DTEST_LOG << "SoftbusAdapterTest StopSoftbusEvent_001 end" << std::endl;
}
@ -80,7 +80,7 @@ HWTEST_F(SoftbusAdapterTest, RegisterSoftbusEventListener_001, TestSize.Level3)
DTEST_LOG << "SoftbusAdapterTest RegisterSoftbusEventListener_001 begin" << std::endl;
std::shared_ptr<SubSoftbusAdapterListener> listener = std::make_shared<SubSoftbusAdapterListener>();
uint32_t result = SoftbusAdapter::GetInstance().RegisterSoftbusEventListener(listener);
EXPECT_NE(result, SOFTBUS_OK);
EXPECT_EQ(result, SOFTBUS_OK);
DTEST_LOG << "SoftbusAdapterTest RegisterSoftbusEventListener_001 end" << std::endl;
}
@ -94,8 +94,94 @@ HWTEST_F(SoftbusAdapterTest, UnregisterSoftbusEventListener_001, TestSize.Level3
DTEST_LOG << "SoftbusAdapterTest UnregisterSoftbusEventListener_001 begin" << std::endl;
std::shared_ptr<SubSoftbusAdapterListener> listener = std::make_shared<SubSoftbusAdapterListener>();
uint32_t result = SoftbusAdapter::GetInstance().UnregisterSoftbusEventListener(listener);
EXPECT_NE(result, SOFTBUS_OK);
EXPECT_EQ(result, SOFTBUS_OK);
DTEST_LOG << "SoftbusAdapterTest UnregisterSoftbusEventListener_001 end" << std::endl;
}
/**
* @tc.name: RegisterSoftbusEventListener_002
* @tc.desc: call RegisterSoftbusEventListener from distributedsched
* @tc.type: FUNC
*/
HWTEST_F(SoftbusAdapterTest, RegisterSoftbusEventListener_002, TestSize.Level3)
{
DTEST_LOG << "SoftbusAdapterTest RegisterSoftbusEventListener_002 begin" << std::endl;
std::shared_ptr<SubSoftbusAdapterListener> listener = nullptr;
uint32_t result = SoftbusAdapter::GetInstance().RegisterSoftbusEventListener(listener);
EXPECT_EQ(result, SOFTBUS_OK);
DTEST_LOG << "SoftbusAdapterTest RegisterSoftbusEventListener_002 end" << std::endl;
}
/**
* @tc.name: StopSoftbusEvent_002
* @tc.desc: call StopSoftbusEvent from distributedsched
* @tc.type: FUNC
*/
HWTEST_F(SoftbusAdapterTest, StopSoftbusEvent_002, TestSize.Level3)
{
DTEST_LOG << "SoftbusAdapterTest StopSoftbusEvent_002 begin" << std::endl;
SoftbusAdapter::GetInstance().pkgName_ = "oh";
uint32_t result = SoftbusAdapter::GetInstance().StopSoftbusEvent();
EXPECT_EQ(result, SOFTBUS_OK);
DTEST_LOG << "SoftbusAdapterTest StopSoftbusEvent_002 end" << std::endl;
}
/**
* @tc.name: RegisterSoftbusEventListener_003
* @tc.desc: call RegisterSoftbusEventListener from distributedsched
* @tc.type: FUNC
*/
HWTEST_F(SoftbusAdapterTest, RegisterSoftbusEventListener_003, TestSize.Level3)
{
DTEST_LOG << "SoftbusAdapterTest RegisterSoftbusEventListener_003 begin" << std::endl;
std::shared_ptr<SubSoftbusAdapterListener> listener ;
uint32_t result = SoftbusAdapter::GetInstance().RegisterSoftbusEventListener(listener);
EXPECT_EQ(result, SOFTBUS_OK);
DTEST_LOG << "SoftbusAdapterTest RegisterSoftbusEventListener_003 end" << std::endl;
}
/**
* @tc.name: RegisterSoftbusEventListener_004
* @tc.desc: call RegisterSoftbusEventListener from distributedsched
* @tc.type: FUNC
*/
HWTEST_F(SoftbusAdapterTest, RegisterSoftbusEventListener_004, TestSize.Level3)
{
DTEST_LOG << "SoftbusAdapterTest RegisterSoftbusEventListener_004 begin" << std::endl;
std::shared_ptr<SubSoftbusAdapterListener> listener ;
SoftbusAdapter::GetInstance().pkgName_ = "oh";
uint32_t result = SoftbusAdapter::GetInstance().RegisterSoftbusEventListener(listener);
EXPECT_EQ(result, SOFTBUS_OK);
DTEST_LOG << "SoftbusAdapterTest RegisterSoftbusEventListener_004 end" << std::endl;
}
/**
* @tc.name: UnregisterSoftbusEventListener_002
* @tc.desc: call UnregisterSoftbusEventListener from distributedsched
* @tc.type: FUNC
*/
HWTEST_F(SoftbusAdapterTest, UnregisterSoftbusEventListener_002, TestSize.Level3)
{
DTEST_LOG << "SoftbusAdapterTest UnregisterSoftbusEventListener_002 begin" << std::endl;
std::shared_ptr<SubSoftbusAdapterListener> listener;
uint32_t result = SoftbusAdapter::GetInstance().UnregisterSoftbusEventListener(listener);
EXPECT_EQ(result, SOFTBUS_OK);
DTEST_LOG << "SoftbusAdapterTest UnregisterSoftbusEventListener_002 end" << std::endl;
}
/**
* @tc.name: UnregisterSoftbusEventListener_003
* @tc.desc: call UnregisterSoftbusEventListener from distributedsched
* @tc.type: FUNC
*/
HWTEST_F(SoftbusAdapterTest, UnregisterSoftbusEventListener_003, TestSize.Level3)
{
DTEST_LOG << "SoftbusAdapterTest UnregisterSoftbusEventListener_003 begin" << std::endl;
std::shared_ptr<SubSoftbusAdapterListener> listener = std::make_shared<SubSoftbusAdapterListener>();
SoftbusAdapter::GetInstance().pkgName_ = "oh";
uint32_t result = SoftbusAdapter::GetInstance().UnregisterSoftbusEventListener(listener);
EXPECT_EQ(result, SOFTBUS_OK);
DTEST_LOG << "SoftbusAdapterTest UnregisterSoftbusEventListener_003 end" << std::endl;
}
}
}

View File

@ -53,7 +53,7 @@ dtbabilitymgr_external_deps = [
"device_manager:devicemanagersdk",
"eventhandler:libeventhandler",
"ffrt:libffrt",
"hiviewdfx_hilog_native:libhilog",
"hilog:libhilog",
"init:libbegetutil",
"ipc:ipc_core",
"os_account:os_account_innerkits",