1# Copyright (c) 2025 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 14import("//build/config/features.gni") 15import("//build/test.gni") 16import("../../../accessibility.gni") 17import("../../../config.gni") 18 19ohos_fuzztest("AudioInterruptDfxCollectorFuzzTest") { 20 module_out_path = "audio_framework/audio_framework_route" 21 fuzz_config_file = "../audiointerruptdfxcollector_fuzzer" 22 23 include_dirs = [ 24 "../../../services/audio_policy/server/include/service", 25 "../../../services/audio_policy/server/include", 26 "../../../frameworks/native/audioutils/include", 27 "../../../services/audio_service/common/include/limiter/", 28 "../../../services/audio_engine/manager/include", 29 ] 30 cflags = [ 31 "-g", 32 "-O0", 33 "-Wno-unused-variable", 34 "-fno-omit-frame-pointer", 35 "-fno-access-control", 36 ] 37 configs = [ "../../../services/audio_policy:audio_policy_public_config" ] 38 39 sources = [ "audio_interrupt_dfx_collector_fuzzer.cpp" ] 40 41 deps = [ 42 "../../../frameworks/native/audioutils:audio_utils", 43 "../../../frameworks/native/bluetoothclient:audio_bluetooth_client", 44 "../../../services/audio_policy:audio_policy_service_static", 45 "../../../services/audio_service:audio_common", 46 "../../../frameworks/native/audioclock:audio_clock", 47 "../../../services/audio_engine:audio_engine_manager", 48 ] 49 50 external_deps = [ 51 "ability_base:want", 52 "ability_runtime:extension_manager", 53 "ability_runtime:wantagent_innerkits", 54 "access_token:libaccesstoken_sdk", 55 "access_token:libnativetoken_shared", 56 "access_token:libprivacy_sdk", 57 "access_token:libtokenid_sdk", 58 "access_token:libtokensetproc_shared", 59 "background_task_mgr:bgtaskmgr_innerkits", 60 "bounds_checking_function:libsec_shared", 61 "bundle_framework:appexecfwk_base", 62 "bundle_framework:appexecfwk_core", 63 "c_utils:utils", 64 "data_share:datashare_common", 65 "data_share:datashare_consumer", 66 "eventhandler:libeventhandler", 67 "hdf_core:libhdf_ipc_adapter", 68 "hdf_core:libhdi", 69 "hdf_core:libpub_utils", 70 "hicollie:libhicollie", 71 "hilog:libhilog", 72 "hisysevent:libhisysevent", 73 "hitrace:hitrace_meter", 74 "init:libbegetutil", 75 "ipc:ipc_single", 76 "kv_store:distributeddata_inner", 77 "media_foundation:media_monitor_client", 78 "media_foundation:media_monitor_common", 79 "os_account:os_account_innerkits", 80 "power_manager:powermgr_client", 81 "relational_store:native_appdatafwk", 82 "safwk:system_ability_fwk", 83 "samgr:samgr_proxy", 84 "bluetooth:btframework" 85 ] 86 if (sonic_enable == true) { 87 external_deps += [ "pulseaudio:sonic" ] 88 } 89 if (accessibility_enable == true) { 90 external_deps += [ 91 "accessibility:accessibility_common", 92 "accessibility:accessibilityconfig", 93 ] 94 } 95 96 defines = [] 97 if (use_libfuzzer || use_clang_coverage) { 98 defines += [ "TEST_COVERAGE" ] 99 } 100 if (audio_framework_feature_dtmf_tone) { 101 defines += [ "FEATURE_DTMF_TONE" ] 102 } 103 if (audio_framework_feature_input) { 104 defines += [ "FEATURE_MULTIMODALINPUT_INPUT" ] 105 } 106} 107 108 109 110group("fuzztest") { 111 testonly = true 112 deps = [ ":AudioInterruptDfxCollectorFuzzTest" ] 113} 114