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/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 "device_security_level:dslm_sdk", 69 "distributed_hardware_fwk:distributed_av_receiver", 70 "distributed_hardware_fwk:distributed_av_sender", 71 "distributed_hardware_fwk:distributedhardwareutils", 72 "dsoftbus:softbus_client", 73 "eventhandler:libeventhandler", 74 "googletest:gmock", 75 "hdf_core:libhdf_ipc_adapter", 76 "hdf_core:libhdf_utils", 77 "hdf_core:libhdi", 78 "hilog:libhilog", 79 "hitrace:hitrace_meter", 80 "ipc:ipc_core", 81 "safwk:system_ability_fwk", 82 "samgr:samgr_proxy", 83 ] 84 85 if (device_security_level_control) { 86 external_deps += [ "device_security_level:dslm_sdk" ] 87 defines = [ "DEVICE_SECURITY_LEVEL_ENABLE" ] 88 } 89} 90 91## UnitTest daudio_sink_manager_test 92ohos_unittest("DAudioSinkManagerTest") { 93 module_out_path = module_out_path 94 95 sources = [ "${services_path}/audiomanager/test/unittest/managersink/src/daudio_sink_manager_test.cpp" ] 96 97 configs = [ ":module_private_config" ] 98 99 deps = [ 100 "${innerkits_path}/native_cpp/audio_sink:distributed_audio_sink_sdk", 101 "${services_path}/audiomanager/servicesink:distributed_audio_sink", 102 ] 103 104 external_deps = [ 105 "audio_framework:audio_capturer", 106 "audio_framework:audio_client", 107 "audio_framework:audio_renderer", 108 "cJSON:cjson", 109 "c_utils:utils", 110 "device_manager:devicemanagersdk", 111 "device_security_level:dslm_sdk", 112 "distributed_hardware_fwk:distributed_av_receiver", 113 "distributed_hardware_fwk:distributed_av_sender", 114 "distributed_hardware_fwk:distributedhardwareutils", 115 "dsoftbus:softbus_client", 116 "eventhandler:libeventhandler", 117 "googletest:gmock", 118 "hdf_core:libhdf_ipc_adapter", 119 "hdf_core:libhdf_utils", 120 "hdf_core:libhdi", 121 "hilog:libhilog", 122 "hitrace:hitrace_meter", 123 "ipc:ipc_core", 124 "safwk:system_ability_fwk", 125 "samgr:samgr_proxy", 126 ] 127 128 if (device_security_level_control) { 129 external_deps += [ "device_security_level:dslm_sdk" ] 130 defines = [ "DEVICE_SECURITY_LEVEL_ENABLE" ] 131 } 132} 133 134group("manager_sink_test") { 135 testonly = true 136 deps = [ 137 ":DAudioSinkManagerTest", 138 ":DaudioSinkDevTest", 139 ] 140} 141