# Copyright (c) 2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #####################hydra-fuzz################### import("//build/config/features.gni") import("//build/test.gni") import("../../../multimodalinput_mini.gni") module_output_path = "input/input" ##############################fuzztest########################################## ohos_fuzztest("InjectEventFuzzTest") { module_out_path = module_output_path fuzz_config_file = "${mmi_path}/test/fuzztest/injectevent_fuzzer" include_dirs = [ "${mmi_path}/service/app_state_manager/include", "${mmi_path}/service/device_config/include", "${mmi_path}/service/device_manager/include", "${mmi_path}/service/device_scalability/include", "${mmi_path}/service/device_state_manager/include", "${mmi_path}/service/delegate_task/include", "${mmi_path}/service/display_state_manager/include", "${mmi_path}/service/event_dispatch/include", "${mmi_path}/service/key_event_normalize/include", "${mmi_path}/service/event_handler/include", "${mmi_path}/service/event_dump/include", "${mmi_path}/service/fingersense_wrapper/include", "${mmi_path}/service/gesturesense_wrapper/include", "${mmi_path}/service/monitor/include", "${mmi_path}/service/interceptor/include", "${mmi_path}/service/dfx/include", "${mmi_path}/service/libinput_adapter/include", "${mmi_path}/service/message_handle/include", "${mmi_path}/service/module_loader/include", "${mmi_path}/service/window_manager/include", "${mmi_path}/service/touch_event_normalize/include", "${mmi_path}/service/key_command/include", "${mmi_path}/service/subscriber/include", "${mmi_path}/service/timer_manager/include", "${mmi_path}/service/permission_helper/include", "${mmi_path}/service/connect_manager/include", "${mmi_path}/service/device_state_manager/include", "${mmi_path}/service/filter/include", "${mmi_path}/service/module_loader/include", "${mmi_path}/service/nap_process/include", "${mmi_path}/service/event_resample/include", "${mmi_path}/interfaces/native/innerkits/proxy/include", "${mmi_path}/interfaces/native/innerkits/event/include", "${mmi_path}/service/mouse_event_normalize/include", "${mmi_path}/interfaces/native/innerkits/common/include", "${mmi_path}/util/common/include", "${mmi_path}/util/socket/include", "${mmi_path}/util/network/include", "${mmi_path}/frameworks/proxy/event_handler/include", "//third_party/cJSON", "${preferences_path}/frameworks/native/include", "${graphics_path}/2d_graphics/include", ] cflags = [ "-g", "-O0", "-Wno-unused-variable", "-fno-omit-frame-pointer", ] sources = [ "injectevent_fuzzer.cpp" ] deps = [ "${mmi_path}/frameworks/proxy:libmmi-client", "${mmi_path}/service:libmmi-server", "${mmi_path}/util:libmmi-util", ] external_deps = [ "ability_base:want", "ability_base:zuri", "ability_runtime:ability_manager", "ability_runtime:abilitykit_native", "ability_runtime:app_manager", "ability_runtime:dataobs_manager", "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "common_event_service:cesfwk_innerkits", "config_policy:configpolicy_util", "data_share:datashare_consumer", "faultloggerd:libbacktrace_local", "graphic_2d:2d_graphics", "graphic_2d:librender_service_client", "hicollie:libhicollie", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "image_framework:image_native", "init:libbeget_proxy", "init:libbegetutil", "ipc:ipc_single", "libinput:libinput-third-mmi", "napi:ace_napi", "preferences:native_preferences", "safwk:system_ability_fwk", "window_manager:libwm", "window_manager:libwsutils", ] if (security_component_enable) { external_deps += [ "security_component_manager:libsecurity_component_sdk" ] } if (resource_schedule_service_enabled) { external_deps += [ "resource_schedule_service:ressched_client" ] } if (enable_player_framework) { external_deps += [ "player_framework:media_client" ] } } ############################################################################### group("fuzztest") { testonly = true deps = [] deps += [ # deps file ":InjectEventFuzzTest", ] } ###############################################################################