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