# Copyright (c) 2022-2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #####################hydra-fuzz################### import("//build/config/features.gni") import("//build/test.gni") import("//foundation/communication/netmanager_ext/netmanager_ext_config.gni") ##############################fuzztest########################################## ohos_fuzztest("NetShareClientFuzzTest") { module_out_path = "communication/netmanager_ext" fuzz_config_file = "$NETMANAGER_EXT_ROOT/test/networksharemanager/fuzztest/netshareclient_fuzzer" include_dirs = [ "$DHCP_MANAGER_ROOT/services/mgr_service/include", "$DHCP_MANAGER_ROOT/interfaces/inner_api/include", "$DHCP_MANAGER_ROOT/interfaces/inner_api/interfaces", "$DHCP_MANAGER_ROOT/interfaces/inner_api/interfaces", "$DHCP_MANAGER_ROOT/interfaces/inner_api/include", "$EXT_INNERKITS_ROOT/ethernetclient/include", "$EXT_INNERKITS_ROOT/netshareclient/include", "$EXT_INNERKITS_ROOT/netshareclient/include/proxy", "$EXT_INNERKITS_ROOT/netshareclient/include/proxy/ipccallback", "$EXT_INNERKITS_ROOT/include", "$EXT_INNERKITS_ROOT/include/proxy", "$NETMANAGER_EXT_ROOT/utils/log/include", "$NETWORKSHAREMANAGER_SOURCE_DIR/include", "$NETWORKSHAREMANAGER_SOURCE_DIR/include/stub", "$NETWORKSHAREMANAGER_UTILS_DIR/event_report/include", "$NETSYSCONTROLLER_ROOT_DIR/include", "$WIFI_MANAGER_ROOT/interfaces/kits/c", "$WIFI_MANAGER_ROOT/frameworks/native/interfaces", ] cflags = [ "-g", "-O0", "-Wno-unused-variable", "-fno-omit-frame-pointer", ] sources = [ "netshare_client_fuzzer.cpp" ] deps = [ "$BASE_INNERKITS_ROOT/netconnclient:net_conn_manager_if", "$BLUETOOTH_ROOT/frameworks/inner:btframework", "$DHCP_MANAGER_ROOT/services/mgr_service:dhcp_manager_service", "$NETMANAGER_BASE_ROOT/utils:net_manager_common", "$NETMANAGER_EXT_ROOT/services/networksharemanager:net_tether_manager_static", "$NETSYSCONTROLLER_ROOT_DIR:netsys_controller", ] external_deps = [ "access_token:libaccesstoken_sdk", "access_token:libtoken_setproc", "c_utils:utils", "ipc:ipc_core", "safwk:system_ability_fwk", "wifi:wifi_sdk", ] external_deps += [ "hilog:libhilog" ] defines = [ "NETMGR_LOG_TAG = \"NetShareManager\"", "LOG_DOMAIN = 0xD0015B0", ] if (!defined(global_parts_info) || defined(global_parts_info.communication_bluetooth)) { defines += [ "BLUETOOTH_MODOULE=1" ] external_deps += [ "bluetooth:btframework" ] } } ############################################################################### group("fuzztest") { testonly = true deps = [ ":NetShareClientFuzzTest" ] } ###############################################################################