• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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(
18    "//foundation/distributedhardware/distributed_input/distributedinput.gni")
19
20##############################fuzztest##########################################
21ohos_fuzztest("DistributedInputSinkTransportFuzzTest") {
22  module_out_path = "distributed_input/system"
23
24  fuzz_config_file = "${distributedinput_path}/test/fuzztest/distributedinputsinktransport_fuzzer"
25
26  include_dirs = [
27    "${av_transport_path}/common/include",
28    "${services_sink_path}/transport/include",
29    "${distributedinput_path}/services/transportbase/include",
30    "${common_path}/include",
31    "${frameworks_path}/include",
32    "${fwk_common_path}/log/include",
33    "${fwk_common_path}/utils/include",
34    "${fwk_interfaces_path}/include",
35    "${service_common}/include",
36    "//third_party/json/include",
37    "${dfx_utils_path}/include",
38    "${utils_path}/include",
39  ]
40
41  cflags = [
42    "-g",
43    "-O0",
44    "-Wno-unused-variable",
45    "-fno-omit-frame-pointer",
46  ]
47  sources = [
48    "${services_sink_path}/transport/src/distributed_input_sink_switch.cpp",
49    "${services_sink_path}/transport/src/distributed_input_sink_transport.cpp",
50    "distributed_input_sink_transport_fuzzer.cpp",
51  ]
52
53  deps = [
54    "${dfx_utils_path}:libdinput_dfx_utils",
55    "${distributedinput_path}/services/transportbase:libdinput_trans_base",
56    "${utils_path}:libdinput_utils",
57    "//third_party/libevdev:libevdev",
58  ]
59
60  external_deps = [
61    "c_utils:utils",
62    "distributed_hardware_fwk:libdhfwk_sdk",
63    "dsoftbus:softbus_client",
64    "eventhandler:libeventhandler",
65    "ipc:ipc_core",
66    "safwk:system_ability_fwk",
67  ]
68
69  defines = [
70    "HI_LOG_ENABLE",
71    "DH_LOG_TAG=\"DistributedInputSinkTransportFuzzTest\"",
72    "LOG_DOMAIN=0xD004100",
73  ]
74}
75
76###############################################################################
77group("fuzztest") {
78  testonly = true
79
80  deps = [ ":DistributedInputSinkTransportFuzzTest" ]
81}
82###############################################################################
83