• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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/test.gni")
15import("//foundation/ability/ability_runtime/ability_runtime.gni")
16
17module_output_path = "ability_runtime/mstabilitymgrservice"
18
19ohos_moduletest("on_new_want_module_test") {
20  module_out_path = module_output_path
21  cflags_cc = []
22  include_dirs = [
23    "${ability_runtime_test_path}/moduletest/mock/include",
24    "//third_party/jsoncpp/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 = [ "on_new_want_module_test.cpp" ]
30  sources += [
31    "${ability_runtime_services_path}/abilitymgr/src/ability_manager_service.cpp",
32    "//foundation/distributedhardware/device_manager/test/unittest/mock/parameter.cpp",
33  ]
34
35  configs = [
36    "${ability_runtime_test_path}/moduletest:aafwk_module_test_config",
37    "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config",
38    "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/sa_mgr:sa_mgr_mock_config",
39    "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config",
40  ]
41  cflags = []
42  if (target_cpu == "arm") {
43    cflags += [ "-DBINDER_IPC_32BIT" ]
44  }
45  deps = [
46    "${ability_runtime_innerkits_path}/app_manager:app_manager",
47    "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr",
48    "${ability_runtime_native_path}/ability/native:abilitykit_native",
49    "${ability_runtime_services_path}/abilitymgr:abilityms",
50    "${ability_runtime_services_path}/common:event_report",
51    "${ability_runtime_services_path}/common:perm_verification",
52    "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk",
53    "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy",
54    "//third_party/googletest:gmock_main",
55    "//third_party/googletest:gtest_main",
56    "//third_party/icu/icu4c:shared_icuuc",
57    "//third_party/jsoncpp:jsoncpp",
58  ]
59
60  if (ability_runtime_graphics) {
61    deps += [
62      "${ace_engine_path}/interfaces/inner_api/ui_service_manager:ui_service_mgr",
63      "${global_path}/i18n/frameworks/intl:intl_util",
64      "${multimedia_path}/interfaces/innerkits:image_native",
65    ]
66  }
67
68  external_deps = [
69    "ability_base:want",
70    "ability_base:zuri",
71    "ability_runtime:ability_deps_wrapper",
72    "access_token:libaccesstoken_sdk",
73    "bundle_framework:appexecfwk_base",
74    "bundle_framework:appexecfwk_core",
75    "c_utils:utils",
76    "common_event_service:cesfwk_core",
77    "common_event_service:cesfwk_innerkits",
78    "dsoftbus:softbus_client",
79    "eventhandler:libeventhandler",
80    "hicollie_native:libhicollie",
81    "hisysevent_native:libhisysevent",
82    "hitrace_native:hitrace_meter",
83    "hiviewdfx_hilog_native:libhilog",
84    "init:libbegetutil",
85    "ipc:ipc_core",
86    "relational_store:native_appdatafwk",
87    "relational_store:native_dataability",
88    "relational_store:native_rdb",
89  ]
90
91  if (efficiency_manager) {
92    cflags_cc += [ "-DEFFICIENCY_MANAGER_ENABLE" ]
93    external_deps += [ "efficiency_manager:suspend_manager_client" ]
94  }
95
96  if (resource_schedule_service_enable) {
97    cflags_cc += [ "-RESOURCE_SCHEDULE_SERVICE_ENABLE" ]
98    external_deps += [ "resource_schedule_service:ressched_client" ]
99  }
100
101  if (background_task_mgr_continuous_task_enable) {
102    external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ]
103  }
104
105  if (ability_runtime_graphics) {
106    external_deps += [
107      "input:libmmi-client",
108      "window_manager:libdm",
109    ]
110  }
111}
112
113group("moduletest") {
114  testonly = true
115
116  deps = [ ":on_new_want_module_test" ]
117}
118