1# Copyright (c) 2024-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/test.gni") 15import("../../../../../distributedaudio.gni") 16 17module_out_path = "distributed_audio/distributed_audio/services/audiomanager/source_manager_test" 18 19config("module_private_config") { 20 visibility = [ ":*" ] 21 22 include_dirs = [ 23 "include", 24 "${audio_control_path}/controlsource/include", 25 "${audio_hdi_proxy_path}/include", 26 "${audio_processor_path}/interface", 27 "${audio_transport_path}/audioctrltransport/include", 28 "${audio_transport_path}/audioctrltransport/interface", 29 "${audio_transport_path}/audiotransportstatus/include", 30 "${audio_transport_path}/audiotransportstatus/interface", 31 "${audio_transport_path}/interface", 32 "${audio_transport_path}/receiverengine/include", 33 "${audio_transport_path}/senderengine/include", 34 "${common_path}/include", 35 "${common_path}/dfx_utils/include", 36 "${distributedaudio_path}/audiohandler/include", 37 "${interfaces_path}/inner_kits/native_cpp/audio_sink/include", 38 "${interfaces_path}/inner_kits/native_cpp/audio_source/include", 39 "${innerkits_path}/native_cpp/audio_source/include", 40 "${innerkits_path}/native_cpp/audio_sink/include", 41 "${services_path}/audiomanager/managersource/include", 42 "${services_path}/audiomanager/servicesource/include", 43 "${services_path}/common/audiodata/include", 44 "${services_path}/common/audioeventcallback", 45 "${services_path}/common/audioparam", 46 "${services_path}/common/taskProcessor/include", 47 "${services_path}/audiohdiproxy/test/unittest/daudio_hdi_handler/include", 48 ] 49} 50 51## UnitTest daudio_source_mgr_test 52ohos_unittest("DaudioSourceMgrTest") { 53 module_out_path = module_out_path 54 55 sources = [ 56 "src/daudio_source_mgr_test.cpp", 57 "${interfaces_path}/inner_kits/native_cpp/audio_source/src/daudio_hdf_operate.cpp", 58 "${services_path}/audiohdiproxy/test/unittest/daudio_hdi_handler/src/mock_distributed_hardware_fwk_kit.cpp", 59 ] 60 61 configs = [ ":module_private_config" ] 62 63 deps = [ 64 "${innerkits_path}/native_cpp/audio_source:distributed_audio_source_sdk", 65 "${services_path}/audiomanager/servicesource:distributed_audio_source", 66 "${services_path}/common:distributed_audio_utils", 67 ] 68 69 external_deps = [ 70 "audio_framework:audio_capturer", 71 "audio_framework:audio_client", 72 "audio_framework:audio_renderer", 73 "cJSON:cjson", 74 "c_utils:utils", 75 "device_manager:devicemanagersdk", 76 "distributed_hardware_fwk:distributed_av_receiver", 77 "distributed_hardware_fwk:distributed_av_sender", 78 "distributed_hardware_fwk:distributedhardwareutils", 79 "drivers_interface_distributed_audio:libdaudioext_proxy_2.1", 80 "dsoftbus:softbus_client", 81 "eventhandler:libeventhandler", 82 "googletest:gmock", 83 "hdf_core:libhdi", 84 "hilog:libhilog", 85 "ipc:ipc_core", 86 "ipc:ipc_single", 87 "safwk:system_ability_fwk", 88 "samgr:samgr_proxy", 89 ] 90} 91 92group("daudio_source_mgr_test") { 93 testonly = true 94 deps = [ ":DaudioSourceMgrTest" ] 95} 96