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 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("SubManagersHelperFuzzTest") { 23 module_out_path = module_output_path 24 25 fuzz_config_file = "${ability_runtime_test_path}/fuzztest/submanagershelper_fuzzer" 26 include_dirs = [ 27 "${ability_runtime_innerkits_path}/ability_manager/include", 28 "${ability_runtime_services_path}/abilitymgr/include", 29 ] 30 cflags = [ 31 "-g", 32 "-O0", 33 "-Wno-unused-variable", 34 "-fno-omit-frame-pointer", 35 ] 36 sources = [ 37 "submanagershelper_fuzzer.cpp", 38 "${ability_runtime_innerkits_path}/deps_wrapper/src/os_account_manager_wrapper.cpp", 39 "${ability_runtime_services_path}/abilitymgr/src/ability_cache_manager.cpp", 40 "${ability_runtime_services_path}/abilitymgr/src/scene_board/ui_ability_lifecycle_manager.cpp", 41 "${ability_runtime_services_path}/abilitymgr/src/sub_managers_helper.cpp", 42 "${ability_runtime_services_path}/abilitymgr/src/utils/request_id_util.cpp", 43 ] 44 45 configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config" ] 46 47 deps = [ 48 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 49 "${ability_runtime_innerkits_path}/ability_manager:ability_start_options", 50 "${ability_runtime_innerkits_path}/ability_manager:ability_start_setting", 51 "${ability_runtime_innerkits_path}/ability_manager:mission_info", 52 "${ability_runtime_innerkits_path}/ability_manager:process_options", 53 "${ability_runtime_innerkits_path}/app_manager:app_manager", 54 "${ability_runtime_native_path}/ability/native:abilitykit_native", 55 "${ability_runtime_native_path}/ability/native:auto_startup_callback", 56 "${ability_runtime_native_path}/appkit:appkit_manager_helper", 57 "${ability_runtime_path}/utils/global/freeze:freeze_util", 58 "${ability_runtime_path}/utils/server/startup:startup_util", 59 "${ability_runtime_services_path}/abilitymgr:abilityms", 60 "${ability_runtime_services_path}/abilitymgr:wantagent_manager", 61 "${ability_runtime_services_path}/common:app_util", 62 "${ability_runtime_services_path}/common:event_report", 63 "${ability_runtime_services_path}/common:perm_verification", 64 "${ability_runtime_services_path}/common:res_sched_util", 65 "${ability_runtime_services_path}/common:task_handler_wrap", 66 ] 67 68 external_deps = [ 69 "ability_base:base", 70 "ability_base:configuration", 71 "ability_base:extractortool", 72 "ability_base:session_info", 73 "ability_base:view_data", 74 "ability_base:want", 75 "ability_base:zuri", 76 "access_token:libaccesstoken_sdk", 77 "access_token:libtokenid_sdk", 78 "bundle_framework:appexecfwk_base", 79 "bundle_framework:appexecfwk_core", 80 "bundle_framework:libappexecfwk_common", 81 "cJSON:cjson", 82 "c_utils:utils", 83 "common_event_service:cesfwk_core", 84 "common_event_service:cesfwk_innerkits", 85 "config_policy:configpolicy_util", 86 "dsoftbus:softbus_client", 87 "eventhandler:libeventhandler", 88 "faultloggerd:libbacktrace_local", 89 "ffrt:libffrt", 90 "hicollie:libhicollie", 91 "hilog:libhilog", 92 "hisysevent:libhisysevent", 93 "hitrace:hitrace_meter", 94 "icu:shared_icuuc", 95 "init:libbeget_proxy", 96 "init:libbegetutil", 97 "ipc:ipc_core", 98 "kv_store:distributeddata_inner", 99 "os_account:os_account_innerkits", 100 "qos_manager:concurrent_task_client", 101 "relational_store:native_appdatafwk", 102 "relational_store:native_dataability", 103 "relational_store:native_rdb", 104 "safwk:system_ability_fwk", 105 "samgr:samgr_proxy", 106 "window_manager:libmodal_system_ui_extension_client", 107 "window_manager:libwsutils", 108 "window_manager:scene_session", 109 "window_manager:session_manager_lite", 110 "window_manager:sms", 111 ] 112 113 if (ability_runtime_graphics) { 114 external_deps += [ "input:libmmi-client" ] 115 } 116} 117 118############################################################################### 119group("fuzztest") { 120 testonly = true 121 deps = [] 122 deps += [ 123 # deps file 124 ":SubManagersHelperFuzzTest", 125 ] 126} 127############################################################################### 128