• 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("DistributedInputSourceTransportFuzzTest") {
22  module_out_path = fuzz_test_path
23
24  fuzz_config_file = "${distributedinput_path}/test/fuzztest/distributedinputsourcetransport_fuzzer"
25
26  include_dirs = [
27    "${av_transport_path}/common/include",
28    "${services_source_path}/transport/include",
29    "${distributedinput_path}/services/transportbase/include",
30    "${common_path}/include",
31    "${fwk_common_path}/log/include",
32    "${fwk_common_path}/utils/include",
33    "${fwk_interfaces_path}/include",
34    "${service_common}/include",
35    "${services_source_path}/inputinject/include",
36    "${services_source_path}/transport/include",
37    "//third_party/json/include",
38    "${dfx_utils_path}/include",
39    "${utils_path}/include",
40    "${frameworks_path}/include",
41    "${distributedinput_path}/inputdevicehandler/include",
42    "${distributedinput_path}/services/state/include",
43  ]
44
45  cflags = [
46    "-g",
47    "-O0",
48    "-Wno-unused-variable",
49    "-fno-omit-frame-pointer",
50  ]
51
52  sources = [
53    "${services_source_path}/transport/src/distributed_input_source_transport.cpp",
54    "distributed_input_source_transport_fuzzer.cpp",
55  ]
56
57  deps = [
58    "${dfx_utils_path}:libdinput_dfx_utils",
59    "${distributedinput_path}/services/transportbase:libdinput_trans_base",
60    "${services_source_path}/inputinject:libdinput_inject",
61    "${utils_path}:libdinput_utils",
62    "//third_party/libevdev:libevdev",
63  ]
64
65  external_deps = [
66    "c_utils:utils",
67    "distributed_hardware_fwk:libdhfwk_sdk",
68    "dsoftbus:softbus_client",
69    "eventhandler:libeventhandler",
70    "hitrace:hitrace_meter",
71    "ipc:ipc_core",
72    "safwk:system_ability_fwk",
73  ]
74
75  defines = [
76    "HI_LOG_ENABLE",
77    "DH_LOG_TAG=\"DistributedInputSourceTransportFuzzTest\"",
78    "LOG_DOMAIN=0xD004120",
79  ]
80}
81
82###############################################################################
83group("fuzztest") {
84  testonly = true
85
86  deps = [ ":DistributedInputSourceTransportFuzzTest" ]
87}
88###############################################################################
89