• 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_reliability_test###########################
25  unittest("hdf_audio_hdi_render_reliability_test") {
26    sources = [
27      "../../common/hdi_common/src/audio_hdi_common.cpp",
28      "src/audio_hdirender_reliability_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/utils/include",
39      "//drivers/framework/include",
40      "//drivers/framework/core/sec/include",
41      "//drivers/framework/core/shared/include",
42      "//drivers/framework/core/host/include",
43      "//drivers/framework/core/manager/include",
44      "//drivers/framework/core/common/include/host/",
45      "//third_party/bounds_checking_function/include",
46      "//drivers/adapter/khdf/liteos/osal/include",
47      "//drivers/adapter/uhdf2/shared/include",
48      "//drivers/adapter/uhdf2/include/hdi/",
49      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
50      "//third_party/googletest/googletest/include/gtest",
51      "//drivers/peripheral/audio/test/systemtest/hdi/hdireliability/include",
52    ]
53    cflags = [
54      "-Wall",
55      "-Wextra",
56      "-Werror",
57      "-fsigned-char",
58      "-fno-common",
59      "-fno-strict-aliasing",
60      "-std=c++11",
61    ]
62
63    deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
64  }
65
66  ###########################end###########################
67  ###########################hdf_audio_hdi_capture_reliability_test###########################
68  unittest("hdf_audio_hdi_capture_reliability_test") {
69    sources = [
70      "../../common/hdi_common/src/audio_hdi_common.cpp",
71      "src/audio_hdicapture_reliability_test.cpp",
72    ]
73
74    include_dirs = [
75      "//drivers/peripheral/audio/interfaces/include",
76      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
77      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
78      "//drivers/framework/include/core",
79      "//drivers/framework/include/utils",
80      "//drivers/framework/include/osal",
81      "//drivers/framework/utils/include",
82      "//drivers/framework/include",
83      "//drivers/framework/core/sec/include",
84      "//drivers/framework/core/shared/include",
85      "//drivers/framework/core/host/include",
86      "//drivers/framework/core/manager/include",
87      "//drivers/framework/core/common/include/host/",
88      "//third_party/bounds_checking_function/include",
89      "//drivers/adapter/khdf/liteos/osal/include",
90      "//drivers/adapter/uhdf2/shared/include",
91      "//drivers/adapter/uhdf2/include/hdi/",
92      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
93      "//third_party/googletest/googletest/include/gtest",
94      "//drivers/peripheral/audio/test/systemtest/hdi/hdireliability/include",
95    ]
96
97    deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
98  }
99
100  ###########################end###########################
101  ###########################hdf_audio_hdi_capture_control_reliability_test###########################
102  unittest("hdf_audio_hdi_capture_control_reliability_test") {
103    sources = [
104      "../../common/hdi_common/src/audio_hdi_common.cpp",
105      "src/audio_hdicapture_control_reliability_test.cpp",
106    ]
107
108    include_dirs = [
109      "//drivers/peripheral/audio/interfaces/include",
110      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
111      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
112      "//drivers/framework/include/core",
113      "//drivers/framework/include/utils",
114      "//drivers/framework/include/osal",
115      "//drivers/framework/utils/include",
116      "//drivers/framework/include",
117      "//drivers/framework/core/sec/include",
118      "//drivers/framework/core/shared/include",
119      "//drivers/framework/core/host/include",
120      "//drivers/framework/core/manager/include",
121      "//drivers/framework/core/common/include/host/",
122      "//third_party/bounds_checking_function/include",
123      "//drivers/adapter/khdf/liteos/osal/include",
124      "//drivers/adapter/uhdf2/shared/include",
125      "//drivers/adapter/uhdf2/include/hdi/",
126      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
127      "//third_party/googletest/googletest/include/gtest",
128      "//drivers/peripheral/audio/test/systemtest/hdi/hdireliability/include",
129    ]
130
131    deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
132  }
133
134  ###########################end###########################
135  ###########################hdf_audio_hdi_render_control_reliability_test###########################
136  unittest("hdf_audio_hdi_render_control_reliability_test") {
137    sources = [
138      "../../common/hdi_common/src/audio_hdi_common.cpp",
139      "src/audio_hdirender_control_reliability_test.cpp",
140    ]
141
142    include_dirs = [
143      "//drivers/peripheral/audio/interfaces/include",
144      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
145      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
146      "//drivers/framework/include/core",
147      "//drivers/framework/include/utils",
148      "//drivers/framework/include/osal",
149      "//drivers/framework/utils/include",
150      "//drivers/framework/include",
151      "//drivers/framework/core/sec/include",
152      "//drivers/framework/core/shared/include",
153      "//drivers/framework/core/host/include",
154      "//drivers/framework/core/manager/include",
155      "//drivers/framework/core/common/include/host/",
156      "//third_party/bounds_checking_function/include",
157      "//drivers/adapter/khdf/liteos/osal/include",
158      "//drivers/adapter/uhdf2/shared/include",
159      "//drivers/adapter/uhdf2/include/hdi/",
160      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
161      "//third_party/googletest/googletest/include/gtest",
162      "//drivers/peripheral/audio/test/systemtest/hdi/hdireliability/include",
163    ]
164
165    deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
166  }
167} else {
168  ###########################systemtest##############################
169  module_output_path = "audio_device_driver/audio"
170
171  ###########################hdf_audio_hdi_render_reliability_test###########################
172  ohos_systemtest("hdf_audio_hdi_render_reliability_test") {
173    module_out_path = module_output_path
174    sources = [
175      "../../common/hdi_common/src/audio_hdi_common.cpp",
176      "src/audio_hdirender_reliability_test.cpp",
177    ]
178
179    include_dirs = [
180      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
181      "//drivers/peripheral/audio/interfaces/include",
182      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
183      "//third_party/bounds_checking_function/include",
184      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
185      "//third_party/googletest/googletest/include/gtest",
186      "//drivers/peripheral/audio/test/systemtest/hdi/hdireliability/include",
187    ]
188    deps = [
189      "//third_party/googletest:gmock_main",
190      "//third_party/googletest:gtest_main",
191    ]
192    external_deps = [
193      "device_driver_framework:libhdf_utils",
194      "utils_base:utils",
195    ]
196    cflags = [
197      "-Wall",
198      "-Wextra",
199      "-Werror",
200      "-fsigned-char",
201      "-fno-common",
202      "-fno-strict-aliasing",
203    ]
204    defines = []
205    if (enable_audio_adm_so) {
206      defines += [ "AUDIO_ADM_SO" ]
207    }
208    if (enable_audio_mpi_so) {
209      defines += [ "AUDIO_MPI_SO" ]
210    }
211    if (enable_audio_adm_service) {
212      defines += [ "AUDIO_ADM_SERVICE" ]
213    }
214    if (enable_audio_mpi_service) {
215      defines += [ "AUDIO_MPI_SERVICE" ]
216    }
217  }
218
219  ###########################end###########################
220  ###########################hdf_audio_hdi_capture_reliability_test###########################
221  ohos_systemtest("hdf_audio_hdi_capture_reliability_test") {
222    module_out_path = module_output_path
223    sources = [
224      "../../common/hdi_common/src/audio_hdi_common.cpp",
225      "src/audio_hdicapture_reliability_test.cpp",
226    ]
227
228    include_dirs = [
229      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
230      "//drivers/peripheral/audio/interfaces/include",
231      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
232      "//third_party/bounds_checking_function/include",
233      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
234      "//third_party/googletest/googletest/include/gtest",
235      "//drivers/peripheral/audio/test/systemtest/hdi/hdireliability/include",
236    ]
237    deps = [
238      "//third_party/googletest:gmock_main",
239      "//third_party/googletest:gtest_main",
240    ]
241    external_deps = [
242      "device_driver_framework:libhdf_utils",
243      "utils_base:utils",
244    ]
245    cflags = [
246      "-Wall",
247      "-Wextra",
248      "-Werror",
249      "-fsigned-char",
250      "-fno-common",
251      "-fno-strict-aliasing",
252    ]
253    defines = []
254    if (enable_audio_adm_so) {
255      defines += [ "AUDIO_ADM_SO" ]
256    }
257    if (enable_audio_mpi_so) {
258      defines += [ "AUDIO_MPI_SO" ]
259    }
260    if (enable_audio_adm_service) {
261      defines += [ "AUDIO_ADM_SERVICE" ]
262    }
263    if (enable_audio_mpi_service) {
264      defines += [ "AUDIO_MPI_SERVICE" ]
265    }
266  }
267
268  ###########################end###########################
269  ###########################hdf_audio_hdi_capture_control_reliability_test###########################
270  ohos_systemtest("hdf_audio_hdi_capture_control_reliability_test") {
271    module_out_path = module_output_path
272    sources = [
273      "../../common/hdi_common/src/audio_hdi_common.cpp",
274      "src/audio_hdicapture_control_reliability_test.cpp",
275    ]
276
277    include_dirs = [
278      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
279      "//drivers/peripheral/audio/interfaces/include",
280      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
281      "//third_party/bounds_checking_function/include",
282      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
283      "//third_party/googletest/googletest/include/gtest",
284      "//drivers/peripheral/audio/test/systemtest/hdi/hdireliability/include",
285    ]
286    deps = [
287      "//third_party/googletest:gmock_main",
288      "//third_party/googletest:gtest_main",
289    ]
290    external_deps = [
291      "device_driver_framework:libhdf_utils",
292      "utils_base:utils",
293    ]
294    cflags = [
295      "-Wall",
296      "-Wextra",
297      "-Werror",
298      "-fsigned-char",
299      "-fno-common",
300      "-fno-strict-aliasing",
301    ]
302    defines = []
303    if (enable_audio_adm_so) {
304      defines += [ "AUDIO_ADM_SO" ]
305    }
306    if (enable_audio_mpi_so) {
307      defines += [ "AUDIO_MPI_SO" ]
308    }
309    if (enable_audio_adm_service) {
310      defines += [ "AUDIO_ADM_SERVICE" ]
311    }
312    if (enable_audio_mpi_service) {
313      defines += [ "AUDIO_MPI_SERVICE" ]
314    }
315  }
316
317  ###########################end###########################
318  ###########################hdf_audio_hdi_render_control_reliability_test###########################
319  ohos_systemtest("hdf_audio_hdi_render_control_reliability_test") {
320    module_out_path = module_output_path
321    sources = [
322      "../../common/hdi_common/src/audio_hdi_common.cpp",
323      "src/audio_hdirender_control_reliability_test.cpp",
324    ]
325
326    include_dirs = [
327      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
328      "//drivers/peripheral/audio/interfaces/include",
329      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
330      "//third_party/bounds_checking_function/include",
331      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
332      "//third_party/googletest/googletest/include/gtest",
333      "//drivers/peripheral/audio/test/systemtest/hdi/hdireliability/include",
334    ]
335    deps = [
336      "//third_party/googletest:gmock_main",
337      "//third_party/googletest:gtest_main",
338    ]
339    external_deps = [
340      "device_driver_framework:libhdf_utils",
341      "utils_base:utils",
342    ]
343    cflags = [
344      "-Wall",
345      "-Wextra",
346      "-Werror",
347      "-fsigned-char",
348      "-fno-common",
349      "-fno-strict-aliasing",
350    ]
351    defines = []
352    if (enable_audio_adm_so) {
353      defines += [ "AUDIO_ADM_SO" ]
354    }
355    if (enable_audio_mpi_so) {
356      defines += [ "AUDIO_MPI_SO" ]
357    }
358    if (enable_audio_adm_service) {
359      defines += [ "AUDIO_ADM_SERVICE" ]
360    }
361    if (enable_audio_mpi_service) {
362      defines += [ "AUDIO_MPI_SERVICE" ]
363    }
364  }
365}
366###########################end###########################
367