blob: 895204616384a711533a6945311562e812baa980 [file] [log] [blame]
Dan Willemsenc017c202016-09-12 16:15:40 -07001// Build the unit tests for audio_utils
2
3cc_test {
4 name: "primitives_tests",
Dan Willemsen19227262016-09-12 18:43:04 -07005 host_supported: true,
Dan Willemsenc017c202016-09-12 16:15:40 -07006
7 shared_libs: [
8 "liblog",
9 "libcutils",
Dan Willemsenc017c202016-09-12 16:15:40 -070010 ],
11 srcs: ["primitives_tests.cpp"],
12 cflags: [
13 "-Werror",
14 "-Wall",
15 ],
Dan Willemsen19227262016-09-12 18:43:04 -070016 target: {
17 android: {
Kevin Rocard0e586f42018-01-24 06:09:44 +000018 shared_libs: ["libaudioutils"],
Dan Willemsen19227262016-09-12 18:43:04 -070019 },
20 host: {
Kevin Rocard0e586f42018-01-24 06:09:44 +000021 static_libs: ["libaudioutils"],
Dan Willemsen19227262016-09-12 18:43:04 -070022 },
23 }
Dan Willemsenc017c202016-09-12 16:15:40 -070024}
25
26cc_binary {
Kevin Rocard2d98fd32017-11-09 22:12:51 -080027 name: "primitives_benchmark",
28 host_supported: true,
Kevin Rocard4db50572017-11-15 09:09:29 -080029 target: {
30 darwin: {
31 enabled: false,
32 },
33 },
Kevin Rocard2d98fd32017-11-09 22:12:51 -080034
35 srcs: ["primitives_benchmark.cpp"],
36 cflags: [
37 "-Werror",
38 "-Wall",
39 ],
40 static_libs: [
41 "libgoogle-benchmark",
Kevin Rocard0e586f42018-01-24 06:09:44 +000042 "libaudioutils",
Kevin Rocard2d98fd32017-11-09 22:12:51 -080043 ],
44}
45
46cc_binary {
Dan Willemsenc017c202016-09-12 16:15:40 -070047 name: "fifo_tests",
48 host_supported: true,
49 srcs: ["fifo_tests.cpp"],
Kevin Rocard0e586f42018-01-24 06:09:44 +000050 shared_libs: ["libaudioutils"],
Dan Willemsenc017c202016-09-12 16:15:40 -070051 static_libs: ["libsndfile"],
52 cflags: [
53 "-Werror",
54 "-Wall",
55 ],
56}
57
Glenn Kasten39a75cc2016-09-12 09:35:05 -070058cc_binary {
59 name: "fifo_multiprocess",
60 host_supported: false,
61 srcs: ["fifo_multiprocess.cpp"],
Kevin Rocard0e586f42018-01-24 06:09:44 +000062 shared_libs: ["libaudioutils", "libcutils"],
Glenn Kasten39a75cc2016-09-12 09:35:05 -070063 static_libs: ["libsndfile"],
64 cflags: [
65 "-Werror",
66 "-Wall",
67 ],
68}
69
Dan Willemsenc017c202016-09-12 16:15:40 -070070cc_binary_host {
Dan Willemsen03e86bd2016-09-12 21:34:12 -070071 name: "fifo_threads",
72 // TODO move getch.c and .h to a utility library
73 srcs: [
74 "fifo_threads.cpp",
75 "getch.c",
76 ],
77 static_libs: [
Kevin Rocard0e586f42018-01-24 06:09:44 +000078 "libaudioutils",
Dan Willemsen03e86bd2016-09-12 21:34:12 -070079 "liblog",
80 ],
81 cflags: [
82 "-Werror",
83 "-Wall",
84 ],
85}
86
87cc_binary_host {
Dan Willemsenc017c202016-09-12 16:15:40 -070088 name: "limiter_tests",
89 srcs: ["limiter_tests.c"],
Kevin Rocard0e586f42018-01-24 06:09:44 +000090 static_libs: ["libaudioutils"],
Dan Willemsenc017c202016-09-12 16:15:40 -070091 cflags: [
92 "-Werror",
93 "-Wall",
Dan Willemsen03e86bd2016-09-12 21:34:12 -070094 "-UNDEBUG",
Dan Willemsenc017c202016-09-12 16:15:40 -070095 ],
96}
Andy Hung459a2a32017-03-20 09:24:53 -070097
98cc_test {
99 name: "power_tests",
100 host_supported: true,
101
102 shared_libs: [
103 "libcutils",
104 "liblog",
105 ],
106 srcs: ["power_tests.cpp"],
107 cflags: [
108 "-Wall",
109 "-Werror",
110 "-Wextra",
111 ],
112 target: {
113 android: {
Kevin Rocard0e586f42018-01-24 06:09:44 +0000114 shared_libs: ["libaudioutils"],
Andy Hung459a2a32017-03-20 09:24:53 -0700115 },
116 host: {
Kevin Rocard0e586f42018-01-24 06:09:44 +0000117 static_libs: ["libaudioutils"],
Andy Hung459a2a32017-03-20 09:24:53 -0700118 },
119 }
120}
Andy Hungbe289a82017-03-23 16:17:35 -0700121
122cc_test {
123 name: "errorlog_tests",
124 host_supported: false,
125
126 shared_libs: [
127 "libcutils",
128 "liblog",
129 ],
130 srcs: ["errorlog_tests.cpp"],
131 cflags: [
132 "-Wall",
133 "-Werror",
134 "-Wextra",
135 ],
136 target: {
137 android: {
Kevin Rocard0e586f42018-01-24 06:09:44 +0000138 shared_libs: ["libaudioutils"],
Andy Hungbe289a82017-03-23 16:17:35 -0700139 },
140 host: {
Kevin Rocard0e586f42018-01-24 06:09:44 +0000141 static_libs: ["libaudioutils"],
Andy Hungbe289a82017-03-23 16:17:35 -0700142 },
143 }
144}
145
146cc_test {
147 name: "powerlog_tests",
148 host_supported: false,
149
150 shared_libs: [
151 "libcutils",
152 "liblog",
153 ],
154 srcs: ["powerlog_tests.cpp"],
155 cflags: [
156 "-Wall",
157 "-Werror",
158 "-Wextra",
159 ],
160 target: {
161 android: {
Kevin Rocard0e586f42018-01-24 06:09:44 +0000162 shared_libs: ["libaudioutils"],
Andy Hungbe289a82017-03-23 16:17:35 -0700163 },
164 host: {
Kevin Rocard0e586f42018-01-24 06:09:44 +0000165 static_libs: ["libaudioutils"],
Andy Hungbe289a82017-03-23 16:17:35 -0700166 },
167 }
168}
169
170cc_test {
171 name: "simplelog_tests",
172 host_supported: false,
173
174 shared_libs: [
175 "libcutils",
176 "liblog",
177 ],
178 srcs: ["simplelog_tests.cpp"],
179 cflags: [
180 "-Wall",
181 "-Werror",
182 "-Wextra",
183 ],
184 target: {
185 android: {
Kevin Rocard0e586f42018-01-24 06:09:44 +0000186 shared_libs: ["libaudioutils"],
Andy Hungbe289a82017-03-23 16:17:35 -0700187 },
188 host: {
Kevin Rocard0e586f42018-01-24 06:09:44 +0000189 static_libs: ["libaudioutils"],
Andy Hungbe289a82017-03-23 16:17:35 -0700190 },
191 }
192}
Andy Hung09bddf22017-12-01 13:24:52 -0800193
194cc_test {
195 name: "channels_tests",
196 host_supported: true,
197
198 shared_libs: [
199 "libcutils",
200 "liblog",
201 ],
202 srcs: ["channels_tests.cpp"],
203 cflags: [
204 "-Wall",
205 "-Werror",
206 ],
207 target: {
208 android: {
Kevin Rocard0e586f42018-01-24 06:09:44 +0000209 shared_libs: ["libaudioutils"],
Andy Hung09bddf22017-12-01 13:24:52 -0800210 },
211 host: {
Kevin Rocard0e586f42018-01-24 06:09:44 +0000212 static_libs: ["libaudioutils"],
Andy Hung09bddf22017-12-01 13:24:52 -0800213 },
214 }
215}
Andy Hungc5e409a2018-04-17 18:13:05 -0700216
217cc_test {
218 name: "string_tests",
219 host_supported: false,
220
221 shared_libs: ["libaudioutils"],
222 srcs: ["string_tests.cpp"],
223 cflags: [
224 "-Wall",
225 "-Werror",
226 ],
227}