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