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