1// Build the unit tests for audio_utils 2 3cc_test { 4 name: "fdtostring_tests", 5 host_supported: false, 6 7 shared_libs: [ 8 "libcutils", 9 "liblog", 10 "libutils", //for systemTime 11 ], 12 srcs: ["fdtostring_tests.cpp"], 13 cflags: [ 14 "-Wall", 15 "-Werror", 16 "-Wextra", 17 ], 18 target: { 19 android: { 20 shared_libs: ["libaudioutils"], 21 }, 22 } 23} 24 25cc_test { 26 name: "primitives_tests", 27 host_supported: true, 28 29 shared_libs: [ 30 "liblog", 31 "libcutils", 32 ], 33 srcs: ["primitives_tests.cpp"], 34 cflags: [ 35 "-Werror", 36 "-Wall", 37 ], 38 target: { 39 android: { 40 shared_libs: ["libaudioutils"], 41 }, 42 host: { 43 static_libs: ["libaudioutils"], 44 }, 45 } 46} 47 48cc_binary { 49 name: "primitives_benchmark", 50 host_supported: true, 51 target: { 52 darwin: { 53 enabled: false, 54 }, 55 }, 56 57 srcs: ["primitives_benchmark.cpp"], 58 cflags: [ 59 "-Werror", 60 "-Wall", 61 ], 62 static_libs: [ 63 "libgoogle-benchmark", 64 "libaudioutils", 65 ], 66} 67 68cc_binary { 69 name: "fifo_tests", 70 host_supported: true, 71 srcs: ["fifo_tests.cpp"], 72 shared_libs: ["libaudioutils"], 73 static_libs: ["libsndfile"], 74 cflags: [ 75 "-Werror", 76 "-Wall", 77 ], 78} 79 80cc_binary { 81 name: "fifo_multiprocess", 82 host_supported: false, 83 srcs: ["fifo_multiprocess.cpp"], 84 shared_libs: ["libaudioutils", "libcutils"], 85 static_libs: ["libsndfile"], 86 cflags: [ 87 "-Werror", 88 "-Wall", 89 ], 90} 91 92cc_binary_host { 93 name: "fifo_threads", 94 // TODO move getch.c and .h to a utility library 95 srcs: [ 96 "fifo_threads.cpp", 97 "getch.c", 98 ], 99 static_libs: [ 100 "libaudioutils", 101 "liblog", 102 ], 103 cflags: [ 104 "-Werror", 105 "-Wall", 106 ], 107} 108 109cc_binary_host { 110 name: "limiter_tests", 111 srcs: ["limiter_tests.c"], 112 static_libs: ["libaudioutils"], 113 cflags: [ 114 "-Werror", 115 "-Wall", 116 "-UNDEBUG", 117 ], 118} 119 120cc_test { 121 name: "power_tests", 122 host_supported: true, 123 124 shared_libs: [ 125 "libcutils", 126 "liblog", 127 ], 128 srcs: ["power_tests.cpp"], 129 cflags: [ 130 "-Wall", 131 "-Werror", 132 "-Wextra", 133 ], 134 target: { 135 android: { 136 shared_libs: ["libaudioutils"], 137 }, 138 host: { 139 static_libs: ["libaudioutils"], 140 }, 141 } 142} 143 144cc_test { 145 name: "errorlog_tests", 146 host_supported: false, 147 148 shared_libs: [ 149 "libcutils", 150 "liblog", 151 ], 152 srcs: ["errorlog_tests.cpp"], 153 cflags: [ 154 "-Wall", 155 "-Werror", 156 "-Wextra", 157 ], 158 target: { 159 android: { 160 shared_libs: ["libaudioutils"], 161 }, 162 host: { 163 static_libs: ["libaudioutils"], 164 }, 165 } 166} 167 168cc_test { 169 name: "powerlog_tests", 170 host_supported: false, 171 172 shared_libs: [ 173 "libcutils", 174 "liblog", 175 ], 176 srcs: ["powerlog_tests.cpp"], 177 cflags: [ 178 "-Wall", 179 "-Werror", 180 "-Wextra", 181 ], 182 target: { 183 android: { 184 shared_libs: ["libaudioutils"], 185 }, 186 host: { 187 static_libs: ["libaudioutils"], 188 }, 189 } 190} 191 192cc_test { 193 name: "simplelog_tests", 194 host_supported: false, 195 196 shared_libs: [ 197 "libcutils", 198 "liblog", 199 ], 200 srcs: ["simplelog_tests.cpp"], 201 cflags: [ 202 "-Wall", 203 "-Werror", 204 "-Wextra", 205 ], 206 target: { 207 android: { 208 shared_libs: ["libaudioutils"], 209 }, 210 host: { 211 static_libs: ["libaudioutils"], 212 }, 213 } 214} 215 216cc_test { 217 name: "channels_tests", 218 host_supported: true, 219 220 shared_libs: [ 221 "libcutils", 222 "liblog", 223 ], 224 srcs: ["channels_tests.cpp"], 225 cflags: [ 226 "-Wall", 227 "-Werror", 228 ], 229 target: { 230 android: { 231 shared_libs: ["libaudioutils"], 232 }, 233 host: { 234 static_libs: ["libaudioutils"], 235 }, 236 } 237} 238 239cc_test { 240 name: "string_tests", 241 host_supported: false, 242 243 shared_libs: ["libaudioutils"], 244 srcs: ["string_tests.cpp"], 245 cflags: [ 246 "-Wall", 247 "-Werror", 248 ], 249} 250 251cc_test { 252 name: "format_tests", 253 host_supported: true, 254 255 shared_libs: [ 256 "liblog", 257 ], 258 srcs: ["format_tests.cpp"], 259 cflags: [ 260 "-Werror", 261 "-Wall", 262 ], 263 target: { 264 android: { 265 shared_libs: ["libaudioutils"], 266 }, 267 host: { 268 static_libs: ["libaudioutils"], 269 }, 270 } 271} 272 273cc_test { 274 name: "statistics_tests", 275 host_supported: false, 276 277 shared_libs: ["libaudioutils"], 278 srcs: ["statistics_tests.cpp"], 279 cflags: [ 280 "-Wall", 281 "-Werror", 282 "-Wextra", 283 ], 284} 285 286cc_test { 287 name: "timestampverifier_tests", 288 host_supported: false, 289 290 shared_libs: ["libaudioutils"], 291 srcs: ["timestampverifier_tests.cpp"], 292 cflags: [ 293 "-Wall", 294 "-Werror", 295 "-Wextra", 296 ], 297} 298 299cc_test { 300 name: "variadic_tests", 301 host_supported: false, 302 303 shared_libs: ["libaudioutils"], 304 srcs: ["variadic_tests.cpp"], 305 cflags: [ 306 "-Wall", 307 "-Werror", 308 "-Wextra", 309 ], 310} 311 312cc_test { 313 name: "logplot_tests", 314 host_supported: true, 315 316 shared_libs: [ 317 "liblog", 318 "libcutils", 319 ], 320 srcs: ["logplot_tests.cpp"], 321 cflags: [ 322 "-Werror", 323 "-Wall", 324 ], 325 target: { 326 android: { 327 shared_libs: ["libaudioutils"], 328 }, 329 host: { 330 static_libs: ["libaudioutils"], 331 }, 332 } 333} 334 335cc_binary { 336 name: "statistics_benchmark", 337 host_supported: false, 338 339 srcs: ["statistics_benchmark.cpp"], 340 cflags: [ 341 "-Werror", 342 "-Wall", 343 ], 344 static_libs: [ 345 "libgoogle-benchmark", 346 "libaudioutils", 347 ], 348} 349 350cc_test { 351 name: "sample_tests", 352 host_supported: true, 353 354 shared_libs: [ 355 "liblog", 356 "libcutils", 357 ], 358 srcs: ["sample_tests.cpp"], 359 cflags: [ 360 "-Werror", 361 "-Wall", 362 ], 363 target: { 364 android: { 365 shared_libs: ["libaudioutils"], 366 }, 367 host: { 368 static_libs: ["libaudioutils"], 369 }, 370 } 371} 372