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