• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/test.gni")
15import("../../../../../distributedaudio.gni")
16
17module_out_path = "distributed_audio/services/audiomanager/source_device_test"
18
19config("module_private_config") {
20  visibility = [ ":*" ]
21
22  include_dirs = [
23    "//third_party/json/include",
24    "${driver_audio_path}/include",
25    "${fwk_common_path}/utils/include",
26    "${mediastandardfwk_path}/audiocapturer/include",
27    "${mediastandardfwk_path}/audiocommon/include",
28    "${mediastandardfwk_path}/audiomanager/include",
29  ]
30
31  include_dirs += [
32    "include",
33    "${audio_control_path}/controlsource/include",
34    "${audio_hdi_proxy_path}/include",
35    "${audio_processor_path}/interface",
36    "${audio_transport_path}/audioctrltransport/interface",
37    "${audio_transport_path}/audiochannel/interface",
38    "${audio_transport_path}/audiotransportstatus/include",
39    "${audio_transport_path}/audiotransportstatus/interface",
40    "${audio_transport_path}/encodetransport/include",
41    "${audio_transport_path}/decodetransport/include",
42    "${audio_transport_path}/interface",
43    "${audio_transport_path}/receiverengine/include",
44    "${audio_transport_path}/senderengine/include",
45    "${common_path}/include",
46    "${common_path}/dfx_utils/include",
47    "${distributedaudio_path}/audiohandler/include",
48    "${hdf_service_path}/hdi_service/common/include",
49    "${innerkits_path}/native_cpp/audio_source/include",
50    "${innerkits_path}/native_cpp/audio_sink/include",
51    "${interfaces_path}/inner_kits/native_cpp/audio_sink/include",
52    "${interfaces_path}/inner_kits/native_cpp/audio_source/include",
53    "${services_path}/audiomanager/managersource/include",
54    "${services_path}/audiomanager/test/unittest/audiomanagertestutils/include",
55    "${services_path}/common/audioparam",
56    "${services_path}/common/taskProcessor/include",
57    "${services_path}/common/audiodata/include",
58    "${services_path}/common/audioeventcallback",
59    "${services_path}/hdfaudioclient/include",
60    "${softbusadapter_path}/include",
61  ]
62}
63
64## UnitTest daudio_source_dev_test
65ohos_unittest("DaudioSourceDevTest") {
66  module_out_path = module_out_path
67
68  sources = [ "src/daudio_source_dev_test.cpp" ]
69
70  configs = [ ":module_private_config" ]
71
72  deps = [
73    "${audio_transport_path}/decodetransport:distributed_audio_decode_transport",
74    "${audio_transport_path}/encodetransport:distributed_audio_encode_transport",
75    "${hdf_interfaces_path}/audioext/v1_0:libdaudioext_proxy_1.0",
76    "${services_path}/audiomanager/servicesource:distributed_audio_source",
77    "${services_path}/common:distributed_audio_utils",
78    "//third_party/googletest:gmock",
79    "//third_party/googletest:gtest_main",
80  ]
81
82  external_deps = [
83    "c_utils:utils",
84    "distributed_hardware_fwk:distributed_av_receiver",
85    "distributed_hardware_fwk:distributed_av_sender",
86    "drivers_interface_audio:libaudio_proxy_1.0",
87    "dsoftbus:softbus_client",
88    "ipc:ipc_core",
89    "samgr:samgr_proxy",
90  ]
91}
92
93## UnitTest daudio_source_dev_test
94ohos_unittest("DMicDevTest") {
95  module_out_path = module_out_path
96
97  sources = [ "src/dmic_dev_test.cpp" ]
98
99  configs = [ ":module_private_config" ]
100
101  deps = [
102    "${audio_transport_path}/decodetransport:distributed_audio_decode_transport",
103    "${hdf_interfaces_path}/audioext/v1_0:libdaudioext_proxy_1.0",
104    "${services_path}/audiomanager/servicesource:distributed_audio_source",
105    "//third_party/googletest:gmock",
106    "//third_party/googletest:gtest_main",
107  ]
108
109  external_deps = [
110    "distributed_hardware_fwk:distributed_av_receiver",
111    "distributed_hardware_fwk:distributed_av_sender",
112    "ipc:ipc_core",
113    "samgr:samgr_proxy",
114  ]
115}
116
117## UnitTest daudio_source_dev_test
118ohos_unittest("DSpeakerDevTest") {
119  module_out_path = module_out_path
120
121  sources = [ "src/dspeaker_dev_test.cpp" ]
122
123  configs = [ ":module_private_config" ]
124
125  deps = [
126    "${audio_transport_path}/encodetransport:distributed_audio_encode_transport",
127    "${hdf_interfaces_path}/audioext/v1_0:libdaudioext_proxy_1.0",
128    "${services_path}/audiomanager/servicesource:distributed_audio_source",
129    "//third_party/googletest:gmock",
130    "//third_party/googletest:gtest_main",
131  ]
132
133  external_deps = [
134    "distributed_hardware_fwk:distributed_av_receiver",
135    "distributed_hardware_fwk:distributed_av_sender",
136    "ipc:ipc_core",
137    "samgr:samgr_proxy",
138  ]
139}
140
141group("daudio_source_dev_test") {
142  testonly = true
143  deps = [
144    ":DMicDevTest",
145    ":DSpeakerDevTest",
146    ":DaudioSourceDevTest",
147  ]
148}
149