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 ], 34 shared_libs: [ 35 "libbinder", 36 "libfmq", 37 "libxml2", 38 ], 39 header_libs: [ 40 "android.hardware.audio.common.util@all-versions", 41 ], 42 test_suites: [ 43 "general-tests", 44 "vts", 45 ], 46} 47 48cc_test { 49 name: "VtsHalAudioV2_0TargetTest", 50 defaults: ["VtsHalAudioTargetTest_defaults"], 51 srcs: [ 52 "2.0/AudioPrimaryHidlHalTest.cpp", 53 ], 54 static_libs: [ 55 "libaudiofoundation", 56 "libaudiopolicycomponents", 57 "libmedia_helper", 58 "android.hardware.audio@2.0", 59 "android.hardware.audio.common@2.0", 60 ], 61 cflags: [ 62 "-DMAJOR_VERSION=2", 63 "-DMINOR_VERSION=0", 64 "-include common/all-versions/VersionMacro.h", 65 ], 66 data: [ 67 ":audio_policy_configuration_V2_0", 68 ], 69 // Use test_config for vts suite. 70 // TODO(b/146104851): Add auto-gen rules and remove it. 71 test_config: "VtsHalAudioV2_0TargetTest.xml", 72} 73 74cc_test { 75 name: "VtsHalAudioV4_0TargetTest", 76 defaults: ["VtsHalAudioTargetTest_defaults"], 77 srcs: [ 78 "4.0/AudioPrimaryHidlHalTest.cpp", 79 ], 80 static_libs: [ 81 "libaudiofoundation", 82 "libaudiopolicycomponents", 83 "libmedia_helper", 84 "android.hardware.audio@4.0", 85 "android.hardware.audio.common@4.0", 86 ], 87 cflags: [ 88 "-DMAJOR_VERSION=4", 89 "-DMINOR_VERSION=0", 90 "-include common/all-versions/VersionMacro.h", 91 ], 92 data: [ 93 ":audio_policy_configuration_V4_0", 94 ], 95 // Use test_config for vts suite. 96 // TODO(b/146104851): Add auto-gen rules and remove it. 97 test_config: "VtsHalAudioV4_0TargetTest.xml", 98} 99 100cc_test { 101 name: "VtsHalAudioV5_0TargetTest", 102 defaults: ["VtsHalAudioTargetTest_defaults"], 103 srcs: [ 104 "5.0/AudioPrimaryHidlHalTest.cpp", 105 ], 106 static_libs: [ 107 "libaudiofoundation", 108 "libaudiopolicycomponents", 109 "libmedia_helper", 110 "android.hardware.audio@5.0", 111 "android.hardware.audio.common@5.0", 112 ], 113 cflags: [ 114 "-DMAJOR_VERSION=5", 115 "-DMINOR_VERSION=0", 116 "-include common/all-versions/VersionMacro.h", 117 ], 118 data: [ 119 ":audio_policy_configuration_V5_0", 120 ], 121 // Use test_config for vts suite. 122 // TODO(b/146104851): Add auto-gen rules and remove it. 123 test_config: "VtsHalAudioV5_0TargetTest.xml", 124} 125 126cc_test { 127 name: "VtsHalAudioV6_0TargetTest", 128 defaults: ["VtsHalAudioTargetTest_defaults"], 129 srcs: [ 130 "6.0/AudioPrimaryHidlHalTest.cpp", 131 "6.0/Generators.cpp", 132 ], 133 static_libs: [ 134 "libaudiofoundation", 135 "libaudiopolicycomponents", 136 "libmedia_helper", 137 "android.hardware.audio@6.0", 138 "android.hardware.audio.common@6.0", 139 ], 140 cflags: [ 141 "-DMAJOR_VERSION=6", 142 "-DMINOR_VERSION=0", 143 "-include common/all-versions/VersionMacro.h", 144 ], 145 data: [ 146 ":audio_policy_configuration_V6_0", 147 ], 148 // Use test_config for vts suite. 149 // TODO(b/146104851): Add auto-gen rules and remove it. 150 test_config: "VtsHalAudioV6_0TargetTest.xml", 151} 152 153cc_test { 154 name: "VtsHalAudioV7_0TargetTest", 155 defaults: ["VtsHalAudioTargetTest_defaults"], 156 srcs: [ 157 "7.0/AudioPrimaryHidlHalTest.cpp", 158 "7.0/Generators.cpp", 159 "7.0/PolicyConfig.cpp", 160 ], 161 generated_headers: ["audio_policy_configuration_V7_0_parser"], 162 generated_sources: ["audio_policy_configuration_V7_0_parser"], 163 static_libs: [ 164 "android.hardware.audio@7.0", 165 "android.hardware.audio.common@7.0", 166 "android.hardware.audio.common@7.0-enums", 167 "android.hardware.audio.common@7.0-util", 168 ], 169 cflags: [ 170 "-DMAJOR_VERSION=7", 171 "-DMINOR_VERSION=0", 172 "-include common/all-versions/VersionMacro.h", 173 ], 174 data: [ 175 ":audio_policy_configuration_V7_0", 176 ], 177 // Use test_config for vts suite. 178 // TODO(b/146104851): Add auto-gen rules and remove it. 179 test_config: "VtsHalAudioV7_0TargetTest.xml", 180} 181 182// Note: the following aren't VTS tests, but rather unit tests 183// to verify correctness of test utilities. 184cc_test { 185 name: "HalAudioStreamWorkerTest", 186 host_supported: true, 187 srcs: [ 188 "tests/streamworker_tests.cpp", 189 ], 190} 191 192cc_test { 193 name: "HalAudioV6_0GeneratorTest", 194 defaults: ["VtsHalAudioTargetTest_defaults"], 195 srcs: [ 196 "6.0/Generators.cpp", 197 "tests/generators_tests.cpp", 198 ], 199 static_libs: [ 200 "android.hardware.audio@6.0", 201 "android.hardware.audio.common@6.0", 202 "libaudiofoundation", 203 "libaudiopolicycomponents", 204 "libmedia_helper", 205 ], 206 cflags: [ 207 "-DMAJOR_VERSION=6", 208 "-DMINOR_VERSION=0", 209 "-include common/all-versions/VersionMacro.h", 210 ], 211 data: [ 212 "tests/apm_config_no_vx.xml", 213 "tests/apm_config_with_vx.xml", 214 "tests/apm_config_b_205808571_6_0.xml", 215 ], 216 test_config: "tests/HalAudioV6_0GeneratorTest.xml", 217} 218 219cc_test { 220 name: "HalAudioV7_0GeneratorTest", 221 defaults: ["VtsHalAudioTargetTest_defaults"], 222 srcs: [ 223 "7.0/Generators.cpp", 224 "7.0/PolicyConfig.cpp", 225 "tests/generators_tests.cpp", 226 ], 227 generated_headers: ["audio_policy_configuration_V7_0_parser"], 228 generated_sources: ["audio_policy_configuration_V7_0_parser"], 229 static_libs: [ 230 "android.hardware.audio@7.0", 231 "android.hardware.audio.common@7.0", 232 "android.hardware.audio.common@7.0-enums", 233 "android.hardware.audio.common@7.0-util", 234 ], 235 cflags: [ 236 "-DMAJOR_VERSION=7", 237 "-DMINOR_VERSION=0", 238 "-include common/all-versions/VersionMacro.h", 239 ], 240 data: [ 241 "tests/apm_config_no_vx_7_0.xml", 242 "tests/apm_config_with_vx_7_0.xml", 243 "tests/apm_config_b_204314749_7_0.xml", 244 "tests/apm_config_b_205808571_7_0.xml", 245 ], 246 test_config: "tests/HalAudioV7_0GeneratorTest.xml", 247} 248