1# Copyright (c) 2022-2023 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/services/audiomanager/source_device_test" 18 19config("module_private_config") { 20 visibility = [ ":*" ] 21 22 include_dirs = [ 23 "//third_party/json/include", 24 "${driver_audio_path}/include", 25 "${fwk_common_path}/utils/include", 26 "${mediastandardfwk_path}/audiocapturer/include", 27 "${mediastandardfwk_path}/audiocommon/include", 28 "${mediastandardfwk_path}/audiomanager/include", 29 ] 30 31 include_dirs += [ 32 "include", 33 "${audio_control_path}/controlsource/include", 34 "${audio_hdi_proxy_path}/include", 35 "${audio_processor_path}/interface", 36 "${audio_transport_path}/interface", 37 "${audio_transport_path}/receiverengine/include", 38 "${audio_transport_path}/senderengine/include", 39 "${common_path}/include", 40 "${common_path}/dfx_utils/include", 41 "${distributedaudio_path}/audiohandler/include", 42 "${hdf_service_path}/hdi_service/common/include", 43 "${innerkits_path}/native_cpp/audio_source/include", 44 "${innerkits_path}/native_cpp/audio_sink/include", 45 "${interfaces_path}/inner_kits/native_cpp/audio_sink/include", 46 "${interfaces_path}/inner_kits/native_cpp/audio_source/include", 47 "${services_path}/audiomanager/managersource/include", 48 "${services_path}/audiomanager/test/unittest/audiomanagertestutils/include", 49 "${services_path}/common/audioparam", 50 "${services_path}/common/audiodata/include", 51 "${services_path}/common/audioeventcallback", 52 "${services_path}/hdfaudioclient/include", 53 ] 54} 55 56## UnitTest daudio_source_dev_test 57ohos_unittest("DaudioSourceDevTest") { 58 module_out_path = module_out_path 59 60 sources = [ "src/daudio_source_dev_test.cpp" ] 61 62 configs = [ ":module_private_config" ] 63 64 deps = [ 65 "${audio_transport_path}/receiverengine:distributed_audio_decode_transport", 66 "${audio_transport_path}/senderengine:distributed_audio_encode_transport", 67 "${services_path}/audiomanager/servicesource:distributed_audio_source", 68 "${services_path}/common:distributed_audio_utils", 69 "//third_party/googletest:gmock", 70 "//third_party/googletest:gtest_main", 71 ] 72 73 external_deps = [ 74 "c_utils:utils", 75 "distributed_hardware_fwk:distributed_av_receiver", 76 "distributed_hardware_fwk:distributed_av_sender", 77 "drivers_interface_distributed_audio:libdaudioext_proxy_1.0", 78 "dsoftbus:softbus_client", 79 "eventhandler:libeventhandler", 80 "ipc:ipc_core", 81 "samgr:samgr_proxy", 82 ] 83} 84 85## UnitTest daudio_source_dev_test 86ohos_unittest("DMicDevTest") { 87 module_out_path = module_out_path 88 89 sources = [ "src/dmic_dev_test.cpp" ] 90 91 configs = [ ":module_private_config" ] 92 93 deps = [ 94 "${audio_transport_path}/receiverengine:distributed_audio_decode_transport", 95 "${services_path}/audiomanager/servicesource:distributed_audio_source", 96 "//third_party/googletest:gmock", 97 "//third_party/googletest:gtest_main", 98 ] 99 100 external_deps = [ 101 "distributed_hardware_fwk:distributed_av_receiver", 102 "distributed_hardware_fwk:distributed_av_sender", 103 "drivers_interface_distributed_audio:libdaudioext_proxy_1.0", 104 "ipc:ipc_core", 105 "samgr:samgr_proxy", 106 ] 107} 108 109## UnitTest daudio_source_dev_test 110ohos_unittest("DSpeakerDevTest") { 111 module_out_path = module_out_path 112 113 sources = [ "src/dspeaker_dev_test.cpp" ] 114 115 configs = [ ":module_private_config" ] 116 117 deps = [ 118 "${audio_transport_path}/senderengine:distributed_audio_encode_transport", 119 "${services_path}/audiomanager/servicesource:distributed_audio_source", 120 "//third_party/googletest:gmock", 121 "//third_party/googletest:gtest_main", 122 ] 123 124 external_deps = [ 125 "distributed_hardware_fwk:distributed_av_receiver", 126 "distributed_hardware_fwk:distributed_av_sender", 127 "drivers_interface_distributed_audio:libdaudioext_proxy_1.0", 128 "ipc:ipc_core", 129 "samgr:samgr_proxy", 130 ] 131} 132 133group("daudio_source_dev_test") { 134 testonly = true 135 deps = [ 136 ":DMicDevTest", 137 ":DSpeakerDevTest", 138 ":DaudioSourceDevTest", 139 ] 140} 141