1# Copyright (c) 2022-2023 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 14import("//build/test.gni") 15import("//drivers/peripheral/wlan/wlan.gni") 16import("../../../../../hdf_core/adapter/uhdf2/uhdf.gni") 17 18TEST_ROOT_DIR = "../../.." 19 20module_output_path = "drivers_peripheral_wlan/drivers_peripheral_wlan" 21 22ohos_fuzztest("ChipFuzzTest") { 23 module_out_path = module_output_path 24 25 fuzz_config_file = "$TEST_ROOT_DIR/test/fuzztest/chip_fuzzer" 26 27 include_dirs = [] 28 29 defines = [ 30 "P2P_NAME=\"$drivers_peripheral_wlan_p2p_name\"", 31 "HAL_SO_NAME=\"$drivers_peripheral_wlan_feature_vendor\"", 32 ] 33 34 deps = [ 35 "../../../chip/hdi_service:libchip_controller_chip_interface_service_1.0", 36 ] 37 38 public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 39 40 external_deps = [ 41 "c_utils:utils", 42 "drivers_interface_wlan:libchip_stub_1.0", 43 "hdf_core:libhdf_utils", 44 "hdf_core:libhdi", 45 "hilog:libhilog", 46 "init:libbegetutil", 47 "ipc:ipc_single", 48 ] 49 50 cflags = [ 51 "-g", 52 "-O0", 53 "-Wno-unused-variable", 54 "-fno-omit-frame-pointer", 55 ] 56 57 sources = [ 58 "$TEST_ROOT_DIR/chip/hdi_service/hdi_sync_util.cpp", 59 "$TEST_ROOT_DIR/chip/hdi_service/iface_tool.cpp", 60 "$TEST_ROOT_DIR/chip/hdi_service/iface_util.cpp", 61 "$TEST_ROOT_DIR/chip/hdi_service/wifi.cpp", 62 "$TEST_ROOT_DIR/chip/hdi_service/wifi_ap_iface.cpp", 63 "$TEST_ROOT_DIR/chip/hdi_service/wifi_chip.cpp", 64 "$TEST_ROOT_DIR/chip/hdi_service/wifi_chip_modes.cpp", 65 "$TEST_ROOT_DIR/chip/hdi_service/wifi_ext_iface.cpp", 66 "$TEST_ROOT_DIR/chip/hdi_service/wifi_p2p_iface.cpp", 67 "$TEST_ROOT_DIR/chip/hdi_service/wifi_sta_iface.cpp", 68 "$TEST_ROOT_DIR/chip/hdi_service/wifi_vendor_hal.cpp", 69 "$TEST_ROOT_DIR/chip/hdi_service/wifi_vendor_hal_list.cpp", 70 "$TEST_ROOT_DIR/chip/hdi_service/wifi_vendor_hal_stubs.cpp", 71 "chip_fuzzer.cpp", 72 ] 73} 74 75group("chip_fuzztest") { 76 testonly = true 77 deps = [ ":ChipFuzzTest" ] 78} 79