1# Copyright (c) 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 14#####################hydra-fuzz################### 15import("//build/config/features.gni") 16import("//build/test.gni") 17import("//foundation/communication/netmanager_ext/netmanager_ext_config.gni") 18##############################fuzztest########################################## 19ohos_fuzztest("VpnClientFuzzTest") { 20 module_out_path = "communication/netmanager_ext" 21 fuzz_config_file = 22 "$NETMANAGER_EXT_ROOT/test/vpnmanager/fuzztest/vpnclient_fuzzer" 23 24 include_dirs = [ 25 "$EXT_INNERKITS_ROOT/netvpnclient/include", 26 "$EXT_INNERKITS_ROOT/netvpnclient/include/ipc", 27 "$NETMANAGER_EXT_ROOT/utils/log/include", 28 "$NETMANAGER_EXT_ROOT/utils/event_report/include", 29 "$VPNMANAGER_SOURCE_DIR/include", 30 "$VPNMANAGER_SOURCE_DIR/include/ipc", 31 "$BASE_INNERKITS_ROOT/netconnclient/include", 32 "$BASE_INNERKITS_ROOT/netconnclient/include/proxy", 33 ] 34 35 cflags = [ 36 "-g", 37 "-O0", 38 "-Wno-unused-variable", 39 "-fno-omit-frame-pointer", 40 ] 41 42 sources = [ "vpnclient_fuzzer.cpp" ] 43 44 deps = [ 45 "$EXT_INNERKITS_ROOT/netvpnclient:net_vpn_manager_if", 46 "$NETMANAGER_EXT_ROOT/services/vpnmanager:net_vpn_manager_static", 47 ] 48 49 external_deps = [ 50 "access_token:libaccesstoken_sdk", 51 "access_token:libtoken_setproc", 52 "bundle_framework:appexecfwk_core", 53 "c_utils:utils", 54 "hilog:libhilog", 55 "ipc:ipc_core", 56 "netmanager_base:net_manager_common", 57 "netmanager_base:netsys_controller", 58 "os_account:os_account_innerkits", 59 "safwk:system_ability_fwk", 60 ] 61 62 defines = [ 63 "NETMGR_LOG_TAG = \"NetVpnManager\"", 64 "LOG_DOMAIN = 0xD0015B0", 65 ] 66} 67 68group("fuzztest") { 69 testonly = true 70 deps = [ ":VpnClientFuzzTest" ] 71} 72