1# Copyright (c) 2022 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") 15 16#####################hydra-fuzz################### 17import("//build/test.gni") 18import("//foundation/communication/netmanager_base/netmanager_base_config.gni") 19 20##############################fuzztest########################################## 21ohos_fuzztest("NetConnClientFuzzTest") { 22 module_out_path = "netmanager_base/net_conn_client" 23 fuzz_config_file = "$NETMANAGER_BASE_ROOT/test/fuzztest/netconnclient_fuzzer" 24 25 include_dirs = [ 26 "$INNERKITS_ROOT/include", 27 "$INNERKITS_ROOT/netconnclient/include", 28 "$INNERKITS_ROOT/netconnclient/include/proxy", 29 "$NETCONNMANAGER_SOURCE_DIR/include/stub", 30 "$NETCONNMANAGER_SOURCE_DIR/include", 31 "$SAMGR_MANAGER_ROOT/interfaces/innerkits/samgr_proxy/include", 32 "$NETMANAGERNATIVE_ROOT/net_mgr_native/include", 33 "$NETMANAGERNATIVE_ROOT/common/include", 34 "$NETMANAGER_BASE_ROOT/services/common/include", 35 ] 36 37 cflags = [ 38 "-g", 39 "-O0", 40 "-Wno-unused-variable", 41 "-fno-omit-frame-pointer", 42 ] 43 sources = [ "net_conn_client_fuzzer.cpp" ] 44 45 deps = [ 46 "$INNERKITS_ROOT/netconnclient:net_conn_manager_if", 47 "$NETCONNMANAGER_SOURCE_DIR:net_conn_manager", 48 "$NETMANAGER_BASE_ROOT/utils:net_manager_common", 49 ] 50 51 defines = [ 52 "HI_LOG_ENABLE", 53 "DH_LOG_TAG=\"NetConnClientFuzzTest\"", 54 "LOG_DOMAIN=0xD004100", 55 ] 56 57 external_deps = [ 58 "access_token:libaccesstoken_sdk", 59 "access_token:libnativetoken", 60 "access_token:libtoken_setproc", 61 "bundle_framework:appexecfwk_base", 62 "bundle_framework:appexecfwk_core", 63 "eventhandler:libeventhandler", 64 "hiviewdfx_hilog_native:libhilog", 65 "init:libbegetutil", 66 "ipc:ipc_core", 67 "safwk:system_ability_fwk", 68 "samgr:samgr_proxy", 69 ] 70} 71 72############################################################################### 73group("fuzztest") { 74 testonly = true 75 76 deps = [ ":NetConnClientFuzzTest" ] 77} 78 79############################################################################### 80 81