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("//third_party/wpa_supplicant/wpa_supplicant-2.9_standard/wpa.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("HostapdFuzzTest") { 23 module_out_path = module_output_path 24 25 fuzz_config_file = "$TEST_ROOT_DIR/test/fuzztest/hostapd_fuzzer" 26 27 include_dirs = [ 28 "$TEST_ROOT_DIR/hostapd/interfaces/hdi_service", 29 "$TEST_ROOT_DIR/hostapd/interfaces/hdi_service/service_common", 30 "$TEST_ROOT_DIR/interfaces/include", 31 "$TEST_ROOT_DIR/test/fuzztest", 32 "./service_common", 33 "../../client/include", 34 "//third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src", 35 "//third_party/wpa_supplicant/wpa_supplicant-2.9_standard/hostapd", 36 ] 37 38 deps = [ "$TEST_ROOT_DIR/hdi_service:hdi_wlan_service" ] 39 40 defines = [ "__OHOS__USER__" ] 41 42 external_deps = [ 43 "c_utils:utils", 44 "drivers_interface_wlan:libhostapd_proxy_1.0", 45 "drivers_interface_wlan:libhostapd_stub_1.0", 46 "drivers_interface_wlan:libwlan_proxy_1.2", 47 "hdf_core:libhdf_host", 48 "hdf_core:libhdf_utils", 49 "hilog:libhilog", 50 "wpa_supplicant:wpa", 51 ] 52 53 cflags = [ 54 "-g", 55 "-O0", 56 "-Wno-unused-variable", 57 "-fno-omit-frame-pointer", 58 "-fno-strict-aliasing", 59 "-DCONFIG_CTRL_IFACE", 60 "-DCONFIG_WEP", 61 "-DCONFIG_WPS", 62 ] 63 64 public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 65 66 sources = [ 67 "$TEST_ROOT_DIR/test/fuzztest/hostapd_common_fuzzer.cpp", 68 "hostapd_fuzzer.cpp", 69 ] 70} 71 72group("hostapd_fuzztest") { 73 testonly = true 74 deps = [ ":HostapdFuzzTest" ] 75} 76