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 14import("//build/config/features.gni") 15import("//build/test.gni") 16import("../../../accessibility.gni") 17import("../../../config.gni") 18import("../../../sensor.gni") 19import("../../../window_manager.gni") 20 21ohos_fuzztest("AudioEffectFuzzTest") { 22 module_out_path = "audio_framework/audio_framework_route" 23 fuzz_config_file = "../audioeffect_fuzzer" 24 25 include_dirs = [ 26 "../../../frameworks/native/audioeffect/include", 27 "../../../services/audio_policy/server/include/service", 28 "../../../services/audio_policy/server/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_effect_fuzzer.cpp" ] 40 41 deps = [ 42 "../../../frameworks/native/audioeffect:audio_effect", 43 "../../../frameworks/native/bluetoothclient:audio_bluetooth_client", 44 "../../../services/audio_policy:audio_policy_service", 45 ] 46 47 external_deps = [ 48 "ability_base:want", 49 "ability_runtime:extension_manager", 50 "access_token:libaccesstoken_sdk", 51 "access_token:libnativetoken_shared", 52 "access_token:libprivacy_sdk", 53 "access_token:libtokenid_sdk", 54 "access_token:libtokensetproc_shared", 55 "bounds_checking_function:libsec_shared", 56 "bundle_framework:appexecfwk_base", 57 "bundle_framework:appexecfwk_core", 58 "c_utils:utils", 59 "data_share:datashare_common", 60 "data_share:datashare_consumer", 61 "drivers_interface_audio:libeffect_proxy_1.0", 62 "eventhandler:libeventhandler", 63 "hdf_core:libhdf_ipc_adapter", 64 "hdf_core:libhdf_utils", 65 "hdf_core:libhdi", 66 "hdf_core:libpub_utils", 67 "hicollie:libhicollie", 68 "hilog:libhilog", 69 "hisysevent:libhisysevent", 70 "hitrace:hitrace_meter", 71 "init:libbegetutil", 72 "ipc:ipc_single", 73 "kv_store:distributeddata_inner", 74 "media_foundation:media_monitor_client", 75 "media_foundation:media_monitor_common", 76 "os_account:os_account_innerkits", 77 "power_manager:powermgr_client", 78 "pulseaudio:pulse", 79 "relational_store:native_appdatafwk", 80 "safwk:system_ability_fwk", 81 "samgr:samgr_proxy", 82 ] 83 if (accessibility_enable == true) { 84 external_deps += [ 85 "accessibility:accessibility_common", 86 "accessibility:accessibilityconfig", 87 ] 88 } 89 if (sensor_enable == true) { 90 external_deps += [ "sensor:sensor_interface_native" ] 91 cflags += [ "-DSENSOR_ENABLE" ] 92 } 93 if (window_manager_enable == true) { 94 cflags += [ "-DWINDOW_MANAGER_ENABLE" ] 95 } 96} 97 98group("fuzztest") { 99 testonly = true 100 deps = [ ":AudioEffectFuzzTest" ] 101} 102