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