From b4aee82372d616f7c6989a076926ce624dffddc0 Mon Sep 17 00:00:00 2001 From: qianyong325 Date: Wed, 12 Feb 2025 10:52:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=B3=95=E9=83=A8=E4=BB=B6?= =?UTF-8?q?=E6=94=B9=E9=80=A0=E6=94=AF=E6=8C=81=E7=8B=AC=E7=AB=8B=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: qianyong325 --- etc/para/BUILD.gn | 2 + frameworks/js/napi/common/BUILD.gn | 6 +- .../inputmethod_extension_ability/BUILD.gn | 2 +- .../inputmethod_extension_context/BUILD.gn | 2 +- frameworks/js/napi/inputmethodlist/BUILD.gn | 3 +- .../inner_api/inputmethod_ability/BUILD.gn | 6 ++ seccomp_policy/BUILD.gn | 2 +- services/BUILD.gn | 2 + .../adapter/settings_data_provider/BUILD.gn | 2 + .../enableimedataparse_fuzzer/BUILD.gn | 2 + .../imfhisyseventreport_fuzzer/BUILD.gn | 1 + .../inputmethodability_fuzzer/BUILD.gn | 1 + .../inputmethodsystemability_fuzzer/BUILD.gn | 2 + test/fuzztest/perusersession_fuzzer/BUILD.gn | 2 + .../securitymodeparser_fuzzer/BUILD.gn | 1 + .../settingsdatautils_fuzzer/BUILD.gn | 2 + .../systemabilitystub_fuzzer/BUILD.gn | 2 + .../systemabilitystubfuzztest/BUILD.gn | 2 + .../systemabilitystubfuzztest/common/BUILD.gn | 2 + test/unittest/cpp_test/BUILD.gn | 101 ++++++++++++------ test/unittest/cpp_test/common/BUILD.gn | 2 +- .../cpp_test/common/include/tdd_util.h | 2 +- 22 files changed, 109 insertions(+), 40 deletions(-) diff --git a/etc/para/BUILD.gn b/etc/para/BUILD.gn index 4036662e4..56c8810dc 100644 --- a/etc/para/BUILD.gn +++ b/etc/para/BUILD.gn @@ -16,12 +16,14 @@ import("//build/ohos.gni") ohos_prebuilt_etc("inputmethod.para") { source = "//base/inputmethod/imf/etc/para/inputmethod.para" + subsystem_name = "inputmethod" part_name = "imf" module_install_dir = "etc/param" } ohos_prebuilt_etc("inputmethod.para.dac") { source = "//base/inputmethod/imf/etc/para/inputmethod.para.dac" + subsystem_name = "inputmethod" part_name = "imf" module_install_dir = "etc/param" } diff --git a/frameworks/js/napi/common/BUILD.gn b/frameworks/js/napi/common/BUILD.gn index 34985f086..227c06406 100644 --- a/frameworks/js/napi/common/BUILD.gn +++ b/frameworks/js/napi/common/BUILD.gn @@ -54,7 +54,11 @@ ohos_static_library("inputmethod_js_common") { configs = [ ":inputmethod_js_common_config" ] public_configs = [ ":inputmethod_js_common_public_config" ] deps = [ "${inputmethod_path}/common:inputmethod_common" ] - external_deps = [ "napi:ace_napi" ] + external_deps = [ + "c_utils:utilsbase", + "eventhandler:libeventhandler", + "napi:ace_napi", + ] subsystem_name = "inputmethod" part_name = "imf" } diff --git a/frameworks/js/napi/inputmethod_extension_ability/BUILD.gn b/frameworks/js/napi/inputmethod_extension_ability/BUILD.gn index 8daa5abc4..38466ac01 100644 --- a/frameworks/js/napi/inputmethod_extension_ability/BUILD.gn +++ b/frameworks/js/napi/inputmethod_extension_ability/BUILD.gn @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//arkcompiler/ets_frontend/es2panda/es2abc_config.gni") +import("//build/config/components/ets_frontend/es2abc_config.gni") import("//build/ohos.gni") es2abc_gen_abc("gen_inputmethod_extension_ability_abc") { diff --git a/frameworks/js/napi/inputmethod_extension_context/BUILD.gn b/frameworks/js/napi/inputmethod_extension_context/BUILD.gn index d8e851af3..3099b4e7e 100644 --- a/frameworks/js/napi/inputmethod_extension_context/BUILD.gn +++ b/frameworks/js/napi/inputmethod_extension_context/BUILD.gn @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//arkcompiler/ets_frontend/es2panda/es2abc_config.gni") +import("//build/config/components/ets_frontend/es2abc_config.gni") import("//build/ohos.gni") diff --git a/frameworks/js/napi/inputmethodlist/BUILD.gn b/frameworks/js/napi/inputmethodlist/BUILD.gn index 1fe0462fa..416fd1c05 100644 --- a/frameworks/js/napi/inputmethodlist/BUILD.gn +++ b/frameworks/js/napi/inputmethodlist/BUILD.gn @@ -11,9 +11,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//arkcompiler/ets_frontend/es2panda/es2abc_config.gni") +import("//build/config/components/ets_frontend/es2abc_config.gni") import("//build/ohos.gni") -import("//foundation/arkui/ace_engine/ace_config.gni") es2abc_gen_abc("gen_inputmethodlist_abc") { src_js = rebase_path("inputmethodlist.js") diff --git a/interfaces/inner_api/inputmethod_ability/BUILD.gn b/interfaces/inner_api/inputmethod_ability/BUILD.gn index b108a0f0f..adb6325cc 100644 --- a/interfaces/inner_api/inputmethod_ability/BUILD.gn +++ b/interfaces/inner_api/inputmethod_ability/BUILD.gn @@ -79,6 +79,9 @@ ohos_shared_library("inputmethod_ability") { "ability_base:configuration", "ability_base:want", "ability_runtime:ability_context_native", + "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", + "cJSON:cjson", "c_utils:utils", "config_policy:configpolicy_util", "eventhandler:libeventhandler", @@ -138,6 +141,9 @@ ohos_static_library("inputmethod_ability_static") { "ability_base:configuration", "ability_base:want", "ability_runtime:ability_context_native", + "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", + "cJSON:cjson", "c_utils:utils", "config_policy:configpolicy_util", "eventhandler:libeventhandler", diff --git a/seccomp_policy/BUILD.gn b/seccomp_policy/BUILD.gn index 94d6cf511..1f0cf8a6e 100644 --- a/seccomp_policy/BUILD.gn +++ b/seccomp_policy/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//base/inputmethod/imf/inputmethod.gni") import( - "${startup_init_path}/services/modules/seccomp/scripts/seccomp_policy_fixer.gni") + "//build/config/components/init/seccomp/scripts/seccomp_policy_fixer.gni") ohos_prebuilt_seccomp("imf_ext_secure_filter") { sources = [ "imf_ext_secure_mode.seccomp.policy" ] diff --git a/services/BUILD.gn b/services/BUILD.gn index aaeadc42c..21cf34fef 100644 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -100,6 +100,7 @@ ohos_shared_library("inputmethod_service") { "access_token:libtokenid_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "common_event_service:cesfwk_innerkits", "config_policy:configpolicy_util", @@ -197,6 +198,7 @@ ohos_static_library("inputmethod_service_static") { "access_token:libtokenid_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "common_event_service:cesfwk_innerkits", "config_policy:configpolicy_util", diff --git a/services/adapter/settings_data_provider/BUILD.gn b/services/adapter/settings_data_provider/BUILD.gn index 94801b375..c5acb6e3c 100644 --- a/services/adapter/settings_data_provider/BUILD.gn +++ b/services/adapter/settings_data_provider/BUILD.gn @@ -47,7 +47,9 @@ ohos_static_library("settings_data_static") { external_deps = [ "ability_base:zuri", "ability_runtime:dataobs_manager", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", diff --git a/test/fuzztest/enableimedataparse_fuzzer/BUILD.gn b/test/fuzztest/enableimedataparse_fuzzer/BUILD.gn index 14daf3ed8..cc4399772 100644 --- a/test/fuzztest/enableimedataparse_fuzzer/BUILD.gn +++ b/test/fuzztest/enableimedataparse_fuzzer/BUILD.gn @@ -53,7 +53,9 @@ ohos_fuzztest("EnableImeDataParseFuzzTest") { external_deps = [ "ability_base:zuri", "ability_runtime:dataobs_manager", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", diff --git a/test/fuzztest/imfhisyseventreport_fuzzer/BUILD.gn b/test/fuzztest/imfhisyseventreport_fuzzer/BUILD.gn index a024343e2..5cb878380 100644 --- a/test/fuzztest/imfhisyseventreport_fuzzer/BUILD.gn +++ b/test/fuzztest/imfhisyseventreport_fuzzer/BUILD.gn @@ -54,6 +54,7 @@ ohos_fuzztest("ImfHisyseventReportFuzzTest") { "hilog:libhilog", "hisysevent:libhisysevent", "hisysevent:libhisyseventmanager", + "ipc:ipc_core", ] } diff --git a/test/fuzztest/inputmethodability_fuzzer/BUILD.gn b/test/fuzztest/inputmethodability_fuzzer/BUILD.gn index 847b9564a..3f668bedf 100644 --- a/test/fuzztest/inputmethodability_fuzzer/BUILD.gn +++ b/test/fuzztest/inputmethodability_fuzzer/BUILD.gn @@ -45,6 +45,7 @@ ohos_fuzztest("InputMethodAbilityFuzzTest") { external_deps = [ "ability_runtime:ability_manager", + "ability_runtime:runtime", "c_utils:utils", "hilog:libhilog", "input:libmmi-client", diff --git a/test/fuzztest/inputmethodsystemability_fuzzer/BUILD.gn b/test/fuzztest/inputmethodsystemability_fuzzer/BUILD.gn index c573acfcd..b1362bb6d 100644 --- a/test/fuzztest/inputmethodsystemability_fuzzer/BUILD.gn +++ b/test/fuzztest/inputmethodsystemability_fuzzer/BUILD.gn @@ -55,12 +55,14 @@ ohos_fuzztest("InputmethodSystemAbilityFuzzTest") { "access_token:libnativetoken", "access_token:libtoken_setproc", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_single", + "safwk:system_ability_fwk", ] } diff --git a/test/fuzztest/perusersession_fuzzer/BUILD.gn b/test/fuzztest/perusersession_fuzzer/BUILD.gn index 870539a7c..bcb8c6def 100644 --- a/test/fuzztest/perusersession_fuzzer/BUILD.gn +++ b/test/fuzztest/perusersession_fuzzer/BUILD.gn @@ -52,6 +52,8 @@ ohos_fuzztest("PerUserSessionFuzzTest") { external_deps = [ "ability_runtime:ability_manager", + "ability_runtime:runtime", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", diff --git a/test/fuzztest/securitymodeparser_fuzzer/BUILD.gn b/test/fuzztest/securitymodeparser_fuzzer/BUILD.gn index 03498c4f2..c68e00ac5 100644 --- a/test/fuzztest/securitymodeparser_fuzzer/BUILD.gn +++ b/test/fuzztest/securitymodeparser_fuzzer/BUILD.gn @@ -53,6 +53,7 @@ ohos_fuzztest("SecurityModeParserFuzzTest") { external_deps = [ "ability_runtime:ability_manager", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", diff --git a/test/fuzztest/settingsdatautils_fuzzer/BUILD.gn b/test/fuzztest/settingsdatautils_fuzzer/BUILD.gn index dc81f7b4a..7bcec5ddb 100644 --- a/test/fuzztest/settingsdatautils_fuzzer/BUILD.gn +++ b/test/fuzztest/settingsdatautils_fuzzer/BUILD.gn @@ -54,7 +54,9 @@ ohos_fuzztest("SettingsDataUtilsFuzzTest") { external_deps = [ "ability_base:zuri", "ability_runtime:dataobs_manager", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", diff --git a/test/fuzztest/systemabilitystub_fuzzer/BUILD.gn b/test/fuzztest/systemabilitystub_fuzzer/BUILD.gn index e0d1ec916..9ad41df5b 100644 --- a/test/fuzztest/systemabilitystub_fuzzer/BUILD.gn +++ b/test/fuzztest/systemabilitystub_fuzzer/BUILD.gn @@ -55,12 +55,14 @@ ohos_fuzztest("SystemAbilityStubFuzzTest") { "access_token:libnativetoken", "access_token:libtoken_setproc", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_single", + "safwk:system_ability_fwk", ] } diff --git a/test/fuzztest/systemabilitystubfuzztest/BUILD.gn b/test/fuzztest/systemabilitystubfuzztest/BUILD.gn index c467a9e6c..e454cca30 100644 --- a/test/fuzztest/systemabilitystubfuzztest/BUILD.gn +++ b/test/fuzztest/systemabilitystubfuzztest/BUILD.gn @@ -60,10 +60,12 @@ common_external_deps = [ "ability_runtime:ability_manager", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "data_share:datashare_common", "data_share:datashare_consumer", "hilog:libhilog", "input:libmmi-client", + "safwk:system_ability_fwk", ] common_deps = [ diff --git a/test/fuzztest/systemabilitystubfuzztest/common/BUILD.gn b/test/fuzztest/systemabilitystubfuzztest/common/BUILD.gn index fed51e9b3..854291b92 100644 --- a/test/fuzztest/systemabilitystubfuzztest/common/BUILD.gn +++ b/test/fuzztest/systemabilitystubfuzztest/common/BUILD.gn @@ -57,12 +57,14 @@ ohos_static_library("imf_sa_stub_fuzztest_common_static") { "access_token:libnativetoken", "access_token:libtoken_setproc", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_single", + "safwk:system_ability_fwk", ] subsystem_name = "inputmethod" diff --git a/test/unittest/cpp_test/BUILD.gn b/test/unittest/cpp_test/BUILD.gn index 4221743da..db8dd18ff 100644 --- a/test/unittest/cpp_test/BUILD.gn +++ b/test/unittest/cpp_test/BUILD.gn @@ -52,20 +52,22 @@ ohos_unittest("InputMethodControllerTest") { "${inputmethod_path}/services:inputmethod_service_static", "${inputmethod_path}/test/common:inputmethod_test_common", "${inputmethod_path}/test/unittest/cpp_test/common:inputmethod_tdd_util", - "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:want", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", + "ability_runtime:runtime", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "config_policy:configpolicy_util", "data_share:datashare_common", "data_share:datashare_consumer", "eventhandler:libeventhandler", + "googletest:gtest_main", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_single", @@ -102,22 +104,25 @@ ohos_unittest("InputMethodAttachTest") { "${inputmethod_path}/services/json:imf_json_static", "${inputmethod_path}/test/common:inputmethod_test_common", "${inputmethod_path}/test/unittest/cpp_test/common:inputmethod_tdd_util", - "//third_party/googletest:gmock", - "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:want", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", + "ability_runtime:runtime", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", + "googletest:gmock", + "googletest:gtest_main", "hilog:libhilog", "input:libmmi-client", "napi:ace_napi", + "safwk:system_ability_fwk", "window_manager:libdm", ] @@ -156,18 +161,20 @@ ohos_unittest("InputMethodAbilityTest") { "${inputmethod_path}/services/json:imf_json_static", "${inputmethod_path}/test/common:inputmethod_test_common", "${inputmethod_path}/test/unittest/cpp_test/common:inputmethod_tdd_util", - "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:want", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", + "ability_runtime:runtime", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", + "googletest:gtest_main", "graphic_2d:librender_service_client", "graphic_2d:window_animation", "hilog:libhilog", @@ -176,6 +183,7 @@ ohos_unittest("InputMethodAbilityTest") { "memmgr:memmgrclient", "napi:ace_napi", "os_account:os_account_innerkits", + "safwk:system_ability_fwk", "window_manager:libdm", "window_manager:libwsutils", ] @@ -206,7 +214,6 @@ ohos_unittest("InputMethodServiceTest") { "${inputmethod_path}/services:inputmethod_service", "${inputmethod_path}/test/common:inputmethod_test_common", "${inputmethod_path}/test/unittest/cpp_test/common:inputmethod_tdd_util", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -214,7 +221,9 @@ ohos_unittest("InputMethodServiceTest") { "ability_runtime:ability_context_native", "ability_runtime:ability_manager", "access_token:libaccesstoken_sdk", + "cJSON:cjson", "c_utils:utils", + "googletest:gtest_main", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_single", @@ -249,25 +258,28 @@ ohos_unittest("InputMethodDfxTest") { "${inputmethod_path}/services:inputmethod_service_static", "${inputmethod_path}/test/common:inputmethod_test_common", "${inputmethod_path}/test/unittest/cpp_test/common:inputmethod_tdd_util", - "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:want", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", + "ability_runtime:runtime", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", "eventhandler:libeventhandler", + "googletest:gtest_main", "hilog:libhilog", "hisysevent:libhisysevent", "hisysevent:libhisyseventmanager", "input:libmmi-client", "ipc:ipc_single", "napi:ace_napi", + "safwk:system_ability_fwk", "window_manager:libdm", ] @@ -297,26 +309,29 @@ ohos_unittest("InputMethodPanelTest") { "${inputmethod_path}/services:inputmethod_service_static", "${inputmethod_path}/test/common:inputmethod_test_common", "${inputmethod_path}/test/unittest/cpp_test/common:inputmethod_tdd_util", - "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:want", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", + "ability_runtime:runtime", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "common_event_service:cesfwk_innerkits", "data_share:datashare_common", "data_share:datashare_consumer", "eventhandler:libeventhandler", + "googletest:gtest_main", "graphic_2d:librender_service_client", "graphic_2d:window_animation", "hilog:libhilog", "input:libmmi-client", "napi:ace_napi", "os_account:os_account_innerkits", + "safwk:system_ability_fwk", "window_manager:libdm", "window_manager:libwsutils", ] @@ -353,7 +368,9 @@ ohos_unittest("InputMethodPanelAdjustTest") { "ability_base:want", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", + "ability_runtime:runtime", "access_token:libaccesstoken_sdk", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", @@ -363,6 +380,7 @@ ohos_unittest("InputMethodPanelAdjustTest") { "hilog:libhilog", "input:libmmi-client", "napi:ace_napi", + "safwk:system_ability_fwk", "window_manager:libdm", "window_manager:libwsutils", ] @@ -393,15 +411,17 @@ ohos_unittest("InputMethodSwitchTest") { "${inputmethod_path}/services/adapter/settings_data_provider:settings_data_static", "${inputmethod_path}/test/common:inputmethod_test_common", "${inputmethod_path}/test/unittest/cpp_test/common:inputmethod_tdd_util", - "//third_party/googletest:gtest_main", ] external_deps = [ "access_token:libaccesstoken_sdk", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", + "googletest:gtest_main", "hilog:libhilog", "input:libmmi-client", ] @@ -438,14 +458,15 @@ ohos_unittest("ITypesUtilTest") { "${inputmethod_path}/interfaces/inner_api/inputmethod_controller:inputmethod_client_static", "${inputmethod_path}/test/common:inputmethod_test_common", "${inputmethod_path}/test/unittest/cpp_test/common:inputmethod_tdd_util", - "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:want", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", + "ability_runtime:runtime", "c_utils:utils", + "googletest:gtest_main", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_single", @@ -479,23 +500,26 @@ ohos_unittest("InputMethodPrivateMemberTest") { "${inputmethod_path}/interfaces/inner_api/inputmethod_controller:inputmethod_client_static", "${inputmethod_path}/services:inputmethod_service_static", "${inputmethod_path}/test/unittest/cpp_test/common:inputmethod_tdd_util", - "//third_party/googletest:gtest_main", ] external_deps = [ "ability_runtime:ability_manager", + "ability_runtime:runtime", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", + "googletest:gtest_main", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_core", "ipc:ipc_single", "napi:ace_napi", "os_account:os_account_innerkits", + "safwk:system_ability_fwk", "window_manager:libdm", ] @@ -526,23 +550,26 @@ ohos_unittest("InputMethodEditorTest") { "${inputmethod_path}/services/json:imf_json_static", "${inputmethod_path}/test/common:inputmethod_test_common", "${inputmethod_path}/test/unittest/cpp_test/common:inputmethod_tdd_util", - "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:want", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", + "ability_runtime:runtime", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", "eventhandler:libeventhandler", + "googletest:gtest_main", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_single", "napi:ace_napi", + "safwk:system_ability_fwk", "window_manager:libdm", ] @@ -572,15 +599,17 @@ ohos_unittest("NewImeSwitchTest") { "${inputmethod_path}/services/adapter/settings_data_provider:settings_data_static", "${inputmethod_path}/test/common:inputmethod_test_common", "${inputmethod_path}/test/unittest/cpp_test/common:inputmethod_tdd_util", - "//third_party/googletest:gtest_main", ] external_deps = [ "access_token:libaccesstoken_sdk", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", + "googletest:gtest_main", "hilog:libhilog", "input:libmmi-client", ] @@ -613,7 +642,6 @@ ohos_unittest("IdentityCheckerTest") { "${inputmethod_path}/services:inputmethod_service_static", "${inputmethod_path}/test/common:inputmethod_test_common", "${inputmethod_path}/test/unittest/cpp_test/common:inputmethod_tdd_util", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -622,13 +650,16 @@ ohos_unittest("IdentityCheckerTest") { "ability_runtime:ability_manager", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", + "googletest:gtest_main", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_single", "napi:ace_napi", + "safwk:system_ability_fwk", "window_manager:libdm", ] @@ -658,8 +689,6 @@ ohos_unittest("TextListenerInnerApiTest") { "${inputmethod_path}/services:inputmethod_service", "${inputmethod_path}/test/common:inputmethod_test_common", "${inputmethod_path}/test/unittest/cpp_test/common:inputmethod_tdd_util", - "//third_party/googletest:gmock", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -670,6 +699,8 @@ ohos_unittest("TextListenerInnerApiTest") { "bundle_framework:appexecfwk_core", "c_utils:utils", "eventhandler:libeventhandler", + "googletest:gmock", + "googletest:gtest_main", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_single", @@ -707,16 +738,17 @@ ohos_unittest("ImeProxyTest") { "${inputmethod_path}/test/unittest/resource/bundle_dependencies/editorBox:editorBox", "${inputmethod_path}/test/unittest/resource/bundle_dependencies/extImfBundle:extImf", "${inputmethod_path}/test/unittest/resource/ohos_test:copy_ohos_test", - "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:want", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", + "ability_runtime:runtime", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_core", "c_utils:utils", + "googletest:gtest_main", "graphic_2d:librender_service_client", "graphic_2d:window_animation", "hilog:libhilog", @@ -759,19 +791,18 @@ ohos_unittest("EnableImeDataParseTest") { "src/enable_ime_data_parse_test.cpp", ] - deps = [ - "${inputmethod_path}/services/json:imf_json_static", - "//third_party/googletest:gmock", - "//third_party/googletest:gtest_main", - ] + deps = [ "${inputmethod_path}/services/json:imf_json_static" ] external_deps = [ "ability_base:zuri", "ability_runtime:dataobs_manager", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", + "googletest:gmock", + "googletest:gtest_main", "hilog:libhilog", "ipc:ipc_single", "samgr:samgr_proxy", @@ -807,11 +838,7 @@ ohos_unittest("SecurityModeParseTest") { "src/security_mode_parser_test.cpp", ] - deps = [ - "${inputmethod_path}/services:inputmethod_service_static", - "//third_party/googletest:gmock", - "//third_party/googletest:gtest_main", - ] + deps = [ "${inputmethod_path}/services:inputmethod_service_static" ] external_deps = [ "ability_base:zuri", @@ -819,13 +846,17 @@ ohos_unittest("SecurityModeParseTest") { "ability_runtime:dataobs_manager", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", + "googletest:gmock", + "googletest:gtest_main", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_core", "ipc:ipc_single", + "safwk:system_ability_fwk", "samgr:samgr_proxy", ] } @@ -851,13 +882,13 @@ ohos_unittest("TaskManagerTest") { "${inputmethod_path}/interfaces/inner_api/inputmethod_ability:inputmethod_ability", "${inputmethod_path}/test/common:inputmethod_test_common", "${inputmethod_path}/test/unittest/cpp_test/common:inputmethod_tdd_util", - "//third_party/googletest:gtest_main", ] external_deps = [ "bundle_framework:appexecfwk_core", "c_utils:utils", "eventhandler:libeventhandler", + "googletest:gtest_main", "hilog:libhilog", ] } @@ -878,7 +909,6 @@ ohos_unittest("ImeFreezeManagerTest") { deps = [ "${inputmethod_path}/services:inputmethod_service_static", "${inputmethod_path}/test/unittest/cpp_test/common:inputmethod_tdd_util", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -886,10 +916,12 @@ ohos_unittest("ImeFreezeManagerTest") { "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", "eventhandler:libeventhandler", + "googletest:gtest_main", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_core", @@ -919,14 +951,15 @@ ohos_unittest("JsonOperateTest") { "${inputmethod_path}/services:inputmethod_service_static", "${inputmethod_path}/services/adapter/settings_data_provider:settings_data_static", "${inputmethod_path}/services/json:imf_json_static", - "//third_party/googletest:gtest_main", ] external_deps = [ "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "data_share:datashare_common", "data_share:datashare_consumer", + "googletest:gtest_main", "hilog:libhilog", "ipc:ipc_single", "resource_management:global_resmgr", @@ -951,8 +984,6 @@ ohos_unittest("VirtualListenerTest") { "${inputmethod_path}/interfaces/inner_api/inputmethod_controller:inputmethod_client_static", "${inputmethod_path}/services:inputmethod_service", "${inputmethod_path}/test/common:inputmethod_test_common", - "//third_party/googletest:gmock", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -963,6 +994,8 @@ ohos_unittest("VirtualListenerTest") { "bundle_framework:appexecfwk_core", "c_utils:utils", "eventhandler:libeventhandler", + "googletest:gmock", + "googletest:gtest_main", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_single", @@ -997,7 +1030,6 @@ ohos_unittest("ImeSystemChannelTest") { "${inputmethod_path}/services:inputmethod_service", "${inputmethod_path}/test/common:inputmethod_test_common", "${inputmethod_path}/test/unittest/cpp_test/common:inputmethod_tdd_util", - "//third_party/googletest:gtest_main", ] external_deps = [ @@ -1008,6 +1040,7 @@ ohos_unittest("ImeSystemChannelTest") { "bundle_framework:appexecfwk_core", "c_utils:utils", "eventhandler:libeventhandler", + "googletest:gtest_main", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_single", @@ -1065,6 +1098,7 @@ ohos_unittest("ImeControllerCpaiTest") { external_deps = [ "googletest:gtest_main", + "hilog:libhilog", "input:libmmi-client", ] } @@ -1127,8 +1161,10 @@ ohos_unittest("InputMethodMessageHandlerTest") { "ability_base:want", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", + "ability_runtime:runtime", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "config_policy:configpolicy_util", "data_share:datashare_common", @@ -1202,5 +1238,6 @@ ohos_unittest("ImfHisysEventReporterTest") { "hilog:libhilog", "hisysevent:libhisysevent", "hisysevent:libhisyseventmanager", + "ipc:ipc_core", ] } diff --git a/test/unittest/cpp_test/common/BUILD.gn b/test/unittest/cpp_test/common/BUILD.gn index 2b148db42..71815ce06 100644 --- a/test/unittest/cpp_test/common/BUILD.gn +++ b/test/unittest/cpp_test/common/BUILD.gn @@ -29,7 +29,6 @@ config("inputmethod_tdd_util_public_config") { visibility = [ "./*" ] include_dirs = [ "include", - "${bundllemanager_path}/interfaces/inner_api/appexecfwk_core/include/bundlemgr", "${inputmethod_path}/services/adapter/settings_data_provider/common/include", ] } @@ -55,6 +54,7 @@ ohos_static_library("inputmethod_tdd_util") { "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libtoken_setproc", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "cJSON:cjson", "data_share:datashare_common", diff --git a/test/unittest/cpp_test/common/include/tdd_util.h b/test/unittest/cpp_test/common/include/tdd_util.h index e67525217..4ce1cb801 100644 --- a/test/unittest/cpp_test/common/include/tdd_util.h +++ b/test/unittest/cpp_test/common/include/tdd_util.h @@ -20,7 +20,7 @@ #include "block_data.h" #include "bundle_mgr_interface.h" -#include "foundation/window/window_manager/interfaces/innerkits/wm/window.h" +#include "window.h" #include "window_manager.h" #include "window_option.h" #include "wm_common.h" -- Gitee