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 [ "${ability_runtime_test_path}/mock/services_appmgr_test/include" ] 29 30 public_configs = [ 31 "${ability_runtime_test_path}/moduletest:services_module_test_config", 32 "${ability_runtime_services_path}/appmgr:appmgr_config", 33 "${ability_runtime_test_path}/moduletest:services_mock_ams_config", 34 "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", 35 "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy_config", 36 "${c_utils_base_path}:utils_config", 37 "//third_party/googletest:gtest_config", 38 "//third_party/googletest:gmock_config", 39 ] 40 cflags = [] 41 if (target_cpu == "arm") { 42 cflags += [ "-DBINDER_IPC_32BIT" ] 43 } 44 deps = [ 45 "${ability_runtime_path}/utils/global/freeze:freeze_util", 46 "${ability_runtime_services_path}/appmgr:libappms", 47 "${ability_runtime_services_path}/common:task_handler_wrap", 48 ] 49 public_deps = [ 50 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 51 "${ability_runtime_innerkits_path}/app_manager:app_manager", 52 "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", 53 "${ability_runtime_services_path}/common:perm_verification", 54 "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", 55 "${bundlefwk_inner_api_path}/appexecfwk_core:appexecfwk_core", 56 "${c_utils_base_path}:utils", 57 "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", 58 "//third_party/googletest:gmock_main", 59 "//third_party/googletest:gtest_main", 60 "//third_party/icu/icu4c:shared_icuuc", 61 ] 62 63 external_deps = [ 64 "ability_base:configuration", 65 "ability_base:want", 66 "ability_runtime:ability_deps_wrapper", 67 "access_token:libaccesstoken_sdk", 68 "appspawn:appspawn_client", 69 "bundle_framework:appexecfwk_base", 70 "bundle_framework:appexecfwk_core", 71 "c_utils:utils", 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 "init:libbegetutil", 81 "ipc:ipc_core", 82 "json:nlohmann_json_static", 83 "window_manager:libwm", 84 ] 85 86 if (background_task_mgr_continuous_task_enable) { 87 external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] 88 } 89 90 subsystem_name = "ability" 91 part_name = "ability_runtime" 92} 93 94group("moduletest") { 95 testonly = true 96 97 deps = [ 98 "ability_running_record_test:moduletest", 99 "app_life_cycle_test:moduletest", 100 "app_mgr_service_test:moduletest", 101 "app_recent_list_test:moduletest", 102 "app_running_processes_info_module_test:moduletest", 103 "app_running_record_test:moduletest", 104 "app_service_flow_test:moduletest", 105 "ipc_ams_mgr_test:moduletest", 106 "ipc_app_mgr_test:moduletest", 107 "ipc_app_scheduler_test:moduletest", 108 "specified_ability_service_test:moduletest", 109 ] 110} 111