# 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("StubUnsubscribeKeyEventFuzzTest") {
module_out_path = module_output_path
fuzz_config_file = "${mmi_path}/test/fuzztest/stubunsubscribekeyevent_fuzzer"
include_dirs = [
"${mmi_path}/common/event_integrity/include",
"${mmi_path}/interfaces/util/common/include",
"${mmi_path}/service/connect_manager/include",
"${mmi_path}/service/filter/include/",
"${mmi_path}/service/nap_process/include/",
"${mmi_path}/service/module_loader/include",
"${mmi_path}/service/delegate_task/include",
"${mmi_path}/service/event_handler/include",
"${mmi_path}/service/event_dispatch/include",
"${mmi_path}/service/interceptor/include",
"${mmi_path}/service/joystick/include",
"${mmi_path}/service/monitor/include",
"${mmi_path}/service/event_hook/include",
"${mmi_path}/service/event_hook/include/hook",
"${mmi_path}/service/event_hook/include/checker",
"${mmi_path}/service/key_event_normalize/include",
"${mmi_path}/service/window_manager/include",
"${mmi_path}/service/key_command/include",
"${mmi_path}/service/subscriber/include",
"${mmi_path}/service/mouse_event_normalize/include",
"${mmi_path}/service/libinput_adapter/include",
"${mmi_path}/service/message_handle/include",
"${mmi_path}/service/touch_event_normalize/include",
"${mmi_path}/util/common/include",
"${mmi_path}/service/common/include",
"${mmi_path}/service/common/timer_manager/include",
"${mmi_path}/service/common/setting_datashare/include",
"${mmi_path}/service/account_manager/include",
]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
"-Dprivate=public",
"-Dprotected=public",
]
configs = [
"${mmi_path}/service/filter:mmi_event_filter_config",
"${mmi_path}/service/connect_manager:mmi_connect_manager_config",
"${mmi_path}/common/anco/comm:mmi_anco_channel_config",
]
sources = [
"stubunsubscribekeyevent_fuzzer.cpp",
"${mmi_path}/test/fuzztest/mmi_fuzzer_helper/mmi_fuzzer_helper.cpp",
]
deps = [
"${mmi_path}/frameworks/proxy:libmmi-client",
"${mmi_path}/service:libmmi-server",
"${mmi_path}/util:libmmi-util",
]
external_deps = [
"common_event_service:cesfwk_innerkits",
"ability_runtime:app_manager",
"cJSON:cjson",
"c_utils:utils",
"data_share:datashare_consumer",
"ffrt:libffrt",
"graphic_2d:2d_graphics",
"graphic_2d:librender_service_base",
"graphic_2d:librender_service_client",
"hilog:libhilog",
"image_framework:image_native",
"ipc:ipc_single",
"libinput:libinput-third-mmi",
"preferences:native_preferences",
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
"window_manager:libwm",
]
if (security_component_enable) {
external_deps += [ "security_component_manager:libsecurity_component_sdk" ]
}
if (enable_player_framework) {
external_deps += [ "player_framework:media_client" ]
}
}
###############################################################################
group("fuzztest") {
testonly = true
deps = []
deps += [
# deps file
":StubUnsubscribeKeyEventFuzzTest",
]
}
###############################################################################