Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 1 | load("//aos/seasocks:gen_embedded.bzl", "gen_embedded") |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 2 | load("//aos:config.bzl", "aos_config") |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 3 | load("//aos:flatbuffers.bzl", "cc_static_flatbuffer") |
| 4 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_ts_library") |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 5 | |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 6 | package(default_visibility = ["//visibility:public"]) |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 7 | |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 8 | flatbuffer_cc_library( |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 9 | name = "remote_message_fbs", |
| 10 | srcs = ["remote_message.fbs"], |
| 11 | gen_reflections = 1, |
| 12 | ) |
| 13 | |
| 14 | cc_static_flatbuffer( |
| 15 | name = "remote_message_schema", |
| 16 | function = "aos::message_bridge::RemoteMessageSchema", |
| 17 | target = ":remote_message_fbs_reflection_out", |
| 18 | ) |
| 19 | |
| 20 | flatbuffer_cc_library( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 21 | name = "connect_fbs", |
| 22 | srcs = ["connect.fbs"], |
| 23 | gen_reflections = 1, |
| 24 | includes = [ |
| 25 | "//aos:configuration_fbs_includes", |
| 26 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 27 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 28 | ) |
| 29 | |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 30 | flatbuffer_ts_library( |
| 31 | name = "connect_ts_fbs", |
| 32 | srcs = ["connect.fbs"], |
| 33 | includes = [ |
| 34 | "//aos:configuration_fbs_includes", |
| 35 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 36 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 37 | ) |
| 38 | |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 39 | flatbuffer_cc_library( |
Austin Schuh | f068dca | 2021-03-14 21:38:40 -0700 | [diff] [blame] | 40 | name = "remote_data_fbs", |
| 41 | srcs = ["remote_data.fbs"], |
| 42 | gen_reflections = 1, |
| 43 | target_compatible_with = ["@platforms//os:linux"], |
| 44 | ) |
| 45 | |
| 46 | flatbuffer_cc_library( |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 47 | name = "timestamp_fbs", |
| 48 | srcs = ["timestamp.fbs"], |
| 49 | gen_reflections = 1, |
| 50 | includes = [ |
| 51 | "//aos:configuration_fbs_includes", |
| 52 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 53 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 54 | ) |
| 55 | |
| 56 | flatbuffer_cc_library( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 57 | name = "message_bridge_client_fbs", |
| 58 | srcs = ["message_bridge_client.fbs"], |
| 59 | gen_reflections = 1, |
| 60 | includes = [ |
| 61 | ":message_bridge_server_fbs_includes", |
| 62 | "//aos:configuration_fbs_includes", |
| 63 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 64 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 65 | ) |
| 66 | |
| 67 | flatbuffer_cc_library( |
| 68 | name = "message_bridge_server_fbs", |
| 69 | srcs = ["message_bridge_server.fbs"], |
| 70 | gen_reflections = 1, |
| 71 | includes = [ |
| 72 | "//aos:configuration_fbs_includes", |
| 73 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 74 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 75 | ) |
| 76 | |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 77 | cc_library( |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 78 | name = "team_number", |
| 79 | srcs = [ |
| 80 | "team_number.cc", |
| 81 | ], |
| 82 | hdrs = [ |
| 83 | "team_number.h", |
| 84 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 85 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 86 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 87 | "//aos/util:string_to_num", |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 88 | "@com_github_google_glog//:glog", |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 89 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 90 | ) |
| 91 | |
Austin Schuh | df5591e | 2015-12-19 22:36:50 -0800 | [diff] [blame] | 92 | cc_test( |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 93 | name = "team_number_test", |
| 94 | srcs = [ |
| 95 | "team_number_test.cc", |
| 96 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 97 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 98 | deps = [ |
| 99 | ":team_number", |
Jim Ostrowski | 8565b40 | 2020-02-29 20:26:53 -0800 | [diff] [blame] | 100 | "//aos:configuration", |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 101 | "//aos/testing:googletest", |
| 102 | ], |
Austin Schuh | df5591e | 2015-12-19 22:36:50 -0800 | [diff] [blame] | 103 | ) |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 104 | |
| 105 | cc_library( |
| 106 | name = "sctp_lib", |
| 107 | srcs = [ |
| 108 | "sctp_lib.cc", |
| 109 | ], |
| 110 | hdrs = [ |
| 111 | "sctp_lib.h", |
| 112 | ], |
| 113 | copts = [ |
| 114 | # The casts required to read datastructures from sockets trip -Wcast-align. |
| 115 | "-Wno-cast-align", |
| 116 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 117 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 118 | deps = [ |
| 119 | "//aos:unique_malloc_ptr", |
Austin Schuh | 2fe4b71 | 2020-03-15 14:21:45 -0700 | [diff] [blame] | 120 | "//aos/util:file", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 121 | "//third_party/lksctp-tools:sctp", |
| 122 | "@com_github_google_glog//:glog", |
| 123 | ], |
| 124 | ) |
| 125 | |
| 126 | cc_library( |
| 127 | name = "sctp_server", |
| 128 | srcs = [ |
| 129 | "sctp_server.cc", |
| 130 | ], |
| 131 | hdrs = [ |
| 132 | "sctp_server.h", |
| 133 | ], |
| 134 | copts = [ |
| 135 | "-Wno-cast-align", |
| 136 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 137 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 138 | deps = [ |
| 139 | ":sctp_lib", |
| 140 | "//third_party/lksctp-tools:sctp", |
| 141 | ], |
| 142 | ) |
| 143 | |
| 144 | cc_library( |
| 145 | name = "message_bridge_protocol", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 146 | srcs = [ |
| 147 | "message_bridge_protocol.cc", |
| 148 | ], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 149 | hdrs = [ |
| 150 | "message_bridge_protocol.h", |
| 151 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 152 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 153 | deps = [ |
| 154 | ":connect_fbs", |
| 155 | "//aos:configuration", |
| 156 | "//aos:flatbuffer_merge", |
| 157 | "//aos:flatbuffers", |
Austin Schuh | 4385b14 | 2021-03-14 21:31:13 -0700 | [diff] [blame] | 158 | "//aos:uuid", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 159 | "@com_github_google_flatbuffers//:flatbuffers", |
| 160 | ], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 161 | ) |
| 162 | |
| 163 | cc_library( |
Austin Schuh | e19b675 | 2020-08-27 23:20:19 -0700 | [diff] [blame] | 164 | name = "message_bridge_server_status", |
| 165 | srcs = [ |
| 166 | "message_bridge_server_status.cc", |
| 167 | ], |
| 168 | hdrs = [ |
| 169 | "message_bridge_server_status.h", |
| 170 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 171 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e19b675 | 2020-08-27 23:20:19 -0700 | [diff] [blame] | 172 | deps = [ |
| 173 | ":message_bridge_client_fbs", |
| 174 | ":message_bridge_server_fbs", |
| 175 | ":timestamp_fbs", |
| 176 | ":timestamp_filter", |
| 177 | "//aos:flatbuffer_merge", |
| 178 | "//aos:flatbuffers", |
| 179 | "//aos/events:event_loop", |
| 180 | "//aos/time", |
| 181 | ], |
| 182 | ) |
| 183 | |
| 184 | cc_library( |
Austin Schuh | 36a2c3e | 2021-02-18 22:28:38 -0800 | [diff] [blame] | 185 | name = "timestamp_channel", |
| 186 | srcs = ["timestamp_channel.cc"], |
| 187 | hdrs = ["timestamp_channel.h"], |
| 188 | deps = [ |
| 189 | ":remote_message_fbs", |
| 190 | "//aos:configuration", |
| 191 | "//aos/events:event_loop", |
| 192 | "@com_github_google_glog//:glog", |
| 193 | "@com_google_absl//absl/container:btree", |
| 194 | "@com_google_absl//absl/strings", |
| 195 | ], |
| 196 | ) |
| 197 | |
| 198 | cc_library( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 199 | name = "message_bridge_server_lib", |
| 200 | srcs = [ |
| 201 | "message_bridge_server_lib.cc", |
| 202 | ], |
| 203 | hdrs = [ |
| 204 | "message_bridge_server_lib.h", |
| 205 | ], |
| 206 | copts = [ |
| 207 | "-Wno-cast-align", |
| 208 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 209 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 210 | deps = [ |
| 211 | ":connect_fbs", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 212 | ":message_bridge_client_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 213 | ":message_bridge_protocol", |
| 214 | ":message_bridge_server_fbs", |
Austin Schuh | e19b675 | 2020-08-27 23:20:19 -0700 | [diff] [blame] | 215 | ":message_bridge_server_status", |
Austin Schuh | f068dca | 2021-03-14 21:38:40 -0700 | [diff] [blame] | 216 | ":remote_data_fbs", |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 217 | ":remote_message_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 218 | ":sctp_lib", |
| 219 | ":sctp_server", |
Austin Schuh | 36a2c3e | 2021-02-18 22:28:38 -0800 | [diff] [blame] | 220 | ":timestamp_channel", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 221 | ":timestamp_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 222 | "//aos:unique_malloc_ptr", |
| 223 | "//aos/events:shm_event_loop", |
Austin Schuh | b06f03b | 2021-02-17 22:00:37 -0800 | [diff] [blame] | 224 | "//aos/events/logging:log_reader", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 225 | "//third_party/lksctp-tools:sctp", |
| 226 | ], |
| 227 | ) |
| 228 | |
| 229 | cc_binary( |
| 230 | name = "message_bridge_server", |
| 231 | srcs = [ |
| 232 | "message_bridge_server.cc", |
| 233 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 234 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 235 | deps = [ |
| 236 | ":message_bridge_server_lib", |
| 237 | "//aos:init", |
| 238 | "//aos:json_to_flatbuffer", |
| 239 | "//aos/events:shm_event_loop", |
| 240 | ], |
| 241 | ) |
| 242 | |
| 243 | cc_library( |
| 244 | name = "sctp_client", |
| 245 | srcs = [ |
| 246 | "sctp_client.cc", |
| 247 | ], |
| 248 | hdrs = [ |
| 249 | "sctp_client.h", |
| 250 | ], |
| 251 | copts = [ |
| 252 | "-Wno-cast-align", |
| 253 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 254 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 255 | deps = [ |
| 256 | ":sctp_lib", |
| 257 | "//third_party/lksctp-tools:sctp", |
| 258 | ], |
| 259 | ) |
| 260 | |
| 261 | cc_library( |
Austin Schuh | ae2e7bf | 2020-08-27 23:42:56 -0700 | [diff] [blame] | 262 | name = "message_bridge_client_status", |
| 263 | srcs = [ |
| 264 | "message_bridge_client_status.cc", |
| 265 | ], |
| 266 | hdrs = [ |
| 267 | "message_bridge_client_status.h", |
| 268 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 269 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | ae2e7bf | 2020-08-27 23:42:56 -0700 | [diff] [blame] | 270 | deps = [ |
| 271 | ":message_bridge_client_fbs", |
| 272 | ":message_bridge_server_fbs", |
| 273 | ":timestamp_filter", |
| 274 | "//aos:flatbuffers", |
| 275 | "//aos/events:event_loop", |
| 276 | "//aos/time", |
| 277 | ], |
| 278 | ) |
| 279 | |
| 280 | cc_library( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 281 | name = "message_bridge_client_lib", |
| 282 | srcs = [ |
| 283 | "message_bridge_client_lib.cc", |
| 284 | ], |
| 285 | hdrs = [ |
| 286 | "message_bridge_client_lib.h", |
| 287 | ], |
| 288 | copts = [ |
| 289 | "-Wno-cast-align", |
| 290 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 291 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 292 | deps = [ |
| 293 | ":connect_fbs", |
| 294 | ":message_bridge_client_fbs", |
Austin Schuh | ae2e7bf | 2020-08-27 23:42:56 -0700 | [diff] [blame] | 295 | ":message_bridge_client_status", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 296 | ":message_bridge_protocol", |
| 297 | ":message_bridge_server_fbs", |
Austin Schuh | f068dca | 2021-03-14 21:38:40 -0700 | [diff] [blame] | 298 | ":remote_data_fbs", |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 299 | ":remote_message_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 300 | ":sctp_client", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 301 | ":timestamp_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 302 | "//aos/events:shm_event_loop", |
Austin Schuh | b06f03b | 2021-02-17 22:00:37 -0800 | [diff] [blame] | 303 | "//aos/events/logging:log_reader", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 304 | ], |
| 305 | ) |
| 306 | |
| 307 | cc_binary( |
| 308 | name = "message_bridge_client", |
| 309 | srcs = [ |
| 310 | "message_bridge_client.cc", |
| 311 | ], |
| 312 | copts = [ |
| 313 | "-Wno-cast-align", |
| 314 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 315 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 316 | deps = [ |
| 317 | ":message_bridge_client_lib", |
| 318 | "//aos:init", |
| 319 | "//aos:json_to_flatbuffer", |
| 320 | "//aos/events:shm_event_loop", |
| 321 | ], |
| 322 | ) |
| 323 | |
| 324 | aos_config( |
Austin Schuh | 36a2c3e | 2021-02-18 22:28:38 -0800 | [diff] [blame] | 325 | name = "message_bridge_test_combined_timestamps_common_config", |
| 326 | src = "message_bridge_test_combined_timestamps_common.json", |
| 327 | flatbuffers = [ |
| 328 | ":remote_message_fbs", |
| 329 | "//aos/events:ping_fbs", |
| 330 | "//aos/events:pong_fbs", |
| 331 | "//aos/network:message_bridge_client_fbs", |
| 332 | "//aos/network:message_bridge_server_fbs", |
| 333 | "//aos/network:timestamp_fbs", |
| 334 | ], |
| 335 | target_compatible_with = ["@platforms//os:linux"], |
| 336 | deps = ["//aos/events:config"], |
| 337 | ) |
| 338 | |
| 339 | aos_config( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 340 | name = "message_bridge_test_common_config", |
| 341 | src = "message_bridge_test_common.json", |
| 342 | flatbuffers = [ |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 343 | ":remote_message_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 344 | "//aos/events:ping_fbs", |
| 345 | "//aos/events:pong_fbs", |
| 346 | "//aos/network:message_bridge_client_fbs", |
| 347 | "//aos/network:message_bridge_server_fbs", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 348 | "//aos/network:timestamp_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 349 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 350 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 351 | deps = ["//aos/events:config"], |
| 352 | ) |
| 353 | |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 354 | cc_test( |
| 355 | name = "message_bridge_test", |
| 356 | srcs = [ |
| 357 | "message_bridge_test.cc", |
| 358 | ], |
| 359 | data = [ |
Austin Schuh | 36a2c3e | 2021-02-18 22:28:38 -0800 | [diff] [blame] | 360 | ":message_bridge_test_combined_timestamps_common_config", |
Austin Schuh | f466ab5 | 2021-02-16 22:00:38 -0800 | [diff] [blame] | 361 | ":message_bridge_test_common_config", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 362 | ], |
Austin Schuh | 025ff51 | 2021-02-07 23:06:48 -0800 | [diff] [blame] | 363 | flaky = True, |
Austin Schuh | 36a2c3e | 2021-02-18 22:28:38 -0800 | [diff] [blame] | 364 | shard_count = 10, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 365 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 366 | deps = [ |
| 367 | ":message_bridge_client_lib", |
| 368 | ":message_bridge_server_lib", |
| 369 | "//aos:json_to_flatbuffer", |
| 370 | "//aos/events:ping_fbs", |
| 371 | "//aos/events:pong_fbs", |
| 372 | "//aos/events:shm_event_loop", |
Brian Silverman | 7b266d9 | 2021-02-17 21:24:02 -0800 | [diff] [blame] | 373 | "//aos/ipc_lib:event", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 374 | "//aos/testing:googletest", |
| 375 | ], |
| 376 | ) |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 377 | |
| 378 | flatbuffer_cc_library( |
| 379 | name = "web_proxy_fbs", |
| 380 | srcs = ["web_proxy.fbs"], |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 381 | gen_reflections = True, |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 382 | includes = [ |
| 383 | ":connect_fbs_includes", |
| 384 | "//aos:configuration_fbs_includes", |
| 385 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 386 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 387 | ) |
| 388 | |
| 389 | flatbuffer_ts_library( |
| 390 | name = "web_proxy_ts_fbs", |
| 391 | srcs = ["web_proxy.fbs"], |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 392 | includes = [ |
| 393 | ":connect_fbs_includes", |
| 394 | "//aos:configuration_fbs_includes", |
| 395 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 396 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 397 | ) |
| 398 | |
| 399 | cc_library( |
| 400 | name = "web_proxy_utils", |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 401 | srcs = ["web_proxy_utils.cc"], |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 402 | hdrs = ["web_proxy_utils.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 403 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 404 | deps = [ |
| 405 | ":connect_fbs", |
| 406 | ":web_proxy_fbs", |
| 407 | "//aos:configuration_fbs", |
| 408 | "//aos/events:event_loop", |
| 409 | "@com_github_google_flatbuffers//:flatbuffers", |
| 410 | ], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 411 | ) |
| 412 | |
| 413 | cc_library( |
| 414 | name = "web_proxy", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 415 | srcs = ["web_proxy.cc"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 416 | hdrs = ["web_proxy.h"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 417 | copts = [ |
| 418 | "-DWEBRTC_POSIX", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 419 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 420 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 421 | deps = [ |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 422 | ":connect_fbs", |
James Kuszmaul | 4867136 | 2020-12-24 13:54:16 -0800 | [diff] [blame] | 423 | ":gen_embedded", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 424 | ":web_proxy_fbs", |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 425 | ":web_proxy_utils", |
| 426 | "//aos/events:shm_event_loop", |
James Kuszmaul | 8d928d0 | 2020-12-25 17:47:49 -0800 | [diff] [blame] | 427 | "//aos/mutex", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 428 | "//aos/seasocks:seasocks_logger", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 429 | "//third_party:webrtc", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 430 | "//third_party/seasocks", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 431 | "@com_github_google_glog//:glog", |
| 432 | ], |
| 433 | ) |
| 434 | |
| 435 | gen_embedded( |
| 436 | name = "gen_embedded", |
| 437 | srcs = glob( |
| 438 | include = ["www_defaults/**/*"], |
| 439 | exclude = ["www/**/*"], |
| 440 | ), |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 441 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 442 | ) |
| 443 | |
| 444 | cc_binary( |
| 445 | name = "web_proxy_main", |
| 446 | srcs = ["web_proxy_main.cc"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 447 | copts = [ |
| 448 | "-DWEBRTC_POSIX", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 449 | ], |
| 450 | data = [ |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 451 | "//aos/network/www:files", |
Austin Schuh | da9d060 | 2019-09-15 17:29:38 -0700 | [diff] [blame] | 452 | "//aos/network/www:main_bundle.min.js", |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 453 | "@com_github_google_flatbuffers//:flatjs", |
| 454 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 455 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 456 | deps = [ |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 457 | ":web_proxy", |
| 458 | "//aos:init", |
| 459 | "//aos/events:shm_event_loop", |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 460 | "@com_github_google_flatbuffers//:flatbuffers", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 461 | ], |
| 462 | ) |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 463 | |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 464 | cc_binary( |
| 465 | name = "log_web_proxy_main", |
| 466 | srcs = ["log_web_proxy_main.cc"], |
| 467 | args = [ |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 468 | "--data_dir=aos/network/www", |
| 469 | ], |
| 470 | copts = [ |
| 471 | "-DWEBRTC_POSIX", |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 472 | ], |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 473 | deps = [ |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 474 | ":web_proxy", |
| 475 | "//aos:init", |
| 476 | "//aos/events:simulated_event_loop", |
Austin Schuh | b06f03b | 2021-02-17 22:00:37 -0800 | [diff] [blame] | 477 | "//aos/events/logging:log_reader", |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 478 | "@com_github_google_flatbuffers//:flatbuffers", |
| 479 | ], |
| 480 | ) |
| 481 | |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 482 | cc_library( |
| 483 | name = "timestamp_filter", |
Austin Schuh | 7ee6f72 | 2020-08-24 16:19:36 -0700 | [diff] [blame] | 484 | srcs = ["timestamp_filter.cc"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 485 | hdrs = ["timestamp_filter.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 486 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 487 | deps = [ |
Austin Schuh | 04eccfc | 2020-08-26 21:08:27 -0700 | [diff] [blame] | 488 | "//aos:configuration", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 489 | "//aos/time", |
Austin Schuh | 85357ee | 2020-08-24 16:41:42 -0700 | [diff] [blame] | 490 | "@com_google_absl//absl/strings", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 491 | ], |
| 492 | ) |
| 493 | |
Austin Schuh | 0ca1fd3 | 2020-12-18 22:53:05 -0800 | [diff] [blame] | 494 | cc_library( |
| 495 | name = "multinode_timestamp_filter", |
| 496 | srcs = ["multinode_timestamp_filter.cc"], |
| 497 | hdrs = ["multinode_timestamp_filter.h"], |
| 498 | target_compatible_with = ["@platforms//os:linux"], |
| 499 | deps = [ |
| 500 | ":timestamp_filter", |
| 501 | "//aos:configuration", |
| 502 | "//aos/events:simulated_event_loop", |
Austin Schuh | e639ea1 | 2021-01-25 13:00:22 -0800 | [diff] [blame] | 503 | "//aos/events/logging:logfile_utils", |
Austin Schuh | 0ca1fd3 | 2020-12-18 22:53:05 -0800 | [diff] [blame] | 504 | "//aos/time", |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 505 | "@com_github_stevengj_nlopt//:nlopt", |
Austin Schuh | 0ca1fd3 | 2020-12-18 22:53:05 -0800 | [diff] [blame] | 506 | "@org_tuxfamily_eigen//:eigen", |
| 507 | ], |
| 508 | ) |
| 509 | |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 510 | cc_test( |
| 511 | name = "timestamp_filter_test", |
| 512 | srcs = [ |
| 513 | "timestamp_filter_test.cc", |
| 514 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 515 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 516 | deps = [ |
| 517 | ":timestamp_filter", |
Austin Schuh | 04eccfc | 2020-08-26 21:08:27 -0700 | [diff] [blame] | 518 | "//aos:json_to_flatbuffer", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 519 | "//aos/testing:googletest", |
| 520 | ], |
| 521 | ) |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 522 | |
Austin Schuh | a9abc03 | 2021-01-01 16:46:19 -0800 | [diff] [blame] | 523 | cc_library( |
| 524 | name = "testing_time_converter", |
| 525 | testonly = True, |
| 526 | srcs = ["testing_time_converter.cc"], |
| 527 | hdrs = ["testing_time_converter.h"], |
| 528 | deps = [ |
| 529 | ":multinode_timestamp_filter", |
| 530 | "//aos/events:simulated_event_loop", |
| 531 | "//aos/time", |
| 532 | ], |
| 533 | ) |
| 534 | |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 535 | cc_test( |
| 536 | name = "multinode_timestamp_filter_test", |
| 537 | srcs = [ |
| 538 | "multinode_timestamp_filter_test.cc", |
| 539 | ], |
| 540 | target_compatible_with = ["@platforms//os:linux"], |
| 541 | deps = [ |
| 542 | ":multinode_timestamp_filter", |
Austin Schuh | a9abc03 | 2021-01-01 16:46:19 -0800 | [diff] [blame] | 543 | ":testing_time_converter", |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 544 | ":timestamp_filter", |
| 545 | "//aos/testing:googletest", |
Austin Schuh | 87dd383 | 2021-01-01 23:07:31 -0800 | [diff] [blame] | 546 | "//third_party/gmp", |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 547 | "@com_github_stevengj_nlopt//:nlopt", |
| 548 | ], |
| 549 | ) |