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 14#####################hydra-fuzz################### 15import("//build/config/features.gni") 16import("//build/ohos.gni") 17import("//build/test.gni") 18import("//foundation/ability/ability_runtime/ability_runtime.gni") 19module_output_path = "ability_runtime/abilitymgr" 20 21##############################fuzztest########################################## 22ohos_fuzztest("KeepAliveProcessManagerNinthFuzzTest") { 23 module_out_path = module_output_path 24 25 fuzz_config_file = 26 "${ability_runtime_test_path}/fuzztest/keepaliveprocessmanagerninth_fuzzer" 27 include_dirs = [ 28 "${ability_runtime_innerkits_path}/ability_manager/include", 29 "${ability_runtime_innerkits_path}/app_manager/include/appmgr", 30 "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper", 31 "${ability_runtime_services_path}/abilitymgr/include/utils", 32 "${ability_runtime_services_path}/abilitymgr/include/keep_alive", 33 "${ability_runtime_services_path}/common/include", 34 ] 35 cflags = [ 36 "-g", 37 "-O0", 38 "-Wno-unused-variable", 39 "-fno-omit-frame-pointer", 40 ] 41 sources = [ 42 "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_mgr_client.cpp", 43 "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_service_manager.cpp", 44 "${ability_runtime_native_path}/appkit/ability_bundle_manager_helper/bundle_mgr_helper.cpp", 45 "${ability_runtime_services_path}/abilitymgr/src/keep_alive/ability_keep_alive_data_manager.cpp", 46 "${ability_runtime_services_path}/abilitymgr/src/keep_alive/ability_keep_alive_service.cpp", 47 "${ability_runtime_services_path}/abilitymgr/src/keep_alive/keep_alive_info.cpp", 48 "${ability_runtime_services_path}/abilitymgr/src/keep_alive/keep_alive_process_manager.cpp", 49 "${ability_runtime_services_path}/abilitymgr/src/process_options.cpp", 50 "${ability_runtime_services_path}/common/src/app_utils.cpp", 51 "${ability_runtime_services_path}/common/src/json_utils.cpp", 52 "${ability_runtime_services_path}/common/src/permission_verification.cpp", 53 "${ability_runtime_services_path}/common/src/record_cost_time_util.cpp", 54 "keepaliveprocessmanagerninth_fuzzer.cpp", 55 ] 56 57 configs = [ 58 "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", 59 "${ability_runtime_services_path}/abilitymgr:abilityms_config", 60 ] 61 62 deps = [ 63 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 64 "${ability_runtime_innerkits_path}/ability_manager:mission_info", 65 "${ability_runtime_native_path}/ability/native:abilitykit_native", 66 "${ability_runtime_path}/utils/server/startup:startup_util", 67 "${ability_runtime_services_path}/abilitymgr:abilityms", 68 "${ability_runtime_services_path}/common:record_cost_time_util", 69 ] 70 71 external_deps = [ 72 "ability_base:base", 73 "ability_base:want", 74 "access_token:libaccesstoken_sdk", 75 "access_token:libtokenid_sdk", 76 "background_task_mgr:bgtaskmgr_innerkits", 77 "bundle_framework:appexecfwk_base", 78 "bundle_framework:appexecfwk_core", 79 "c_utils:utils", 80 "common_event_service:cesfwk_core", 81 "common_event_service:cesfwk_innerkits", 82 "config_policy:configpolicy_util", 83 "eventhandler:libeventhandler", 84 "ffrt:libffrt", 85 "hilog:libhilog", 86 "hitrace:hitrace_meter", 87 "hisysevent:libhisysevent", 88 "init:libbeget_proxy", 89 "input:libmmi-client", 90 "ipc:ipc_core", 91 "kv_store:distributeddata_inner", 92 "napi:ace_napi", 93 "relational_store:native_dataability", 94 "relational_store:native_rdb", 95 "safwk:system_ability_fwk", 96 "samgr:samgr_proxy", 97 "window_manager:libwsutils", 98 "window_manager:scene_session", 99 "window_manager:session_manager_lite", 100 ] 101 102 if (ability_runtime_child_process) { 103 defines = [ "SUPPORT_CHILD_PROCESS" ] 104 } 105 106 if (ability_runtime_graphics) { 107 deps += [] 108 external_deps += [ 109 "i18n:intl_util", 110 "window_manager:libwm", 111 ] 112 } 113 if (ability_runtime_upms) { 114 deps += [ 115 "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", 116 ] 117 } 118} 119 120############################################################################### 121group("fuzztest") { 122 testonly = true 123 deps = [] 124 deps += [ 125 # deps file 126 ":KeepAliveProcessManagerNinthFuzzTest", 127 ] 128} 129############################################################################### 130