1# Copyright (c) 2021-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/ohos.gni") 15import("//foundation/ability/ability_runtime/ability_runtime.gni") 16 17ohos_source_set("appmgr_mst_source") { 18 testonly = true 19 cflags_cc = [] 20 sources = [ 21 "${ability_runtime_services_path}/appmgr/src/app_mgr_service.cpp", 22 "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", 23 ] 24 25 defines = [ "AMS_LOG_TAG = \"AppMgrService\"" ] 26 27 include_dirs = [ 28 "//third_party/json/include", 29 "${ability_runtime_test_path}/mock/services_appmgr_test/include", 30 ] 31 32 public_configs = [ 33 "${ability_runtime_test_path}/moduletest:services_module_test_config", 34 "${ability_runtime_services_path}/appmgr:appmgr_config", 35 "${ability_runtime_test_path}/moduletest:services_mock_ams_config", 36 "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", 37 "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy_config", 38 "${c_utils_base_path}:utils_config", 39 "//third_party/googletest:gtest_config", 40 "//third_party/googletest:gmock_config", 41 ] 42 cflags = [] 43 if (target_cpu == "arm") { 44 cflags += [ "-DBINDER_IPC_32BIT" ] 45 } 46 deps = [ 47 "${ability_runtime_services_path}/appmgr:libappms", 48 "${ability_runtime_services_path}/common:task_handler_wrap", 49 ] 50 public_deps = [ 51 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 52 "${ability_runtime_innerkits_path}/app_manager:app_manager", 53 "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", 54 "${ability_runtime_services_path}/common:perm_verification", 55 "${appspawn_path}/interfaces/innerkits:appspawn_socket_client", 56 "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", 57 "${bundlefwk_inner_api_path}/appexecfwk_core:appexecfwk_core", 58 "${c_utils_base_path}:utils", 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 ] 64 65 external_deps = [ 66 "ability_base:configuration", 67 "ability_base:want", 68 "ability_runtime:ability_deps_wrapper", 69 "access_token:libaccesstoken_sdk", 70 "bundle_framework:appexecfwk_base", 71 "bundle_framework:appexecfwk_core", 72 "common_event_service:cesfwk_core", 73 "common_event_service:cesfwk_innerkits", 74 "ffrt:libffrt", 75 "hicollie:libhicollie", 76 "hilog:libhilog", 77 "hisysevent:libhisysevent", 78 "hitrace:hitrace_meter", 79 "init:libbeget_proxy", 80 "ipc:ipc_core", 81 "window_manager:libwm", 82 ] 83 84 if (background_task_mgr_continuous_task_enable) { 85 external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] 86 } 87 88 subsystem_name = "ability" 89 part_name = "ability_runtime" 90} 91 92group("moduletest") { 93 testonly = true 94 95 deps = [ 96 "ability_running_record_test:moduletest", 97 "app_life_cycle_test:moduletest", 98 "app_mgr_service_test:moduletest", 99 "app_recent_list_test:moduletest", 100 "app_running_processes_info_module_test:moduletest", 101 "app_running_record_test:moduletest", 102 "app_service_flow_test:moduletest", 103 "ipc_ams_mgr_test:moduletest", 104 "ipc_app_mgr_test:moduletest", 105 "ipc_app_scheduler_test:moduletest", 106 "service_app_spawn_client_test:moduletest", 107 "service_event_drive_test:moduletest", 108 "service_start_process_test:moduletest", 109 "specified_ability_service_test:moduletest", 110 ] 111} 112