• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("NetSysClientFuzzTest") {
22  module_out_path = "netmanager_base/net_sys_client"
23  fuzz_config_file = "$NETMANAGER_BASE_ROOT/test/fuzztest/netsysclient_fuzzer"
24
25  include_dirs = [
26    "$NETCONNMANAGER_SOURCE_DIR/include",
27    "$NETCONNMANAGER_COMMON_DIR/include",
28    "$NETMANAGER_BASE_ROOT/utils/log/include",
29    "$NETSYSNATIVE_INNERKITS_SOURCE_DIR",
30    "$INNERKITS_ROOT/netmanagernative/include",
31    "$NETSYSNATIVE_SOURCE_DIR/include/netsys/wrapper",
32    "$NETSYSNATIVE_SOURCE_DIR/include/netsys",
33    "$NETSYSNATIVE_SOURCE_DIR/include/manager",
34    "$NETSYSNATIVE_SOURCE_DIR/include",
35    "$NETSYSCONTROLLER_ROOT_DIR/include",
36    "$DHCP_MANAGER_ROOT/interfaces/inner_api/include",
37    "$DHCP_MANAGER_ROOT/interfaces/inner_api/interfaces",
38  ]
39
40  cflags = [
41    "-g",
42    "-O0",
43    "-Wno-unused-variable",
44    "-fno-omit-frame-pointer",
45  ]
46  sources = [ "net_sys_client_fuzzer.cpp" ]
47
48  deps = [
49    "$NETMANAGER_BASE_ROOT/services/netmanagernative:netsys_native_manager",
50    "$NETMANAGER_BASE_ROOT/utils:net_manager_common",
51    "$NETSYSCONTROLLER_ROOT_DIR:netsys_controller",
52  ]
53
54  defines = [
55    "HI_LOG_ENABLE",
56    "DH_LOG_TAG=\"NetSysClientFuzzTest\"",
57    "LOG_DOMAIN=0xD004100",
58  ]
59
60  external_deps = [
61    "access_token:libaccesstoken_sdk",
62    "access_token:libnativetoken",
63    "access_token:libtoken_setproc",
64    "bundle_framework:appexecfwk_base",
65    "bundle_framework:appexecfwk_core",
66    "eventhandler:libeventhandler",
67    "hiviewdfx_hilog_native:libhilog",
68    "init:libbegetutil",
69    "ipc:ipc_core",
70    "safwk:system_ability_fwk",
71    "samgr:samgr_proxy",
72  ]
73}
74
75###############################################################################
76group("fuzztest") {
77  testonly = true
78
79  deps = [ ":NetSysClientFuzzTest" ]
80}
81
82###############################################################################
83
84