# 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. import("//build/config/features.gni") import("//build/test.gni") import("../../../accessibility.gni") import("../../../appgallery.gni") import("../../../bluetooth_part.gni") import("../../../config.gni") ohos_fuzztest("AudioPolicyMoreFuzzTest") { module_out_path = "audio_framework/audio_framework_route" fuzz_config_file = "../audiopolicymore_fuzzer" include_dirs = [ "../../../services/audio_policy/client/include", "../../../services/audio_policy/server/include", "../../../../../communication/bluetooth/interfaces/inner_api/include", "../../../interfaces/inner_api/native/audiomanager/include", "../../../frameworks/native/commcon/include", "../../../interfaces/inner_api/native/audiocommon/include", "../../../services/audio_policy/server/src/service/interrupt", "../../../utils/system/safwk/native/include", "../../../../communication/bluetooth/interfaces/inner_api/include", ] cflags = [ "-g", "-O0", "-fno-omit-frame-pointer", ] configs = [ "../../../services/audio_policy:audio_policy_public_config" ] cflags_cc = cflags cflags_cc += [ "-fno-access-control" ] sources = [ "audio_policy_more_fuzzer.cpp" ] deps = [ "../../../services/audio_policy:audio_policy_client", "../../../services/audio_policy:audio_policy_service", ] external_deps = [ "ability_base:session_info", "ability_base:want", "ability_base:zuri", "ability_runtime:ability_connect_callback_stub", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", "ability_runtime:app_context", "ability_runtime:dataobs_manager", "ability_runtime:extension_manager", "access_token:libaccesstoken_sdk", "access_token:libnativetoken_shared", "access_token:libprivacy_sdk", "access_token:libtokenid_sdk", "access_token:libtokensetproc_shared", "bounds_checking_function:libsec_shared", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "bundle_framework:appexecfwk_core", "c_utils:utils", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_common", "data_share:datashare_consumer", "data_share:datashare_consumer", "drivers_interface_audio:libaudio_proxy_4.0", "eventhandler:libeventhandler", "hdf_core:libhdf_host", "hdf_core:libhdf_ipc_adapter", "hdf_core:libhdf_ipc_adapter", "hdf_core:libhdf_utils", "hdf_core:libhdi", "hdf_core:libhdi", "hdf_core:libpub_utils", "hdf_core:libpub_utils", "hilog:libhilog", "hilog:libhilog", "hisysevent:libhisysevent", "init:libbegetutil", "ipc:ipc_single", "ipc:ipc_single", "kv_store:distributeddata_inner", "kv_store:distributeddata_inner", "media_foundation:media_monitor_client", "media_foundation:media_monitor_common", "os_account:os_account_innerkits", "os_account:os_account_innerkits", "power_manager:power_setting", "power_manager:powermgr_client", "power_manager:powermgr_client", "pulseaudio:pulse", "pulseaudio:pulse", "safwk:system_ability_fwk", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] if (accessibility_enable == true) { external_deps += [ "accessibility:accessibility_common", "accessibility:accessibilityconfig", ] } defines = [] if (audio_framework_feature_double_pnp_detect) { defines += [ "AUDIO_DOUBLE_PNP_DETECT" ] } if (build_variant == "user") { defines += [ "AUDIO_BUILD_VARIANT_USER" ] } else if (build_variant == "root") { defines += [ "AUDIO_BUILD_VARIANT_ROOT" ] } if (audio_framework_feature_support_os_account) { defines += [ "SUPPORT_USER_ACCOUNT" ] } if (audio_framework_feature_dtmf_tone) { defines += [ "FEATURE_DTMF_TONE" ] } if (audio_framework_config_policy_enable) { defines += [ "USE_CONFIG_POLICY" ] external_deps += [ "config_policy:configpolicy_util" ] } if (appgallery_part_enable == true) { defines += [ "FEATURE_APPGALLERY" ] } if (bluetooth_part_enable == true) { deps += [ "../../../frameworks/native/bluetoothclient:audio_bluetooth_client" ] external_deps += [ "bluetooth:btframework" ] } if (audio_framework_feature_input) { defines += [ "FEATURE_MULTIMODALINPUT_INPUT" ] external_deps += [ "input:libmmi-client" ] } if (audio_framework_feature_device_manager) { defines += [ "FEATURE_DEVICE_MANAGER" ] external_deps += [ "device_manager:devicemanagersdk" ] } } group("fuzztest") { testonly = true deps = [ ":AudioPolicyMoreFuzzTest" ] }