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