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("../../../../dsoftbus.gni") 19 20##############################fuzztest########################################## 21 22ohos_fuzztest("BrProxyFuzzTest") { 23 module_out_path = dsoftbus_fuzz_out_path 24 25 fuzz_config_file = 26 "$dsoftbus_root_path/tests/br_proxy/fuzztest/brproxy_fuzzer" 27 28 include_dirs = [ 29 "$dsoftbus_root_path/br_proxy", 30 "$dsoftbus_root_path/br_proxy/common/include", 31 "$dsoftbus_root_path/interfaces/kits/common", 32 "$dsoftbus_root_path/sdk/frame/common/include", 33 "$dsoftbus_root_path/sdk/transmission/ipc/include", 34 ] 35 36 cflags = [ 37 "-g", 38 "-O0", 39 "-Wno-unused-variable", 40 "-fno-omit-frame-pointer", 41 ] 42 43 sources = [ "brproxy_fuzzer.cpp" ] 44 45 deps = [ 46 "$dsoftbus_dfx_path:softbus_dfx", 47 "$dsoftbus_dfx_path/dumper/legacy:softbus_dfx_dump", 48 "$dsoftbus_root_path/adapter:softbus_adapter", 49 "$dsoftbus_root_path/core/common:softbus_utils", 50 "$dsoftbus_root_path/core/frame:softbus_server", 51 "$dsoftbus_root_path/sdk:softbus_client", 52 "$dsoftbus_root_path/tests/sdk:softbus_client_static", 53 ] 54 55 if (is_standard_system) { 56 external_deps = [ 57 "c_utils:utils", 58 "dsoftbus:softbus_client", 59 "hilog:libhilog", 60 "ipc:ipc_single", 61 ] 62 } else { 63 external_deps = [ 64 "dsoftbus:softbus_client", 65 "hilog:libhilog", 66 "ipc:ipc_single", 67 ] 68 } 69} 70 71group("fuzztest") { 72 testonly = true 73 deps = [ 74 # deps file 75 ":BrProxyFuzzTest", 76 ] 77} 78