1# Copyright (c) 2024 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/ohos.gni") 17import("//build/test.gni") 18import("//foundation/ability/dmsfwk/dmsfwk.gni") 19ohos_fuzztest("SoftbusAdapterFuzzTest") { 20 module_out_path = module_output_path 21 22 visibility = [ ":*" ] 23 include_dirs = [ 24 "${dms_path}/common/include/", 25 "${dms_path}/interfaces/innerkits/common/include/", 26 "${dms_path}/services/dtbschedmgr/include/", 27 "${dms_path}/services/dtbschedmgr/include/collaborate/", 28 "${dms_path}/services/dtbschedmgr/include/mission", 29 "${dms_path}/services/dtbschedmgr/include/softbus_adapter", 30 "${dms_path}/services/dtbschedmgr/include/softbus_adapter/transport", 31 "${dms_path}/test/fuzztest/softbusadapter_fuzzer", 32 ] 33 34 fuzz_config_file = "${dms_path}/test/fuzztest/softbusadapter_fuzzer" 35 36 configs = [ "${dms_path}/services/dtbschedmgr/test/resource:coverage_flags" ] 37 38 cflags = [ 39 "-g", 40 "-O0", 41 "-Wno-unused-variable", 42 "-fno-omit-frame-pointer", 43 "-Dprivate=public", 44 ] 45 46 sources = [ "softbusadapter_fuzzer.cpp" ] 47 48 deps = [ "${dms_path}/services/dtbschedmgr:distributedschedsvr" ] 49 50 defines = [] 51 if (dmsfwk_mission_manager) { 52 defines += [ "SUPPORT_DISTRIBUTED_MISSION_MANAGER" ] 53 } 54 55 external_deps = [ 56 "ability_base:base", 57 "ability_base:want", 58 "ability_base:zuri", 59 "ability_runtime:ability_manager", 60 "ability_runtime:app_manager", 61 "ability_runtime:dataobs_manager", 62 "ability_runtime:mission_info", 63 "access_token:libaccesstoken_sdk", 64 "access_token:libnativetoken_shared", 65 "access_token:libtokensetproc_shared", 66 "bundle_framework:appexecfwk_base", 67 "bundle_framework:appexecfwk_core", 68 "cJSON:cjson", 69 "c_utils:utils", 70 "data_share:datashare_consumer", 71 "device_auth:deviceauth_sdk", 72 "device_info_manager:distributed_device_profile_common", 73 "device_info_manager:distributed_device_profile_sdk", 74 "device_manager:devicemanagersdk", 75 "device_security_level:dslm_sdk", 76 "distributed_bundle_framework:dbms_fwk", 77 "dsoftbus:softbus_client", 78 "eventhandler:libeventhandler", 79 "hilog:libhilog", 80 "hisysevent:libhisysevent", 81 "hitrace:hitrace_meter", 82 "hitrace:libhitracechain", 83 "init:libbegetutil", 84 "ipc:ipc_core", 85 "kv_store:distributeddata_inner", 86 "safwk:system_ability_fwk", 87 "samgr:samgr_proxy", 88 ] 89} 90 91group("fuzztest") { 92 testonly = true 93 deps = [ ":SoftbusAdapterFuzzTest" ] 94} 95