• 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  ]
33  cflags = [
34    "-g",
35    "-O0",
36    "-Wno-unused-variable",
37    "-fno-omit-frame-pointer",
38  ]
39  sources = [ "mdns_client_fuzzer.cpp" ]
40
41  deps = [
42    "$EXT_INNERKITS_ROOT/mdnsclient:mdns_manager_if",
43    "$NETMANAGER_EXT_ROOT/services/mdnsmanager:mdns_manager",
44  ]
45
46  external_deps = [
47    "c_utils:utils",
48    "ipc:ipc_core",
49    "safwk:system_ability_fwk",
50  ]
51
52  if (is_standard_system) {
53    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
54  } else {
55    external_deps += [ "hilog:libhilog" ]
56  }
57
58  defines = [
59    "NETMGR_LOG_TAG = \"NetShareManager\"",
60    "LOG_DOMAIN = 0xD0015B0",
61  ]
62}
63
64###############################################################################
65group("fuzztest") {
66  testonly = true
67  deps = [ ":MDnsClientFuzzTest" ]
68}
69###############################################################################
70