• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    "//commonlibrary/c_utils/base: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 = [ "${ability_runtime_services_path}/appmgr:libappms" ]
47  public_deps = [
48    "${ability_runtime_innerkits_path}/ability_manager:ability_manager",
49    "${ability_runtime_innerkits_path}/app_manager:app_manager",
50    "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr",
51    "${ability_runtime_services_path}/common:perm_verification",
52    "${appspawn_path}/interfaces/innerkits:appspawn_socket_client",
53    "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base",
54    "${bundlefwk_inner_api_path}/appexecfwk_core:appexecfwk_core",
55    "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy",
56    "//commonlibrary/c_utils/base:utils",
57    "//third_party/googletest:gmock_main",
58    "//third_party/googletest:gtest_main",
59    "//third_party/icu/icu4c:shared_icuuc",
60  ]
61
62  external_deps = [
63    "ability_base:configuration",
64    "ability_base:want",
65    "ability_runtime:ability_deps_wrapper",
66    "access_token:libaccesstoken_sdk",
67    "bundle_framework:appexecfwk_base",
68    "bundle_framework:appexecfwk_core",
69    "common_event_service:cesfwk_core",
70    "common_event_service:cesfwk_innerkits",
71    "eventhandler:libeventhandler",
72    "hicollie_native:libhicollie",
73    "hisysevent_native:libhisysevent",
74    "hitrace_native:hitrace_meter",
75    "hiviewdfx_hilog_native:libhilog",
76    "init:libbeget_proxy",
77    "ipc:ipc_core",
78    "window_manager:libwm",
79  ]
80
81  if (background_task_mgr_continuous_task_enable) {
82    external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ]
83  }
84
85  subsystem_name = "ability"
86  part_name = "ability_runtime"
87}
88
89group("moduletest") {
90  testonly = true
91
92  deps = [
93    "ability_running_record_test:moduletest",
94    "app_life_cycle_test:moduletest",
95    "app_mgr_service_test:moduletest",
96    "app_recent_list_test:moduletest",
97    "app_running_processes_info_module_test:moduletest",
98    "app_running_record_test:moduletest",
99    "app_service_flow_test:moduletest",
100    "ipc_ams_mgr_test:moduletest",
101    "ipc_app_mgr_test:moduletest",
102    "ipc_app_scheduler_test:moduletest",
103    "service_app_spawn_client_test:moduletest",
104    "service_event_drive_test:moduletest",
105    "service_start_process_test:moduletest",
106    "specified_ability_service_test:moduletest",
107  ]
108}
109