1# Copyright (c) 2022-2024 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("ability_timeout_module_test") { 20 module_out_path = module_output_path 21 cflags_cc = [] 22 include_dirs = [ 23 "${ability_runtime_test_path}/moduletest/mock/include", 24 "//third_party/jsoncpp/include", 25 "${ability_runtime_path}/interfaces/kits/native/ability/native/distributed_ability_runtime", 26 "${ability_runtime_innerkits_path}/dataobs_manager/include", 27 "${distributedschedule_path}/safwk/interfaces/innerkits/safwk", 28 ] 29 30 sources = [ "ability_timeout_module_test.cpp" ] 31 sources += [ 32 "${ability_runtime_services_path}/abilitymgr/src/ability_bundle_event_callback.cpp", 33 "${ability_runtime_services_path}/abilitymgr/src/ability_event_util.cpp", 34 "${ability_runtime_services_path}/abilitymgr/src/ability_manager_service.cpp", 35 "${ability_runtime_services_path}/abilitymgr/src/app_exit_reason_data_manager.cpp", 36 "${ability_runtime_services_path}/abilitymgr/src/assert_fault_callback_death_mgr.cpp", 37 "${ability_runtime_services_path}/abilitymgr/src/assert_fault_proxy.cpp", 38 "${ability_runtime_services_path}/abilitymgr/src/scene_board/ui_ability_lifecycle_manager.cpp", 39 "${ability_runtime_services_path}/abilitymgr/src/start_ability_handler.cpp", 40 "${ability_runtime_services_path}/abilitymgr/src/start_ability_handler/start_ability_sandbox_savefile.cpp", 41 "${ability_runtime_services_path}/abilitymgr/src/sub_managers_helper.cpp", 42 "${ability_runtime_services_path}/abilitymgr/src/window_focus_changed_listener.cpp", 43 "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/sa_mgr/src/sa_mgr_client_mock.cpp", 44 "${ability_runtime_test_path}/moduletest/mock/src/mock_app_mgr_client.cpp", 45 "${ability_runtime_test_path}/moduletest/mock/src/mock_bundle_mgr.cpp", 46 ] 47 48 configs = [ 49 "${ability_runtime_test_path}/moduletest:aafwk_module_test_config", 50 "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", 51 "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/sa_mgr:sa_mgr_mock_config", 52 "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", 53 ] 54 cflags = [] 55 if (target_cpu == "arm") { 56 cflags += [ "-DBINDER_IPC_32BIT" ] 57 } 58 deps = [ 59 "${ability_runtime_innerkits_path}/ability_manager:ability_start_setting", 60 "${ability_runtime_innerkits_path}/ability_manager:process_options", 61 "${ability_runtime_innerkits_path}/app_manager:app_manager", 62 "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", 63 "${ability_runtime_native_path}/ability/native:abilitykit_native", 64 "${ability_runtime_path}/utils/server/startup:startup_util", 65 "${ability_runtime_services_path}/abilitymgr:abilityms", 66 "${ability_runtime_services_path}/abilitymgr:mission_list", 67 "${ability_runtime_services_path}/common:event_report", 68 "${ability_runtime_services_path}/common:perm_verification", 69 "${ability_runtime_services_path}/common:task_handler_wrap", 70 "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", 71 "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", 72 "//third_party/googletest:gmock_main", 73 "//third_party/googletest:gtest_main", 74 "//third_party/jsoncpp:jsoncpp", 75 ] 76 77 if (ability_runtime_graphics) { 78 deps += [ 79 "${ace_engine_path}/interfaces/inner_api/ui_service_manager:ui_service_mgr", 80 "${global_path}/i18n/frameworks/intl:intl_util", 81 "${multimedia_path}/interfaces/innerkits:image_native", 82 "//third_party/icu/icu4c:shared_icuuc", 83 ] 84 } 85 86 external_deps = [ 87 "ability_base:configuration", 88 "ability_base:view_data", 89 "ability_base:want", 90 "ability_base:zuri", 91 "ability_runtime:ability_deps_wrapper", 92 "ability_runtime:ability_manager", 93 "access_token:libaccesstoken_sdk", 94 "bundle_framework:appexecfwk_base", 95 "bundle_framework:appexecfwk_core", 96 "c_utils:utils", 97 "common_event_service:cesfwk_core", 98 "common_event_service:cesfwk_innerkits", 99 "dsoftbus:softbus_client", 100 "ffrt:libffrt", 101 "hicollie:libhicollie", 102 "hilog:libhilog", 103 "hisysevent:libhisysevent", 104 "hitrace:hitrace_meter", 105 "init:libbeget_proxy", 106 "init:libbegetutil", 107 "ipc:ipc_core", 108 "kv_store:distributeddata_inner", 109 "napi:ace_napi", 110 "relational_store:native_appdatafwk", 111 "relational_store:native_dataability", 112 "relational_store:native_rdb", 113 "safwk:system_ability_fwk", 114 "window_manager:libmodal_system_ui_extension_client", 115 "window_manager:libwsutils", 116 "window_manager:sms", 117 ] 118 119 if (resource_schedule_service_enable) { 120 cflags_cc += [ "-RESOURCE_SCHEDULE_SERVICE_ENABLE" ] 121 external_deps += [ "resource_schedule_service:ressched_client" ] 122 } 123 124 if (background_task_mgr_continuous_task_enable) { 125 external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] 126 } 127 128 if (ability_runtime_graphics) { 129 external_deps += [ 130 "input:libmmi-client", 131 "window_manager:libdm", 132 ] 133 } 134 135 if (os_dlp_part_enabled) { 136 cflags_cc += [ "-DWITH_DLP" ] 137 } 138} 139 140group("moduletest") { 141 testonly = true 142 deps = [ 143 # ":ability_timeout_module_test" 144 ] 145} 146