• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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/abilitymgr"
18
19ohos_unittest("ability_manager_service_tenth_test") {
20  module_out_path = module_output_path
21  sanitize = {
22    cfi = true
23    cfi_cross_dso = true
24    debug = false
25    blocklist = "../../cfi_blocklist.txt"
26  }
27  branch_protector_ret = "pac_ret"
28  cflags = [
29    "-Dprivate=public",
30    "-Dprotected=public",
31  ]
32  include_dirs = [
33    "${ability_runtime_path}/interfaces/kits/native/ability/ability_runtime/",
34    "${ability_runtime_path}/interfaces/inner_api/ability_manager/include",
35    "${ability_runtime_test_path}/mock/mock_sa_call",
36    "${ability_runtime_test_path}/mock/task_handler_wrap_mock/include",
37  ]
38
39  sources = [
40    "${ability_runtime_path}/services/abilitymgr/src/ability_auto_startup_service.cpp",
41    "${ability_runtime_path}/services/abilitymgr/src/auto_startup_info.cpp",
42    "${ability_runtime_services_path}/abilitymgr/src/ability_connect_callback_stub.cpp",
43    "${ability_runtime_test_path}/mock/task_handler_wrap_mock/src/mock_task_handler_wrap.cpp",
44    "ability_manager_service_tenth_test.cpp",
45  ]
46
47  configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ]
48
49  deps = [
50    "${ability_runtime_innerkits_path}/ability_manager:ability_start_setting",
51    "${ability_runtime_innerkits_path}/ability_manager:mission_info",
52    "${ability_runtime_innerkits_path}/app_manager:app_manager",
53    "${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
54    "${ability_runtime_native_path}/ability/native:auto_startup_callback",
55    "${ability_runtime_services_path}/abilitymgr:abilityms",
56    "${ability_runtime_services_path}/abilitymgr:wantagent_manager",
57    "${ability_runtime_services_path}/common:perm_verification",
58    "${ability_runtime_services_path}/common:task_handler_wrap",
59  ]
60
61  external_deps = [
62    "ability_base:session_info",
63    "ability_base:want",
64    "ability_base:zuri",
65    "access_token:libaccesstoken_sdk",
66    "access_token:libnativetoken",
67    "access_token:libtoken_setproc",
68    "bundle_framework:appexecfwk_base",
69    "bundle_framework:appexecfwk_core",
70    "cJSON:cjson",
71    "c_utils:utils",
72    "common_event_service:cesfwk_innerkits",
73    "eventhandler:libeventhandler",
74    "ffrt:libffrt",
75    "googletest:gmock_main",
76    "googletest:gtest_main",
77    "hilog:libhilog",
78    "hisysevent:libhisysevent",
79    "init:libbegetutil",
80    "ipc:ipc_core",
81    "kv_store:distributeddata_inner",
82    "safwk:api_cache_manager",
83    "selinux_adapter:librestorecon",
84  ]
85
86  defines = []
87  if (ability_runtime_auto_fill) {
88    defines += [ "SUPPORT_AUTO_FILL" ]
89  }
90
91  if (ability_runtime_graphics) {
92    external_deps += [
93      "window_manager:libwsutils",
94      "window_manager:scene_session",
95    ]
96  }
97}
98
99group("unittest") {
100  testonly = true
101  deps = [ ":ability_manager_service_tenth_test" ]
102}
103