1# Copyright (c) 2022-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( 18 "//foundation/distributedhardware/distributed_input/distributedinput.gni") 19 20##############################fuzztest########################################## 21ohos_fuzztest("DistributedInputTransportBaseFuzzTest") { 22 module_out_path = "distributed_input/system" 23 24 fuzz_config_file = "${distributedinput_path}/test/fuzztest/distributedinputtransportbase_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 = [ 52 "${distributedinput_path}/services/transportbase/src/distributed_input_transport_base.cpp", 53 "distributed_input_transport_base_fuzzer.cpp", 54 ] 55 56 deps = [ 57 "${dfx_utils_path}:libdinput_dfx_utils", 58 "${distributedinput_path}/services/transportbase:libdinput_trans_base", 59 "${services_source_path}/inputinject:libdinput_inject", 60 "${utils_path}:libdinput_utils", 61 "//third_party/libevdev:libevdev", 62 ] 63 64 external_deps = [ 65 "c_utils:utils", 66 "distributed_hardware_fwk:libdhfwk_sdk", 67 "dsoftbus:softbus_client", 68 "eventhandler:libeventhandler", 69 "hitrace:hitrace_meter", 70 "ipc:ipc_core", 71 "safwk:system_ability_fwk", 72 ] 73 74 defines = [ 75 "HI_LOG_ENABLE", 76 "DH_LOG_TAG=\"DistributedInputTransportBaseFuzzTest\"", 77 "LOG_DOMAIN=0xD004100", 78 ] 79} 80 81############################################################################### 82group("fuzztest") { 83 testonly = true 84 85 deps = [ ":DistributedInputTransportBaseFuzzTest" ] 86} 87############################################################################### 88