• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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
14if (defined(ohos_lite)) {
15  import("//build/lite/config/test.gni")
16} else {
17  import("//build/test.gni")
18  import("//drivers/adapter/uhdf2/uhdf.gni")
19  import("//drivers/peripheral/audio/audio.gni")
20}
21
22if (defined(ohos_lite)) {
23  ###########################LITEOS##########################################
24  ###########################hdf_audio_hdi_render_attr_test######################
25  unittest("hdf_audio_hdi_render_attr_test") {
26    sources = [
27      "../../common/hdi_common/src/audio_hdi_common.cpp",
28      "src/audio_hdirender_attr_test.cpp",
29    ]
30
31    include_dirs = [
32      "//drivers/peripheral/audio/interfaces/include",
33      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
34      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
35      "//drivers/framework/include/core",
36      "//drivers/framework/include/utils",
37      "//drivers/framework/include/osal",
38      "//drivers/framework/ability/sbuf/include",
39      "//drivers/framework/utils/include",
40      "//drivers/framework/include",
41      "//drivers/framework/core/sec/include",
42      "//drivers/framework/core/shared/include",
43      "//drivers/framework/core/host/include",
44      "//drivers/framework/core/manager/include",
45      "//drivers/framework/core/common/include/host/",
46      "//third_party/bounds_checking_function/include",
47      "//drivers/adapter/khdf/liteos/osal/include",
48      "//drivers/adapter/uhdf2/shared/include",
49      "//drivers/adapter/uhdf2/include/hdi/",
50      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
51      "//third_party/googletest/googletest/include/gtest",
52      "//drivers/peripheral/audio/test/systemtest/hdi/render/include",
53    ]
54    cflags = [
55      "-Wall",
56      "-Wextra",
57      "-Werror",
58      "-fsigned-char",
59      "-fno-common",
60      "-fno-strict-aliasing",
61    ]
62  }
63
64  ###########################end###########################
65  ###########################hdf_audio_hdi_render_control_test######################
66  unittest("hdf_audio_hdi_render_control_test") {
67    sources = [
68      "../../common/hdi_common/src/audio_hdi_common.cpp",
69      "src/audio_hdirender_control_test.cpp",
70    ]
71
72    include_dirs = [
73      "//drivers/peripheral/audio/interfaces/include",
74      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
75      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
76      "//drivers/framework/include/core",
77      "//drivers/framework/include/utils",
78      "//drivers/framework/include/osal",
79      "//drivers/framework/ability/sbuf/include",
80      "//drivers/framework/utils/include",
81      "//drivers/framework/include",
82      "//drivers/framework/core/sec/include",
83      "//drivers/framework/core/shared/include",
84      "//drivers/framework/core/host/include",
85      "//drivers/framework/core/manager/include",
86      "//drivers/framework/core/common/include/host/",
87      "//third_party/bounds_checking_function/include",
88      "//drivers/adapter/khdf/liteos/osal/include",
89      "//drivers/adapter/uhdf2/shared/include",
90      "//drivers/adapter/uhdf2/include/hdi/",
91      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
92      "//third_party/googletest/googletest/include/gtest",
93      "//drivers/peripheral/audio/test/systemtest/hdi/render/include",
94    ]
95    cflags = [
96      "-Wall",
97      "-Wextra",
98      "-Werror",
99      "-fsigned-char",
100      "-fno-common",
101      "-fno-strict-aliasing",
102    ]
103  }
104
105  ###########################end###########################
106  ###########################hdf_audio_hdi_render_volume_test######################
107  unittest("hdf_audio_hdi_render_volume_test") {
108    sources = [
109      "../../common/hdi_common/src/audio_hdi_common.cpp",
110      "src/audio_hdirender_volume_test.cpp",
111    ]
112
113    include_dirs = [
114      "//drivers/peripheral/audio/interfaces/include",
115      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
116      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
117      "//drivers/framework/include/core",
118      "//drivers/framework/include/utils",
119      "//drivers/framework/include/osal",
120      "//drivers/framework/ability/sbuf/include",
121      "//drivers/framework/utils/include",
122      "//drivers/framework/include",
123      "//drivers/framework/core/sec/include",
124      "//drivers/framework/core/shared/include",
125      "//drivers/framework/core/host/include",
126      "//drivers/framework/core/manager/include",
127      "//drivers/framework/core/common/include/host/",
128      "//third_party/bounds_checking_function/include",
129      "//drivers/adapter/khdf/liteos/osal/include",
130      "//drivers/adapter/uhdf2/shared/include",
131      "//drivers/adapter/uhdf2/include/hdi/",
132      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
133      "//third_party/googletest/googletest/include/gtest",
134      "//drivers/peripheral/audio/test/systemtest/hdi/render/include",
135    ]
136    cflags = [
137      "-Wall",
138      "-Wextra",
139      "-Werror",
140      "-fsigned-char",
141      "-fno-common",
142      "-fno-strict-aliasing",
143    ]
144  }
145
146  ###########################end###########################
147  ###########################hdf_audio_hdi_render_scene_test######################
148  unittest("hdf_audio_hdi_render_scene_test") {
149    sources = [
150      "../../common/hdi_common/src/audio_hdi_common.cpp",
151      "src/audio_hdirender_scene_test.cpp",
152    ]
153
154    include_dirs = [
155      "//drivers/peripheral/audio/interfaces/include",
156      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
157      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
158      "//drivers/framework/include/core",
159      "//drivers/framework/include/utils",
160      "//drivers/framework/include/osal",
161      "//drivers/framework/ability/sbuf/include",
162      "//drivers/framework/utils/include",
163      "//drivers/framework/include",
164      "//drivers/framework/core/sec/include",
165      "//drivers/framework/core/shared/include",
166      "//drivers/framework/core/host/include",
167      "//drivers/framework/core/manager/include",
168      "//drivers/framework/core/common/include/host/",
169      "//third_party/bounds_checking_function/include",
170      "//drivers/adapter/khdf/liteos/osal/include",
171      "//drivers/adapter/uhdf2/shared/include",
172      "//drivers/adapter/uhdf2/include/hdi/",
173      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
174      "//third_party/googletest/googletest/include/gtest",
175      "//drivers/peripheral/audio/test/systemtest/hdi/render/include",
176    ]
177    cflags = [
178      "-Wall",
179      "-Wextra",
180      "-Werror",
181      "-fsigned-char",
182      "-fno-common",
183      "-fno-strict-aliasing",
184    ]
185  }
186
187  ###########################end###########################
188  ###########################hdf_audio_hdi_render_test######################
189  unittest("hdf_audio_hdi_render_test") {
190    sources = [
191      "../../common/hdi_common/src/audio_hdi_common.cpp",
192      "src/audio_hdirender_test.cpp",
193    ]
194
195    include_dirs = [
196      "//drivers/peripheral/audio/interfaces/include",
197      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
198      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
199      "//drivers/framework/include/core",
200      "//drivers/framework/include/utils",
201      "//drivers/framework/include/osal",
202      "//drivers/framework/ability/sbuf/include",
203      "//drivers/framework/utils/include",
204      "//drivers/framework/include",
205      "//drivers/framework/core/sec/include",
206      "//drivers/framework/core/shared/include",
207      "//drivers/framework/core/host/include",
208      "//drivers/framework/core/manager/include",
209      "//drivers/framework/core/common/include/host/",
210      "//third_party/bounds_checking_function/include",
211      "//drivers/adapter/khdf/liteos/osal/include",
212      "//drivers/adapter/uhdf2/shared/include",
213      "//drivers/adapter/uhdf2/include/hdi/",
214      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
215      "//third_party/googletest/googletest/include/gtest",
216      "//drivers/peripheral/audio/test/systemtest/hdi/render/include",
217    ]
218    cflags = [
219      "-Wall",
220      "-Wextra",
221      "-Werror",
222      "-fsigned-char",
223      "-fno-common",
224      "-fno-strict-aliasing",
225    ]
226  }
227} else {
228  ###########################systemtest##############################
229  module_output_path = "hdf/audio"
230
231  ###########################hdf_audio_hdi_render_attr_test######################
232  ohos_systemtest("hdf_audio_hdi_render_attr_test") {
233    module_out_path = module_output_path
234    sources = [
235      "../../common/hdi_common/src/audio_hdi_common.cpp",
236      "src/audio_hdirender_attr_test.cpp",
237    ]
238
239    include_dirs = [
240      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
241      "//drivers/peripheral/audio/interfaces/include",
242      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
243      "//drivers/adapter/uhdf2/include/hdi",
244      "//drivers/adapter/uhdf2/shared/include",
245      "//drivers/framework/include/core",
246      "//drivers/framework/include/utils",
247      "//drivers/framework/include/osal",
248      "//drivers/framework/include",
249      "//third_party/bounds_checking_function/include",
250      "//drivers/framework/ability/sbuf/include",
251      "//drivers/framework/utils/include",
252      "//drivers/framework/ability/sbuf/include",
253      "//drivers/adapter/uhdf2/osal/include",
254      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
255      "//third_party/googletest/googletest/include/gtest",
256      "//drivers/peripheral/audio/test/systemtest/hdi/render/include",
257    ]
258    cflags = [
259      "-Wall",
260      "-Wextra",
261      "-Werror",
262      "-fsigned-char",
263      "-fno-common",
264      "-fno-strict-aliasing",
265    ]
266    deps = [
267      "//third_party/googletest:gmock_main",
268      "//third_party/googletest:gtest_main",
269    ]
270    defines = []
271    if (enable_audio_adm_so) {
272      defines += [ "AUDIO_ADM_SO" ]
273    }
274    if (enable_audio_mpi_so) {
275      defines += [ "AUDIO_MPI_SO" ]
276    }
277    if (enable_audio_adm_service) {
278      defines += [ "AUDIO_ADM_SERVICE" ]
279    }
280    if (enable_audio_mpi_service) {
281      defines += [ "AUDIO_MPI_SERVICE" ]
282    }
283  }
284
285  ###########################end###########################
286  ###########################hdf_audio_hdi_render_control_test######################
287  ohos_systemtest("hdf_audio_hdi_render_control_test") {
288    module_out_path = module_output_path
289    sources = [
290      "../../common/hdi_common/src/audio_hdi_common.cpp",
291      "src/audio_hdirender_control_test.cpp",
292    ]
293
294    include_dirs = [
295      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
296      "//drivers/peripheral/audio/interfaces/include",
297      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
298      "//drivers/adapter/uhdf2/include/hdi",
299      "//drivers/adapter/uhdf2/shared/include",
300      "//drivers/framework/include/core",
301      "//drivers/framework/include/utils",
302      "//drivers/framework/include/osal",
303      "//drivers/framework/include",
304      "//third_party/bounds_checking_function/include",
305      "//drivers/framework/ability/sbuf/include",
306      "//drivers/framework/utils/include",
307      "//drivers/framework/ability/sbuf/include",
308      "//drivers/adapter/uhdf2/osal/include",
309      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
310      "//third_party/googletest/googletest/include/gtest",
311      "//drivers/peripheral/audio/test/systemtest/hdi/render/include",
312    ]
313    cflags = [
314      "-Wall",
315      "-Wextra",
316      "-Werror",
317      "-fsigned-char",
318      "-fno-common",
319      "-fno-strict-aliasing",
320    ]
321    deps = [
322      "//third_party/googletest:gmock_main",
323      "//third_party/googletest:gtest_main",
324    ]
325    defines = []
326    if (enable_audio_adm_so) {
327      defines += [ "AUDIO_ADM_SO" ]
328    }
329    if (enable_audio_mpi_so) {
330      defines += [ "AUDIO_MPI_SO" ]
331    }
332    if (enable_audio_adm_service) {
333      defines += [ "AUDIO_ADM_SERVICE" ]
334    }
335    if (enable_audio_mpi_service) {
336      defines += [ "AUDIO_MPI_SERVICE" ]
337    }
338  }
339
340  ###########################end###########################
341  ###########################hdf_audio_hdi_render_volume_test######################
342  ohos_systemtest("hdf_audio_hdi_render_volume_test") {
343    module_out_path = module_output_path
344    sources = [
345      "../../common/hdi_common/src/audio_hdi_common.cpp",
346      "src/audio_hdirender_volume_test.cpp",
347    ]
348
349    include_dirs = [
350      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
351      "//drivers/peripheral/audio/interfaces/include",
352      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
353      "//drivers/adapter/uhdf2/include/hdi",
354      "//drivers/adapter/uhdf2/shared/include",
355      "//drivers/framework/include/core",
356      "//drivers/framework/include/utils",
357      "//drivers/framework/include/osal",
358      "//drivers/framework/include",
359      "//third_party/bounds_checking_function/include",
360      "//drivers/framework/ability/sbuf/include",
361      "//drivers/framework/utils/include",
362      "//drivers/framework/ability/sbuf/include",
363      "//drivers/adapter/uhdf2/osal/include",
364      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
365      "//third_party/googletest/googletest/include/gtest",
366      "//drivers/peripheral/audio/test/systemtest/hdi/render/include",
367    ]
368    cflags = [
369      "-Wall",
370      "-Wextra",
371      "-Werror",
372      "-fsigned-char",
373      "-fno-common",
374      "-fno-strict-aliasing",
375    ]
376    deps = [
377      "//third_party/googletest:gmock_main",
378      "//third_party/googletest:gtest_main",
379    ]
380    defines = []
381    if (enable_audio_adm_so) {
382      defines += [ "AUDIO_ADM_SO" ]
383    }
384    if (enable_audio_mpi_so) {
385      defines += [ "AUDIO_MPI_SO" ]
386    }
387    if (enable_audio_adm_service) {
388      defines += [ "AUDIO_ADM_SERVICE" ]
389    }
390    if (enable_audio_mpi_service) {
391      defines += [ "AUDIO_MPI_SERVICE" ]
392    }
393  }
394
395  ###########################end###########################
396  ###########################hdf_audio_hdi_render_scene_test######################
397  ohos_systemtest("hdf_audio_hdi_render_scene_test") {
398    module_out_path = module_output_path
399    sources = [
400      "../../common/hdi_common/src/audio_hdi_common.cpp",
401      "src/audio_hdirender_scene_test.cpp",
402    ]
403
404    include_dirs = [
405      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
406      "//drivers/peripheral/audio/interfaces/include",
407      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
408      "//drivers/adapter/uhdf2/include/hdi",
409      "//drivers/adapter/uhdf2/shared/include",
410      "//drivers/framework/include/core",
411      "//drivers/framework/include/utils",
412      "//drivers/framework/include/osal",
413      "//drivers/framework/include",
414      "//third_party/bounds_checking_function/include",
415      "//drivers/framework/ability/sbuf/include",
416      "//drivers/framework/utils/include",
417      "//drivers/framework/ability/sbuf/include",
418      "//drivers/adapter/uhdf2/osal/include",
419      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
420      "//third_party/googletest/googletest/include/gtest",
421      "//drivers/peripheral/audio/test/systemtest/hdi/render/include",
422    ]
423    cflags = [
424      "-Wall",
425      "-Wextra",
426      "-Werror",
427      "-fsigned-char",
428      "-fno-common",
429      "-fno-strict-aliasing",
430    ]
431    deps = [
432      "//third_party/googletest:gmock_main",
433      "//third_party/googletest:gtest_main",
434    ]
435    defines = []
436    if (enable_audio_adm_so) {
437      defines += [ "AUDIO_ADM_SO" ]
438    }
439    if (enable_audio_mpi_so) {
440      defines += [ "AUDIO_MPI_SO" ]
441    }
442    if (enable_audio_adm_service) {
443      defines += [ "AUDIO_ADM_SERVICE" ]
444    }
445    if (enable_audio_mpi_service) {
446      defines += [ "AUDIO_MPI_SERVICE" ]
447    }
448  }
449
450  ###########################end###########################
451  ###########################hdf_audio_hdi_render_test######################
452  ohos_systemtest("hdf_audio_hdi_render_test") {
453    module_out_path = module_output_path
454    sources = [
455      "../../common/hdi_common/src/audio_hdi_common.cpp",
456      "src/audio_hdirender_test.cpp",
457    ]
458
459    include_dirs = [
460      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
461      "//drivers/peripheral/audio/interfaces/include",
462      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
463      "//drivers/adapter/uhdf2/include/hdi",
464      "//drivers/adapter/uhdf2/shared/include",
465      "//drivers/framework/include/core",
466      "//drivers/framework/include/utils",
467      "//drivers/framework/include/osal",
468      "//drivers/framework/include",
469      "//third_party/bounds_checking_function/include",
470      "//drivers/framework/ability/sbuf/include",
471      "//drivers/framework/utils/include",
472      "//drivers/framework/ability/sbuf/include",
473      "//drivers/adapter/uhdf2/osal/include",
474      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
475      "//third_party/googletest/googletest/include/gtest",
476      "//drivers/peripheral/audio/test/systemtest/hdi/render/include",
477    ]
478    cflags = [
479      "-Wall",
480      "-Wextra",
481      "-Werror",
482      "-fsigned-char",
483      "-fno-common",
484      "-fno-strict-aliasing",
485    ]
486    deps = [
487      "//third_party/googletest:gmock_main",
488      "//third_party/googletest:gtest_main",
489    ]
490    defines = []
491    if (enable_audio_adm_so) {
492      defines += [ "AUDIO_ADM_SO" ]
493    }
494    if (enable_audio_mpi_so) {
495      defines += [ "AUDIO_MPI_SO" ]
496    }
497    if (enable_audio_adm_service) {
498      defines += [ "AUDIO_ADM_SERVICE" ]
499    }
500    if (enable_audio_mpi_service) {
501      defines += [ "AUDIO_MPI_SERVICE" ]
502    }
503  }
504}
505###########################end###########################
506