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/appmgrservice" 18 19ohos_unittest("app_running_manager_third_test") { 20 sanitize = { 21 cfi = true 22 cfi_cross_dso = true 23 debug = false 24 blocklist = "../../cfi_blocklist.txt" 25 } 26 module_out_path = module_output_path 27 28 cflags = [ 29 "-Dprivate=public", 30 "-Dprotected=public", 31 ] 32 33 include_dirs = [ 34 "${ability_runtime_services_path}/abilitymgr/include", 35 "${ability_runtime_services_path}/abilitymgr/include/utils", 36 "${ability_runtime_test_path}/mock/services_appmgr_test/include", 37 "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/ability_scheduler_mock", 38 ] 39 40 configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config" ] 41 42 sources = [ "app_running_manager_third_test.cpp" ] 43 44 deps = [ 45 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 46 "${ability_runtime_innerkits_path}/app_manager:app_manager", 47 "${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper", 48 "${ability_runtime_path}/utils/server/startup:startup_util", 49 "${ability_runtime_services_path}/abilitymgr:abilityms", 50 "${ability_runtime_services_path}/appmgr:libappms", 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:base", 58 "ability_base:configuration", 59 "ability_base:want", 60 "access_token:libaccesstoken_sdk", 61 "appspawn:appspawn_client", 62 "bundle_framework:appexecfwk_base", 63 "bundle_framework:appexecfwk_core", 64 "c_utils:utils", 65 "common_event_service:cesfwk_innerkits", 66 "ffrt:libffrt", 67 "googletest:gmock_main", 68 "googletest:gtest_main", 69 "hicollie:libhicollie", 70 "hilog:libhilog", 71 "hisysevent:libhisysevent", 72 "hitrace:hitrace_meter", 73 "init:libbeget_proxy", 74 "init:libbegetutil", 75 "ipc:ipc_core", 76 "kv_store:distributeddata_mgr", 77 "memory_utils:libmeminfo", 78 "safwk:system_ability_fwk", 79 "samgr:samgr_proxy", 80 "window_manager:libwmutil", 81 "window_manager:libwmutil_static", 82 "window_manager:libwmutil_base", 83 ] 84 85 if (ohos_indep_compiler_enable) { 86 external_deps += [ "window_manager:libwmutil" ] 87 } 88 89 defines = [] 90 if (ability_runtime_child_process) { 91 defines += [ "SUPPORT_CHILD_PROCESS" ] 92 } 93 94 if (ability_runtime_graphics) { 95 external_deps += [ 96 "window_manager:libwm", 97 "window_manager:libwsutils", 98 ] 99 defines += [ "SUPPORT_SCREEN" ] 100 } 101 if (ability_runtime_upms) { 102 deps += [ 103 "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", 104 ] 105 } 106} 107 108group("unittest") { 109 testonly = true 110 111 deps = [ ":app_running_manager_third_test" ] 112} 113