blob: f4b57d53b31377f6961d14164d9faf2997660ae6 [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 Schuh044e18b2015-10-21 20:17:09 -070020 name = 'macros',
21 hdrs = [
22 'macros.h',
23 ],
24)
25
26cc_library(
27 name = 'type_traits',
28 hdrs = [
29 'type_traits.h',
30 ],
31)
32
33cc_library(
Austin Schuhf0736512015-09-07 01:22:16 -070034 name = 'time',
Austin Schuhf0736512015-09-07 01:22:16 -070035 srcs = [
36 'time.cc',
37 ],
Brian Silverman100534c2015-09-07 15:51:23 -040038 hdrs = [
39 'time.h',
40 ],
Austin Schuhf0736512015-09-07 01:22:16 -070041 deps = [
Brian Silvermancb5da1f2015-12-05 22:19:58 -050042 '//aos/common/logging:logging',
Brian Silverman2200b2c2015-11-29 05:59:28 +000043 ':mutex',
Austin Schuh044e18b2015-10-21 20:17:09 -070044 ':macros',
45 '//aos/linux_code/ipc_lib:shared_mem',
Austin Schuhf0736512015-09-07 01:22:16 -070046 ],
47)
48
Brian Silvermanf480a612015-09-13 02:22:01 -040049genrule(
50 name = 'gen_queue_primitives',
51 visibility = ['//visibility:private'],
52 tools = ['//aos/build/queues:queue_primitives'],
53 outs = ['queue_primitives.h'],
54 cmd = '$(location //aos/build/queues:queue_primitives) $@',
55)
56
57genrule(
58 name = 'gen_print_field',
59 visibility = ['//visibility:private'],
60 tools = ['//aos/build/queues:print_field'],
61 outs = ['print_field.cc'],
62 cmd = '$(location //aos/build/queues:print_field) $@',
63)
64
Austin Schuhf0736512015-09-07 01:22:16 -070065cc_library(
Brian Silverman258b9172015-09-19 14:32:57 -040066 name = 'generated_queue_headers',
67 visibility = ['//aos/common/logging:__pkg__'],
68 hdrs = [
69 ':gen_queue_primitives',
70 ],
71)
72
73cc_library(
Brian Silverman2200b2c2015-11-29 05:59:28 +000074 name = 'event',
Austin Schuh044e18b2015-10-21 20:17:09 -070075 hdrs = [
76 'event.h',
77 ],
Brian Silverman2200b2c2015-11-29 05:59:28 +000078 srcs = [
79 'event.cc',
80 ],
Austin Schuh044e18b2015-10-21 20:17:09 -070081 deps = [
82 '//aos/linux_code/ipc_lib:aos_sync',
Brian Silverman30608942015-04-08 19:16:46 -040083 ':time',
Brian Silvermancb5da1f2015-12-05 22:19:58 -050084 '//aos/common/logging:logging',
Brian Silverman086cb8c2015-10-26 11:39:40 -040085 ],
86)
87
88cc_library(
Austin Schuh044e18b2015-10-21 20:17:09 -070089 name = 'unique_malloc_ptr',
90 hdrs = [
91 'unique_malloc_ptr.h',
92 ],
93)
94
95cc_library(
Austin Schuhf0736512015-09-07 01:22:16 -070096 name = 'queue_types',
97 srcs = [
98 'queue_types.cc',
Brian Silvermanf480a612015-09-13 02:22:01 -040099 ':gen_print_field',
Austin Schuh044e18b2015-10-21 20:17:09 -0700100 'print_field_helpers.h',
Austin Schuhf0736512015-09-07 01:22:16 -0700101 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400102 hdrs = [
103 'queue_types.h',
104 ],
105 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400106 ':generated_queue_headers',
Brian Silverman100534c2015-09-07 15:51:23 -0400107 '//aos/linux_code/ipc_lib:shared_mem',
108 '//aos/linux_code/ipc_lib:core_lib',
Brian Silverman2200b2c2015-11-29 05:59:28 +0000109 ':mutex',
Brian Silvermancb5da1f2015-12-05 22:19:58 -0500110 '//aos/common/logging:printf_formats',
Brian Silverman100534c2015-09-07 15:51:23 -0400111 ':time',
Austin Schuh044e18b2015-10-21 20:17:09 -0700112 ':byteorder'
Brian Silverman100534c2015-09-07 15:51:23 -0400113 ],
114)
115
116cc_test(
117 name = 'queue_types_test',
118 srcs = [
119 'queue_types_test.cc',
120 ],
121 deps = [
122 ':queue_types',
Brian Silverman258b9172015-09-19 14:32:57 -0400123 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -0400124 ':test_queue',
125 '//aos/common/logging',
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -0500126 '//aos/testing:test_logging',
Brian Silverman100534c2015-09-07 15:51:23 -0400127 ],
128)
129
130cc_library(
Austin Schuh044e18b2015-10-21 20:17:09 -0700131 name = 'network_port',
132 hdrs = [
133 'network_port.h',
134 ],
135)
136
137cc_library(
138 name = 'byteorder',
139 hdrs = [
140 'byteorder.h',
141 ],
142)
143
144cc_library(
Brian Silverman100534c2015-09-07 15:51:23 -0400145 name = 'queues',
146 srcs = [
147 'queue.cc',
148 ],
149 hdrs = [
150 'queue.h',
151 ],
152 deps = [
153 '//aos/linux_code/ipc_lib:queue',
154 ':time',
Austin Schuh044e18b2015-10-21 20:17:09 -0700155 ':macros',
156 '//aos/linux_code:queue',
157 ':byteorder',
Brian Silverman100534c2015-09-07 15:51:23 -0400158 ],
159)
160
161cc_library(
162 name = 'scoped_fd',
Austin Schuh044e18b2015-10-21 20:17:09 -0700163 hdrs = [
164 'scoped_fd.h',
165 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400166 deps = [
167 '//aos/common/logging',
168 ],
169)
170
171cc_test(
172 name = 'queue_test',
173 srcs = [
174 'queue_test.cc',
175 ],
176 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400177 '//aos/testing:googletest',
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -0500178 '//aos/testing:test_shm',
Brian Silverman100534c2015-09-07 15:51:23 -0400179 ':test_queue',
180 '//aos/common/util:thread',
181 ':die',
182 ],
183)
184
185cc_test(
186 name = 'type_traits_test',
187 srcs = [
188 'type_traits_test.cpp',
189 ],
190 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400191 '//aos/testing:googletest',
Austin Schuh044e18b2015-10-21 20:17:09 -0700192 ':type_traits',
Brian Silverman100534c2015-09-07 15:51:23 -0400193 ],
194)
195
196cc_library(
197 name = 'gtest_prod',
Austin Schuh044e18b2015-10-21 20:17:09 -0700198 hdrs = [
199 'gtest_prod.h',
200 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400201)
202
203cc_library(
204 name = 'once',
Austin Schuh044e18b2015-10-21 20:17:09 -0700205 hdrs = [
206 'once.h',
207 ],
208 srcs = [
209 'once-tmpl.h',
210 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400211 deps = [
Brian Silvermanea542292015-09-13 02:24:45 -0400212 ':gtest_prod',
Austin Schuh044e18b2015-10-21 20:17:09 -0700213 ':type_traits',
Brian Silverman100534c2015-09-07 15:51:23 -0400214 ],
215)
216
217cc_test(
218 name = 'once_test',
219 srcs = [
220 'once_test.cc',
221 ],
222 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400223 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -0400224 ':once',
225 ],
226)
227
228cc_test(
229 name = 'time_test',
230 srcs = [
231 'time_test.cc',
232 ],
233 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400234 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -0400235 ':time',
236 '//aos/common/logging',
237 '//aos/common/util:death_test_log_implementation',
238 ],
239)
240
241cc_library(
242 name = 'die',
243 srcs = [
244 'die.cc',
245 ],
246 hdrs = [
247 'die.h',
248 ],
249 deps = [
Austin Schuh044e18b2015-10-21 20:17:09 -0700250 ':macros',
Brian Silverman100534c2015-09-07 15:51:23 -0400251 '//aos/common/libc:aos_strerror',
252 ],
253)
254
255cc_test(
Brian Silverman100534c2015-09-07 15:51:23 -0400256 name = 'mutex_test',
257 srcs = [
258 'mutex_test.cc',
259 ],
260 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400261 '//aos/testing:googletest',
Brian Silverman2200b2c2015-11-29 05:59:28 +0000262 ':mutex',
Brian Silverman100534c2015-09-07 15:51:23 -0400263 ':die',
264 '//aos/common/logging',
265 '//aos/common/util:death_test_log_implementation',
266 '//aos/common/util:thread',
267 '//aos/common:time',
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -0500268 '//aos/testing:test_logging',
Brian Silverman71c55c52014-08-19 14:31:59 -0400269 '//aos/testing:test_shm',
Brian Silverman100534c2015-09-07 15:51:23 -0400270 ],
271)
272
273cc_test(
274 name = 'event_test',
275 srcs = [
276 'event_test.cc',
277 ],
278 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400279 '//aos/testing:googletest',
Brian Silverman086cb8c2015-10-26 11:39:40 -0400280 ':event',
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -0500281 '//aos/testing:test_logging',
Brian Silverman100534c2015-09-07 15:51:23 -0400282 ':time',
283 ],
284)
285
Austin Schuh044e18b2015-10-21 20:17:09 -0700286cc_library(
Brian Silverman2200b2c2015-11-29 05:59:28 +0000287 name = 'condition',
Austin Schuh044e18b2015-10-21 20:17:09 -0700288 hdrs = [
289 'condition.h',
290 ],
Brian Silverman2200b2c2015-11-29 05:59:28 +0000291 srcs = [
292 'condition.cc',
293 ],
Brian Silverman086cb8c2015-10-26 11:39:40 -0400294 deps = [
Brian Silverman2200b2c2015-11-29 05:59:28 +0000295 ':mutex',
296 '//aos/linux_code/ipc_lib:aos_sync',
Brian Silvermancb5da1f2015-12-05 22:19:58 -0500297 '//aos/common/logging:logging',
Brian Silverman086cb8c2015-10-26 11:39:40 -0400298 ],
299)
300
Brian Silverman100534c2015-09-07 15:51:23 -0400301cc_test(
302 name = 'condition_test',
303 srcs = [
304 'condition_test.cc',
305 ],
306 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400307 '//aos/testing:googletest',
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -0500308 '//aos/testing:prevent_exit',
Brian Silverman086cb8c2015-10-26 11:39:40 -0400309 ':condition',
Brian Silverman100534c2015-09-07 15:51:23 -0400310 '//aos/common/util:thread',
311 ':time',
Brian Silverman2200b2c2015-11-29 05:59:28 +0000312 ':mutex',
Brian Silverman100534c2015-09-07 15:51:23 -0400313 '//aos/common/logging',
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -0500314 '//aos/testing:test_shm',
Brian Silverman100534c2015-09-07 15:51:23 -0400315 '//aos/linux_code/ipc_lib:core_lib',
316 '//aos/linux_code/ipc_lib:aos_sync',
317 ':die',
Brian Silverman100534c2015-09-07 15:51:23 -0400318 ],
319)
320
321cc_test(
322 name = 'die_test',
323 srcs = [
324 'die_test.cc',
325 ],
326 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400327 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -0400328 ':die',
329 ],
330)
331
332cc_library(
333 name = 'stl_mutex',
Austin Schuh044e18b2015-10-21 20:17:09 -0700334 hdrs = [
335 'stl_mutex.h',
336 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400337 deps = [
338 '//aos/linux_code/ipc_lib:aos_sync',
339 '//aos/common/logging',
340 ],
341)
342
Austin Schuh044e18b2015-10-21 20:17:09 -0700343cc_library(
344 name = 'mutex',
345 hdrs = [
346 'mutex.h',
347 ],
Brian Silverman2200b2c2015-11-29 05:59:28 +0000348 srcs = [
349 'mutex.cc',
350 ],
Austin Schuh044e18b2015-10-21 20:17:09 -0700351 deps = [
352 '//aos/linux_code/ipc_lib:aos_sync',
353 ':die',
Brian Silvermancb5da1f2015-12-05 22:19:58 -0500354 '//aos/common/logging:logging',
Brian Silverman2200b2c2015-11-29 05:59:28 +0000355 ':type_traits',
Austin Schuh044e18b2015-10-21 20:17:09 -0700356 ],
357)
358
Brian Silverman100534c2015-09-07 15:51:23 -0400359cc_test(
360 name = 'stl_mutex_test',
361 srcs = [
362 'stl_mutex_test.cc',
363 ],
364 deps = [
365 ':stl_mutex',
Brian Silverman258b9172015-09-19 14:32:57 -0400366 '//aos/testing:googletest',
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -0500367 '//aos/testing:test_logging',
Brian Silverman100534c2015-09-07 15:51:23 -0400368 '//aos/common/util:thread',
369 ':die',
370 ],
Austin Schuhf0736512015-09-07 01:22:16 -0700371)
Brian Silverman3d37a5f2014-09-05 18:42:20 -0400372
373cc_library(
374 name = 'transaction',
375 hdrs = [
376 'transaction.h',
377 ],
378 deps = [
Brian Silvermancb5da1f2015-12-05 22:19:58 -0500379 '//aos/common/logging:logging',
Brian Silverman3d37a5f2014-09-05 18:42:20 -0400380 '//aos/common/util:compiler_memory_barrier',
381 ],
382)
383
384cc_test(
385 name = 'transaction_test',
386 srcs = [
387 'transaction_test.cc',
388 ],
389 deps = [
390 ':transaction',
391 '//aos/testing:googletest',
392 '//aos/common/logging',
393 '//aos/common/util:death_test_log_implementation',
394 ],
395)
Parker Schuhecd057f2017-03-11 20:03:01 -0800396
397cc_library(
398 name = 'ring_buffer',
399 hdrs = [
400 'ring_buffer.h',
401 ],
402)
403
404cc_test(
405 name = 'ring_buffer_test',
406 srcs = [
407 'ring_buffer_test.cc',
408 ],
409 deps = [
410 ':ring_buffer',
411 '//aos/testing:googletest',
412 ],
413)