1686862fbSopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd. 2686862fbSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3686862fbSopenharmony_ci# you may not use this file except in compliance with the License. 4686862fbSopenharmony_ci# You may obtain a copy of the License at 5686862fbSopenharmony_ci# 6686862fbSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7686862fbSopenharmony_ci# 8686862fbSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9686862fbSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10686862fbSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11686862fbSopenharmony_ci# See the License for the specific language governing permissions and 12686862fbSopenharmony_ci# limitations under the License. 13686862fbSopenharmony_ci 14686862fbSopenharmony_ci#####################hydra-fuzz################### 15686862fbSopenharmony_ciimport("//build/config/features.gni") 16686862fbSopenharmony_ciimport("//build/ohos.gni") 17686862fbSopenharmony_ciimport("//build/test.gni") 18686862fbSopenharmony_ciimport("//foundation/ability/dmsfwk/dmsfwk.gni") 19686862fbSopenharmony_ciohos_fuzztest("DistributedSchedStubFuzzTest") { 20686862fbSopenharmony_ci module_out_path = module_output_path 21686862fbSopenharmony_ci 22686862fbSopenharmony_ci visibility = [ ":*" ] 23686862fbSopenharmony_ci include_dirs = [ 24686862fbSopenharmony_ci "${dms_path}/common/include/", 25686862fbSopenharmony_ci "${dms_path}/common/include/continue/", 26686862fbSopenharmony_ci "${dms_path}/interfaces/innerkits/common/include/", 27686862fbSopenharmony_ci "${dms_path}/interfaces/kits/napi/include/", 28686862fbSopenharmony_ci "${dms_path}/services/dtbschedmgr/include/", 29686862fbSopenharmony_ci "${dms_path}/services/dtbschedmgr/include/collaborate/", 30686862fbSopenharmony_ci "${dms_path}/services/dtbschedmgr/include/dfx/", 31686862fbSopenharmony_ci "${dms_path}/services/dtbschedmgr/test/unittest", 32686862fbSopenharmony_ci "${dms_path}/services/dtbschedmgr/include/softbus_adapter/transport/", 33686862fbSopenharmony_ci "${dms_path}/services/dtbschedmgr/include/collaborate/", 34686862fbSopenharmony_ci "${dms_path}/services/dtbschedmgr/include/continue/", 35686862fbSopenharmony_ci "${dms_path}/services/dtbschedmgr/include/continue/state/", 36686862fbSopenharmony_ci "${dms_path}/services/dtbschedmgr/include/continue/state/transport/", 37686862fbSopenharmony_ci "${dms_path}/test/fuzztest/distributedschedstub_fuzzer", 38686862fbSopenharmony_ci "${dms_path}/test/fuzztest/util", 39686862fbSopenharmony_ci ] 40686862fbSopenharmony_ci 41686862fbSopenharmony_ci fuzz_config_file = "${dms_path}/test/fuzztest/distributedschedstub_fuzzer" 42686862fbSopenharmony_ci 43686862fbSopenharmony_ci configs = [ "${dms_path}/services/dtbschedmgr/test/resource:coverage_flags" ] 44686862fbSopenharmony_ci 45686862fbSopenharmony_ci cflags = [ 46686862fbSopenharmony_ci "-g", 47686862fbSopenharmony_ci "-O0", 48686862fbSopenharmony_ci "-Wno-unused-variable", 49686862fbSopenharmony_ci "-fno-omit-frame-pointer", 50686862fbSopenharmony_ci "-Dprivate=public", 51686862fbSopenharmony_ci ] 52686862fbSopenharmony_ci 53686862fbSopenharmony_ci sources = [ 54686862fbSopenharmony_ci "${dms_path}/services/dtbschedmgr/test/unittest/mock_distributed_sched.cpp", 55686862fbSopenharmony_ci "${dms_path}/test/fuzztest/util/mock_fuzz_util.cpp", 56686862fbSopenharmony_ci "distributedschedstub_fuzzer.cpp", 57686862fbSopenharmony_ci ] 58686862fbSopenharmony_ci 59686862fbSopenharmony_ci deps = [ "${dms_path}/services/dtbschedmgr:distributedschedsvr" ] 60686862fbSopenharmony_ci 61686862fbSopenharmony_ci defines = [] 62686862fbSopenharmony_ci if (dmsfwk_mission_manager) { 63686862fbSopenharmony_ci defines += [ "SUPPORT_DISTRIBUTED_MISSION_MANAGER" ] 64686862fbSopenharmony_ci } 65686862fbSopenharmony_ci if (dmsfwk_standard_form_share) { 66686862fbSopenharmony_ci defines += [ "SUPPORT_DISTRIBUTED_FORM_SHARE" ] 67686862fbSopenharmony_ci } 68686862fbSopenharmony_ci if (os_account_part) { 69686862fbSopenharmony_ci defines += [ "OS_ACCOUNT_PART" ] 70686862fbSopenharmony_ci } 71686862fbSopenharmony_ci external_deps = [ 72686862fbSopenharmony_ci "ability_base:base", 73686862fbSopenharmony_ci "ability_base:want", 74686862fbSopenharmony_ci "ability_base:zuri", 75686862fbSopenharmony_ci "ability_runtime:ability_manager", 76686862fbSopenharmony_ci "ability_runtime:app_manager", 77686862fbSopenharmony_ci "ability_runtime:dataobs_manager", 78686862fbSopenharmony_ci "ability_runtime:mission_info", 79686862fbSopenharmony_ci "access_token:libaccesstoken_sdk", 80686862fbSopenharmony_ci "access_token:libnativetoken_shared", 81686862fbSopenharmony_ci "access_token:libtokensetproc_shared", 82686862fbSopenharmony_ci "bundle_framework:appexecfwk_base", 83686862fbSopenharmony_ci "bundle_framework:appexecfwk_core", 84686862fbSopenharmony_ci "cJSON:cjson", 85686862fbSopenharmony_ci "c_utils:utils", 86686862fbSopenharmony_ci "data_share:datashare_consumer", 87686862fbSopenharmony_ci "device_auth:deviceauth_sdk", 88686862fbSopenharmony_ci "device_info_manager:distributed_device_profile_common", 89686862fbSopenharmony_ci "device_info_manager:distributed_device_profile_sdk", 90686862fbSopenharmony_ci "device_manager:devicemanagersdk", 91686862fbSopenharmony_ci "device_security_level:dslm_sdk", 92686862fbSopenharmony_ci "distributed_bundle_framework:dbms_fwk", 93686862fbSopenharmony_ci "dsoftbus:softbus_client", 94686862fbSopenharmony_ci "eventhandler:libeventhandler", 95686862fbSopenharmony_ci "hilog:libhilog", 96686862fbSopenharmony_ci "hisysevent:libhisysevent", 97686862fbSopenharmony_ci "hitrace:hitrace_meter", 98686862fbSopenharmony_ci "hitrace:libhitracechain", 99686862fbSopenharmony_ci "init:libbegetutil", 100686862fbSopenharmony_ci "ipc:ipc_core", 101686862fbSopenharmony_ci "kv_store:distributeddata_inner", 102686862fbSopenharmony_ci "os_account:libaccountkits", 103686862fbSopenharmony_ci "safwk:system_ability_fwk", 104686862fbSopenharmony_ci "samgr:samgr_proxy", 105686862fbSopenharmony_ci ] 106686862fbSopenharmony_ci if (dmsfwk_standard_form_share) { 107686862fbSopenharmony_ci external_deps += [ "form_fwk:form_manager" ] 108686862fbSopenharmony_ci } 109686862fbSopenharmony_ci if (os_account_part) { 110686862fbSopenharmony_ci external_deps += [ "os_account:os_account_innerkits" ] 111686862fbSopenharmony_ci } 112686862fbSopenharmony_ci} 113686862fbSopenharmony_ci 114686862fbSopenharmony_cigroup("fuzztest") { 115686862fbSopenharmony_ci testonly = true 116686862fbSopenharmony_ci deps = [ ":DistributedSchedStubFuzzTest" ] 117686862fbSopenharmony_ci} 118