blob: d142c13b70228331785492b7959805a311e55eff [file] [log] [blame]
Austin Schuhf9724442018-10-28 20:30:21 -07001load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library")
Brian Silverman28760272020-02-02 13:21:51 -08002load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_py_library")
James Kuszmaul27da8142019-07-21 16:13:55 -07003
Brian Silvermanfbe79b82015-09-12 15:10:54 -04004cc_test(
Austin Schuhf9724442018-10-28 20:30:21 -07005 name = "gflags_build_test",
6 size = "small",
7 srcs = [
8 "gflags.cc",
9 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080010 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhf9724442018-10-28 20:30:21 -070011 deps = [
Brian Silverman16a923c2018-10-31 19:40:51 -070012 "@com_github_gflags_gflags//:gflags",
Austin Schuhf9724442018-10-28 20:30:21 -070013 ],
Brian Silvermanfbe79b82015-09-12 15:10:54 -040014)
Brian Silvermanb67da232015-09-12 23:50:30 -040015
Brian Silverman516ceb22015-11-27 01:29:05 -050016cc_binary(
Austin Schuhf9724442018-10-28 20:30:21 -070017 name = "tcmalloc_build_test_binary",
18 srcs = [
19 "tcmalloc.cc",
20 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080021 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman516ceb22015-11-27 01:29:05 -050022)
23
24sh_test(
Austin Schuhf9724442018-10-28 20:30:21 -070025 name = "tcmalloc_build_test",
26 size = "small",
27 srcs = [
28 "tcmalloc_test.sh",
29 ],
30 data = [
31 ":tcmalloc_build_test_binary",
32 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080033 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman516ceb22015-11-27 01:29:05 -050034)
Brian Silvermaneb16fa42016-02-20 15:29:56 -050035
Austin Schuhf9724442018-10-28 20:30:21 -070036cc_proto_library(
37 name = "proto_build_test_library",
38 srcs = ["proto.proto"],
Philipp Schraderdada1072020-11-24 11:34:46 -080039 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhf9724442018-10-28 20:30:21 -070040 deps = [
41 ":proto_build_test_library_base",
42 "@com_google_protobuf//:cc_wkt_protos",
43 ],
Parker Schuh971588a2017-03-01 22:15:04 -080044)
45
Austin Schuhf9724442018-10-28 20:30:21 -070046cc_proto_library(
47 name = "proto_build_test_library_base",
48 srcs = ["proto_base.proto"],
Philipp Schraderdada1072020-11-24 11:34:46 -080049 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermaneb16fa42016-02-20 15:29:56 -050050)
51
52cc_test(
Austin Schuhf9724442018-10-28 20:30:21 -070053 name = "proto_build_test",
54 size = "small",
55 srcs = [
56 "proto.cc",
57 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080058 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhf9724442018-10-28 20:30:21 -070059 deps = [
60 ":proto_build_test_library",
61 "//aos/testing:googletest",
62 ],
Brian Silvermaneb16fa42016-02-20 15:29:56 -050063)
James Kuszmaulf385c462019-12-24 09:37:34 -080064
Brian Silverman28760272020-02-02 13:21:51 -080065flatbuffer_py_library(
James Kuszmaulf385c462019-12-24 09:37:34 -080066 name = "test_python_fbs",
67 srcs = ["test.fbs"],
68 namespace = "aos.examples",
69 tables = [
70 "Foo",
71 "Bar",
72 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080073 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaulf385c462019-12-24 09:37:34 -080074 visibility = ["//visibility:public"],
75)
76
77py_test(
78 name = "python_fbs",
79 srcs = ["python_fbs.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -080080 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaulf385c462019-12-24 09:37:34 -080081 deps = [":test_python_fbs"],
82)
Brian Silverman4fe44ea2020-02-02 12:56:42 -080083
84py_test(
85 name = "python3_opencv",
86 srcs = ["python_opencv.py"],
Brian Silverman4fe44ea2020-02-02 12:56:42 -080087 main = "python_opencv.py",
Philipp Schraderdada1072020-11-24 11:34:46 -080088 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman4fe44ea2020-02-02 12:56:42 -080089 deps = ["@opencv_contrib_nonfree_amd64//:python_opencv"],
90)
James Kuszmaulc91e4402020-05-10 18:47:20 -070091
92py_test(
93 name = "python_jinja2",
94 srcs = ["python_jinja2.py"],
95 srcs_version = "PY2AND3",
Philipp Schraderdada1072020-11-24 11:34:46 -080096 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaulc91e4402020-05-10 18:47:20 -070097 deps = ["@python_jinja2"],
98)