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/ohos.gni") 15import("//build/ohos_var.gni") 16import("//build/test.gni") 17import("../../../../../distributedaudio.gni") 18 19module_out_path = "distributed_audio/services/audiomanager/manager_sink_test" 20 21config("module_private_config") { 22 visibility = [ ":*" ] 23 24 include_dirs = [ 25 "//third_party/json/include", 26 "${audio_framework_path}/audiopolicy/include", 27 "${mediastandardfwk_path}/audiocapturer/include", 28 "${mediastandardfwk_path}/audiocommon/include", 29 "${mediastandardfwk_path}/audiorenderer/include", 30 "${mediastandardfwk_path}/audiomanager/include", 31 "${fwk_common_path}/utils/include", 32 ] 33 34 include_dirs += [ 35 "${audio_client_path}/micclient/include", 36 "${audio_client_path}/spkclient/include", 37 "${audio_client_path}/interface", 38 "${audio_control_path}/controlsink/include", 39 "${audio_processor_path}/decodeprocessor/include", 40 "${audio_processor_path}/encodeprocessor/include", 41 "${audio_processor_path}/interface", 42 "${audio_transport_path}/audiochannel/audiodatachannel/include", 43 "${audio_transport_path}/audiochannel/interface", 44 "${audio_transport_path}/audio_channel/include", 45 "${audio_transport_path}/audioctrltransport/interface", 46 "${audio_transport_path}/audioctrltransport/include", 47 "${audio_transport_path}/audiodatachannel/include", 48 "${audio_transport_path}/audiotransportstatus/include", 49 "${audio_transport_path}/audiotransportstatus/interface", 50 "${audio_transport_path}/decodetransport/include", 51 "${audio_transport_path}/encodetransport/include", 52 "${audio_transport_path}/interface", 53 "${audio_transport_path}/receiverengine/include", 54 "${audio_transport_path}/senderengine/include", 55 "${common_path}/include", 56 "${innerkits_path}/native_cpp/audio_source/include", 57 "${services_path}/audiomanager/managersink/include", 58 "${services_path}/audiomanager/test/unittest/managersink/include", 59 "${services_path}/common/audiodata/include", 60 "${services_path}/common/audioeventcallback", 61 "${services_path}/common/audioparam", 62 "${services_path}/common/taskProcessor/include", 63 ] 64} 65 66## UnitTest daudio_sink_dev_test 67ohos_unittest("DaudioSinkDevTest") { 68 module_out_path = module_out_path 69 70 sources = [ "${services_path}/audiomanager/test/unittest/managersink/src/daudio_sink_dev_test.cpp" ] 71 72 configs = [ ":module_private_config" ] 73 74 deps = [ 75 "${services_path}/audiomanager/servicesink:distributed_audio_sink", 76 "//third_party/googletest:gmock", 77 "//third_party/googletest:gtest_main", 78 ] 79 80 external_deps = [ 81 "audio_framework:audio_capturer", 82 "audio_framework:audio_client", 83 "audio_framework:audio_renderer", 84 "c_utils:utils", 85 "distributed_hardware_fwk:distributed_av_receiver", 86 "distributed_hardware_fwk:distributed_av_sender", 87 "drivers_interface_audio:libaudio_proxy_1.0", 88 "hdf_core:libhdf_ipc_adapter", 89 "hdf_core:libhdf_utils", 90 "hdf_core:libhdi", 91 "hitrace:hitrace_meter", 92 "ipc:ipc_core", 93 "safwk:system_ability_fwk", 94 "samgr:samgr_proxy", 95 ] 96} 97 98## UnitTest daudio_sink_manager_test 99ohos_unittest("DAudioSinkManagerTest") { 100 module_out_path = module_out_path 101 102 sources = [ "${services_path}/audiomanager/test/unittest/managersink/src/daudio_sink_manager_test.cpp" ] 103 104 configs = [ ":module_private_config" ] 105 106 deps = [ 107 "${services_path}/audiomanager/servicesink:distributed_audio_sink", 108 "//third_party/googletest:gmock", 109 "//third_party/googletest:gtest_main", 110 ] 111 112 external_deps = [ 113 "audio_framework:audio_capturer", 114 "audio_framework:audio_client", 115 "audio_framework:audio_renderer", 116 "c_utils:utils", 117 "distributed_hardware_fwk:distributed_av_receiver", 118 "distributed_hardware_fwk:distributed_av_sender", 119 "drivers_interface_audio:libaudio_proxy_1.0", 120 "hdf_core:libhdf_ipc_adapter", 121 "hdf_core:libhdf_utils", 122 "hdf_core:libhdi", 123 "hitrace:hitrace_meter", 124 "ipc:ipc_core", 125 "safwk:system_ability_fwk", 126 "samgr:samgr_proxy", 127 ] 128} 129 130group("manager_sink_test") { 131 testonly = true 132 deps = [ 133 ":DAudioSinkManagerTest", 134 ":DaudioSinkDevTest", 135 ] 136} 137