• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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/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  ]
36  cflags = []
37  if (target_cpu == "arm") {
38    cflags += [ "-DBINDER_IPC_32BIT" ]
39  }
40  deps = [
41    "${ability_runtime_path}/utils/global/freeze:freeze_util",
42    "${ability_runtime_services_path}/appmgr:libappms",
43    "${ability_runtime_services_path}/common:task_handler_wrap",
44  ]
45  public_deps = [
46    "${ability_runtime_innerkits_path}/ability_manager:ability_manager",
47    "${ability_runtime_innerkits_path}/app_manager:app_manager",
48    "${ability_runtime_services_path}/common:perm_verification",
49  ]
50
51  external_deps = [
52    "ability_base:configuration",
53    "ability_base:want",
54    "ability_runtime:ability_deps_wrapper",
55    "access_token:libaccesstoken_sdk",
56    "appspawn:appspawn_client",
57    "common_event_service:cesfwk_core",
58    "common_event_service:cesfwk_innerkits",
59    "ffrt:libffrt",
60    "hicollie:libhicollie",
61    "hilog:libhilog",
62    "hisysevent:libhisysevent",
63    "hitrace:hitrace_meter",
64    "init:libbeget_proxy",
65    "init:libbegetutil",
66    "ipc:ipc_core",
67    "json:nlohmann_json_static",
68  ]
69
70  public_external_deps = [
71    "bundle_framework:appexecfwk_base",
72    "bundle_framework:appexecfwk_core",
73    "c_utils:utils",
74    "googletest:gmock_main",
75    "googletest:gtest_main",
76    "icu:shared_icuuc",
77    "samgr:samgr_proxy",
78  ]
79
80  if (ability_runtime_graphics) {
81    external_deps += [ "window_manager:libwm" ]
82  }
83  if (ability_runtime_upms) {
84    deps += [
85      "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr",
86    ]
87  }
88  if (ability_runtime_child_process) {
89    defines += [ "SUPPORT_CHILD_PROCESS" ]
90  }
91
92  if (background_task_mgr_continuous_task_enable) {
93    external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ]
94  }
95
96  subsystem_name = "ability"
97  part_name = "ability_runtime"
98}
99
100group("moduletest") {
101  testonly = true
102
103  deps = [
104    "ability_running_record_test:moduletest",
105    "app_life_cycle_test:moduletest",
106    "app_mgr_service_test:moduletest",
107    "app_recent_list_test:moduletest",
108    "app_running_processes_info_module_test:moduletest",
109    "app_running_record_test:moduletest",
110    "app_service_flow_test:moduletest",
111    "ipc_ams_mgr_test:moduletest",
112    "ipc_app_mgr_test:moduletest",
113    "ipc_app_scheduler_test:moduletest",
114    "service_start_process_test:moduletest",
115    "specified_ability_service_test:moduletest",
116  ]
117}
118