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