1# Copyright (c) 2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/test.gni") 15import("//foundation/ability/ability_runtime/ability_runtime.gni") 16 17module_output_path = "ability_runtime/mstabilitymgrservice" 18 19ohos_moduletest("start_ability_implicit_module_test") { 20 module_out_path = module_output_path 21 cflags_cc = [] 22 include_dirs = [ 23 "${ability_runtime_test_path}/moduletest/mock/include", 24 "${ability_runtime_native_path}/ability/native/include/distributed_ability_runtime", 25 "${ability_runtime_innerkits_path}/dataobs_manager/include", 26 "${ace_engine_path}/interfaces/inner_api/ui_service_manager/include", 27 "${ace_engine_path}/adapter/ohos/services/uiservice/include", 28 "${windowmanager_path}/interfaces/innerkits", 29 "${multimodalinput_path}/interfaces/native/innerkits/event/include", 30 "//third_party/jsoncpp/include", 31 ] 32 33 sources = [ "start_ability_implicit_module_test.cpp" ] 34 35 sources += [ 36 "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/sa_mgr/src/sa_mgr_client_mock.cpp", 37 "${ability_runtime_test_path}/moduletest/mock/src/mock_app_mgr_client.cpp", 38 "${ability_runtime_test_path}/moduletest/mock/src/mock_bundle_mgr.cpp", 39 "${ability_runtime_test_path}/moduletest/mock/src/ui_service_mgr_client_mock.cpp", 40 ] 41 42 configs = [ 43 "${ability_runtime_test_path}/moduletest:aafwk_module_test_config", 44 "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", 45 ] 46 47 cflags = [] 48 if (target_cpu == "arm") { 49 cflags += [ "-DBINDER_IPC_32BIT" ] 50 } 51 deps = [ 52 "${ability_runtime_innerkits_path}/app_manager:app_manager", 53 "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", 54 "${ability_runtime_native_path}/ability/native:abilitykit_native", 55 "${ability_runtime_services_path}/abilitymgr:abilityms", 56 "${ability_runtime_services_path}/common:perm_verification", 57 "${ability_runtime_services_path}/common:task_handler_wrap", 58 "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", 59 "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", 60 "//third_party/googletest:gmock_main", 61 "//third_party/googletest:gtest_main", 62 "//third_party/icu/icu4c:shared_icuuc", 63 "//third_party/jsoncpp:jsoncpp", 64 ] 65 66 if (ability_runtime_graphics) { 67 deps += [ 68 "${global_path}/i18n/frameworks/intl:intl_util", 69 "${multimedia_path}/interfaces/innerkits:image_native", 70 "//third_party/icu/icu4c:shared_icuuc", 71 ] 72 } 73 74 external_deps = [ 75 "ability_base:configuration", 76 "ability_base:want", 77 "ability_base:zuri", 78 "ability_runtime:ability_deps_wrapper", 79 "access_token:libaccesstoken_sdk", 80 "bundle_framework:appexecfwk_base", 81 "bundle_framework:appexecfwk_core", 82 "c_utils:utils", 83 "common_event_service:cesfwk_core", 84 "common_event_service:cesfwk_innerkits", 85 "dsoftbus:softbus_client", 86 "ffrt:libffrt", 87 "hicollie:libhicollie", 88 "hilog:libhilog", 89 "hisysevent:libhisysevent", 90 "hitrace:hitrace_meter", 91 "init:libbeget_proxy", 92 "init:libbegetutil", 93 "ipc:ipc_core", 94 "napi:ace_napi", 95 "relational_store:native_appdatafwk", 96 "relational_store:native_dataability", 97 "relational_store:native_rdb", 98 ] 99 100 if (efficiency_manager) { 101 cflags_cc += [ "-DEFFICIENCY_MANAGER_ENABLE" ] 102 external_deps += [ "efficiency_manager:suspend_manager_client" ] 103 } 104 105 if (resource_schedule_service_enable) { 106 cflags_cc += [ "-RESOURCE_SCHEDULE_SERVICE_ENABLE" ] 107 external_deps += [ "resource_schedule_service:ressched_client" ] 108 } 109 110 if (background_task_mgr_continuous_task_enable) { 111 external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] 112 } 113 114 if (ability_runtime_graphics) { 115 external_deps += [ 116 "input:libmmi-client", 117 "window_manager:libdm", 118 ] 119 } 120} 121 122group("moduletest") { 123 testonly = true 124 125 deps = [ ":start_ability_implicit_module_test" ] 126} 127