• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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/abilitymgr"
18
19ohos_unittest("app_exit_reason_helper_test") {
20  sanitize = {
21    cfi = true
22    cfi_cross_dso = true
23    debug = false
24    blocklist = "../../cfi_blocklist.txt"
25  }
26  branch_protector_ret = "pac_ret"
27  module_out_path = module_output_path
28
29  include_dirs = [ "${ability_runtime_services_path}/abilitymgr/include" ]
30
31  sources = [
32    "${ability_runtime_path}/frameworks/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.cpp",
33    "${ability_runtime_services_path}/abilitymgr/src/ability_cache_manager.cpp",
34    "${ability_runtime_services_path}/abilitymgr/src/app_exit_reason_helper.cpp",
35    "${ability_runtime_services_path}/abilitymgr/src/process_options.cpp",
36    "${ability_runtime_services_path}/abilitymgr/src/scene_board/ui_ability_lifecycle_manager.cpp",
37    "${ability_runtime_services_path}/abilitymgr/src/start_window_option.cpp",
38    "${ability_runtime_services_path}/abilitymgr/src/sub_managers_helper.cpp",
39    "${ability_runtime_services_path}/abilitymgr/src/utils/timeout_state_utils.cpp",
40    "app_exit_reason_helper_test.cpp",
41  ]
42
43  deps = [
44    "${ability_runtime_innerkits_path}/ability_manager:ability_manager",
45    "${ability_runtime_innerkits_path}/app_manager:app_manager",
46    "${ability_runtime_native_path}/appkit:appkit_manager_helper",
47    "${ability_runtime_path}/utils/global/freeze:freeze_util",
48    "${ability_runtime_path}/utils/server/startup:startup_util",
49    "${ability_runtime_services_path}/abilitymgr:abilityms",
50    "${ability_runtime_services_path}/common:app_util",
51    "${ability_runtime_services_path}/common:event_report",
52    "${ability_runtime_services_path}/common:perm_verification",
53    "${ability_runtime_services_path}/common:task_handler_wrap",
54  ]
55
56  external_deps = [
57    "ability_base:want",
58    "ability_base:zuri",
59    "ability_runtime:ability_deps_wrapper",
60    "access_token:libaccesstoken_sdk",
61    "c_utils:utils",
62    "eventhandler:libeventhandler",
63    "ffrt:libffrt",
64    "hilog:libhilog",
65    "hisysevent:libhisysevent",
66    "hitrace:hitrace_meter",
67    "ipc:ipc_core",
68    "kv_store:distributeddata_inner",
69    "napi:ace_napi",
70    "safwk:system_ability_fwk",
71    "samgr:samgr_proxy",
72    "window_manager:libdm",
73    "window_manager:libwsutils",
74    "window_manager:session_manager_lite",
75  ]
76  cflags_cc = []
77  if (os_dlp_part_enabled) {
78    cflags_cc += [ "-DWITH_DLP" ]
79  }
80}
81
82group("unittest") {
83  testonly = true
84
85  deps = [ ":app_exit_reason_helper_test" ]
86}
87