• 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("DistributedInputClientFuzzTest") {
22  module_out_path = "distributed_input/system"
23
24  fuzz_config_file =
25      "${distributedinput_path}/test/fuzztest/distributedinputclient_fuzzer"
26
27  include_dirs = [
28    "${av_transport_path}/common/include",
29    "include",
30    "${distributedinput_path}/interfaces/inner_kits/include",
31    "${distributedinput_path}/interfaces/ipc/include",
32    "${distributedinput_path}/services/source/sourcemanager/include",
33    "${distributedinput_path}/services/sink/sinkmanager/include",
34    "${distributedinput_path}/frameworks/include",
35    "${distributedinput_path}/sourcehandler/include",
36    "${distributedinput_path}/sinkhandler/include",
37    "${distributedinput_path}/inputdevicehandler/include",
38    "${distributedinput_path}/services/state/include",
39    "${service_common}/include",
40    "${common_path}/include",
41    "${fwk_common_path}/log/include",
42    "${fwk_common_path}/utils/include",
43    "//third_party/json/include",
44    "${fwk_interfaces_path}/include",
45    "${fwk_interfaces_path}/include/ipc",
46    "${services_source_path}/inputinject/include",
47    "${utils_path}/include",
48  ]
49
50  cflags = [
51    "-g",
52    "-O0",
53    "-Wno-unused-variable",
54    "-fno-omit-frame-pointer",
55  ]
56
57  sources = [ "distributed_input_client_fuzzer.cpp" ]
58
59  deps = [
60    "${distributedinput_path}/sourcehandler:libdinput_source_handler",
61    "//third_party/libevdev:libevdev",
62  ]
63
64  external_deps = [
65    "c_utils:utils",
66    "dsoftbus:softbus_client",
67    "eventhandler:libeventhandler",
68    "ipc:ipc_core",
69    "safwk:system_ability_fwk",
70  ]
71
72  defines = [
73    "HI_LOG_ENABLE",
74    "DH_LOG_TAG=\"DistributedInputClientFuzzTest\"",
75    "LOG_DOMAIN=0xD004100",
76  ]
77}
78
79###############################################################################
80group("fuzztest") {
81  testonly = true
82
83  deps = [ ":DistributedInputClientFuzzTest" ]
84}
85###############################################################################
86