• 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    "app_exit_reason_helper_test.cpp",
40  ]
41
42  deps = [
43    "${ability_runtime_innerkits_path}/ability_manager:ability_manager",
44    "${ability_runtime_innerkits_path}/app_manager:app_manager",
45    "${ability_runtime_path}/utils/global/freeze:freeze_util",
46    "${ability_runtime_path}/utils/server/startup:startup_util",
47    "${ability_runtime_services_path}/abilitymgr:abilityms",
48    "${ability_runtime_services_path}/common:app_util",
49    "${ability_runtime_services_path}/common:event_report",
50    "${ability_runtime_services_path}/common:perm_verification",
51    "${ability_runtime_services_path}/common:task_handler_wrap",
52  ]
53
54  external_deps = [
55    "ability_base:want",
56    "ability_base:zuri",
57    "ability_runtime:ability_deps_wrapper",
58    "access_token:libaccesstoken_sdk",
59    "c_utils:utils",
60    "eventhandler:libeventhandler",
61    "ffrt:libffrt",
62    "hilog:libhilog",
63    "hisysevent:libhisysevent",
64    "hitrace:hitrace_meter",
65    "ipc:ipc_core",
66    "kv_store:distributeddata_inner",
67    "napi:ace_napi",
68    "safwk:system_ability_fwk",
69    "samgr:samgr_proxy",
70    "window_manager:libwsutils",
71    "window_manager:session_manager_lite",
72  ]
73  cflags_cc = []
74  if (os_dlp_part_enabled) {
75    cflags_cc += [ "-DWITH_DLP" ]
76  }
77}
78
79group("unittest") {
80  testonly = true
81
82  deps = [ ":app_exit_reason_helper_test" ]
83}
84