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/form_fwk/form_fwk.gni") 19 20##############################fuzztest########################################## 21ohos_fuzztest("formrefreshFuzzTest") { 22 module_out_path = form_fuzz_test_path 23 24 fuzz_config_file = 25 "${form_fwk_path}/test/fuzztest/formrefresh_fuzzer" 26 27 include_dirs = [ 28 "${form_fwk_path}/interfaces/kits/native/include", 29 "${form_fwk_path}/services/src/form_refresh/check_mgr", 30 "${form_fwk_path}/services/src/form_refresh/refresh_impl", 31 "${form_fwk_path}/services/include/common/util", 32 "${form_fwk_path}/services/include/form_refresh/strategy", 33 ] 34 cflags = [ 35 "-g", 36 "-O0", 37 "-Wno-unused-variable", 38 "-fno-omit-frame-pointer", 39 ] 40 41 sources = [ 42 "${form_fwk_path}/services/src/form_refresh/check_mgr/active_user_checker.cpp", 43 "${form_fwk_path}/services/src/form_refresh/check_mgr/add_finish_checker.cpp", 44 "${form_fwk_path}/services/src/form_refresh/check_mgr/calling_bundle_checker.cpp", 45 "${form_fwk_path}/services/src/form_refresh/check_mgr/calling_user_checker.cpp", 46 "${form_fwk_path}/services/src/form_refresh/check_mgr/self_form_checker.cpp", 47 "${form_fwk_path}/services/src/form_refresh/check_mgr/system_app_checker.cpp", 48 "${form_fwk_path}/services/src/form_refresh/check_mgr/untrust_app_checker.cpp", 49 "${form_fwk_path}/services/src/form_refresh/refresh_impl/form_data_refresh_impl.cpp", 50 "${form_fwk_path}/services/src/form_refresh/refresh_impl/form_force_refresh_impl.cpp", 51 "${form_fwk_path}/services/src/form_refresh/refresh_impl/form_host_refresh_impl.cpp", 52 "${form_fwk_path}/services/src/form_refresh/refresh_impl/form_net_conn_refresh_impl.cpp", 53 "${form_fwk_path}/services/src/form_refresh/refresh_impl/form_next_time_refresh_impl.cpp", 54 "${form_fwk_path}/services/src/form_refresh/refresh_impl/form_refresh_after_uncontrol_impl.cpp", 55 "${form_fwk_path}/services/src/form_refresh/refresh_impl/form_timer_refresh_impl.cpp", 56 "${form_fwk_path}/services/src/status_mgr_center/form_status.cpp", 57 "${form_fwk_path}/services/src/common/util/form_report.cpp", 58 "${form_fwk_path}/services/src/common/util/form_trust_mgr.cpp", 59 "${form_fwk_path}/services/src/common/util/form_util.cpp", 60 "${form_fwk_path}/services/src/form_refresh/strategy/refresh_cache_mgr.cpp", 61 "${form_fwk_path}/services/src/form_refresh/strategy/refresh_check_mgr.cpp", 62 "${form_fwk_path}/services/src/form_refresh/strategy/refresh_control_mgr.cpp", 63 "${form_fwk_path}/services/src/form_refresh/strategy/refresh_exec_mgr.cpp", 64 "${form_fwk_path}/services/src/data_center/form_record/form_record_report.cpp", 65 "formrefresh_fuzzer.cpp", 66 ] 67 68 deps = [ 69 "${form_fwk_path}:fms_target", 70 "${form_fwk_path}:fmskit_native", 71 "${form_fwk_path}/services/form_render_service:formrender", 72 "${form_fwk_path}/services/form_render_service:formrender_service", 73 ] 74 75 external_deps = [ 76 "ability_base:base", 77 "ability_base:want", 78 "ability_runtime:ability_deps_wrapper", 79 "ability_runtime:abilitykit_native", 80 "ability_runtime:app_manager", 81 "access_token:libaccesstoken_sdk", 82 "access_token:libtokenid_sdk", 83 "ace_engine:ace_form_render", 84 "bundle_framework:appexecfwk_base", 85 "bundle_framework:appexecfwk_core", 86 "c_utils:utils", 87 "common_event_service:cesfwk_core", 88 "common_event_service:cesfwk_innerkits", 89 "data_share:datashare_common", 90 "data_share:datashare_consumer", 91 "data_share:datashare_provider", 92 "ffrt:libffrt", 93 "form_fwk:form_manager", 94 "hilog:libhilog", 95 "hisysevent:libhisysevent", 96 "ipc:ipc_core", 97 "libxml2:libxml2", 98 "safwk:system_ability_fwk", 99 "samgr:samgr_proxy", 100 ] 101} 102 103############################################################################### 104group("fuzztest") { 105 testonly = true 106 deps = [] 107 deps += [ 108 # deps file 109 ":formrefreshFuzzTest", 110 ] 111} 112############################################################################### 113