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("sa_interceptor_manager_test") { 20 module_out_path = module_output_path 21 sanitize = { 22 cfi = true 23 cfi_cross_dso = true 24 debug = false 25 } 26 include_dirs = [ 27 "${ability_runtime_services_path}/abilitymgr/include", 28 "mock", 29 ] 30 31 sources = [ 32 "${ability_runtime_services_path}/abilitymgr/src/sa_interceptor_manager.cpp", 33 "sa_interceptor_manager_test.cpp", 34 ] 35 36 configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] 37 38 deps = [ 39 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 40 "${ability_runtime_innerkits_path}/ability_manager:ability_start_options", 41 "${ability_runtime_native_path}/ability/native:abilitykit_native", 42 "${ability_runtime_services_path}/abilitymgr:abilityms", 43 "${ability_runtime_services_path}/abilitymgr:wantagent_manager", 44 "${ability_runtime_services_path}/common:event_report", 45 "${ability_runtime_services_path}/common:perm_verification", 46 "${ability_runtime_services_path}/common:task_handler_wrap", 47 ] 48 49 external_deps = [ 50 "ability_base:want", 51 "ability_base:zuri", 52 "ability_runtime:ability_manager", 53 "access_token:libaccesstoken_sdk", 54 "bundle_framework:appexecfwk_base", 55 "bundle_framework:appexecfwk_core", 56 "c_utils:utils", 57 "common_event_service:cesfwk_innerkits", 58 "eventhandler:libeventhandler", 59 "ffrt:libffrt", 60 "googletest:gmock_main", 61 "googletest:gtest_main", 62 "hilog:libhilog", 63 "hisysevent:libhisysevent", 64 "hitrace:hitrace_meter", 65 "ipc:ipc_core", 66 "napi:ace_napi", 67 "safwk:system_ability_fwk", 68 "samgr:samgr_proxy", 69 ] 70 71 if (background_task_mgr_continuous_task_enable) { 72 external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] 73 } 74} 75 76group("unittest") { 77 testonly = true 78 79 deps = [ ":sa_interceptor_manager_test" ] 80} 81