# Copyright (c) 2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #####################hydra-fuzz################### import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") import("//foundation/ability/dmsfwk/dmsfwk.gni") ohos_fuzztest("DistributedSchedStubFuzzTest") { module_out_path = module_output_path visibility = [ ":*" ] include_dirs = [ "${dms_path}/common/include/", "${dms_path}/common/include/continue/", "${dms_path}/interfaces/innerkits/common/include/", "${dms_path}/interfaces/kits/napi/include/", "${dms_path}/services/dtbschedmgr/include/", "${dms_path}/services/dtbschedmgr/include/collaborate/", "${dms_path}/services/dtbschedmgr/include/dfx/", "${dms_path}/services/dtbschedmgr/test/unittest", "${dms_path}/services/dtbschedmgr/include/softbus_adapter/transport/", "${dms_path}/services/dtbschedmgr/include/collaborate/", "${dms_path}/services/dtbschedmgr/include/continue/", "${dms_path}/services/dtbschedmgr/include/continue/state/", "${dms_path}/services/dtbschedmgr/include/continue/state/transport/", "${dms_path}/test/fuzztest/distributedschedstub_fuzzer", "${dms_path}/test/fuzztest/util", ] fuzz_config_file = "${dms_path}/test/fuzztest/distributedschedstub_fuzzer" configs = [ "${dms_path}/services/dtbschedmgr/test/resource:coverage_flags" ] cflags = [ "-g", "-O0", "-Wno-unused-variable", "-fno-omit-frame-pointer", "-Dprivate=public", ] sources = [ "${dms_path}/services/dtbschedmgr/test/unittest/mock_distributed_sched.cpp", "${dms_path}/test/fuzztest/util/mock_fuzz_util.cpp", "distributedschedstub_fuzzer.cpp", ] deps = [ "${dms_path}/services/dtbschedmgr:distributedschedsvr" ] defines = [] if (dmsfwk_mission_manager) { defines += [ "SUPPORT_DISTRIBUTED_MISSION_MANAGER" ] } if (dmsfwk_standard_form_share) { defines += [ "SUPPORT_DISTRIBUTED_FORM_SHARE" ] } if (os_account_part) { defines += [ "OS_ACCOUNT_PART" ] } external_deps = [ "ability_base:base", "ability_base:want", "ability_base:zuri", "ability_runtime:ability_manager", "ability_runtime:app_manager", "ability_runtime:dataobs_manager", "ability_runtime:mission_info", "access_token:libaccesstoken_sdk", "access_token:libnativetoken_shared", "access_token:libtokensetproc_shared", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "cJSON:cjson", "c_utils:utils", "data_share:datashare_consumer", "device_auth:deviceauth_sdk", "device_info_manager:distributed_device_profile_common", "device_info_manager:distributed_device_profile_sdk", "device_manager:devicemanagersdk", "device_security_level:dslm_sdk", "distributed_bundle_framework:dbms_fwk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "hitrace:libhitracechain", "init:libbegetutil", "ipc:ipc_core", "kv_store:distributeddata_inner", "os_account:libaccountkits", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] if (dmsfwk_standard_form_share) { external_deps += [ "form_fwk:form_manager" ] } if (os_account_part) { external_deps += [ "os_account:os_account_innerkits" ] } } group("fuzztest") { testonly = true deps = [ ":DistributedSchedStubFuzzTest" ] }