Android.bp 6.2 KB

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