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 "${audio_client_path}/micclient/include", 26 "${audio_client_path}/spkclient/include", 27 "${audio_client_path}/interface", 28 "${audio_control_path}/controlsink/include", 29 "${audio_processor_path}/interface", 30 "${audio_transport_path}/interface", 31 "${audio_transport_path}/receiverengine/include", 32 "${audio_transport_path}/senderengine/include", 33 "${common_path}/include", 34 "${innerkits_path}/native_cpp/audio_source/include", 35 "${innerkits_path}/native_cpp/audio_sink/include", 36 "${services_path}/audiomanager/managersink/include", 37 "${services_path}/audiomanager/test/unittest/managersink/include", 38 "${services_path}/audiomanager/test/unittest/audiomanagertestutils/include", 39 "${services_path}/audiomanager/servicesink/include", 40 "${services_path}/common/audiodata/include", 41 "${services_path}/common/audioeventcallback", 42 "${services_path}/common/audioparam", 43 ] 44} 45 46## UnitTest daudio_sink_dev_test 47ohos_unittest("DaudioSinkDevTest") { 48 module_out_path = module_out_path 49 50 sources = [ "${services_path}/audiomanager/test/unittest/managersink/src/daudio_sink_dev_test.cpp" ] 51 52 configs = [ ":module_private_config" ] 53 54 deps = [ 55 "${innerkits_path}/native_cpp/audio_sink:distributed_audio_sink_sdk", 56 "${services_path}/audiomanager/servicesink:distributed_audio_sink", 57 "${services_path}/common:distributed_audio_utils", 58 ] 59 60 external_deps = [ 61 "audio_framework:audio_capturer", 62 "audio_framework:audio_client", 63 "audio_framework:audio_renderer", 64 "cJSON:cjson", 65 "c_utils:utils", 66 "device_manager:devicemanagersdk", 67 "device_security_level:dslm_sdk", 68 "distributed_hardware_fwk:distributed_av_receiver", 69 "distributed_hardware_fwk:distributed_av_sender", 70 "distributed_hardware_fwk:distributedhardwareutils", 71 "eventhandler:libeventhandler", 72 "googletest:gmock", 73 "hdf_core:libhdf_ipc_adapter", 74 "hdf_core:libhdf_utils", 75 "hdf_core:libhdi", 76 "hilog:libhilog", 77 "hitrace:hitrace_meter", 78 "ipc:ipc_core", 79 "safwk:system_ability_fwk", 80 "samgr:samgr_proxy", 81 ] 82} 83 84## UnitTest daudio_sink_manager_test 85ohos_unittest("DAudioSinkManagerTest") { 86 module_out_path = module_out_path 87 88 sources = [ "${services_path}/audiomanager/test/unittest/managersink/src/daudio_sink_manager_test.cpp" ] 89 90 configs = [ ":module_private_config" ] 91 92 deps = [ 93 "${innerkits_path}/native_cpp/audio_sink:distributed_audio_sink_sdk", 94 "${services_path}/audiomanager/servicesink:distributed_audio_sink", 95 ] 96 97 external_deps = [ 98 "audio_framework:audio_capturer", 99 "audio_framework:audio_client", 100 "audio_framework:audio_renderer", 101 "cJSON:cjson", 102 "c_utils:utils", 103 "device_manager:devicemanagersdk", 104 "device_security_level:dslm_sdk", 105 "distributed_hardware_fwk:distributed_av_receiver", 106 "distributed_hardware_fwk:distributed_av_sender", 107 "distributed_hardware_fwk:distributedhardwareutils", 108 "googletest:gmock", 109 "hdf_core:libhdf_ipc_adapter", 110 "hdf_core:libhdf_utils", 111 "hdf_core:libhdi", 112 "hitrace:hitrace_meter", 113 "ipc:ipc_core", 114 "safwk:system_ability_fwk", 115 "samgr:samgr_proxy", 116 ] 117} 118 119group("manager_sink_test") { 120 testonly = true 121 deps = [ 122 ":DAudioSinkManagerTest", 123 ":DaudioSinkDevTest", 124 ] 125} 126