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