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