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