# Copyright (c) 2024 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. import("//build/config/features.gni") #####################hydra-fuzz################### import("//build/test.gni") import("//foundation/communication/netmanager_base/netmanager_base_config.gni") ##############################fuzztest########################################## ohos_fuzztest("NetBaseBranchFuzzTest") { module_out_path = fuzz_test_path fuzz_config_file = "$NETMANAGER_BASE_ROOT/test/fuzztest/netbasebranch_fuzzer" include_dirs = [ "$INNERKITS_ROOT/include", "$INNERKITS_ROOT/netconnclient/include", "$INNERKITS_ROOT/netconnclient/include/proxy", "$INNERKITS_ROOT/netmanagernative/include", "$INNERKITS_ROOT/netpolicyclient/include", "$INNERKITS_ROOT/netpolicyclient/include/proxy", "$NETCONNMANAGER_SOURCE_DIR/include/stub", "$NETCONNMANAGER_SOURCE_DIR/include", "$SAMGR_MANAGER_ROOT/interfaces/innerkits/samgr_proxy/include", "$NETMANAGERNATIVE_ROOT/net_mgr_native/include", "$NETMANAGERNATIVE_ROOT/common/include", "$NETMANAGER_BASE_ROOT/services/netpolicymanager/include", "$NETMANAGER_BASE_ROOT/services/common/include", "$NETMANAGER_BASE_ROOT/test/commonduplicatedcode", "$NETMANAGER_BASE_ROOT/test/security", "$NETSYSCONTROLLER_ROOT_DIR/include", "$THIRD_PARTY_ROOT/curl/include", ] cflags = [ "-g", "-O0", "-Wno-unused-variable", "-fno-omit-frame-pointer", ] sources = [ "net_base_branch_fuzzer.cpp" ] deps = [ "$INNERKITS_ROOT/netconnclient:net_conn_manager_if", "$NETCONNMANAGER_SOURCE_DIR:net_conn_manager_static", "$NETMANAGER_BASE_ROOT/services/netpolicymanager:net_policy_manager_static", "$NETMANAGER_BASE_ROOT/utils:net_manager_common", "$NETSYSCONTROLLER_ROOT_DIR:netsys_controller", "$THIRD_PARTY_ROOT/curl:curl_shared", ] defines = [ "HI_LOG_ENABLE", "DH_LOG_TAG=\"NetBaseBranchFuzzTest\"", "LOG_DOMAIN=0xD004100", ] external_deps = [ "ability_base:zuri", "ability_runtime:ability_manager", "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libtoken_setproc", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "cJSON:cjson", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "ffrt:libffrt", "hilog:libhilog", "hitrace:hitrace_meter", "init:libbegetutil", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] } ############################################################################### group("fuzztest") { testonly = true deps = [ ":NetBaseBranchFuzzTest" ] } ###############################################################################