• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("MDnsClientFuzzTest") {
20  module_out_path = "communication/netmanager_ext"
21  fuzz_config_file =
22      "$NETMANAGER_EXT_ROOT/test/mdnsmanager/fuzztest/mdnsclient_fuzzer"
23
24  include_dirs = [
25    "$NETMANAGER_EXT_ROOT/interfaces/innerkits/mdnsclient",
26    "$NETMANAGER_EXT_ROOT/interfaces/innerkits/mdnsclient/proxy",
27    "$NETMANAGER_EXT_ROOT/services/mdnsmanager/include",
28    "$NETMANAGER_EXT_ROOT/services/mdnsmanager/include/protocol",
29    "$NETMANAGER_EXT_ROOT/services/mdnsmanager/include/stub",
30    "$EXT_INNERKITS_ROOT/include",
31    "$NETMANAGER_EXT_ROOT/utils/log/include",
32    "$BASE_INNERKITS_ROOT/netconnclient/include",
33    "$BASE_INNERKITS_ROOT/netconnclient/include/proxy",
34  ]
35  cflags = [
36    "-g",
37    "-O0",
38    "-Wno-unused-variable",
39    "-fno-omit-frame-pointer",
40  ]
41  sources = [ "mdns_client_fuzzer.cpp" ]
42
43  deps = [
44    "$EXT_INNERKITS_ROOT/mdnsclient:mdns_manager_if",
45    "$NETMANAGER_EXT_ROOT/services/mdnsmanager:mdns_manager_static",
46  ]
47
48  external_deps = [
49    "c_utils:utils",
50    "ipc:ipc_core",
51    "netmanager_base:net_conn_manager_if",
52    "safwk:system_ability_fwk",
53  ]
54
55  external_deps += [ "hilog:libhilog" ]
56
57  defines = [
58    "NETMGR_LOG_TAG = \"NetShareManager\"",
59    "LOG_DOMAIN = 0xD0015B0",
60  ]
61}
62
63###############################################################################
64group("fuzztest") {
65  testonly = true
66  deps = [ ":MDnsClientFuzzTest" ]
67}
68###############################################################################
69