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/test.gni") 17import("//build/config/components/idl_tool/idl.gni") 18import("../../../frameworks/fontmgr/fontmgr.gni") 19##############################fuzztest########################################## 20 21idl_gen_interface("font_service_interface") { 22 src_idl = rebase_path("../../../service/IFontService.idl") 23} 24 25ohos_fuzztest("ServiceUnInstallFontFuzzTest") { 26 module_out_path = "font_manager/font_manager_fuzz" 27 fuzz_config_file = "//base/global/font_manager/test/fuzztest/serviceuninstallfont_fuzzer" 28 cflags = [ 29 "-g", 30 "-O0", 31 "-Wno-unused-variable", 32 "-fno-omit-frame-pointer", 33 ] 34 include_dirs = [ 35 "${target_gen_dir}", 36 "../utils", 37 "../../../service/include", 38 "../../../frameworks/fontmgr/include", 39 ] 40 sources = [ 41 "fuzzer.cpp", 42 "../utils/fuzz_data.cpp", 43 "../../../service/src/font_sa_load_callback.cpp", 44 "../../../service/src/font_service_load_manager.cpp" 45 ] 46 idl_path = get_target_outputs(":font_service_interface") 47 sources += filter_include(idl_path, [ "*_stub.cpp" ]) 48 49 deps = [ 50 ":font_service_interface", 51 "../../../service:font_service_ability", 52 ] 53 54 external_deps = [ 55 "ability_runtime:ability_manager", 56 "c_utils:utils", 57 "hilog:libhilog", 58 "ipc:ipc_core", 59 "samgr:samgr_proxy", 60 ] 61 62 external_deps += fontmgr_external_deps 63} 64