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/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_innerkits_path}/uri_permission:uri_permission_mgr", 45 "${ability_runtime_path}/utils/server/startup:startup_util", 46 "${ability_runtime_services_path}/appmgr:libappms", 47 "${ability_runtime_services_path}/common:event_report", 48 "${ability_runtime_services_path}/common:perm_verification", 49 "${ability_runtime_services_path}/common:task_handler_wrap", 50 "${windowmanager_path}/utils:libwmutil_static", 51 "//third_party/googletest:gmock_main", 52 "//third_party/googletest:gtest_main", 53 ] 54 55 external_deps = [ 56 "ability_base:base", 57 "ability_base:configuration", 58 "ability_base:want", 59 "access_token:libaccesstoken_sdk", 60 "appspawn:appspawn_client", 61 "bundle_framework:appexecfwk_base", 62 "bundle_framework:appexecfwk_core", 63 "c_utils:utils", 64 "common_event_service:cesfwk_innerkits", 65 "ffrt:libffrt", 66 "hicollie:libhicollie", 67 "hilog:libhilog", 68 "hisysevent:libhisysevent", 69 "hitrace:hitrace_meter", 70 "init:libbeget_proxy", 71 "init:libbegetutil", 72 "ipc:ipc_core", 73 "kv_store:distributeddata_mgr", 74 "memory_utils:libmeminfo", 75 "safwk:system_ability_fwk", 76 "samgr:samgr_proxy", 77 ] 78 79 if (ability_runtime_graphics) { 80 external_deps += [ 81 "window_manager:libwm", 82 "window_manager:libwsutils", 83 ] 84 defines = [ "SUPPORT_SCREEN" ] 85 } 86} 87 88group("unittest") { 89 testonly = true 90 91 deps = [ ":app_running_manager_second_test" ] 92} 93