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. 13import("../../../device_status.gni") 14 15###############################hydra_fuzz################################# 16import("//build/config/features.gni") 17import("//build/test.gni") 18module_output_path = "${device_status_fuzz_output_path}" 19deps_ex = [ 20 "distributed_input:libdinput_sdk", 21 "device_manager:devicemanagersdk", 22 "access_token:libaccesstoken_sdk", 23 "c_utils:utils", 24 "graphic_2d:libcomposer", 25 "graphic_2d:window_animation", 26 "hisysevent:libhisysevent", 27 "hitrace:hitrace_meter", 28 "hilog:libhilog", 29 "input:libmmi-client", 30 "window_manager:libdm", 31] 32 33###############################fuzztest################################# 34ohos_fuzztest("GetExtraInfoFuzzTest") { 35 module_out_path = module_output_path 36 37 fuzz_config_file = 38 "${device_status_root_path}/test/fuzztest/getextrainfo_fuzzer" 39 include_dirs = [ 40 "${device_status_root_path}/libs/interface", 41 "${device_status_service_path}/interaction/drag/include", 42 "${device_status_service_path}/interaction/coordination/include", 43 "${device_status_service_path}/communication/service/include", 44 "${device_status_utils_path}/include", 45 ] 46 47 if (defined(fusion_interaction_motion_drag) && 48 fusion_interaction_motion_drag) { 49 include_dirs += [ "${motion_service_path}/native/include" ] 50 } 51 52 cflags = [ 53 "-Dprivate=public", 54 "-g", 55 "-O0", 56 "-fno-omit-frame-pointer", 57 ] 58 sources = [ "getextrainfo_fuzzer.cpp" ] 59 60 deps = [ 61 "${device_status_interfaces_path}/innerkits:devicestatus_client", 62 "${device_status_root_path}/services:devicestatus_static_service", 63 "${device_status_root_path}/utils/ipc:devicestatus_ipc", 64 "${device_status_utils_path}:devicestatus_util", 65 ] 66 67 external_deps = deps_ex 68} 69 70group("fuzztest") { 71 testonly = true 72 deps = [] 73 deps += [ ":GetExtraInfoFuzzTest" ] 74} 75