• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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("../../../multimodalinput_mini.gni")
18module_output_path = "input/input"
19
20##############################fuzztest##########################################
21ohos_fuzztest("StubGetWindowPidFuzzTest") {
22  module_out_path = module_output_path
23  fuzz_config_file = "${mmi_path}/test/fuzztest/stubgetwindowpid_fuzzer"
24  include_dirs = [
25    "${mmi_path}/interfaces/util/common/include",
26    "${mmi_path}/service/connect_manager/include",
27    "${mmi_path}/service/filter/include/",
28    "${mmi_path}/service/nap_process/include/",
29    "${mmi_path}/service/module_loader/include",
30    "${mmi_path}/service/delegate_task/include",
31    "${mmi_path}/service/event_handler/include",
32    "${mmi_path}/service/event_dispatch/include",
33    "${mmi_path}/service/interceptor/include",
34    "${mmi_path}/service/joystick/include",
35    "${mmi_path}/service/monitor/include",
36    "${mmi_path}/service/key_event_normalize/include",
37    "${mmi_path}/service/window_manager/include",
38    "${mmi_path}/service/key_command/include",
39    "${mmi_path}/service/subscriber/include",
40    "${mmi_path}/service/mouse_event_normalize/include",
41    "${mmi_path}/service/timer_manager/include",
42    "${mmi_path}/service/libinput_adapter/include",
43    "${mmi_path}/service/message_handle/include",
44    "${mmi_path}/service/touch_event_normalize/include",
45    "${mmi_path}/util/json_parser/include",
46  ]
47  cflags = [
48    "-g",
49    "-O0",
50    "-Wno-unused-variable",
51    "-fno-omit-frame-pointer",
52    "-Dprivate=public",
53    "-Dprotected=public",
54  ]
55
56  configs = [
57    "${mmi_path}/service/filter:mmi_event_filter_config",
58    "${mmi_path}/service/connect_manager:mmi_connect_manager_config",
59    "${mmi_path}/common/anco/comm:mmi_anco_channel_config",
60  ]
61
62  sources = [ "stubgetwindowpid_fuzzer.cpp" ]
63
64  deps = [
65    "${mmi_path}/frameworks/proxy:libmmi-client",
66    "${mmi_path}/service:libmmi-server",
67    "${mmi_path}/util:libmmi-util",
68    "${mmi_path}/util:mmi_json_parser",
69  ]
70
71  external_deps = [
72    "ability_runtime:app_manager",
73    "cJSON:cjson",
74    "c_utils:utils",
75    "data_share:datashare_consumer",
76    "graphic_2d:2d_graphics",
77    "graphic_2d:librender_service_base",
78    "graphic_2d:librender_service_client",
79    "hilog:libhilog",
80    "image_framework:image_native",
81    "ipc:ipc_single",
82    "libinput:libinput-third-mmi",
83    "preferences:native_preferences",
84    "safwk:system_ability_fwk",
85    "samgr:samgr_proxy",
86    "window_manager:libwm",
87  ]
88
89  if (security_component_enable) {
90    external_deps += [ "security_component_manager:libsecurity_component_sdk" ]
91  }
92
93  if (enable_player_framework) {
94    external_deps += [ "player_framework:media_client" ]
95  }
96}
97
98###############################################################################
99group("fuzztest") {
100  testonly = true
101  deps = []
102  deps += [
103    # deps file
104    ":StubGetWindowPidFuzzTest",
105  ]
106}
107###############################################################################
108