• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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/hdf_core/adapter/uhdf2/uhdf.gni")
19}
20import("//drivers/peripheral/audio/audio.gni")
21
22if (defined(ohos_lite)) {
23  moduletest("hdf_audio_hdi_capture_attr_advance_test") {
24    sources = [
25      "../../../common/hdi_common/src/audio_hdi_common.cpp",
26      "src/audio_hdicapture_attr_test.cpp",
27    ]
28
29    include_dirs = [
30      "//drivers/peripheral/audio/interfaces/include",
31      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
32      "//drivers/hdf_core/framework/include/core",
33      "//drivers/hdf_core/framework/include/utils",
34      "//drivers/hdf_core/framework/include/osal",
35      "//drivers/hdf_core/framework/utils/include",
36      "//drivers/hdf_core/framework/include",
37      "//drivers/hdf_core/framework/core/sec/include",
38      "//drivers/hdf_core/framework/core/shared/include",
39      "//drivers/hdf_core/framework/core/host/include",
40      "//drivers/hdf_core/framework/core/manager/include",
41      "//drivers/hdf_core/framework/core/common/include/host/",
42      "//third_party/bounds_checking_function/include",
43      "//drivers/hdf_core/adapter/khdf/liteos/osal/include",
44      "//drivers/hdf_core/adapter/uhdf2/shared/include",
45      "//drivers/hdf_core/adapter/uhdf2/include/hdi/",
46      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
47      "//third_party/googletest/googletest/include/gtest",
48    ]
49    deps = [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ]
50  }
51  moduletest("hdf_audio_hdi_capture_scene_advance_test") {
52    sources = [
53      "../../../common/hdi_common/src/audio_hdi_common.cpp",
54      "src/audio_hdicapture_scene_test.cpp",
55    ]
56
57    include_dirs = [
58      "//drivers/peripheral/audio/interfaces/include",
59      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
60      "//drivers/hdf_core/framework/include/core",
61      "//drivers/hdf_core/framework/include/utils",
62      "//drivers/hdf_core/framework/include/osal",
63      "//drivers/hdf_core/framework/utils/include",
64      "//drivers/hdf_core/framework/include",
65      "//drivers/hdf_core/framework/core/sec/include",
66      "//drivers/hdf_core/framework/core/shared/include",
67      "//drivers/hdf_core/framework/core/host/include",
68      "//drivers/hdf_core/framework/core/manager/include",
69      "//drivers/hdf_core/framework/core/common/include/host/",
70      "//third_party/bounds_checking_function/include",
71      "//drivers/hdf_core/adapter/khdf/liteos/osal/include",
72      "//drivers/hdf_core/adapter/uhdf2/shared/include",
73      "//drivers/hdf_core/adapter/uhdf2/include/hdi/",
74      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
75      "//third_party/googletest/googletest/include/gtest",
76    ]
77    deps = [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ]
78  }
79  moduletest("hdf_audio_hdi_capture_advance_test") {
80    sources = [
81      "../../../common/hdi_common/src/audio_hdi_common.cpp",
82      "src/audio_hdicapture_test.cpp",
83    ]
84
85    include_dirs = [
86      "//drivers/peripheral/audio/interfaces/include",
87      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
88      "//drivers/hdf_core/framework/include/core",
89      "//drivers/hdf_core/framework/include/utils",
90      "//drivers/hdf_core/framework/include/osal",
91      "//drivers/hdf_core/framework/utils/include",
92      "//drivers/hdf_core/framework/include",
93      "//drivers/hdf_core/framework/core/sec/include",
94      "//drivers/hdf_core/framework/core/shared/include",
95      "//drivers/hdf_core/framework/core/host/include",
96      "//drivers/hdf_core/framework/core/manager/include",
97      "//drivers/hdf_core/framework/core/common/include/host/",
98      "//third_party/bounds_checking_function/include",
99      "//drivers/hdf_core/adapter/khdf/liteos/osal/include",
100      "//drivers/hdf_core/adapter/uhdf2/shared/include",
101      "//drivers/hdf_core/adapter/uhdf2/include/hdi/",
102      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
103      "//third_party/googletest/googletest/include/gtest",
104    ]
105    deps = [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ]
106  }
107} else {
108  module_output_path = "drivers_peripheral_audio/audio"
109
110  ohos_systemtest("hdf_audio_hdi_capture_attr_advance_test") {
111    module_out_path = module_output_path
112    sources = [
113      "../../../common/hdi_common/src/audio_hdi_common.cpp",
114      "src/audio_hdicapture_attr_test.cpp",
115    ]
116
117    include_dirs = [
118      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
119      "//drivers/peripheral/audio/interfaces/include",
120      "//drivers/hdf_core/adapter/uhdf2/include/hdi",
121      "//drivers/hdf_core/adapter/uhdf2/shared/include",
122      "//drivers/hdf_core/framework/include/core",
123      "//drivers/hdf_core/framework/include/utils",
124      "//drivers/hdf_core/framework/include/osal",
125      "//drivers/hdf_core/framework/include",
126      "//third_party/bounds_checking_function/include",
127      "//drivers/hdf_core/framework/utils/include",
128      "//drivers/hdf_core/adapter/uhdf2/osal/include",
129      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
130      "//third_party/googletest/googletest/include/gtest",
131    ]
132
133    deps = [
134      "//third_party/googletest:gmock_main",
135      "//third_party/googletest:gtest_main",
136    ]
137    defines = []
138    if (enable_audio_adm_passthrough) {
139      deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ]
140      defines += [ "AUDIO_ADM_SO" ]
141    }
142    if (enable_audio_adm_service) {
143      deps +=
144          [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ]
145      defines += [ "AUDIO_ADM_SERVICE" ]
146    }
147  }
148  ohos_systemtest("hdf_audio_hdi_capture_scene_advance_test") {
149    module_out_path = module_output_path
150    sources = [
151      "../../../common/hdi_common/src/audio_hdi_common.cpp",
152      "src/audio_hdicapture_scene_test.cpp",
153    ]
154
155    include_dirs = [
156      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
157      "//drivers/peripheral/audio/interfaces/include",
158      "//drivers/hdf_core/adapter/uhdf2/include/hdi",
159      "//drivers/hdf_core/adapter/uhdf2/shared/include",
160      "//drivers/hdf_core/framework/include/core",
161      "//drivers/hdf_core/framework/include/utils",
162      "//drivers/hdf_core/framework/include/osal",
163      "//drivers/hdf_core/framework/include",
164      "//third_party/bounds_checking_function/include",
165      "//drivers/hdf_core/framework/utils/include",
166      "//drivers/hdf_core/adapter/uhdf2/osal/include",
167      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
168      "//third_party/googletest/googletest/include/gtest",
169    ]
170
171    deps = [
172      "//third_party/googletest:gmock_main",
173      "//third_party/googletest:gtest_main",
174    ]
175    defines = []
176    if (enable_audio_adm_passthrough) {
177      deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ]
178      defines += [ "AUDIO_ADM_SO" ]
179    }
180    if (enable_audio_adm_service) {
181      deps +=
182          [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ]
183      defines += [ "AUDIO_ADM_SERVICE" ]
184    }
185  }
186  ohos_systemtest("hdf_audio_hdi_capture_advance_test") {
187    module_out_path = module_output_path
188    sources = [
189      "../../../common/hdi_common/src/audio_hdi_common.cpp",
190      "src/audio_hdicapture_test.cpp",
191    ]
192
193    include_dirs = [
194      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
195      "//drivers/peripheral/audio/interfaces/include",
196      "//drivers/hdf_core/adapter/uhdf2/include/hdi",
197      "//drivers/hdf_core/adapter/uhdf2/shared/include",
198      "//drivers/hdf_core/framework/include/core",
199      "//drivers/hdf_core/framework/include/utils",
200      "//drivers/hdf_core/framework/include/osal",
201      "//drivers/hdf_core/framework/include",
202      "//third_party/bounds_checking_function/include",
203      "//drivers/hdf_core/framework/utils/include",
204      "//drivers/hdf_core/adapter/uhdf2/osal/include",
205      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
206      "//third_party/googletest/googletest/include/gtest",
207      "//drivers/peripheral/audio/test/systemtest/hdi/common/capture/include",
208    ]
209
210    deps = [
211      "//third_party/googletest:gmock_main",
212      "//third_party/googletest:gtest_main",
213    ]
214    defines = []
215    if (enable_audio_adm_passthrough) {
216      deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ]
217      defines += [ "AUDIO_ADM_SO" ]
218    }
219    if (enable_audio_adm_service) {
220      deps +=
221          [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ]
222      defines += [ "AUDIO_ADM_SERVICE" ]
223    }
224  }
225}
226