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", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 375 | "//aos/testing:path", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 376 | ], |
| 377 | ) |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 378 | |
| 379 | flatbuffer_cc_library( |
| 380 | name = "web_proxy_fbs", |
| 381 | srcs = ["web_proxy.fbs"], |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 382 | gen_reflections = True, |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 383 | includes = [ |
| 384 | ":connect_fbs_includes", |
| 385 | "//aos:configuration_fbs_includes", |
| 386 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 387 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 388 | ) |
| 389 | |
| 390 | flatbuffer_ts_library( |
| 391 | name = "web_proxy_ts_fbs", |
| 392 | srcs = ["web_proxy.fbs"], |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 393 | includes = [ |
| 394 | ":connect_fbs_includes", |
| 395 | "//aos:configuration_fbs_includes", |
| 396 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 397 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 398 | ) |
| 399 | |
| 400 | cc_library( |
| 401 | name = "web_proxy_utils", |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 402 | srcs = ["web_proxy_utils.cc"], |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 403 | hdrs = ["web_proxy_utils.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 404 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 405 | deps = [ |
| 406 | ":connect_fbs", |
| 407 | ":web_proxy_fbs", |
| 408 | "//aos:configuration_fbs", |
| 409 | "//aos/events:event_loop", |
| 410 | "@com_github_google_flatbuffers//:flatbuffers", |
| 411 | ], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 412 | ) |
| 413 | |
| 414 | cc_library( |
| 415 | name = "web_proxy", |
Austin Schuh | 52e5e3a | 2021-04-24 22:30:02 -0700 | [diff] [blame] | 416 | srcs = [ |
| 417 | "rawrtc.cc", |
| 418 | "web_proxy.cc", |
| 419 | ], |
| 420 | hdrs = [ |
| 421 | "rawrtc.h", |
| 422 | "web_proxy.h", |
| 423 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 424 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 425 | deps = [ |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 426 | ":connect_fbs", |
James Kuszmaul | 4867136 | 2020-12-24 13:54:16 -0800 | [diff] [blame] | 427 | ":gen_embedded", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 428 | ":web_proxy_fbs", |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 429 | ":web_proxy_utils", |
| 430 | "//aos/events:shm_event_loop", |
James Kuszmaul | 8d928d0 | 2020-12-25 17:47:49 -0800 | [diff] [blame] | 431 | "//aos/mutex", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 432 | "//aos/seasocks:seasocks_logger", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 433 | "//third_party/seasocks", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 434 | "@com_github_google_glog//:glog", |
Austin Schuh | 52e5e3a | 2021-04-24 22:30:02 -0700 | [diff] [blame] | 435 | "@com_github_rawrtc_rawrtc//:rawrtc", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 436 | ], |
| 437 | ) |
| 438 | |
| 439 | gen_embedded( |
| 440 | name = "gen_embedded", |
| 441 | srcs = glob( |
| 442 | include = ["www_defaults/**/*"], |
| 443 | exclude = ["www/**/*"], |
| 444 | ), |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 445 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 446 | ) |
| 447 | |
| 448 | cc_binary( |
| 449 | name = "web_proxy_main", |
| 450 | srcs = ["web_proxy_main.cc"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 451 | data = [ |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 452 | "//aos/network/www:files", |
Austin Schuh | da9d060 | 2019-09-15 17:29:38 -0700 | [diff] [blame] | 453 | "//aos/network/www:main_bundle.min.js", |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 454 | "@com_github_google_flatbuffers//:flatjs", |
| 455 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 456 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 457 | deps = [ |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 458 | ":web_proxy", |
| 459 | "//aos:init", |
| 460 | "//aos/events:shm_event_loop", |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 461 | "@com_github_google_flatbuffers//:flatbuffers", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 462 | ], |
| 463 | ) |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 464 | |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 465 | cc_binary( |
| 466 | name = "log_web_proxy_main", |
| 467 | srcs = ["log_web_proxy_main.cc"], |
| 468 | args = [ |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 469 | "--data_dir=aos/network/www", |
| 470 | ], |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 471 | deps = [ |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 472 | ":web_proxy", |
| 473 | "//aos:init", |
| 474 | "//aos/events:simulated_event_loop", |
Austin Schuh | b06f03b | 2021-02-17 22:00:37 -0800 | [diff] [blame] | 475 | "//aos/events/logging:log_reader", |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 476 | "@com_github_google_flatbuffers//:flatbuffers", |
| 477 | ], |
| 478 | ) |
| 479 | |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 480 | cc_library( |
| 481 | name = "timestamp_filter", |
Austin Schuh | 7ee6f72 | 2020-08-24 16:19:36 -0700 | [diff] [blame] | 482 | srcs = ["timestamp_filter.cc"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 483 | hdrs = ["timestamp_filter.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 484 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 485 | deps = [ |
Austin Schuh | 04eccfc | 2020-08-26 21:08:27 -0700 | [diff] [blame] | 486 | "//aos:configuration", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 487 | "//aos/time", |
Austin Schuh | 85357ee | 2020-08-24 16:41:42 -0700 | [diff] [blame] | 488 | "@com_google_absl//absl/strings", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 489 | ], |
| 490 | ) |
| 491 | |
Austin Schuh | 0ca1fd3 | 2020-12-18 22:53:05 -0800 | [diff] [blame] | 492 | cc_library( |
| 493 | name = "multinode_timestamp_filter", |
| 494 | srcs = ["multinode_timestamp_filter.cc"], |
| 495 | hdrs = ["multinode_timestamp_filter.h"], |
| 496 | target_compatible_with = ["@platforms//os:linux"], |
| 497 | deps = [ |
| 498 | ":timestamp_filter", |
| 499 | "//aos:configuration", |
| 500 | "//aos/events:simulated_event_loop", |
Austin Schuh | e639ea1 | 2021-01-25 13:00:22 -0800 | [diff] [blame] | 501 | "//aos/events/logging:logfile_utils", |
Austin Schuh | 0ca1fd3 | 2020-12-18 22:53:05 -0800 | [diff] [blame] | 502 | "//aos/time", |
Austin Schuh | 0ca1fd3 | 2020-12-18 22:53:05 -0800 | [diff] [blame] | 503 | "@org_tuxfamily_eigen//:eigen", |
| 504 | ], |
| 505 | ) |
| 506 | |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 507 | cc_test( |
| 508 | name = "timestamp_filter_test", |
| 509 | srcs = [ |
| 510 | "timestamp_filter_test.cc", |
| 511 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 512 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 513 | deps = [ |
| 514 | ":timestamp_filter", |
Austin Schuh | 04eccfc | 2020-08-26 21:08:27 -0700 | [diff] [blame] | 515 | "//aos:json_to_flatbuffer", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 516 | "//aos/testing:googletest", |
| 517 | ], |
| 518 | ) |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 519 | |
Austin Schuh | a9abc03 | 2021-01-01 16:46:19 -0800 | [diff] [blame] | 520 | cc_library( |
| 521 | name = "testing_time_converter", |
| 522 | testonly = True, |
| 523 | srcs = ["testing_time_converter.cc"], |
| 524 | hdrs = ["testing_time_converter.h"], |
| 525 | deps = [ |
| 526 | ":multinode_timestamp_filter", |
| 527 | "//aos/events:simulated_event_loop", |
| 528 | "//aos/time", |
| 529 | ], |
| 530 | ) |
| 531 | |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 532 | cc_test( |
| 533 | name = "multinode_timestamp_filter_test", |
| 534 | srcs = [ |
| 535 | "multinode_timestamp_filter_test.cc", |
| 536 | ], |
| 537 | target_compatible_with = ["@platforms//os:linux"], |
| 538 | deps = [ |
| 539 | ":multinode_timestamp_filter", |
Austin Schuh | a9abc03 | 2021-01-01 16:46:19 -0800 | [diff] [blame] | 540 | ":testing_time_converter", |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 541 | ":timestamp_filter", |
| 542 | "//aos/testing:googletest", |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 543 | ], |
| 544 | ) |