From 9fc20798ee979fe0490a9eae4f4914069308b7bc Mon Sep 17 00:00:00 2001 From: zhanghanwu Date: Thu, 10 Apr 2025 10:48:07 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E9=9C=80=E6=B1=82]:=20[=E9=83=A8?= =?UTF-8?q?=E4=BB=B6=E5=8C=96=E6=B2=BB=E7=90=86]=E7=A6=81=E6=AD=A2?= =?UTF-8?q?=E7=BB=9D=E5=AF=B9=E8=B7=AF=E5=BE=84=E4=BE=9D=E8=B5=96=E5=85=B6?= =?UTF-8?q?=E5=AE=83=E9=83=A8=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bundle.json | 9 ++++- frameworks/ans/BUILD.gn | 2 +- frameworks/core/BUILD.gn | 1 + .../ans_notification_annex_test/BUILD.gn | 2 +- frameworks/js/napi/BUILD.gn | 8 ++-- frameworks/js/napi/src/manager/BUILD.gn | 4 +- frameworks/js/napi/src/reminder/BUILD.gn | 8 ++-- frameworks/js/napi/src/subscribe/BUILD.gn | 6 +-- frameworks/test/moduletest/BUILD.gn | 13 ++++--- services/ans/BUILD.gn | 1 + .../live_publish_process.cpp | 2 +- .../add_do_not_disturb_profiles.cpp | 2 +- .../get_do_not_disturb_date.cpp | 2 +- .../get_do_not_disturb_profile.cpp | 2 +- .../set_do_not_disturb_date.cpp | 2 +- services/ans/src/slot_manager/AddSlots.cpp | 2 +- .../setNotificationEnableSlot.cpp | 2 +- services/ans/test/unittest/BUILD.gn | 38 +++++++++---------- services/distributed/test/unittest/BUILD.gn | 18 ++++----- services/test/moduletest/BUILD.gn | 1 - .../notification_publish_test/BUILD.gn | 4 +- .../notification_services_test/BUILD.gn | 7 +--- test/fuzztest/fuzz_common_base/BUILD.gn | 5 ++- tools/test/unittest/dump/BUILD.gn | 5 +-- 24 files changed, 73 insertions(+), 73 deletions(-) diff --git a/bundle.json b/bundle.json index c564fdcc7..e3b350c64 100644 --- a/bundle.json +++ b/bundle.json @@ -102,12 +102,17 @@ "openssl", "power_manager", "dsoftbus", - "zlib" + "zlib", + "libuv", + "json", + "node" ], "third_party": [ "libuv", "libxml2", - "icu" + "icu", + "json", + "node" ] }, "build": { diff --git a/frameworks/ans/BUILD.gn b/frameworks/ans/BUILD.gn index ad5f354b2..fff01ce2d 100644 --- a/frameworks/ans/BUILD.gn +++ b/frameworks/ans/BUILD.gn @@ -75,7 +75,6 @@ config("ans_innerkits_public_config") { "${core_path}/common/include", "${core_path}/include", "${target_gen_dir}", - "//third_party/json/single_include", ] configs = [ "${multimedia_path}/interfaces/innerkits:image_external_config" ] } @@ -298,6 +297,7 @@ ohos_shared_library("ans_innerkits") { public_external_deps = [ "ability_runtime:wantagent_innerkits", "image_framework:image_native", + "json:nlohmann_json_static", ] if (is_double_framework) { diff --git a/frameworks/core/BUILD.gn b/frameworks/core/BUILD.gn index 74a703fdc..c90cde0df 100644 --- a/frameworks/core/BUILD.gn +++ b/frameworks/core/BUILD.gn @@ -72,6 +72,7 @@ ohos_shared_library("ans_core") { external_deps = [ "ability_base:want", "ability_base:zuri", + "ability_runtime:app_context", "ability_runtime:wantagent_innerkits", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", diff --git a/frameworks/core/test/unittest/ans_notification_annex_test/BUILD.gn b/frameworks/core/test/unittest/ans_notification_annex_test/BUILD.gn index b77177586..c99fc185a 100644 --- a/frameworks/core/test/unittest/ans_notification_annex_test/BUILD.gn +++ b/frameworks/core/test/unittest/ans_notification_annex_test/BUILD.gn @@ -26,7 +26,6 @@ ohos_unittest("ans_notification_annex_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -38,6 +37,7 @@ ohos_unittest("ans_notification_annex_test") { "image_framework:image_native", "ipc:ipc_single", "relational_store:native_rdb", + "googletest:gtest_main", ] subsystem_name = "${subsystem_name}" diff --git a/frameworks/js/napi/BUILD.gn b/frameworks/js/napi/BUILD.gn index 0e776651b..0378bfb06 100644 --- a/frameworks/js/napi/BUILD.gn +++ b/frameworks/js/napi/BUILD.gn @@ -62,12 +62,7 @@ ohos_shared_library("notification") { branch_protector_ret = "pac_ret" include_dirs = [ - "${ability_runtime_path}/interfaces/kits/native/ability/native", - "${ability_runtime_napi_path}/inner/napi_common", "include", - "//third_party/node/src", - "//third_party/libuv/include", - "//third_party/json/single_include", ] configs = [ ":native_module_config" ] @@ -139,6 +134,9 @@ ohos_shared_library("notification") { "napi:ace_napi", "relational_store:native_rdb", "resource_management:global_resmgr", + "json:nlohmann_json_static", + "node:node_header_notice", + "libuv:uv", ] relative_install_dir = "module" diff --git a/frameworks/js/napi/src/manager/BUILD.gn b/frameworks/js/napi/src/manager/BUILD.gn index 817088fd1..3a7e5a31c 100644 --- a/frameworks/js/napi/src/manager/BUILD.gn +++ b/frameworks/js/napi/src/manager/BUILD.gn @@ -47,11 +47,8 @@ ohos_shared_library("notificationmanager") { branch_protector_ret = "pac_ret" include_dirs = [ - "${ability_runtime_path}/interfaces/kits/native/ability/native", - "${ability_runtime_napi_path}/inner/napi_common", "../../include", "../../include/manager", - "//third_party/node/src", ] configs = [ ":native_module_config" ] @@ -122,6 +119,7 @@ ohos_shared_library("notificationmanager") { "ipc:ipc_single", "napi:ace_napi", "relational_store:native_rdb", + "node:node_header_notice", ] defines = [] diff --git a/frameworks/js/napi/src/reminder/BUILD.gn b/frameworks/js/napi/src/reminder/BUILD.gn index a47a16503..edb5a19de 100644 --- a/frameworks/js/napi/src/reminder/BUILD.gn +++ b/frameworks/js/napi/src/reminder/BUILD.gn @@ -39,8 +39,6 @@ ohos_shared_library("reminderagent") { include_dirs = [ "../../include", - "//third_party/node/src", - "//third_party/libuv/include", ] configs = [ ":native_module_config" ] @@ -78,6 +76,8 @@ ohos_shared_library("reminderagent") { "ipc:ipc_single", "napi:ace_napi", "relational_store:native_rdb", + "node:node_header_notice", + "libuv:uv", ] relative_install_dir = "module" @@ -100,8 +100,6 @@ ohos_shared_library("reminderagentmanager") { include_dirs = [ "../../include", "../../include/manager", - "//third_party/node/src", - "//third_party/libuv/include", ] configs = [ ":native_module_config" ] @@ -136,6 +134,8 @@ ohos_shared_library("reminderagentmanager") { "ipc:ipc_single", "napi:ace_napi", "relational_store:native_rdb", + "node:node_header_notice", + "libuv:uv", ] relative_install_dir = "module" diff --git a/frameworks/js/napi/src/subscribe/BUILD.gn b/frameworks/js/napi/src/subscribe/BUILD.gn index e4445a45c..51fa5e3be 100644 --- a/frameworks/js/napi/src/subscribe/BUILD.gn +++ b/frameworks/js/napi/src/subscribe/BUILD.gn @@ -47,12 +47,8 @@ ohos_shared_library("notificationsubscribe") { branch_protector_ret = "pac_ret" include_dirs = [ - "${ability_runtime_path}/interfaces/kits/native/ability/native", - "${ability_runtime_napi_path}/inner/napi_common", "../../include", "../../include/subscribe", - "//third_party/node/src", - "//third_party/libuv/include", ] configs = [ ":native_module_config" ] @@ -90,6 +86,8 @@ ohos_shared_library("notificationsubscribe") { "ipc:ipc_single", "napi:ace_napi", "relational_store:native_rdb", + "node:node_header_notice", + "libuv:uv", ] relative_install_dir = "module" diff --git a/frameworks/test/moduletest/BUILD.gn b/frameworks/test/moduletest/BUILD.gn index 1ed0daf2b..f5e40f5b6 100644 --- a/frameworks/test/moduletest/BUILD.gn +++ b/frameworks/test/moduletest/BUILD.gn @@ -35,7 +35,6 @@ ohos_moduletest("ans_fw_module_test") { "${core_path}/common/include", "${core_path}/include", "${component_path}/services/ans/include", - "//third_party/json/include", "${inner_api_path}", "${core_path}/common/include", "${core_path}/include", @@ -61,7 +60,6 @@ ohos_moduletest("ans_fw_module_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/googletest:gtest_main", ] defines = [] @@ -88,6 +86,8 @@ ohos_moduletest("ans_fw_module_test") { "relational_store:native_rdb", "safwk:system_ability_fwk", "samgr:samgr_proxy", + "googletest:gtest_main", + "json:nlohmann_json_static", ] subsystem_name = "${subsystem_name}" @@ -112,7 +112,6 @@ ohos_moduletest("ans_innerkits_module_publish_test") { "${core_path}/common/include", "${core_path}/include", "${component_path}/services/ans/include", - "//third_party/json/include", "${inner_api_path}", "${core_path}/common/include", "${core_path}/include", @@ -164,6 +163,7 @@ ohos_moduletest("ans_innerkits_module_publish_test") { "relational_store:native_rdb", "safwk:system_ability_fwk", "samgr:samgr_proxy", + "json:nlohmann_json_static", ] subsystem_name = "${subsystem_name}" @@ -202,7 +202,6 @@ ohos_moduletest("ans_innerkits_module_slot_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/googletest:gtest_main", ] defines = [] @@ -231,6 +230,8 @@ ohos_moduletest("ans_innerkits_module_slot_test") { "relational_store:native_rdb", "safwk:system_ability_fwk", "samgr:samgr_proxy", + "googletest:gtest_main", + "json:nlohmann_json_static", ] subsystem_name = "${subsystem_name}" @@ -255,7 +256,6 @@ ohos_moduletest("ans_innerkits_module_setting_test") { "${frameworks_path}/ans/core/common/include", "${frameworks_path}/ans/core/include", "${component_path}/services/ans/include", - "//third_party/json/include", "${inner_api_path}", "${core_path}/common/include", "${core_path}/include", @@ -275,7 +275,6 @@ ohos_moduletest("ans_innerkits_module_setting_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/googletest:gtest_main", ] defines = [] @@ -304,6 +303,8 @@ ohos_moduletest("ans_innerkits_module_setting_test") { "relational_store:native_rdb", "safwk:system_ability_fwk", "samgr:samgr_proxy", + "googletest:gtest_main", + "json:nlohmann_json_static", ] subsystem_name = "${subsystem_name}" diff --git a/services/ans/BUILD.gn b/services/ans/BUILD.gn index a2510a852..c5ccb5b95 100644 --- a/services/ans/BUILD.gn +++ b/services/ans/BUILD.gn @@ -56,6 +56,7 @@ ohos_source_set("ans_service_sources") { "${services_path}/ans/include/notification_extension", "${services_path}/ans/include/utils", "${services_path}/ans/include/slot_manager", + "${services_path}/ans/src", ] defines = [] diff --git a/services/ans/src/advanced_notification_publish/live_publish_process.cpp b/services/ans/src/advanced_notification_publish/live_publish_process.cpp index 35dda3e3f..35487d304 100644 --- a/services/ans/src/advanced_notification_publish/live_publish_process.cpp +++ b/services/ans/src/advanced_notification_publish/live_publish_process.cpp @@ -24,7 +24,7 @@ #include "notification_live_view_content.h" #include "os_account_manager_helper.h" -#include "../advanced_notification_inline.cpp" +#include "advanced_notification_inline.cpp" namespace OHOS { namespace Notification { diff --git a/services/ans/src/disturb_manager/add_do_not_disturb_profiles.cpp b/services/ans/src/disturb_manager/add_do_not_disturb_profiles.cpp index daf9d1054..feef26117 100644 --- a/services/ans/src/disturb_manager/add_do_not_disturb_profiles.cpp +++ b/services/ans/src/disturb_manager/add_do_not_disturb_profiles.cpp @@ -23,7 +23,7 @@ #include "notification_preferences.h" #include "os_account_manager_helper.h" -#include "../advanced_notification_inline.cpp" +#include "advanced_notification_inline.cpp" namespace OHOS { namespace Notification { ErrCode DisturbManager::HandleAddDoNotDisturbProfiles(MessageParcel &data, MessageParcel &reply) diff --git a/services/ans/src/disturb_manager/get_do_not_disturb_date.cpp b/services/ans/src/disturb_manager/get_do_not_disturb_date.cpp index f803bb07f..286584514 100644 --- a/services/ans/src/disturb_manager/get_do_not_disturb_date.cpp +++ b/services/ans/src/disturb_manager/get_do_not_disturb_date.cpp @@ -23,7 +23,7 @@ #include "notification_preferences.h" #include "os_account_manager_helper.h" -#include "../advanced_notification_inline.cpp" +#include "advanced_notification_inline.cpp" namespace OHOS { namespace Notification { ErrCode DisturbManager::HandleGetDoNotDisturbDate(MessageParcel &data, MessageParcel &reply) diff --git a/services/ans/src/disturb_manager/get_do_not_disturb_profile.cpp b/services/ans/src/disturb_manager/get_do_not_disturb_profile.cpp index 365271f6a..68c9d3438 100644 --- a/services/ans/src/disturb_manager/get_do_not_disturb_profile.cpp +++ b/services/ans/src/disturb_manager/get_do_not_disturb_profile.cpp @@ -23,7 +23,7 @@ #include "notification_preferences.h" #include "os_account_manager_helper.h" -#include "../advanced_notification_inline.cpp" +#include "advanced_notification_inline.cpp" namespace OHOS { namespace Notification { ErrCode DisturbManager::HandleGetDoNotDisturbProfile(MessageParcel &data, MessageParcel &reply) diff --git a/services/ans/src/disturb_manager/set_do_not_disturb_date.cpp b/services/ans/src/disturb_manager/set_do_not_disturb_date.cpp index 52b42d0b4..50f300666 100644 --- a/services/ans/src/disturb_manager/set_do_not_disturb_date.cpp +++ b/services/ans/src/disturb_manager/set_do_not_disturb_date.cpp @@ -23,7 +23,7 @@ #include "notification_preferences.h" #include "os_account_manager_helper.h" -#include "../advanced_notification_inline.cpp" +#include "advanced_notification_inline.cpp" namespace OHOS { namespace Notification { diff --git a/services/ans/src/slot_manager/AddSlots.cpp b/services/ans/src/slot_manager/AddSlots.cpp index 4809b484b..8ce65c814 100644 --- a/services/ans/src/slot_manager/AddSlots.cpp +++ b/services/ans/src/slot_manager/AddSlots.cpp @@ -33,7 +33,7 @@ #include "smart_reminder_center.h" #endif -#include "../advanced_notification_inline.cpp" +#include "advanced_notification_inline.cpp" #include "notification_extension_wrapper.h" #include "notification_analytics_util.h" diff --git a/services/ans/src/slot_manager/setNotificationEnableSlot.cpp b/services/ans/src/slot_manager/setNotificationEnableSlot.cpp index 6be51fc49..b85cdbe07 100644 --- a/services/ans/src/slot_manager/setNotificationEnableSlot.cpp +++ b/services/ans/src/slot_manager/setNotificationEnableSlot.cpp @@ -35,7 +35,7 @@ #include "smart_reminder_center.h" #endif -#include "../advanced_notification_inline.cpp" +#include "advanced_notification_inline.cpp" #include "notification_extension_wrapper.h" #include "notification_analytics_util.h" #include "event_report.h" diff --git a/services/ans/test/unittest/BUILD.gn b/services/ans/test/unittest/BUILD.gn index 8b958473e..b9910dbda 100644 --- a/services/ans/test/unittest/BUILD.gn +++ b/services/ans/test/unittest/BUILD.gn @@ -54,8 +54,6 @@ ohos_unittest("ans_unit_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/googletest:gmock_main", - "//third_party/googletest:gtest_main", ] if (distributed_notification_supported) { @@ -94,6 +92,8 @@ ohos_unittest("ans_unit_test") { "safwk:system_ability_fwk", "samgr:samgr_proxy", "time_service:time_client", + "googletest:gmock_main", + "googletest:gtest_main", ] if (device_usage) { @@ -146,8 +146,6 @@ ohos_unittest("notification_preferences_database_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/googletest:gmock_main", - "//third_party/googletest:gtest_main", ] if (distributed_notification_supported) { @@ -181,6 +179,8 @@ ohos_unittest("notification_preferences_database_test") { "safwk:system_ability_fwk", "samgr:samgr_proxy", "time_service:time_client", + "googletest:gmock_main", + "googletest:gtest_main", ] if (device_usage) { @@ -235,8 +235,6 @@ ohos_unittest("notification_subscriber_manager_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/googletest:gmock_main", - "//third_party/googletest:gtest_main", ] if (distributed_notification_supported) { @@ -270,6 +268,8 @@ ohos_unittest("notification_subscriber_manager_test") { "safwk:system_ability_fwk", "samgr:samgr_proxy", "time_service:time_client", + "googletest:gmock_main", + "googletest:gtest_main", ] if (device_usage) { @@ -334,7 +334,6 @@ ohos_unittest("notification_service_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/googletest:gtest_main", ] if (distributed_notification_supported) { @@ -369,6 +368,7 @@ ohos_unittest("notification_service_test") { "safwk:system_ability_fwk", "samgr:samgr_proxy", "time_service:time_client", + "googletest:gtest_main", ] if (device_usage) { @@ -431,7 +431,6 @@ ohos_unittest("notification_publish_service_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/googletest:gtest_main", ] if (distributed_notification_supported) { @@ -468,6 +467,7 @@ ohos_unittest("notification_publish_service_test") { "safwk:system_ability_fwk", "samgr:samgr_proxy", "time_service:time_client", + "googletest:gtest_main", ] if (device_usage) { @@ -528,7 +528,6 @@ ohos_unittest("notification_service_publish_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/googletest:gtest_main", ] if (distributed_notification_supported) { @@ -563,6 +562,7 @@ ohos_unittest("notification_service_publish_test") { "safwk:system_ability_fwk", "samgr:samgr_proxy", "time_service:time_client", + "googletest:gtest_main", ] if (device_usage) { @@ -616,7 +616,6 @@ ohos_unittest("notification_preferences_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/googletest:gtest_main", ] if (distributed_notification_supported) { @@ -652,6 +651,7 @@ ohos_unittest("notification_preferences_test") { "safwk:system_ability_fwk", "samgr:samgr_proxy", "time_service:time_client", + "googletest:gtest_main", ] if (device_usage) { @@ -745,7 +745,6 @@ ohos_unittest("bundle_manager_helper_branch_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -771,6 +770,7 @@ ohos_unittest("bundle_manager_helper_branch_test") { "safwk:system_ability_fwk", "samgr:samgr_proxy", "time_service:time_client", + "googletest:gtest_main", ] if (player_framework) { @@ -799,7 +799,6 @@ ohos_unittest("notification_dialog_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -827,6 +826,7 @@ ohos_unittest("notification_dialog_test") { "safwk:system_ability_fwk", "samgr:samgr_proxy", "time_service:time_client", + "googletest:gtest_main", ] if (player_framework) { @@ -863,7 +863,6 @@ ohos_unittest("notification_subscriber_manager_branch_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/googletest:gtest_main", ] if (distributed_notification_supported) { @@ -896,6 +895,7 @@ ohos_unittest("notification_subscriber_manager_branch_test") { "safwk:system_ability_fwk", "samgr:samgr_proxy", "time_service:time_client", + "googletest:gtest_main", ] if (player_framework) { @@ -1004,8 +1004,6 @@ ohos_unittest("notification_preferences_database_branch_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", - "//third_party/googletest:gtest_main", - "//third_party/libxml2:libxml2", ] external_deps = [ @@ -1032,6 +1030,8 @@ ohos_unittest("notification_preferences_database_branch_test") { "safwk:system_ability_fwk", "samgr:samgr_proxy", "time_service:time_client", + "googletest:gtest_main", + "libxml2:libxml2", ] if (player_framework) { @@ -1055,7 +1055,6 @@ ohos_unittest("push_callback_stub_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -1081,6 +1080,7 @@ ohos_unittest("push_callback_stub_test") { "safwk:system_ability_fwk", "samgr:samgr_proxy", "time_service:time_client", + "googletest:gtest_main", ] if (player_framework) { @@ -1110,7 +1110,6 @@ ohos_unittest("notification_rdb_data_mgr_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -1136,6 +1135,7 @@ ohos_unittest("notification_rdb_data_mgr_test") { "safwk:system_ability_fwk", "samgr:samgr_proxy", "time_service:time_client", + "googletest:gtest_main", ] if (player_framework) { @@ -1163,8 +1163,6 @@ ohos_unittest("notification_config_parse_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/googletest:gtest_main", - "//third_party/libxml2:libxml2", ] external_deps = [ @@ -1190,6 +1188,8 @@ ohos_unittest("notification_config_parse_test") { "safwk:system_ability_fwk", "samgr:samgr_proxy", "time_service:time_client", + "googletest:gtest_main", + "libxml2:libxml2", ] if (player_framework) { diff --git a/services/distributed/test/unittest/BUILD.gn b/services/distributed/test/unittest/BUILD.gn index 2a8670fa1..b9182c51c 100644 --- a/services/distributed/test/unittest/BUILD.gn +++ b/services/distributed/test/unittest/BUILD.gn @@ -70,7 +70,6 @@ ohos_unittest("ans_distributed_unit_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -88,6 +87,7 @@ ohos_unittest("ans_distributed_unit_test") { "image_framework:image_native", "ipc:ipc_core", "kv_store:distributeddata_inner", + "googletest:gtest_main", ] subsystem_name = "${subsystem_name}" @@ -116,7 +116,6 @@ ohos_unittest("distributed_preferences_database_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/distributed:libans_distributed", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -133,6 +132,7 @@ ohos_unittest("distributed_preferences_database_test") { "image_framework:image_native", "ipc:ipc_core", "kv_store:distributeddata_inner", + "googletest:gtest_main", ] subsystem_name = "${subsystem_name}" @@ -162,7 +162,6 @@ ohos_unittest("distributed_screen_status_manager_branch_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/distributed:libans_distributed", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -179,6 +178,7 @@ ohos_unittest("distributed_screen_status_manager_branch_test") { "image_framework:image_native", "ipc:ipc_core", "kv_store:distributeddata_inner", + "googletest:gtest_main", ] subsystem_name = "${subsystem_name}" @@ -208,7 +208,6 @@ ohos_unittest("distributed_database_branch_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/distributed:libans_distributed", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -225,6 +224,7 @@ ohos_unittest("distributed_database_branch_test") { "image_framework:image_native", "ipc:ipc_core", "kv_store:distributeddata_inner", + "googletest:gtest_main", ] subsystem_name = "${subsystem_name}" @@ -248,7 +248,6 @@ ohos_unittest("distributed_preferences_branch_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/distributed:libans_distributed", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -265,6 +264,7 @@ ohos_unittest("distributed_preferences_branch_test") { "image_framework:image_native", "ipc:ipc_core", "kv_store:distributeddata_inner", + "googletest:gtest_main", ] subsystem_name = "${subsystem_name}" @@ -285,7 +285,6 @@ ohos_unittest("distributed_device_callback_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/distributed:libans_distributed", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -302,6 +301,7 @@ ohos_unittest("distributed_device_callback_test") { "image_framework:image_native", "ipc:ipc_core", "kv_store:distributeddata_inner", + "googletest:gtest_main", ] subsystem_name = "${subsystem_name}" @@ -322,7 +322,6 @@ ohos_unittest("distributed_database_callback_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/distributed:libans_distributed", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -338,6 +337,7 @@ ohos_unittest("distributed_database_callback_test") { "image_framework:image_native", "ipc:ipc_core", "kv_store:distributeddata_inner", + "googletest:gtest_main", ] subsystem_name = "${subsystem_name}" @@ -358,7 +358,6 @@ ohos_unittest("distributed_flow_control_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/distributed:libans_distributed", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -374,6 +373,7 @@ ohos_unittest("distributed_flow_control_test") { "image_framework:image_native", "ipc:ipc_core", "kv_store:distributeddata_inner", + "googletest:gtest_main", ] subsystem_name = "${subsystem_name}" @@ -397,7 +397,6 @@ ohos_unittest("distributed_notification_manager_branch_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/distributed:libans_distributed", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -415,6 +414,7 @@ ohos_unittest("distributed_notification_manager_branch_test") { "image_framework:image_native", "ipc:ipc_core", "kv_store:distributeddata_inner", + "googletest:gtest_main", ] subsystem_name = "${subsystem_name}" diff --git a/services/test/moduletest/BUILD.gn b/services/test/moduletest/BUILD.gn index 54cf07a3e..53738ae40 100644 --- a/services/test/moduletest/BUILD.gn +++ b/services/test/moduletest/BUILD.gn @@ -14,7 +14,6 @@ import("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") import("//build/test.gni") -import("//foundation/ability/ability_runtime/ability_runtime.gni") module_output_path = "${component_name}/distributed_notification_service/moduletest" diff --git a/test/bechmarktest/notification_publish_test/BUILD.gn b/test/bechmarktest/notification_publish_test/BUILD.gn index 7bdf0fc18..42102c44e 100644 --- a/test/bechmarktest/notification_publish_test/BUILD.gn +++ b/test/bechmarktest/notification_publish_test/BUILD.gn @@ -28,8 +28,6 @@ ohos_benchmarktest("Benchmark_Publish_Test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", - "//third_party/benchmark:benchmark", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -39,6 +37,8 @@ ohos_benchmarktest("Benchmark_Publish_Test") { "c_utils:utils", "image_framework:image_native", "relational_store:native_rdb", + "googletest:gtest_main", + "benchmark:benchmark", ] subsystem_name = "${subsystem_name}" part_name = "${component_name}" diff --git a/test/bechmarktest/notification_services_test/BUILD.gn b/test/bechmarktest/notification_services_test/BUILD.gn index d6d5d4305..f69536d5e 100644 --- a/test/bechmarktest/notification_services_test/BUILD.gn +++ b/test/bechmarktest/notification_services_test/BUILD.gn @@ -22,9 +22,6 @@ ohos_benchmarktest("Benchmark_Notification_Servece_Test") { include_dirs = [ "include", "mock/include", - "${access_token_path}/interfaces/innerkits/token_setproc/include", - "${access_token_path}/interfaces/innerkits/nativetoken/include", - "${access_token_path}/interfaces/innerkits/accesstoken/include", "${services_path}/ans/include", ] @@ -37,8 +34,6 @@ ohos_benchmarktest("Benchmark_Notification_Servece_Test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", - "//third_party/benchmark:benchmark", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -55,6 +50,8 @@ ohos_benchmarktest("Benchmark_Notification_Servece_Test") { "image_framework:image_native", "kv_store:distributeddata_inner", "relational_store:native_rdb", + "benchmark:benchmark", + "googletest:gtest_main", ] subsystem_name = "${subsystem_name}" part_name = "${component_name}" diff --git a/test/fuzztest/fuzz_common_base/BUILD.gn b/test/fuzztest/fuzz_common_base/BUILD.gn index 6bba7888b..a57779d0c 100644 --- a/test/fuzztest/fuzz_common_base/BUILD.gn +++ b/test/fuzztest/fuzz_common_base/BUILD.gn @@ -26,11 +26,14 @@ static_library("fuzz_common_base") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] - public_deps = [ "${commonlibrary_utils_path}/base:utils" ] external_deps = [ "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libtoken_setproc", ] + + public_external_deps = [ + "c_utils:utils", + ] } diff --git a/tools/test/unittest/dump/BUILD.gn b/tools/test/unittest/dump/BUILD.gn index c9315d57b..21e1764f5 100644 --- a/tools/test/unittest/dump/BUILD.gn +++ b/tools/test/unittest/dump/BUILD.gn @@ -19,7 +19,6 @@ module_output_path = config("tools_dump_config_mock") { include_dirs = [ - "//third_party/googletest/googlemock/include", "${tools_path}/test/mock", "${component_path}/services/ans/include", ] @@ -62,8 +61,6 @@ ohos_unittest("notification_shell_command_dump_test") { deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:ans_service_sources", - "//third_party/googletest:gmock_main", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -78,6 +75,8 @@ ohos_unittest("notification_shell_command_dump_test") { "hilog:libhilog", "ipc:ipc_core", "relational_store:native_rdb", + "googletest:gmock_main", + "googletest:gtest_main", ] } -- Gitee