1# Copyright (c) 2023-2024 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("DinputOnSessionClosedFuzzTest") { 21 module_out_path = fuzz_test_path 22 23 fuzz_config_file = 24 "${distributedinput_path}/test/fuzztest/dinputonsessionclosed_fuzzer" 25 26 include_dirs = [ 27 "${services_source_path}/transport/include", 28 "${distributedinput_path}/services/transportbase/include", 29 "${common_path}/include", 30 "${service_common}/include", 31 "${services_source_path}/inputinject/include", 32 "${services_source_path}/transport/include", 33 "${dfx_utils_path}/include", 34 "${utils_path}/include", 35 "${frameworks_path}/include", 36 "${distributedinput_path}/inputdevicehandler/include", 37 ] 38 39 cflags = [ 40 "-g", 41 "-O0", 42 "-Wno-unused-variable", 43 "-fno-omit-frame-pointer", 44 ] 45 46 sources = [ "dinputonsessionclosed_fuzzer.cpp" ] 47 48 deps = [ 49 "${dfx_utils_path}:libdinput_dfx_utils", 50 "${distributedinput_path}/services/transportbase:libdinput_trans_base", 51 "${services_source_path}/inputinject:libdinput_inject", 52 "${utils_path}:libdinput_utils", 53 ] 54 55 external_deps = [ 56 "c_utils:utils", 57 "distributed_hardware_fwk:distributed_av_sender", 58 "distributed_hardware_fwk:distributedhardwareutils", 59 "distributed_hardware_fwk:libdhfwk_sdk", 60 "dsoftbus:softbus_client", 61 "eventhandler:libeventhandler", 62 "hilog:libhilog", 63 "hitrace:hitrace_meter", 64 "ipc:ipc_core", 65 "json:nlohmann_json_static", 66 "libevdev:libevdev", 67 "safwk:system_ability_fwk", 68 ] 69 70 defines = [ 71 "HI_LOG_ENABLE", 72 "DH_LOG_TAG=\"DinputConfigDhFuzzTest\"", 73 "LOG_DOMAIN=0xD004120", 74 ] 75} 76 77############################################################################### 78group("fuzztest") { 79 testonly = true 80 81 deps = [ ":DinputOnSessionClosedFuzzTest" ] 82} 83############################################################################### 84