blob: 1691e22cbf9f2472b3d05b933a61e0883756f9e9 [file] [log] [blame]
Brian Silverman100534c2015-09-07 15:51:23 -04001package(default_visibility = ['//visibility:public'])
2
3load('/aos/build/queues', 'queue_library')
4
5queue_library(
Austin Schuhf0736512015-09-07 01:22:16 -07006 name = 'test_queue',
7 srcs = [
8 'test_queue.q',
9 ],
10)
Austin Schuhf0736512015-09-07 01:22:16 -070011
12cc_library(
Austin Schuh044e18b2015-10-21 20:17:09 -070013 name = 'math',
14 hdrs = [
15 'commonmath.h',
16 ],
17)
18
19cc_library(
Austin Schuhf0736512015-09-07 01:22:16 -070020 name = 'queue_testutils',
21 srcs = [
22 'queue_testutils.cc',
23 ],
Brian Silverman100534c2015-09-07 15:51:23 -040024 hdrs = [
25 'queue_testutils.h',
26 ],
Austin Schuhf0736512015-09-07 01:22:16 -070027 deps = [
Austin Schuh044e18b2015-10-21 20:17:09 -070028 ':once',
29 ':queues',
Brian Silverman258b9172015-09-19 14:32:57 -040030 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -040031 '//aos/common/logging',
Austin Schuhf0736512015-09-07 01:22:16 -070032 '//aos/linux_code/ipc_lib:shared_mem',
Brian Silvermanf480a612015-09-13 02:22:01 -040033 '//aos/linux_code/ipc_lib:mutex',
Austin Schuhf0736512015-09-07 01:22:16 -070034 ],
35)
36
37cc_library(
Austin Schuh044e18b2015-10-21 20:17:09 -070038 name = 'macros',
39 hdrs = [
40 'macros.h',
41 ],
42)
43
44cc_library(
45 name = 'type_traits',
46 hdrs = [
47 'type_traits.h',
48 ],
49)
50
51cc_library(
Austin Schuhf0736512015-09-07 01:22:16 -070052 name = 'time',
Austin Schuhf0736512015-09-07 01:22:16 -070053 srcs = [
54 'time.cc',
55 ],
Brian Silverman100534c2015-09-07 15:51:23 -040056 hdrs = [
57 'time.h',
58 ],
Austin Schuhf0736512015-09-07 01:22:16 -070059 deps = [
Brian Silverman100534c2015-09-07 15:51:23 -040060 '//aos/common/logging:logging_interface',
Brian Silvermanf480a612015-09-13 02:22:01 -040061 '//aos/linux_code/ipc_lib:mutex',
Austin Schuh044e18b2015-10-21 20:17:09 -070062 ':macros',
63 '//aos/linux_code/ipc_lib:shared_mem',
Austin Schuhf0736512015-09-07 01:22:16 -070064 ],
65)
66
Brian Silvermanf480a612015-09-13 02:22:01 -040067genrule(
68 name = 'gen_queue_primitives',
69 visibility = ['//visibility:private'],
70 tools = ['//aos/build/queues:queue_primitives'],
71 outs = ['queue_primitives.h'],
72 cmd = '$(location //aos/build/queues:queue_primitives) $@',
73)
74
75genrule(
76 name = 'gen_print_field',
77 visibility = ['//visibility:private'],
78 tools = ['//aos/build/queues:print_field'],
79 outs = ['print_field.cc'],
80 cmd = '$(location //aos/build/queues:print_field) $@',
81)
82
Austin Schuhf0736512015-09-07 01:22:16 -070083cc_library(
Brian Silverman258b9172015-09-19 14:32:57 -040084 name = 'generated_queue_headers',
85 visibility = ['//aos/common/logging:__pkg__'],
86 hdrs = [
87 ':gen_queue_primitives',
88 ],
89)
90
91cc_library(
Austin Schuh044e18b2015-10-21 20:17:09 -070092 name = 'event',
93 hdrs = [
94 'event.h',
95 ],
96 deps = [
97 '//aos/linux_code/ipc_lib:aos_sync',
98 ],
99)
100
101cc_library(
102 name = 'unique_malloc_ptr',
103 hdrs = [
104 'unique_malloc_ptr.h',
105 ],
106)
107
108cc_library(
Austin Schuhf0736512015-09-07 01:22:16 -0700109 name = 'queue_types',
110 srcs = [
111 'queue_types.cc',
Brian Silvermanf480a612015-09-13 02:22:01 -0400112 ':gen_print_field',
Austin Schuh044e18b2015-10-21 20:17:09 -0700113 'print_field_helpers.h',
Austin Schuhf0736512015-09-07 01:22:16 -0700114 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400115 hdrs = [
116 'queue_types.h',
117 ],
118 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400119 ':generated_queue_headers',
Brian Silverman100534c2015-09-07 15:51:23 -0400120 '//aos/linux_code/ipc_lib:shared_mem',
121 '//aos/linux_code/ipc_lib:core_lib',
Brian Silvermanf480a612015-09-13 02:22:01 -0400122 '//aos/linux_code/ipc_lib:mutex',
Austin Schuh044e18b2015-10-21 20:17:09 -0700123 '//aos/common/logging:logging_printf_formats',
Brian Silverman100534c2015-09-07 15:51:23 -0400124 ':time',
Austin Schuh044e18b2015-10-21 20:17:09 -0700125 ':byteorder'
Brian Silverman100534c2015-09-07 15:51:23 -0400126 ],
127)
128
129cc_test(
130 name = 'queue_types_test',
131 srcs = [
132 'queue_types_test.cc',
133 ],
134 deps = [
135 ':queue_types',
Brian Silverman258b9172015-09-19 14:32:57 -0400136 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -0400137 ':test_queue',
138 '//aos/common/logging',
139 ':queue_testutils',
140 ],
141)
142
143cc_library(
Austin Schuh044e18b2015-10-21 20:17:09 -0700144 name = 'network_port',
145 hdrs = [
146 'network_port.h',
147 ],
148)
149
150cc_library(
151 name = 'byteorder',
152 hdrs = [
153 'byteorder.h',
154 ],
155)
156
157cc_library(
Brian Silverman100534c2015-09-07 15:51:23 -0400158 name = 'queues',
159 srcs = [
160 'queue.cc',
161 ],
162 hdrs = [
163 'queue.h',
164 ],
165 deps = [
166 '//aos/linux_code/ipc_lib:queue',
167 ':time',
Austin Schuh044e18b2015-10-21 20:17:09 -0700168 ':macros',
169 '//aos/linux_code:queue',
170 ':byteorder',
Brian Silverman100534c2015-09-07 15:51:23 -0400171 ],
172)
173
174cc_library(
175 name = 'scoped_fd',
Austin Schuh044e18b2015-10-21 20:17:09 -0700176 hdrs = [
177 'scoped_fd.h',
178 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400179 deps = [
180 '//aos/common/logging',
181 ],
182)
183
184cc_test(
185 name = 'queue_test',
186 srcs = [
187 'queue_test.cc',
188 ],
189 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400190 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -0400191 ':queue_testutils',
192 ':test_queue',
193 '//aos/common/util:thread',
194 ':die',
195 ],
196)
197
198cc_test(
199 name = 'type_traits_test',
200 srcs = [
201 'type_traits_test.cpp',
202 ],
203 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400204 '//aos/testing:googletest',
Austin Schuh044e18b2015-10-21 20:17:09 -0700205 ':type_traits',
Brian Silverman100534c2015-09-07 15:51:23 -0400206 ],
207)
208
209cc_library(
210 name = 'gtest_prod',
Austin Schuh044e18b2015-10-21 20:17:09 -0700211 hdrs = [
212 'gtest_prod.h',
213 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400214)
215
216cc_library(
217 name = 'once',
Austin Schuh044e18b2015-10-21 20:17:09 -0700218 hdrs = [
219 'once.h',
220 ],
221 srcs = [
222 'once-tmpl.h',
223 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400224 deps = [
Brian Silvermanea542292015-09-13 02:24:45 -0400225 ':gtest_prod',
Austin Schuh044e18b2015-10-21 20:17:09 -0700226 ':type_traits',
Brian Silverman100534c2015-09-07 15:51:23 -0400227 ],
228)
229
230cc_test(
231 name = 'once_test',
232 srcs = [
233 'once_test.cc',
234 ],
235 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400236 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -0400237 ':once',
238 ],
239)
240
241cc_test(
242 name = 'time_test',
243 srcs = [
244 'time_test.cc',
245 ],
246 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400247 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -0400248 ':time',
249 '//aos/common/logging',
250 '//aos/common/util:death_test_log_implementation',
251 ],
252)
253
254cc_library(
255 name = 'die',
256 srcs = [
257 'die.cc',
258 ],
259 hdrs = [
260 'die.h',
261 ],
262 deps = [
Austin Schuh044e18b2015-10-21 20:17:09 -0700263 ':macros',
Brian Silverman100534c2015-09-07 15:51:23 -0400264 '//aos/common/libc:aos_strerror',
265 ],
266)
267
268cc_test(
269 name = 'queue_testutils_test',
270 srcs = [
271 'queue_testutils_test.cc',
272 ],
273 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400274 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -0400275 ':queue_testutils',
276 '//aos/common/logging',
277 ],
278)
279
280cc_test(
281 name = 'mutex_test',
282 srcs = [
283 'mutex_test.cc',
284 ],
285 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400286 '//aos/testing:googletest',
Brian Silvermanf480a612015-09-13 02:22:01 -0400287 '//aos/linux_code/ipc_lib:mutex',
Brian Silverman100534c2015-09-07 15:51:23 -0400288 ':die',
289 '//aos/common/logging',
290 '//aos/common/util:death_test_log_implementation',
291 '//aos/common/util:thread',
292 '//aos/common:time',
293 ':queue_testutils',
294 ],
295)
296
297cc_test(
298 name = 'event_test',
299 srcs = [
300 'event_test.cc',
301 ],
302 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400303 '//aos/testing:googletest',
304 '//aos/linux_code/ipc_lib:event',
Brian Silverman100534c2015-09-07 15:51:23 -0400305 ':queue_testutils',
306 ':time',
307 ],
308)
309
Austin Schuh044e18b2015-10-21 20:17:09 -0700310cc_library(
311 name = 'condition',
312 hdrs = [
313 'condition.h',
314 ],
315)
316
Brian Silverman100534c2015-09-07 15:51:23 -0400317cc_test(
318 name = 'condition_test',
319 srcs = [
320 'condition_test.cc',
321 ],
322 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400323 '//aos/testing:googletest',
324 '//aos/linux_code/ipc_lib:condition',
Brian Silverman100534c2015-09-07 15:51:23 -0400325 '//aos/common/util:thread',
326 ':time',
Brian Silvermanf480a612015-09-13 02:22:01 -0400327 '//aos/linux_code/ipc_lib:mutex',
Brian Silverman100534c2015-09-07 15:51:23 -0400328 '//aos/common/logging',
329 ':queue_testutils',
330 '//aos/linux_code/ipc_lib:core_lib',
331 '//aos/linux_code/ipc_lib:aos_sync',
332 ':die',
Brian Silverman100534c2015-09-07 15:51:23 -0400333 ],
334)
335
336cc_test(
337 name = 'die_test',
338 srcs = [
339 'die_test.cc',
340 ],
341 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400342 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -0400343 ':die',
344 ],
345)
346
347cc_library(
348 name = 'stl_mutex',
Austin Schuh044e18b2015-10-21 20:17:09 -0700349 hdrs = [
350 'stl_mutex.h',
351 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400352 deps = [
353 '//aos/linux_code/ipc_lib:aos_sync',
354 '//aos/common/logging',
355 ],
356)
357
Austin Schuh044e18b2015-10-21 20:17:09 -0700358cc_library(
359 name = 'mutex',
360 hdrs = [
361 'mutex.h',
362 ],
363 deps = [
364 '//aos/linux_code/ipc_lib:aos_sync',
365 ':die',
366 ],
367)
368
Brian Silverman100534c2015-09-07 15:51:23 -0400369cc_test(
370 name = 'stl_mutex_test',
371 srcs = [
372 'stl_mutex_test.cc',
373 ],
374 deps = [
375 ':stl_mutex',
Brian Silverman258b9172015-09-19 14:32:57 -0400376 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -0400377 ':queue_testutils',
378 '//aos/common/util:thread',
379 ':die',
380 ],
Austin Schuhf0736512015-09-07 01:22:16 -0700381)