• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2025 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("DistributedInputTransportBaseFuzzTest") {
22  module_out_path = fuzz_test_path
23
24  fuzz_config_file = "${distributedinput_path}/test/fuzztest/distributedinputtransportbase_fuzzer"
25
26  include_dirs = [
27    "${services_source_path}/transport/include",
28    "${distributedinput_path}/services/transportbase/include",
29    "${common_path}/include",
30    "${service_common}/include",
31    "${services_source_path}/inputinject/include",
32    "${services_source_path}/transport/include",
33    "${dfx_utils_path}/include",
34    "${utils_path}/include",
35    "${frameworks_path}/include",
36    "${distributedinput_path}/inputdevicehandler/include",
37  ]
38
39  cflags = [
40    "-g",
41    "-O0",
42    "-Wno-unused-variable",
43    "-fno-omit-frame-pointer",
44  ]
45
46  sources = [
47    "${distributedinput_path}/services/transportbase/src/distributed_input_transport_base.cpp",
48    "${distributedinput_path}/services/transportbase/src/softbus_permission_check.cpp",
49    "distributed_input_transport_base_fuzzer.cpp",
50  ]
51
52  deps = [
53    "${dfx_utils_path}:libdinput_dfx_utils",
54    "${distributedinput_path}/services/transportbase:libdinput_trans_base",
55    "${services_source_path}/inputinject:libdinput_inject",
56    "${utils_path}:libdinput_utils",
57  ]
58
59  external_deps = [
60    "c_utils:utils",
61    "device_manager:devicemanagersdk",
62    "distributed_hardware_fwk:distributed_av_sender",
63    "distributed_hardware_fwk:distributedhardwareutils",
64    "distributed_hardware_fwk:libdhfwk_sdk",
65    "dsoftbus:softbus_client",
66    "eventhandler:libeventhandler",
67    "hilog:libhilog",
68    "hitrace:hitrace_meter",
69    "ipc:ipc_core",
70    "json:nlohmann_json_static",
71    "libevdev:libevdev",
72    "os_account:libaccountkits",
73    "os_account:os_account_innerkits",
74    "safwk:system_ability_fwk",
75    "samgr:samgr_proxy",
76  ]
77
78  defines = [
79    "HI_LOG_ENABLE",
80    "DH_LOG_TAG=\"DistributedInputTransportBaseFuzzTest\"",
81    "LOG_DOMAIN=0xD004120",
82    "private=public",
83  ]
84}
85
86###############################################################################
87group("fuzztest") {
88  testonly = true
89
90  deps = [ ":DistributedInputTransportBaseFuzzTest" ]
91}
92###############################################################################
93