forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBUILD
388 lines (361 loc) · 12.9 KB
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
load(
"//bazel:envoy_build_system.bzl",
"envoy_benchmark_test",
"envoy_cc_benchmark_binary",
"envoy_cc_fuzz_test",
"envoy_cc_test",
"envoy_cc_test_library",
"envoy_package",
"envoy_select_admin_functionality",
"envoy_select_hot_restart",
)
load("//source/extensions:all_extensions.bzl", "envoy_all_extensions")
load("//bazel:repositories.bzl", "PPC_SKIP_TARGETS", "WINDOWS_SKIP_TARGETS")
licenses(["notice"]) # Apache 2
envoy_package()
envoy_cc_test(
name = "api_listener_test",
srcs = ["api_listener_test.cc"],
deps = [
":utility_lib",
"//source/extensions/listener_managers/listener_manager:listener_manager_lib",
"//source/extensions/request_id/uuid:config",
"//test/mocks/network:network_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/server:listener_component_factory_mocks",
"//test/mocks/server:worker_factory_mocks",
"//test/mocks/server:worker_mocks",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/listener/v3:pkg_cc_proto",
],
)
envoy_cc_test(
name = "backtrace_test",
srcs = ["backtrace_test.cc"],
tags = ["backtrace"],
deps = [
"//source/server:backtrace_lib",
"//test/test_common:logging_lib",
],
)
envoy_cc_test(
name = "configuration_impl_test",
srcs = ["configuration_impl_test.cc"],
data = [
"//test/config/integration/certs",
],
deps = [
"//source/common/api:api_lib",
"//source/common/event:dispatcher_lib",
"//source/common/http:context_lib",
"//source/common/upstream:cluster_manager_lib",
"//source/extensions/access_loggers/file:config",
"//source/extensions/clusters/static:static_cluster_lib",
"//source/extensions/stat_sinks/statsd:config",
"//source/extensions/transport_sockets/raw_buffer:config",
"//source/server:configuration_lib",
"//test/common/upstream:utility_lib",
"//test/mocks:common_lib",
"//test/mocks/network:network_mocks",
"//test/mocks/server:instance_mocks",
"//test/test_common:environment_lib",
"//test/test_common:test_runtime_lib",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/bootstrap/v3:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/config/metrics/v3:pkg_cc_proto",
],
)
envoy_cc_test(
name = "connection_handler_test",
srcs = ["connection_handler_test.cc"],
deps = [
"//source/common/common:utility_lib",
"//source/common/config:utility_lib",
"//source/common/network:address_lib",
"//source/common/network:connection_balancer_lib",
"//source/common/network:udp_packet_writer_handler_lib",
"//source/common/stats:stats_lib",
"//source/extensions/listener_managers/listener_manager:active_raw_udp_listener_config",
"//source/extensions/listener_managers/listener_manager:connection_handler_lib",
"//test/mocks/access_log:access_log_mocks",
"//test/mocks/api:api_mocks",
"//test/mocks/network:network_mocks",
"//test/test_common:network_utility_lib",
"//test/test_common:test_runtime_lib",
"//test/test_common:threadsafe_singleton_injector_lib",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/config/listener/v3:pkg_cc_proto",
],
)
envoy_cc_test(
name = "active_tcp_listener_test",
srcs = ["active_tcp_listener_test.cc"],
deps = [
"//source/common/common:utility_lib",
"//source/common/config:utility_lib",
"//source/common/network:address_lib",
"//source/common/network:connection_balancer_lib",
"//source/common/stats:stats_lib",
"//source/extensions/listener_managers/listener_manager:connection_handler_lib",
"//test/mocks/network:io_handle_mocks",
"//test/mocks/network:network_mocks",
"//test/test_common:network_utility_lib",
],
)
envoy_cc_test(
name = "active_udp_listener_test",
srcs = ["active_udp_listener_test.cc"],
deps = [
"//source/common/network:listen_socket_lib",
"//source/common/network:socket_option_factory_lib",
"//source/common/network:udp_packet_writer_handler_lib",
"//source/server:active_udp_listener",
"//test/mocks/network:network_mocks",
"//test/test_common:environment_lib",
"//test/test_common:network_utility_lib",
],
)
envoy_cc_test(
name = "drain_manager_impl_test",
srcs = ["drain_manager_impl_test.cc"],
deps = [
"//source/server:drain_manager_lib",
"//test/mocks/event:event_mocks",
"//test/mocks/server:instance_mocks",
"@envoy_api//envoy/config/listener/v3:pkg_cc_proto",
],
)
envoy_cc_test(
name = "filter_config_test",
srcs = ["filter_config_test.cc"],
deps = [
"//envoy/server:filter_config_interface",
"//source/extensions/filters/http/common:pass_through_filter_lib",
"//test/mocks/server:server_mocks",
],
)
envoy_cc_test(
name = "hot_restart_impl_test",
srcs = envoy_select_hot_restart(["hot_restart_impl_test.cc"]),
deps = [
"//source/common/api:os_sys_calls_lib",
"//source/common/stats:stats_lib",
"//source/server:hot_restart_lib",
"//test/mocks/server:server_mocks",
"//test/test_common:logging_lib",
"//test/test_common:threadsafe_singleton_injector_lib",
],
)
envoy_cc_test(
name = "hot_restarting_parent_test",
srcs = envoy_select_hot_restart(["hot_restarting_parent_test.cc"]),
deps = [
"//source/common/stats:stats_lib",
"//source/server:hot_restart_lib",
"//source/server:hot_restarting_child",
"//test/mocks/network:network_mocks",
"//test/mocks/server:server_mocks",
],
)
envoy_cc_test(
name = "hot_restarting_base_test",
srcs = envoy_select_hot_restart(["hot_restarting_base_test.cc"]),
deps = [
"//source/server:hot_restart_lib",
"//source/server:hot_restarting_base",
"//test/mocks/api:api_mocks",
"//test/mocks/network:network_mocks",
"//test/test_common:threadsafe_singleton_injector_lib",
],
)
envoy_cc_test(
name = "guarddog_impl_test",
size = "small",
srcs = ["guarddog_impl_test.cc"],
deps = [
"//envoy/common:time_interface",
"//source/common/api:api_lib",
"//source/common/common:macros",
"//source/common/common:utility_lib",
"//source/common/stats:stats_lib",
"//source/server:guarddog_lib",
"//test/mocks:common_lib",
"//test/mocks/event:event_mocks",
"//test/mocks/server:watchdog_config_mocks",
"//test/mocks/stats:stats_mocks",
"//test/test_common:registry_lib",
"//test/test_common:simulated_time_system_lib",
"//test/test_common:utility_lib",
],
)
envoy_cc_test(
name = "options_impl_test",
srcs = ["options_impl_test.cc"],
deps = [
"//envoy/config:typed_config_interface",
"//envoy/server:filter_config_interface",
"//source/common/common:utility_lib",
"//source/common/stats:stats_lib",
"//source/extensions/filters/http/buffer:config",
"//source/server:options_lib",
"//test/mocks/api:api_mocks",
"//test/test_common:environment_lib",
"//test/test_common:logging_lib",
"//test/test_common:registry_lib",
"//test/test_common:threadsafe_singleton_injector_lib",
"//test/test_common:utility_lib",
"@envoy_api//envoy/admin/v3:pkg_cc_proto",
"@envoy_api//envoy/config/bootstrap/v3:pkg_cc_proto",
"@envoy_api//envoy/config/filter/http/buffer/v2:pkg_cc_proto",
"@envoy_api//envoy/extensions/filters/http/buffer/v3:pkg_cc_proto",
],
)
envoy_cc_test(
name = "overload_manager_impl_test",
srcs = ["overload_manager_impl_test.cc"],
deps = [
"//envoy/registry",
"//source/common/stats:isolated_store_lib",
"//source/extensions/resource_monitors/common:factory_base_lib",
"//source/server:overload_manager_lib",
"//test/mocks/event:event_mocks",
"//test/mocks/protobuf:protobuf_mocks",
"//test/mocks/server:options_mocks",
"//test/mocks/thread_local:thread_local_mocks",
"//test/test_common:registry_lib",
"//test/test_common:test_runtime_lib",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/overload/v3:pkg_cc_proto",
],
)
envoy_cc_fuzz_test(
name = "server_fuzz_test",
srcs = ["server_fuzz_test.cc"],
corpus = "server_corpus",
deps = [
"//source/common/thread_local:thread_local_lib",
"//source/server:server_lib",
"//test/integration:integration_lib",
"//test/mocks/server:options_mocks",
"//test/mocks/server:hot_restart_mocks",
"//test/test_common:environment_lib",
] + select({
"//bazel:windows_x86_64": envoy_all_extensions(WINDOWS_SKIP_TARGETS),
"//bazel:linux_ppc": envoy_all_extensions(PPC_SKIP_TARGETS),
"//bazel:gcc_build": [],
"//conditions:default": envoy_all_extensions(),
}),
)
filegroup(
name = "server_test_data",
srcs = glob(["test_data/server/**"]),
)
filegroup(
name = "runtime_test_data",
srcs = glob(["test_data/runtime/**"]),
)
filegroup(
name = "static_validation_test_data",
srcs = glob(["test_data/static_validation/**"]),
)
envoy_cc_test(
name = "server_test",
srcs = envoy_select_admin_functionality(["server_test.cc"]),
data = [
":runtime_test_data",
":server_test_data",
":static_validation_test_data",
],
deps = [
"//source/common/version:version_lib",
"//source/extensions/access_loggers/file:config",
"//source/extensions/clusters/strict_dns:strict_dns_cluster_lib",
"//source/extensions/filters/http/buffer:config",
"//source/extensions/filters/http/grpc_http1_bridge:config",
"//source/extensions/filters/http/health_check:config",
"//source/extensions/filters/http/router:config",
"//source/extensions/filters/network/http_connection_manager:config",
"//source/extensions/tracers/zipkin:config",
"//source/server:process_context_lib",
"//source/server:server_lib",
"//test/common/config:dummy_config_proto_cc_proto",
"//test/common/stats:stat_test_utility_lib",
"//test/config:v2_link_hacks",
"//test/integration:integration_lib",
"//test/mocks/server:bootstrap_extension_factory_mocks",
"//test/mocks/server:fatal_action_factory_mocks",
"//test/mocks/server:hot_restart_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/server:options_mocks",
"//test/mocks/server:overload_manager_mocks",
"//test/mocks/stats:stats_mocks",
"//test/test_common:logging_lib",
"//test/test_common:registry_lib",
"//test/test_common:simulated_time_system_lib",
"//test/test_common:test_runtime_lib",
"//test/test_common:test_time_lib",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
],
)
envoy_cc_test(
name = "ssl_context_manager_test",
srcs = ["ssl_context_manager_test.cc"],
deps = [
"//source/server:ssl_context_manager_lib",
"//test/mocks/ssl:ssl_mocks",
"//test/mocks/stats:stats_mocks",
"//test/test_common:simulated_time_system_lib",
"//test/test_common:utility_lib",
],
)
envoy_cc_test_library(
name = "utility_lib",
hdrs = ["utility.h"],
deps = [
"//source/common/protobuf:utility_lib",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/listener/v3:pkg_cc_proto",
],
)
envoy_cc_test(
name = "worker_impl_test",
srcs = ["worker_impl_test.cc"],
deps = [
"//source/common/api:api_lib",
"//source/common/event:dispatcher_lib",
"//source/server:worker_lib",
"//test/mocks/network:network_mocks",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/server:guard_dog_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/server:overload_manager_mocks",
"//test/mocks/thread_local:thread_local_mocks",
"//test/test_common:utility_lib",
],
)
envoy_cc_benchmark_binary(
name = "server_stats_flush_benchmark",
srcs = ["server_stats_flush_benchmark_test.cc"],
external_deps = [
"benchmark",
],
deps = [
"//envoy/stats:stats_interface",
"//source/common/stats:thread_local_store_lib",
"//source/server:server_lib",
"//test/test_common:simulated_time_system_lib",
],
)
envoy_benchmark_test(
name = "server_stats_flush_benchmark_test",
benchmark_binary = "server_stats_flush_benchmark",
)
envoy_cc_test(
name = "utils_test",
srcs = envoy_select_admin_functionality(["utils_test.cc"]),
deps = [
"//source/server:utils_lib",
],
)