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