# Copyright (c) 2022-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("NetConnClientFuzzTest") { module_out_path = fuzz_test_path fuzz_config_file = "$NETMANAGER_BASE_ROOT/test/fuzztest/netconnclient_fuzzer" include_dirs = [ "$INNERKITS_ROOT/include", "$INNERKITS_ROOT/netconnclient/include", "$INNERKITS_ROOT/netconnclient/include/proxy", "$INNERKITS_ROOT/netmanagernative/include", "$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/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 = [ "$NETMANAGER_BASE_ROOT/test/security/netmanager_base_test_security.cpp", "mock_net_conn_permission.cpp", "net_conn_client_fuzzer.cpp", ] deps = [ "$INNERKITS_ROOT/netconnclient:net_conn_manager_if", "$NETCONNMANAGER_SOURCE_DIR:net_conn_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=\"NetConnClientFuzzTest\"", "LOG_DOMAIN=0xD004100", ] external_deps = [ "ability_base:want", "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", "data_share:datashare_common", "data_share:datashare_consumer", "eventhandler:libeventhandler", "ffrt:libffrt", "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "os_account:os_account_innerkits", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] } ############################################################################### group("fuzztest") { testonly = true deps = [ ":NetConnClientFuzzTest" ] } ###############################################################################