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("../../../bluetooth_part.gni") 18import("../../../config.gni") 19 20ohos_fuzztest("AudioAdaptorBluetoothFuzzTest") { 21 module_out_path = "audio_framework/audio_framework_route" 22 fuzz_config_file = "../audioadaptorbluetooth_fuzzer" 23 24 include_dirs = [ 25 "../../../services/audio_policy/server/include/service", 26 "../../../services/audio_policy/server/include", 27 "../../../frameworks/native/hdiadapter_new/include", 28 ] 29 cflags = [ 30 "-g", 31 "-O0", 32 "-Wno-unused-variable", 33 "-fno-omit-frame-pointer", 34 "-fno-access-control", 35 ] 36 configs = [ "../../../services/audio_policy:audio_policy_public_config" ] 37 38 sources = [ "audio_adaptor_bluetooth_fuzzer.cpp" ] 39 40 deps = [ 41 "../../../services/audio_service/idl:audio_framework_interface", 42 "../../../frameworks/native/bluetoothclient:audio_bluetooth_client", 43 "../../../frameworks/native/hdiadapter_new:hdiadapter_new", 44 "../../../services/audio_policy:audio_policy_service_static", 45 ] 46 47 external_deps = [ 48 "ability_base:want", 49 "ability_runtime:extension_manager", 50 "ability_runtime:wantagent_innerkits", 51 "access_token:libaccesstoken_sdk", 52 "access_token:libprivacy_sdk", 53 "access_token:libtokensetproc_shared", 54 "background_task_mgr:bgtaskmgr_innerkits", 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 "eventhandler:libeventhandler", 62 "hdf_core:libhdf_ipc_adapter", 63 "hdf_core:libhdi", 64 "hdf_core:libpub_utils", 65 "hilog:libhilog", 66 "hisysevent:libhisysevent", 67 "init:libbegetutil", 68 "ipc:ipc_single", 69 "ipc:ipc_single", 70 "kv_store:distributeddata_inner", 71 "media_foundation:media_monitor_client", 72 "media_foundation:media_monitor_common", 73 "os_account:os_account_innerkits", 74 "power_manager:powermgr_client", 75 "safwk:system_ability_fwk", 76 "samgr:samgr_proxy", 77 ] 78 if (accessibility_enable == true) { 79 external_deps += [ 80 "accessibility:accessibility_common", 81 "accessibility:accessibilityconfig", 82 ] 83 } 84 defines = [] 85 if (use_libfuzzer || use_clang_coverage) { 86 defines += [ "TEST_COVERAGE" ] 87 } 88 if (bluetooth_part_enable == true) { 89 external_deps += [ "bluetooth:btframework" ] 90 defines += [ "BLUETOOTH_PART_ENABLE" ] 91 } 92} 93 94group("fuzztest") { 95 testonly = true 96 deps = [ ":AudioAdaptorBluetoothFuzzTest" ] 97} 98