blob: 0e3b8f7c67d4e007d27a6cbc004f227964802b71 [file] [log] [blame]
Austin Schuhf9724442018-10-28 20:30:21 -07001load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library")
James Kuszmaul27da8142019-07-21 16:13:55 -07002load("//tools/cpp/emscripten:defs.bzl", "emcc_binary")
James Kuszmaulf385c462019-12-24 09:37:34 -08003load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_python_library")
James Kuszmaul27da8142019-07-21 16:13:55 -07004
5emcc_binary(
6 name = "helloworld.html",
7 srcs = ["helloworld.cc"],
8)
Brian Silvermanb67da232015-09-12 23:50:30 -04009
James Kuszmaul9a05bfd2019-08-03 17:03:38 -070010emcc_binary(
11 name = "webgl.html",
12 srcs = ["webgl_draw_triangle.c"],
13)
14
15emcc_binary(
16 name = "webgl2.html",
James Kuszmaul36816f32019-08-31 16:58:23 -070017 srcs = ["webgl2_benchmark.cc"],
18 html_shell = "minimal_shell.html",
James Kuszmaul9a05bfd2019-08-03 17:03:38 -070019 # Enable WEBGL2 (-s is used by the emscripten
20 # compiler to specify sundry options).
21 linkopts = [
22 "-s",
23 "USE_WEBGL2=1",
James Kuszmaul36816f32019-08-31 16:58:23 -070024 "-s",
25 "TOTAL_MEMORY=" + repr(256 * 1024 * 1024),
James Kuszmaul9a05bfd2019-08-03 17:03:38 -070026 ],
27)
28
James Kuszmaul6271cf72019-09-18 20:10:08 -070029emcc_binary(
30 name = "plotter.html",
31 srcs = ["webgl2_plot_test.cc"],
32 html_shell = "minimal_shell.html",
33 linkopts = [
34 "-s",
35 "USE_WEBGL2=1",
36 "-s",
37 "FULL_ES3=1",
38 "-s",
39 "TOTAL_MEMORY=" + repr(256 * 1024 * 1024),
40 ],
41 deps = [
42 "//frc971/analysis/plotting:webgl2_animator",
43 "//frc971/analysis/plotting:webgl2_plotter",
44 ],
45)
46
Brian Silvermanfbe79b82015-09-12 15:10:54 -040047cc_test(
Austin Schuhf9724442018-10-28 20:30:21 -070048 name = "gflags_build_test",
49 size = "small",
50 srcs = [
51 "gflags.cc",
52 ],
53 deps = [
Brian Silverman16a923c2018-10-31 19:40:51 -070054 "@com_github_gflags_gflags//:gflags",
Austin Schuhf9724442018-10-28 20:30:21 -070055 ],
Brian Silvermanfbe79b82015-09-12 15:10:54 -040056)
Brian Silvermanb67da232015-09-12 23:50:30 -040057
Brian Silverman516ceb22015-11-27 01:29:05 -050058cc_binary(
Austin Schuhf9724442018-10-28 20:30:21 -070059 name = "tcmalloc_build_test_binary",
60 srcs = [
61 "tcmalloc.cc",
62 ],
Brian Silverman516ceb22015-11-27 01:29:05 -050063)
64
65sh_test(
Austin Schuhf9724442018-10-28 20:30:21 -070066 name = "tcmalloc_build_test",
67 size = "small",
68 srcs = [
69 "tcmalloc_test.sh",
70 ],
71 data = [
72 ":tcmalloc_build_test_binary",
73 ],
Brian Silverman516ceb22015-11-27 01:29:05 -050074)
Brian Silvermaneb16fa42016-02-20 15:29:56 -050075
Austin Schuhf9724442018-10-28 20:30:21 -070076cc_proto_library(
77 name = "proto_build_test_library",
78 srcs = ["proto.proto"],
79 deps = [
80 ":proto_build_test_library_base",
81 "@com_google_protobuf//:cc_wkt_protos",
82 ],
Parker Schuh971588a2017-03-01 22:15:04 -080083)
84
Austin Schuhf9724442018-10-28 20:30:21 -070085cc_proto_library(
86 name = "proto_build_test_library_base",
87 srcs = ["proto_base.proto"],
Brian Silvermaneb16fa42016-02-20 15:29:56 -050088)
89
90cc_test(
Austin Schuhf9724442018-10-28 20:30:21 -070091 name = "proto_build_test",
92 size = "small",
93 srcs = [
94 "proto.cc",
95 ],
96 deps = [
97 ":proto_build_test_library",
98 "//aos/testing:googletest",
99 ],
Brian Silvermaneb16fa42016-02-20 15:29:56 -0500100)
James Kuszmaulf385c462019-12-24 09:37:34 -0800101
102flatbuffer_python_library(
103 name = "test_python_fbs",
104 srcs = ["test.fbs"],
105 namespace = "aos.examples",
106 tables = [
107 "Foo",
108 "Bar",
109 ],
110 visibility = ["//visibility:public"],
111)
112
113py_test(
114 name = "python_fbs",
115 srcs = ["python_fbs.py"],
116 deps = [":test_python_fbs"],
117)
Brian Silverman4fe44ea2020-02-02 12:56:42 -0800118
119py_test(
120 name = "python3_opencv",
121 srcs = ["python_opencv.py"],
122 default_python_version = "PY3",
123 main = "python_opencv.py",
124 srcs_version = "PY2AND3",
125 deps = ["@opencv_contrib_nonfree_amd64//:python_opencv"],
126)