forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
216 lines (201 loc) · 6.71 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
load(
"//bazel:envoy_build_system.bzl",
"envoy_cc_test",
"envoy_cc_test_library",
"envoy_package",
"envoy_select_admin_functionality",
"envoy_sh_test",
)
licenses(["notice"]) # Apache 2
envoy_package()
envoy_sh_test(
name = "build_id_test",
srcs = ["build_id_test.sh"],
coverage = False,
data = [
"//bazel:raw_build_id.ldscript",
"//source/exe:envoy-static",
],
# The Windows equivalent of a binaries' "link stamp" is a resource file descriptor of the
# executable. Our build revision API and output of --version flags are sufficient for now.
tags = ["skip_on_windows"],
)
envoy_sh_test(
name = "envoy_static_test",
srcs = ["envoy_static_test.sh"],
coverage = False,
data = ["//source/exe:envoy-static"],
# TODO(Windows): expect to test to leverage dumpbin.exe to confirm we avoid msvcrt, see
# https://github.com/envoyproxy/envoy/pull/8280#pullrequestreview-290187328
# Sanitizers doesn't like statically linked lib(std)c++ and libgcc, skip this test in that context.
tags = [
"no_san",
"skip_on_windows",
],
)
envoy_sh_test(
name = "pie_test",
srcs = ["pie_test.sh"],
coverage = False,
data = ["//source/exe:envoy-static"],
# Since VS2015 or even earlier, link.exe defaults to PIE generation
tags = [
"nofips",
"skip_on_windows",
],
)
envoy_sh_test(
name = "version_out_test",
srcs = ["version_out_test.sh"],
coverage = False,
data = [
"//:VERSION.txt",
"//bazel:raw_build_id.ldscript",
"//source/exe:envoy-static",
],
)
envoy_cc_test_library(
name = "main_common_test_base_lib",
srcs = ["main_common_test_base.cc"],
hdrs = ["main_common_test_base.h"],
data = [
"//test/config/integration:google_com_proxy_port_0",
],
rbe_pool = "6gig",
deps = [
"//source/common/api:api_lib",
"//source/common/stats:isolated_store_lib",
"//source/exe:envoy_main_common_with_core_extensions_lib",
"//source/exe:platform_impl_lib",
"//source/extensions/clusters/logical_dns:logical_dns_cluster_lib",
"//test/mocks/runtime:runtime_mocks",
"//test/test_common:contention_lib",
"//test/test_common:environment_lib",
"//test/test_common:thread_factory_for_test_lib",
],
)
envoy_cc_test(
name = "main_common_test",
srcs = envoy_select_admin_functionality(["main_common_test.cc"]),
data = [
"//test/config/integration:google_com_proxy_port_0",
],
rbe_pool = "6gig",
deps = envoy_select_admin_functionality([":main_common_test_base_lib"]) + [
"//source/common/api:api_lib",
"//source/common/formatter:formatter_extension_lib",
"//source/exe:envoy_main_common_with_core_extensions_lib",
"//source/exe:platform_impl_lib",
"//source/extensions/clusters/logical_dns:logical_dns_cluster_lib",
"//test/mocks/runtime:runtime_mocks",
"//test/test_common:contention_lib",
"//test/test_common:environment_lib",
],
)
envoy_cc_test(
name = "admin_response_test",
srcs = envoy_select_admin_functionality(["admin_response_test.cc"]),
data = [
"//test/config/integration:google_com_proxy_port_0",
],
rbe_pool = "6gig",
deps = envoy_select_admin_functionality([":main_common_test_base_lib"]) + [
"//source/common/api:api_lib",
"//source/common/formatter:formatter_extension_lib",
"//source/exe:envoy_main_common_with_core_extensions_lib",
"//source/exe:platform_impl_lib",
"//source/extensions/clusters/logical_dns:logical_dns_cluster_lib",
"//test/mocks/runtime:runtime_mocks",
"//test/test_common:contention_lib",
"//test/test_common:environment_lib",
],
)
envoy_cc_test(
name = "extra_extensions_test",
size = "large",
srcs = ["extra_extensions_test.cc"],
rbe_pool = "6gig",
deps = [
"//test/test_common:environment_lib",
] + select({
# gcc RBE build has trouble compiling target with all extensions
"//bazel:gcc_build": ["//source/exe:envoy_main_common_with_core_extensions_lib"],
# This dependency MUST be main_common_with_all_extensions_lib to meet the purpose of this test
"//conditions:default": ["//source/exe:main_common_with_all_extensions_lib"],
}),
)
envoy_cc_test(
name = "terminate_handler_test",
srcs = ["terminate_handler_test.cc"],
rbe_pool = "6gig",
tags = ["backtrace"],
deps = [
"//source/exe:terminate_handler_lib",
"//test/test_common:utility_lib",
],
)
envoy_cc_test(
name = "check_extensions_against_registry_test",
size = "large",
srcs = ["check_extensions_against_registry_test.cc"],
data = [
"//source/extensions:extensions_metadata.yaml",
],
rbe_pool = "6gig",
deps = [
"//test/test_common:environment_lib",
] + select({
# gcc RBE build has trouble compiling target with all extensions
"//bazel:gcc_build": ["//source/exe:envoy_main_common_with_core_extensions_lib"],
# This dependency MUST be main_common_lib to meet the purpose of this test
"//conditions:default": ["//source/exe:main_common_with_all_extensions_lib"],
}),
)
envoy_cc_test(
name = "win32_scm_test",
srcs = ["win32_scm_test.cc"],
coverage = False,
data = [
"//source/exe:envoy-static",
"//test/config/integration:google_com_proxy_port_0",
],
rbe_pool = "6gig",
deps = [
"//source/common/api:api_lib",
"//source/exe:envoy_main_common_with_core_extensions_lib",
"//test/mocks/runtime:runtime_mocks",
"//test/test_common:contention_lib",
"//test/test_common:environment_lib",
],
)
# Due to the limitiations of how Windows signals work
# this test cannot be executed through bazel and it must
# be executed as a standalone executable.
# e.g.: `./bazel-bin/test/exe/win32_outofproc_main_test.exe`
envoy_cc_test(
name = "win32_outofproc_main_test",
srcs = ["win32_outofproc_main_test.cc"],
coverage = False,
data = [
"//source/exe:envoy-static",
"//test/config/integration:google_com_proxy_port_0",
],
# TODO(envoyproxy/windows-dev): Disable the manual tag.
tags = ["manual"],
deps = [
"//source/common/api:api_lib",
"//source/exe:main_common_with_all_extensions_lib",
"//test/mocks/runtime:runtime_mocks",
"//test/test_common:contention_lib",
"//test/test_common:environment_lib",
],
)
envoy_cc_test(
name = "platform_impl_test",
srcs = ["platform_impl_test.cc"],
rbe_pool = "6gig",
deps = [
"//source/exe:platform_impl_lib",
"//test/mocks/runtime:runtime_mocks",
],
)