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