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/appmgrservice" 18 19ohos_unittest("app_running_manager_second_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 include_dirs = [ 29 "${ability_runtime_services_path}/appmgr/include", 30 "${ability_runtime_test_path}/mock/mock_appmgr_service/include/", 31 "${ability_runtime_test_path}/mock/services_appmgr_test/include/", 32 ] 33 34 configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config" ] 35 36 sources = [ 37 "${ability_runtime_services_path}/appmgr/src/exit_resident_process_manager.cpp", 38 "app_running_manager_second_test.cpp", 39 ] 40 41 deps = [ 42 "${ability_runtime_innerkits_path}/app_manager:app_manager", 43 "${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper", 44 "${ability_runtime_path}/utils/server/startup:startup_util", 45 "${ability_runtime_services_path}/appmgr:libappms", 46 "${ability_runtime_services_path}/common:event_report", 47 "${ability_runtime_services_path}/common:perm_verification", 48 "${ability_runtime_services_path}/common:task_handler_wrap", 49 ] 50 51 external_deps = [ 52 "ability_base:base", 53 "ability_base:configuration", 54 "ability_base:want", 55 "access_token:libaccesstoken_sdk", 56 "appspawn:appspawn_client", 57 "bundle_framework:appexecfwk_base", 58 "bundle_framework:appexecfwk_core", 59 "c_utils:utils", 60 "common_event_service:cesfwk_innerkits", 61 "ffrt:libffrt", 62 "googletest:gmock_main", 63 "googletest:gtest_main", 64 "hicollie:libhicollie", 65 "hilog:libhilog", 66 "hisysevent:libhisysevent", 67 "hitrace:hitrace_meter", 68 "init:libbeget_proxy", 69 "init:libbegetutil", 70 "ipc:ipc_core", 71 "kv_store:distributeddata_mgr", 72 "memory_utils:libmeminfo", 73 "safwk:system_ability_fwk", 74 "samgr:samgr_proxy", 75 ] 76 77 if (ohos_indep_compiler_enable) { 78 external_deps += [ "window_manager:libwmutil" ] 79 } 80 81 defines = [] 82 if (ability_runtime_child_process) { 83 defines += [ "SUPPORT_CHILD_PROCESS" ] 84 } 85 86 if (ability_runtime_graphics) { 87 external_deps += [ 88 "window_manager:libwm", 89 "window_manager:libwsutils", 90 ] 91 defines += [ "SUPPORT_SCREEN" ] 92 } 93 if (ability_runtime_upms) { 94 deps += [ 95 "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", 96 ] 97 } 98} 99 100group("unittest") { 101 testonly = true 102 103 deps = [ ":app_running_manager_second_test" ] 104} 105