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/service_source_test" 20 21config("module_private_config") { 22 visibility = [ ":*" ] 23 24 include_dirs = [ 25 "//third_party/json/include", 26 "${audio_framework_path}/audiopolicy/include", 27 "${driver_audio_path}/include", 28 "${fwk_common_path}/utils/include", 29 "${mediastandardfwk_path}/audiocapturer/include", 30 "${mediastandardfwk_path}/audiocommon/include", 31 "${mediastandardfwk_path}/audiorenderer/include", 32 "${mediastandardfwk_path}/audiomanager/include", 33 ] 34 35 include_dirs += [ 36 "${audio_control_path}/controlsource/include", 37 "${audio_hdi_proxy_path}/include", 38 "${audio_processor_path}/interface", 39 "${audio_transport_path}/interface", 40 "${audio_transport_path}/receiverengine/include", 41 "${audio_transport_path}/senderengine/include", 42 "${common_path}/include", 43 "${common_path}/dfx_utils/include", 44 "${distributedaudio_path}/audiohandler/include", 45 "${hdf_service_path}/hdi_service/common/include", 46 "${innerkits_path}/native_cpp/audio_sink/include", 47 "${innerkits_path}/native_cpp/audio_source/include", 48 "${interfaces_path}/inner_kits/native_cpp/audio_sink/include", 49 "${interfaces_path}/inner_kits/native_cpp/audio_source/include", 50 "${services_path}/audiomanager/managersink/include", 51 "${services_path}/audiomanager/managersource/include", 52 "${services_path}/audiomanager/servicesink/include", 53 "${services_path}/audiomanager/servicesource/include", 54 "${services_path}/audiomanager/test/unittest/managersink/include", 55 "${services_path}/audiomanager/test/unittest/servicesink/include", 56 "${services_path}/audiomanager/test/unittest/servicesource/include", 57 "${services_path}/common/audiodata/include", 58 "${services_path}/common/audioeventcallback", 59 "${services_path}/common/audioparam", 60 "${services_path}/hdfaudioclient/include", 61 ] 62} 63 64## UnitTest daudio_source_service_test 65ohos_unittest("DaudioSourceServiceTest") { 66 module_out_path = module_out_path 67 68 sources = [ "${services_path}/audiomanager/test/unittest/servicesource/src/daudio_source_service_test.cpp" ] 69 70 configs = [ ":module_private_config" ] 71 72 deps = [ 73 "${services_path}/audiomanager/servicesource:distributed_audio_source", 74 "//third_party/googletest:gmock", 75 "//third_party/googletest:gtest_main", 76 ] 77 78 external_deps = [ 79 "audio_framework:audio_capturer", 80 "audio_framework:audio_client", 81 "audio_framework:audio_renderer", 82 "c_utils:utils", 83 "dsoftbus:softbus_client", 84 "hisysevent:libhisysevent", 85 "hitrace:hitrace_meter", 86 "ipc:ipc_core", 87 "safwk:system_ability_fwk", 88 "samgr:samgr_proxy", 89 ] 90} 91 92group("service_source_test") { 93 testonly = true 94 deps = [ ":DaudioSourceServiceTest" ] 95} 96