From 319cbe4e7812a9f1cd6b1d24458b5aaf455cb5d6 Mon Sep 17 00:00:00 2001 From: htt1997 Date: Wed, 7 May 2025 16:38:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=E8=A7=A3=E8=80=A6distributeddb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 邓俊 --- .../adapter/bundle_mgr/BUILD.gn | 57 +++++++++++++++++++ .../adapter/bundle_mgr/bundle_mgr_adapter.cpp | 40 +++++++++++++ .../adapter/bundle_mgr/test/BUILD.gn | 42 ++++++++++++++ .../bundle_mgr/test/bundle_mgr_test.cpp | 45 +++++++++++++++ .../adapter/test/BUILD.gn | 6 +- .../service/rdb/rdb_service_impl.cpp | 12 ++++ .../service/test/BUILD.gn | 53 ++++++++--------- .../fuzztest/cloudservicestub_fuzzer/BUILD.gn | 51 ++--------------- .../fuzztest/rdbservicestub_fuzzer/BUILD.gn | 37 ++---------- 9 files changed, 235 insertions(+), 108 deletions(-) create mode 100644 services/distributeddataservice/adapter/bundle_mgr/BUILD.gn create mode 100644 services/distributeddataservice/adapter/bundle_mgr/bundle_mgr_adapter.cpp create mode 100644 services/distributeddataservice/adapter/bundle_mgr/test/BUILD.gn create mode 100644 services/distributeddataservice/adapter/bundle_mgr/test/bundle_mgr_test.cpp diff --git a/services/distributeddataservice/adapter/bundle_mgr/BUILD.gn b/services/distributeddataservice/adapter/bundle_mgr/BUILD.gn new file mode 100644 index 000000000..7ca4db4f9 --- /dev/null +++ b/services/distributeddataservice/adapter/bundle_mgr/BUILD.gn @@ -0,0 +1,57 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//build/ohos.gni") +import("//foundation/distributeddatamgr/datamgr_service/datamgr_service.gni") + +config("module_public_config") { + visibility = [ ":*" ] + include_dirs = [ "${data_service_path}/adapter" ] +} + +ohos_source_set("distributeddata_bundle_mgr") { + branch_protector_ret = "pac_ret" + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + boundary_sanitize = true + ubsan = true + } + sources = [ "bundle_mgr_adapter.cpp" ] + cflags_cc = [ + "-fvisibility=hidden", + "-Oz", + "-fstack-protector-strong", + ] + + public_configs = [ ":module_public_config" ] + cflags = [ + "-fdata-sections", + "-ffunction-sections", + "-Werror", + "-Wno-multichar", + "-Wno-c99-designator", + "-D_LIBCPP_HAS_COND_CLOCKWAIT", + "-Oz", + "-fstack-protector-strong", + ] + + external_deps = [ "kv_store:datamgr_common" ] + external_deps += [ + "bundle_framework:appexecfwk_base", + "bundle_framework:appexecfwk_core", + "hilog:libhilog", + ] + subsystem_name = "distributeddatamgr" + part_name = "datamgr_service" +} diff --git a/services/distributeddataservice/adapter/bundle_mgr/bundle_mgr_adapter.cpp b/services/distributeddataservice/adapter/bundle_mgr/bundle_mgr_adapter.cpp new file mode 100644 index 000000000..efd9d203a --- /dev/null +++ b/services/distributeddataservice/adapter/bundle_mgr/bundle_mgr_adapter.cpp @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG "BundleMgrAdapter" +#include "bundle_mgr/bundle_mgr_adapter.h" +#include "bundle_mgr_client.h" +#include "log_print.h" +using namespace OHOS::AppExecFwk; +namespace OHOS::DistributedData { + +BundleMgrAdapter &BundleMgrAdapter::GetInstance() +{ + static BundleMgrAdapter instance; + return instance; +} + +std::string BundleMgrAdapter::GetBundleName(int32_t uid) +{ + BundleMgrClient client; + std::string bundleName; + auto code = client.GetNameForUid(uid, bundleName); + if (code != 0) { + ZLOGE("failed. uid:%{public}d, code:%{public}d", uid, code); + return ""; + } + return bundleName; +} +} // namespace OHOS::DistributedData \ No newline at end of file diff --git a/services/distributeddataservice/adapter/bundle_mgr/test/BUILD.gn b/services/distributeddataservice/adapter/bundle_mgr/test/BUILD.gn new file mode 100644 index 000000000..193ada6a4 --- /dev/null +++ b/services/distributeddataservice/adapter/bundle_mgr/test/BUILD.gn @@ -0,0 +1,42 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//build/test.gni") +import("//foundation/distributeddatamgr/datamgr_service/datamgr_service.gni") +module_output_path = "datamgr_service/datamgr_service/distributeddatafwk" + +############################################################################### +ohos_unittest("BundleMgrTest") { + module_out_path = module_output_path + + sources = [ "bundle_mgr_test.cpp" ] + + cflags = [ "-Werror" ] + deps = [ "${data_service_path}/adapter/bundle_mgr:distributeddata_bundle_mgr" ] + + external_deps = [ + "googletest:gtest_main", + "hilog:libhilog", + "ipc:ipc_core", + "kv_store:datamgr_common", + ] +} + +############################################################################### +group("unittest") { + testonly = true + + deps = [] + + deps += [ ":BundleMgrTest" ] +} +############################################################################### diff --git a/services/distributeddataservice/adapter/bundle_mgr/test/bundle_mgr_test.cpp b/services/distributeddataservice/adapter/bundle_mgr/test/bundle_mgr_test.cpp new file mode 100644 index 000000000..bf5590727 --- /dev/null +++ b/services/distributeddataservice/adapter/bundle_mgr/test/bundle_mgr_test.cpp @@ -0,0 +1,45 @@ +/* +* Copyright (c) 2025 Huawei Device Co., Ltd. +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include + +#include "bundle_mgr/bundle_mgr_adapter.h" +#include "ipc_skeleton.h" +namespace { +using namespace OHOS; +using namespace OHOS::DistributedData; +using namespace testing::ext; + +class BundleMgrTest : public testing::Test { +public: + static void SetUpTestCase(void) {} + static void TearDownTestCase(void) {} + void SetUp() {} + void TearDown() {} +}; + +/** +* @tc.name: GetBundleName +* @tc.desc: GetBundleName test +* @tc.type: FUNC +* @tc.require: +* @tc.author: +*/ +HWTEST_F(BundleMgrTest, GetBundleName, TestSize.Level0) +{ + auto bundleName = BundleMgrAdapter::GetInstance().GetBundleName(0); + EXPECT_TRUE(bundleName.empty()); +} +} // namespace \ No newline at end of file diff --git a/services/distributeddataservice/adapter/test/BUILD.gn b/services/distributeddataservice/adapter/test/BUILD.gn index 6f6f3b435..7e5686d14 100755 --- a/services/distributeddataservice/adapter/test/BUILD.gn +++ b/services/distributeddataservice/adapter/test/BUILD.gn @@ -20,11 +20,15 @@ group("unittest") { deps += [ "../account/test:unittest", + "../bundle_mgr/test:unittest", "../communicator/test:unittest", "../dfx/test:unittest", - "../screenlock/test:unittest", ] + if (defined(global_parts_info) && defined(global_parts_info.theme_screenlock_mgr)) { + deps += [ "${data_service_path}/adapter/screenlock/test:unittest" ] + } + if (datamgr_service_cloud) { deps += [ "../network/test:unittest" ] } diff --git a/services/distributeddataservice/service/rdb/rdb_service_impl.cpp b/services/distributeddataservice/service/rdb/rdb_service_impl.cpp index 61bff0d76..35b749d39 100644 --- a/services/distributeddataservice/service/rdb/rdb_service_impl.cpp +++ b/services/distributeddataservice/service/rdb/rdb_service_impl.cpp @@ -233,8 +233,20 @@ bool RdbServiceImpl::CheckAccess(const std::string& bundleName, const std::strin std::string RdbServiceImpl::ObtainDistributedTableName(const std::string &device, const std::string &table) { +<<<<<<< HEAD ZLOGI("device=%{public}s table=%{public}s", Anonymous::Change(device).c_str(), table.c_str()); auto uuid = DmAdapter::GetInstance().GetUuidByNetworkId(device); +======= + ZLOGI("device=%{public}s table=%{public}s", Anonymous::Change(device).c_str(), Anonymous::Change(table).c_str()); + auto uid = IPCSkeleton::GetCallingUid(); + auto bundleName = BundleMgrAdapter::GetInstance().GetBundleName(uid); + auto tokenId = IPCSkeleton::GetCallingTokenID(); + std::string appId = " "; + if (AccessTokenKit::GetTokenTypeFlag(tokenId) == Security::AccessToken::TOKEN_HAP) { + appId = CheckerManager::GetInstance().GetAppId({ uid, tokenId, bundleName }); + } + auto uuid = DmAdapter::GetInstance().CalcClientUuid(appId, DmAdapter::GetInstance().ToUUID(device)); +>>>>>>> 21e56f013 (add ut) if (uuid.empty()) { ZLOGE("get uuid failed"); return ""; diff --git a/services/distributeddataservice/service/test/BUILD.gn b/services/distributeddataservice/service/test/BUILD.gn index b2f90d849..70982016a 100755 --- a/services/distributeddataservice/service/test/BUILD.gn +++ b/services/distributeddataservice/service/test/BUILD.gn @@ -67,8 +67,6 @@ ohos_unittest("CloudDataTest") { } module_out_path = module_output_path sources = [ - "${data_service_path}/service/backup/src/backup_manager.cpp", - "${data_service_path}/service/bootstrap/src/bootstrap.cpp", "${data_service_path}/service/cloud/cloud_data_translate.cpp", "${data_service_path}/service/cloud/cloud_service_impl.cpp", "${data_service_path}/service/cloud/cloud_service_stub.cpp", @@ -76,6 +74,7 @@ ohos_unittest("CloudDataTest") { "${data_service_path}/service/cloud/cloud_value_util.cpp", "${data_service_path}/service/cloud/sync_manager.cpp", "${data_service_path}/service/cloud/sync_strategies/network_sync_strategy.cpp", +<<<<<<< HEAD "${data_service_path}/service/common/common_types_utils.cpp", "${data_service_path}/service/common/value_proxy.cpp", "${data_service_path}/service/common/xcollie.cpp", @@ -110,6 +109,8 @@ ohos_unittest("CloudDataTest") { "${data_service_path}/service/rdb/rdb_service_impl.cpp", "${data_service_path}/service/rdb/rdb_service_stub.cpp", "${data_service_path}/service/rdb/rdb_watcher.cpp", +======= +>>>>>>> 21e56f013 (add ut) "${data_service_path}/service/test/mock/checker_mock.cpp", "cloud_data_test.cpp", ] @@ -117,33 +118,30 @@ ohos_unittest("CloudDataTest") { configs = [ ":module_private_config" ] external_deps = [ - "ability_base:base", - "ability_base:want", "access_token:libaccesstoken_sdk", "access_token:libtoken_setproc", "access_token:libtokenid_sdk", - "bundle_framework:appexecfwk_base", - "bundle_framework:appexecfwk_core", "c_utils:utils", - "device_manager:devicemanagersdk", "hicollie:libhicollie", - "hilog:libhilog", - "hisysevent:libhisysevent", - "huks:libhukssdk", - "ipc:ipc_core", + "json:nlohmann_json_static", "kv_store:distributeddata_inner", "kv_store:distributeddb", - "netmanager_base:net_conn_manager_if", "relational_store:native_rdb", - "resource_management:global_resmgr", - "samgr:samgr_proxy", ] deps = [ "${data_service_path}/adapter/account:distributeddata_account", "${data_service_path}/adapter/communicator:distributeddata_communicator", + "${data_service_path}/adapter/dfx:distributeddata_dfx", "${data_service_path}/adapter/schema_helper:distributeddata_schema_helper", +<<<<<<< HEAD "../../framework:distributeddatasvcfwk", +======= + "${data_service_path}/service/bootstrap:distributeddata_bootstrap", + "${data_service_path}/service/common:distributeddata_common", + "${data_service_path}/service/rdb:distributeddata_rdb", + "${data_service_path}/framework:distributeddatasvcfwk", +>>>>>>> 21e56f013 (add ut) "mock:distributeddata_mock_static", "//third_party/googletest:gtest_main", ] @@ -163,8 +161,6 @@ ohos_unittest("CloudServiceImplTest") { } module_out_path = module_output_path sources = [ - "${data_service_path}/service/backup/src/backup_manager.cpp", - "${data_service_path}/service/bootstrap/src/bootstrap.cpp", "${data_service_path}/service/cloud/cloud_data_translate.cpp", "${data_service_path}/service/cloud/cloud_service_impl.cpp", "${data_service_path}/service/cloud/cloud_service_stub.cpp", @@ -172,6 +168,7 @@ ohos_unittest("CloudServiceImplTest") { "${data_service_path}/service/cloud/cloud_value_util.cpp", "${data_service_path}/service/cloud/sync_manager.cpp", "${data_service_path}/service/cloud/sync_strategies/network_sync_strategy.cpp", +<<<<<<< HEAD "${data_service_path}/service/common/common_types_utils.cpp", "${data_service_path}/service/common/value_proxy.cpp", "${data_service_path}/service/common/xcollie.cpp", @@ -206,6 +203,8 @@ ohos_unittest("CloudServiceImplTest") { "${data_service_path}/service/rdb/rdb_service_impl.cpp", "${data_service_path}/service/rdb/rdb_service_stub.cpp", "${data_service_path}/service/rdb/rdb_watcher.cpp", +======= +>>>>>>> 21e56f013 (add ut) "${data_service_path}/service/test/mock/checker_mock.cpp", "cloud_service_impl_test.cpp", ] @@ -213,33 +212,29 @@ ohos_unittest("CloudServiceImplTest") { configs = [ ":module_private_config" ] external_deps = [ - "ability_base:base", - "ability_base:want", "access_token:libaccesstoken_sdk", "access_token:libtoken_setproc", - "access_token:libtokenid_sdk", - "bundle_framework:appexecfwk_base", - "bundle_framework:appexecfwk_core", "c_utils:utils", - "device_manager:devicemanagersdk", "hicollie:libhicollie", - "hilog:libhilog", - "hisysevent:libhisysevent", - "huks:libhukssdk", - "ipc:ipc_core", + "json:nlohmann_json_static", "kv_store:distributeddata_inner", "kv_store:distributeddb", - "netmanager_base:net_conn_manager_if", "relational_store:native_rdb", - "resource_management:global_resmgr", - "samgr:samgr_proxy", ] deps = [ "${data_service_path}/adapter/account:distributeddata_account", "${data_service_path}/adapter/communicator:distributeddata_communicator", + "${data_service_path}/adapter/dfx:distributeddata_dfx", "${data_service_path}/adapter/schema_helper:distributeddata_schema_helper", +<<<<<<< HEAD "../../framework:distributeddatasvcfwk", +======= + "${data_service_path}/service/bootstrap:distributeddata_bootstrap", + "${data_service_path}/service/common:distributeddata_common", + "${data_service_path}/service/rdb:distributeddata_rdb", + "${data_service_path}/framework:distributeddatasvcfwk", +>>>>>>> 21e56f013 (add ut) "mock:distributeddata_mock_static", "//third_party/googletest:gtest_main", ] diff --git a/services/distributeddataservice/service/test/fuzztest/cloudservicestub_fuzzer/BUILD.gn b/services/distributeddataservice/service/test/fuzztest/cloudservicestub_fuzzer/BUILD.gn index 3cb8f10bd..809567f62 100644 --- a/services/distributeddataservice/service/test/fuzztest/cloudservicestub_fuzzer/BUILD.gn +++ b/services/distributeddataservice/service/test/fuzztest/cloudservicestub_fuzzer/BUILD.gn @@ -64,65 +64,24 @@ ohos_fuzztest("CloudServiceStubFuzzTest") { sources = [ "${data_service_path}/app/src/checker/bundle_checker.cpp", "${data_service_path}/app/src/checker/system_checker.cpp", - "${data_service_path}/service/backup/src/backup_manager.cpp", - "${data_service_path}/service/bootstrap/src/bootstrap.cpp", - "${data_service_path}/service/cloud/cloud_data_translate.cpp", - "${data_service_path}/service/cloud/cloud_service_impl.cpp", - "${data_service_path}/service/cloud/cloud_service_stub.cpp", - "${data_service_path}/service/cloud/cloud_types_util.cpp", - "${data_service_path}/service/cloud/cloud_value_util.cpp", - "${data_service_path}/service/cloud/sync_manager.cpp", - "${data_service_path}/service/cloud/sync_strategies/network_sync_strategy.cpp", - "${data_service_path}/service/common/common_types_utils.cpp", - "${data_service_path}/service/common/value_proxy.cpp", - "${data_service_path}/service/common/xcollie.cpp", - "${data_service_path}/service/config/src/config_factory.cpp", - "${data_service_path}/service/config/src/model/app_id_mapping_config.cpp", - "${data_service_path}/service/config/src/model/backup_config.cpp", - "${data_service_path}/service/config/src/model/checker_config.cpp", - "${data_service_path}/service/config/src/model/cloud_config.cpp", - "${data_service_path}/service/config/src/model/component_config.cpp", - "${data_service_path}/service/config/src/model/directory_config.cpp", - "${data_service_path}/service/config/src/model/global_config.cpp", - "${data_service_path}/service/config/src/model/network_config.cpp", - "${data_service_path}/service/config/src/model/protocol_config.cpp", - "${data_service_path}/service/config/src/model/thread_config.cpp", - "${data_service_path}/service/crypto/src/crypto_manager.cpp", - "${data_service_path}/service/kvdb/user_delegate.cpp", - "${data_service_path}/service/permission/src/permission_validator.cpp", - "${data_service_path}/service/permission/src/permit_delegate.cpp", - "${data_service_path}/service/rdb/cache_cursor.cpp", - "${data_service_path}/service/rdb/rdb_asset_loader.cpp", - "${data_service_path}/service/rdb/rdb_cloud.cpp", - "${data_service_path}/service/rdb/rdb_cursor.cpp", - "${data_service_path}/service/rdb/rdb_general_store.cpp", - "${data_service_path}/service/rdb/rdb_hiview_adapter.cpp", - "${data_service_path}/service/rdb/rdb_notifier_proxy.cpp", - "${data_service_path}/service/rdb/rdb_query.cpp", - "${data_service_path}/service/rdb/rdb_result_set_impl.cpp", - "${data_service_path}/service/rdb/rdb_result_set_stub.cpp", - "${data_service_path}/service/rdb/rdb_schema_config.cpp", - "${data_service_path}/service/rdb/rdb_service_impl.cpp", - "${data_service_path}/service/rdb/rdb_service_stub.cpp", - "${data_service_path}/service/rdb/rdb_watcher.cpp", "cloudservicestub_fuzzer.cpp", ] deps = [ "${data_service_path}/adapter/account:distributeddata_account", + "${data_service_path}/adapter/dfx:distributeddata_dfx", "${data_service_path}/adapter/network:distributeddata_network", "${data_service_path}/adapter/schema_helper:distributeddata_schema_helper", "${data_service_path}/adapter/utils:distributeddata_utils", "${data_service_path}/framework:distributeddatasvcfwk", - "${data_service_path}/service:distributeddatasvc", + "${data_service_path}/service/bootstrap:distributeddata_bootstrap", + "${data_service_path}/service/cloud:distributeddata_cloud", + "${data_service_path}/service/common:distributeddata_common", + "${data_service_path}/service/rdb:distributeddata_rdb", "${kv_store_distributeddb_path}:distributeddb", ] external_deps = [ - "ability_base:want", - "ability_base:zuri", - "ability_runtime:ability_manager", - "ability_runtime:dataobs_manager", "access_token:libaccesstoken_sdk", "access_token:libtoken_setproc", "access_token:libtokenid_sdk", diff --git a/services/distributeddataservice/service/test/fuzztest/rdbservicestub_fuzzer/BUILD.gn b/services/distributeddataservice/service/test/fuzztest/rdbservicestub_fuzzer/BUILD.gn index e51d78511..820172706 100644 --- a/services/distributeddataservice/service/test/fuzztest/rdbservicestub_fuzzer/BUILD.gn +++ b/services/distributeddataservice/service/test/fuzztest/rdbservicestub_fuzzer/BUILD.gn @@ -64,46 +64,19 @@ ohos_fuzztest("RdbServiceStubFuzzTest") { sources = [ "${data_service_path}/app/src/checker/bundle_checker.cpp", "${data_service_path}/app/src/checker/system_checker.cpp", - "${data_service_path}/service/backup/src/backup_manager.cpp", - "${data_service_path}/service/bootstrap/src/bootstrap.cpp", - "${data_service_path}/service/common/value_proxy.cpp", - "${data_service_path}/service/common/xcollie.cpp", - "${data_service_path}/service/config/src/config_factory.cpp", - "${data_service_path}/service/config/src/model/app_id_mapping_config.cpp", - "${data_service_path}/service/config/src/model/backup_config.cpp", - "${data_service_path}/service/config/src/model/checker_config.cpp", - "${data_service_path}/service/config/src/model/cloud_config.cpp", - "${data_service_path}/service/config/src/model/component_config.cpp", - "${data_service_path}/service/config/src/model/directory_config.cpp", - "${data_service_path}/service/config/src/model/global_config.cpp", - "${data_service_path}/service/config/src/model/network_config.cpp", - "${data_service_path}/service/config/src/model/protocol_config.cpp", - "${data_service_path}/service/config/src/model/thread_config.cpp", - "${data_service_path}/service/crypto/src/crypto_manager.cpp", - "${data_service_path}/service/rdb/cache_cursor.cpp", - "${data_service_path}/service/rdb/rdb_asset_loader.cpp", - "${data_service_path}/service/rdb/rdb_cloud.cpp", - "${data_service_path}/service/rdb/rdb_cursor.cpp", - "${data_service_path}/service/rdb/rdb_general_store.cpp", - "${data_service_path}/service/rdb/rdb_hiview_adapter.cpp", - "${data_service_path}/service/rdb/rdb_notifier_proxy.cpp", - "${data_service_path}/service/rdb/rdb_query.cpp", - "${data_service_path}/service/rdb/rdb_result_set_impl.cpp", - "${data_service_path}/service/rdb/rdb_result_set_stub.cpp", - "${data_service_path}/service/rdb/rdb_schema_config.cpp", - "${data_service_path}/service/rdb/rdb_service_impl.cpp", - "${data_service_path}/service/rdb/rdb_service_stub.cpp", - "${data_service_path}/service/rdb/rdb_watcher.cpp", "rdbservicestub_fuzzer.cpp", ] deps = [ "${data_service_path}/adapter/account:distributeddata_account", + "${data_service_path}/adapter/dfx:distributeddata_dfx", "${data_service_path}/adapter/utils:distributeddata_utils", "${data_service_path}/framework:distributeddatasvcfwk", - "${data_service_path}/service:distributeddatasvc", + "${data_service_path}/service/bootstrap:distributeddata_bootstrap", + "${data_service_path}/service/cloud:distributeddata_cloud", + "${data_service_path}/service/common:distributeddata_common", + "${data_service_path}/service/rdb:distributeddata_rdb", "${kv_store_distributeddb_path}:distributeddb", - "${relational_store_inner_api_path}:native_rdb_static", ] external_deps = [ -- Gitee From 250adce357d22e1b5b8fcb61b07b2d7344f2d66e Mon Sep 17 00:00:00 2001 From: htt1997 Date: Wed, 7 May 2025 16:38:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=E8=A7=A3=E8=80=A6distributeddb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 邓俊 --- .../distributeddataservice/service/test/BUILD.gn | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/services/distributeddataservice/service/test/BUILD.gn b/services/distributeddataservice/service/test/BUILD.gn index 70982016a..c020173bf 100755 --- a/services/distributeddataservice/service/test/BUILD.gn +++ b/services/distributeddataservice/service/test/BUILD.gn @@ -74,6 +74,7 @@ ohos_unittest("CloudDataTest") { "${data_service_path}/service/cloud/cloud_value_util.cpp", "${data_service_path}/service/cloud/sync_manager.cpp", "${data_service_path}/service/cloud/sync_strategies/network_sync_strategy.cpp", +<<<<<<< HEAD <<<<<<< HEAD "${data_service_path}/service/common/common_types_utils.cpp", "${data_service_path}/service/common/value_proxy.cpp", @@ -110,6 +111,8 @@ ohos_unittest("CloudDataTest") { "${data_service_path}/service/rdb/rdb_service_stub.cpp", "${data_service_path}/service/rdb/rdb_watcher.cpp", ======= +>>>>>>> 21e56f013 (add ut) +======= >>>>>>> 21e56f013 (add ut) "${data_service_path}/service/test/mock/checker_mock.cpp", "cloud_data_test.cpp", @@ -134,9 +137,12 @@ ohos_unittest("CloudDataTest") { "${data_service_path}/adapter/communicator:distributeddata_communicator", "${data_service_path}/adapter/dfx:distributeddata_dfx", "${data_service_path}/adapter/schema_helper:distributeddata_schema_helper", +<<<<<<< HEAD <<<<<<< HEAD "../../framework:distributeddatasvcfwk", ======= +======= +>>>>>>> 21e56f013 (add ut) "${data_service_path}/service/bootstrap:distributeddata_bootstrap", "${data_service_path}/service/common:distributeddata_common", "${data_service_path}/service/rdb:distributeddata_rdb", @@ -168,6 +174,7 @@ ohos_unittest("CloudServiceImplTest") { "${data_service_path}/service/cloud/cloud_value_util.cpp", "${data_service_path}/service/cloud/sync_manager.cpp", "${data_service_path}/service/cloud/sync_strategies/network_sync_strategy.cpp", +<<<<<<< HEAD <<<<<<< HEAD "${data_service_path}/service/common/common_types_utils.cpp", "${data_service_path}/service/common/value_proxy.cpp", @@ -204,6 +211,8 @@ ohos_unittest("CloudServiceImplTest") { "${data_service_path}/service/rdb/rdb_service_stub.cpp", "${data_service_path}/service/rdb/rdb_watcher.cpp", ======= +>>>>>>> 21e56f013 (add ut) +======= >>>>>>> 21e56f013 (add ut) "${data_service_path}/service/test/mock/checker_mock.cpp", "cloud_service_impl_test.cpp", @@ -227,9 +236,12 @@ ohos_unittest("CloudServiceImplTest") { "${data_service_path}/adapter/communicator:distributeddata_communicator", "${data_service_path}/adapter/dfx:distributeddata_dfx", "${data_service_path}/adapter/schema_helper:distributeddata_schema_helper", +<<<<<<< HEAD <<<<<<< HEAD "../../framework:distributeddatasvcfwk", ======= +======= +>>>>>>> 21e56f013 (add ut) "${data_service_path}/service/bootstrap:distributeddata_bootstrap", "${data_service_path}/service/common:distributeddata_common", "${data_service_path}/service/rdb:distributeddata_rdb", -- Gitee