• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2017 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17package {
18    default_team: "trendy_team_android_media_audio_framework",
19    // See: http://go/android-license-faq
20    // A large-scale-change added 'default_applicable_licenses' to import
21    // all of the 'license_kinds' from "hardware_interfaces_license"
22    // to get the below license kinds:
23    //   SPDX-license-identifier-Apache-2.0
24    default_applicable_licenses: ["hardware_interfaces_license"],
25}
26
27cc_defaults {
28    name: "VtsHalAudioTargetTest_defaults",
29    defaults: ["VtsHalTargetTestDefaults"],
30    static_libs: [
31        "android.hardware.audio.common.test.utility",
32        "audioclient-types-aidl-cpp",
33        "libaudioclient_aidl_conversion",
34        "libaudio_aidl_conversion_common_cpp",
35        "libstagefright_foundation",
36    ],
37    shared_libs: [
38        "libbinder",
39        "libcutils",
40        "libfmq",
41        "libxml2",
42    ],
43    header_libs: [
44        "android.hardware.audio.common.util@all-versions",
45    ],
46    test_suites: [
47        "general-tests",
48        "vts",
49    ],
50}
51
52cc_test {
53    name: "VtsHalAudioV2_0TargetTest",
54    defaults: [
55        "VtsHalAudioTargetTest_defaults",
56        "latest_android_media_audio_common_types_cpp_static",
57    ],
58    tidy_timeout_srcs: [
59        "2.0/AudioPrimaryHidlHalTest.cpp",
60    ],
61    srcs: [
62        "2.0/AudioPrimaryHidlHalTest.cpp",
63    ],
64    static_libs: [
65        "libaudiofoundation",
66        "libaudiopolicycomponents",
67        "libmedia_helper",
68        "android.hardware.audio@2.0",
69        "android.hardware.audio.common@2.0",
70    ],
71    cflags: [
72        "-DMAJOR_VERSION=2",
73        "-DMINOR_VERSION=0",
74        "-include common/all-versions/VersionMacro.h",
75    ],
76    data: [
77        ":audio_policy_configuration_V2_0",
78    ],
79    // Use test_config for vts suite.
80    // TODO(b/146104851): Add auto-gen rules and remove it.
81    test_config: "VtsHalAudioV2_0TargetTest.xml",
82}
83
84cc_test {
85    name: "VtsHalAudioV4_0TargetTest",
86    defaults: [
87        "VtsHalAudioTargetTest_defaults",
88        "latest_android_media_audio_common_types_cpp_static",
89    ],
90    tidy_timeout_srcs: [
91        "4.0/AudioPrimaryHidlHalTest.cpp",
92    ],
93    srcs: [
94        "4.0/AudioPrimaryHidlHalTest.cpp",
95    ],
96    static_libs: [
97        "libaudiofoundation",
98        "libaudiopolicycomponents",
99        "libmedia_helper",
100        "android.hardware.audio@4.0",
101        "android.hardware.audio.common@4.0",
102    ],
103    cflags: [
104        "-DMAJOR_VERSION=4",
105        "-DMINOR_VERSION=0",
106        "-include common/all-versions/VersionMacro.h",
107    ],
108    data: [
109        ":audio_policy_configuration_V4_0",
110    ],
111    // Use test_config for vts suite.
112    // TODO(b/146104851): Add auto-gen rules and remove it.
113    test_config: "VtsHalAudioV4_0TargetTest.xml",
114}
115
116cc_test {
117    name: "VtsHalAudioV5_0TargetTest",
118    defaults: [
119        "VtsHalAudioTargetTest_defaults",
120        "latest_android_media_audio_common_types_cpp_static",
121    ],
122    srcs: [
123        "5.0/AudioPrimaryHidlHalTest.cpp",
124    ],
125    static_libs: [
126        "libaudiofoundation",
127        "libaudiopolicycomponents",
128        "libmedia_helper",
129        "android.hardware.audio@5.0",
130        "android.hardware.audio.common@5.0",
131    ],
132    cflags: [
133        "-DMAJOR_VERSION=5",
134        "-DMINOR_VERSION=0",
135        "-include common/all-versions/VersionMacro.h",
136    ],
137    data: [
138        ":audio_policy_configuration_V5_0",
139    ],
140    // Use test_config for vts suite.
141    // TODO(b/146104851): Add auto-gen rules and remove it.
142    test_config: "VtsHalAudioV5_0TargetTest.xml",
143}
144
145cc_test {
146    name: "VtsHalAudioV6_0TargetTest",
147    defaults: [
148        "VtsHalAudioTargetTest_defaults",
149        "latest_android_media_audio_common_types_cpp_static",
150    ],
151    tidy_timeout_srcs: [
152        "6.0/AudioPrimaryHidlHalTest.cpp",
153    ],
154    srcs: [
155        "6.0/AudioPrimaryHidlHalTest.cpp",
156        "6.0/Generators.cpp",
157    ],
158    static_libs: [
159        "libaudiofoundation",
160        "libaudiopolicycomponents",
161        "libmedia_helper",
162        "android.hardware.audio@6.0",
163        "android.hardware.audio.common@6.0",
164    ],
165    cflags: [
166        "-DMAJOR_VERSION=6",
167        "-DMINOR_VERSION=0",
168        "-include common/all-versions/VersionMacro.h",
169    ],
170    data: [
171        ":audio_policy_configuration_V6_0",
172    ],
173    // Use test_config for vts suite.
174    // TODO(b/146104851): Add auto-gen rules and remove it.
175    test_config: "VtsHalAudioV6_0TargetTest.xml",
176}
177
178cc_test {
179    name: "VtsHalAudioV7_0TargetTest",
180    defaults: ["VtsHalAudioTargetTest_defaults"],
181    tidy_timeout_srcs: [
182        "7.0/AudioPrimaryHidlHalTest.cpp",
183    ],
184    srcs: [
185        "7.0/AudioPrimaryHidlHalTest.cpp",
186        "7.0/Generators.cpp",
187        "7.0/PolicyConfig.cpp",
188    ],
189    generated_headers: ["audio_policy_configuration_V7_0_parser"],
190    generated_sources: ["audio_policy_configuration_V7_0_parser"],
191    static_libs: [
192        "android.hardware.audio@7.0",
193        "android.hardware.audio.common@7.0",
194        "android.hardware.audio.common@7.0-enums",
195        "android.hardware.audio.common@7.0-util",
196    ],
197    cflags: [
198        "-DMAJOR_VERSION=7",
199        "-DMINOR_VERSION=0",
200        "-include common/all-versions/VersionMacro.h",
201    ],
202    data: [
203        ":audio_policy_configuration_V7_0",
204        "data/sine882hz3s.mp3",
205    ],
206    // Use test_config for vts suite.
207    // TODO(b/146104851): Add auto-gen rules and remove it.
208    test_config: "VtsHalAudioV7_0TargetTest.xml",
209}
210
211cc_test {
212    name: "VtsHalAudioV7_1TargetTest",
213    defaults: ["VtsHalAudioTargetTest_defaults"],
214    srcs: [
215        "7.1/AudioPrimaryHidlHalTest.cpp",
216        "7.0/Generators.cpp",
217        "7.0/PolicyConfig.cpp",
218    ],
219    generated_headers: ["audio_policy_configuration_V7_1_parser"],
220    generated_sources: ["audio_policy_configuration_V7_1_parser"],
221    static_libs: [
222        "android.hardware.audio@7.0",
223        "android.hardware.audio@7.1",
224        "android.hardware.audio.common@7.0",
225        "android.hardware.audio.common@7.0-enums",
226        "android.hardware.audio.common@7.1-enums",
227        "android.hardware.audio.common@7.1-util",
228    ],
229    cflags: [
230        "-DMAJOR_VERSION=7",
231        "-DMINOR_VERSION=1",
232        "-DCOMMON_TYPES_MINOR_VERSION=0",
233        "-DCORE_TYPES_MINOR_VERSION=0",
234        "-include common/all-versions/VersionMacro.h",
235    ],
236    data: [
237        ":audio_policy_configuration_V7_1",
238        "data/sine882hz3s.mp3",
239    ],
240    // Use test_config for vts suite.
241    // TODO(b/146104851): Add auto-gen rules and remove it.
242    test_config: "VtsHalAudioV7_1TargetTest.xml",
243}
244
245// Note: the following aren't VTS tests, but rather unit tests
246// to verify correctness of test utilities.
247cc_test {
248    name: "HalAudioStreamWorkerTest",
249    host_supported: true,
250    srcs: [
251        "tests/streamworker_tests.cpp",
252    ],
253}
254
255cc_test {
256    name: "HalAudioV6_0GeneratorTest",
257    defaults: [
258        "VtsHalAudioTargetTest_defaults",
259        "latest_android_media_audio_common_types_cpp_static",
260    ],
261    srcs: [
262        "6.0/Generators.cpp",
263        "tests/generators_tests.cpp",
264    ],
265    static_libs: [
266        "android.hardware.audio@6.0",
267        "android.hardware.audio.common@6.0",
268        "libaudiofoundation",
269        "libaudiopolicycomponents",
270        "libmedia_helper",
271    ],
272    cflags: [
273        "-DMAJOR_VERSION=6",
274        "-DMINOR_VERSION=0",
275        "-include common/all-versions/VersionMacro.h",
276    ],
277    data: [
278        "tests/apm_config_no_vx.xml",
279        "tests/apm_config_with_vx.xml",
280        "tests/apm_config_b_205808571_6_0.xml",
281    ],
282    test_config: "tests/HalAudioV6_0GeneratorTest.xml",
283}
284
285cc_test {
286    name: "HalAudioV7_0GeneratorTest",
287    defaults: ["VtsHalAudioTargetTest_defaults"],
288    srcs: [
289        "7.0/Generators.cpp",
290        "7.0/PolicyConfig.cpp",
291        "tests/generators_tests.cpp",
292    ],
293    generated_headers: ["audio_policy_configuration_V7_0_parser"],
294    generated_sources: ["audio_policy_configuration_V7_0_parser"],
295    static_libs: [
296        "android.hardware.audio@7.0",
297        "android.hardware.audio.common@7.0",
298        "android.hardware.audio.common@7.0-enums",
299        "android.hardware.audio.common@7.0-util",
300    ],
301    cflags: [
302        "-DMAJOR_VERSION=7",
303        "-DMINOR_VERSION=0",
304        "-include common/all-versions/VersionMacro.h",
305    ],
306    data: [
307        "tests/apm_config_no_vx_7_0.xml",
308        "tests/apm_config_with_vx_7_0.xml",
309        "tests/apm_config_b_204314749_7_0.xml",
310        "tests/apm_config_b_205808571_7_0.xml",
311    ],
312    test_config: "tests/HalAudioV7_0GeneratorTest.xml",
313}
314