1# Copyright (c) 2024 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/config/features.gni")
15import("//build/ohos.gni")
16import("//build/test.gni")
17module_output_path = "drivers_peripheral_usb/drivers_peripheral_usb"
18
19ohos_fuzztest("UsbGetUsbSpeedFuzzTest") {
20  module_out_path = module_output_path
21
22  fuzz_config_file = "../usbgetdevicespeed_fuzzer"
23
24  include_dirs = [
25    "../usbgetdevicespeed_fuzzer",
26    "../../UsbSubscriberTest",
27    "../usbcommonfunction_fuzzer",
28    "../../../../../../base/usb/usb_manager/utils/native/include",
29    "./../../../hdi_service/include",
30  ]
31
32  deps = [
33    "../../../ddk:libusb_core",
34    "../../../hdi_service:libusb_interface_service_1.1",
35  ]
36
37  external_deps = [
38    "c_utils:utils",
39    "drivers_interface_usb:libusb_ddk_stub_1.0",
40    "drivers_interface_usb:libusb_proxy_1.1",
41    "drivers_interface_usb:usb_ddk_idl_headers",
42    "hdf_core:libhdf_utils",
43    "hdf_core:libhdi",
44    "hilog:libhilog",
45    "ipc:ipc_single",
46  ]
47
48  cflags = [
49    "-g",
50    "-O0",
51    "-Wno-unused-variable",
52    "-fno-omit-frame-pointer",
53  ]
54
55  sources = [
56    "../../UsbSubscriberTest/UsbSubscriberTest.cpp",
57    "../usbcommonfunction_fuzzer/usbcommonfunction_fuzzer.cpp",
58    "usbgetdevicespeed_fuzzer.cpp",
59  ]
60}
61
62group("fuzztest") {
63  testonly = true
64  deps = []
65  deps += [ ":UsbGetUsbSpeedFuzzTest" ]
66}
67