blob: fe79a4a4e86e11717eb3cea7fe2b7c7ca34e44da [file] [log] [blame]
Austin Schuh1bf8a212019-05-26 22:13:14 -07001package(default_visibility = ["//visibility:public"])
Brian Silverman100534c2015-09-07 15:51:23 -04002
Alex Perrycb7da4b2019-08-28 19:35:56 -07003load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
Brian Silverman100534c2015-09-07 15:51:23 -04004
5cc_library(
Austin Schuh1bf8a212019-05-26 22:13:14 -07006 name = "action_lib",
7 srcs = [
8 "actions.cc",
9 "actor.cc",
10 ],
11 hdrs = [
12 "actions.h",
13 "actor.h",
14 ],
15 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -070016 ":actions_fbs",
Austin Schuh1bf8a212019-05-26 22:13:14 -070017 "//aos/controls:control_loop",
18 "//aos/logging",
Austin Schuh1bf8a212019-05-26 22:13:14 -070019 "//aos/time",
20 "//aos/util:phased_loop",
21 ],
Brian Silverman100534c2015-09-07 15:51:23 -040022)
23
Alex Perrycb7da4b2019-08-28 19:35:56 -070024flatbuffer_cc_library(
25 name = "actions_fbs",
26 srcs = ["actions.fbs"],
Brian Silverman100534c2015-09-07 15:51:23 -040027)
28
Alex Perrycb7da4b2019-08-28 19:35:56 -070029flatbuffer_cc_library(
30 name = "test_action_fbs",
31 srcs = ["test_action.fbs"],
Brian Silverman100534c2015-09-07 15:51:23 -040032)
33
34cc_test(
Austin Schuh1bf8a212019-05-26 22:13:14 -070035 name = "action_test",
36 srcs = [
37 "action_test.cc",
38 ],
Alex Perrycb7da4b2019-08-28 19:35:56 -070039 data = ["action_test_config.json"],
Austin Schuh1bf8a212019-05-26 22:13:14 -070040 deps = [
41 ":action_lib",
Alex Perrycb7da4b2019-08-28 19:35:56 -070042 ":actions_fbs",
43 ":test_action_fbs",
Austin Schuh1bf8a212019-05-26 22:13:14 -070044 "//aos:event",
Austin Schuh1bf8a212019-05-26 22:13:14 -070045 "//aos/events:simulated_event_loop",
46 "//aos/logging",
Austin Schuh1bf8a212019-05-26 22:13:14 -070047 "//aos/testing:googletest",
48 "//aos/testing:test_shm",
49 "//aos/time",
50 ],
Brian Silverman100534c2015-09-07 15:51:23 -040051)