OSDN Git Service

Audio V4: Split system and vendor Audio.h
[android-x86/system-media.git] / audio_utils / tests / Android.bp
1 // Build the unit tests for audio_utils
2
3 cc_test {
4     name: "primitives_tests",
5     host_supported: true,
6
7     shared_libs: [
8         "liblog",
9         "libcutils",
10     ],
11     srcs: ["primitives_tests.cpp"],
12     cflags: [
13         "-Werror",
14         "-Wall",
15     ],
16     target: {
17         android: {
18             shared_libs: ["libaudioutils_system"],
19         },
20         host: {
21             static_libs: ["libaudioutils_system"],
22         },
23     }
24 }
25
26 cc_binary {
27     name: "primitives_benchmark",
28     host_supported: true,
29     target: {
30         darwin: {
31             enabled: false,
32         },
33     },
34
35     srcs: ["primitives_benchmark.cpp"],
36     cflags: [
37         "-Werror",
38         "-Wall",
39     ],
40     static_libs: [
41         "libgoogle-benchmark",
42         "libaudioutils_system",
43     ],
44 }
45
46 cc_binary {
47     name: "fifo_tests",
48     host_supported: true,
49     srcs: ["fifo_tests.cpp"],
50     shared_libs: ["libaudioutils_system"],
51     static_libs: ["libsndfile"],
52     cflags: [
53         "-Werror",
54         "-Wall",
55     ],
56 }
57
58 cc_binary {
59     name: "fifo_multiprocess",
60     host_supported: false,
61     srcs: ["fifo_multiprocess.cpp"],
62     shared_libs: ["libaudioutils_system", "libcutils"],
63     static_libs: ["libsndfile"],
64     cflags: [
65         "-Werror",
66         "-Wall",
67     ],
68 }
69
70 cc_binary_host {
71     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_system",
79         "liblog",
80     ],
81     cflags: [
82         "-Werror",
83         "-Wall",
84     ],
85 }
86
87 cc_binary_host {
88     name: "limiter_tests",
89     srcs: ["limiter_tests.c"],
90     static_libs: ["libaudioutils_system"],
91     cflags: [
92         "-Werror",
93         "-Wall",
94         "-UNDEBUG",
95     ],
96 }
97
98 cc_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_system"],
115         },
116         host: {
117             static_libs: ["libaudioutils_system"],
118         },
119     }
120 }
121
122 cc_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_system"],
139         },
140         host: {
141             static_libs: ["libaudioutils_system"],
142         },
143     }
144 }
145
146 cc_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_system"],
163         },
164         host: {
165             static_libs: ["libaudioutils_system"],
166         },
167     }
168 }
169
170 cc_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_system"],
187         },
188         host: {
189             static_libs: ["libaudioutils_system"],
190         },
191     }
192 }
193
194 cc_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: {
209             shared_libs: ["libaudioutils_system"],
210         },
211         host: {
212             static_libs: ["libaudioutils_system"],
213         },
214     }
215 }