blob: 1ffe16de7889abfb89f73d77868144b18851bb76 [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: {
18 shared_libs: ["libaudioutils"],
19 },
20 host: {
21 static_libs: ["libaudioutils"],
22 },
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",
42 "libaudioutils",
43 ],
44}
45
46cc_binary {
Dan Willemsenc017c202016-09-12 16:15:40 -070047 name: "fifo_tests",
48 host_supported: true,
49 srcs: ["fifo_tests.cpp"],
50 shared_libs: ["libaudioutils"],
51 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"],
62 shared_libs: ["libaudioutils", "libcutils"],
63 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: [
78 "libaudioutils",
79 "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"],
90 static_libs: ["libaudioutils"],
91 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: {
114 shared_libs: ["libaudioutils"],
115 },
116 host: {
117 static_libs: ["libaudioutils"],
118 },
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: {
138 shared_libs: ["libaudioutils"],
139 },
140 host: {
141 static_libs: ["libaudioutils"],
142 },
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: {
162 shared_libs: ["libaudioutils"],
163 },
164 host: {
165 static_libs: ["libaudioutils"],
166 },
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: {
186 shared_libs: ["libaudioutils"],
187 },
188 host: {
189 static_libs: ["libaudioutils"],
190 },
191 }
192}