Merge pull request #18479 from billfeng327/feature/reinstate-rbe-windows

Reinstated Bazel Windows local build
pull/18374/head^2
Bill Feng 6 years ago committed by GitHub
commit ade5193c3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 36
      BUILD
  2. 24
      bazel/grpc_build_system.bzl
  3. 1
      test/core/bad_connection/BUILD
  4. 1
      test/core/client_channel/BUILD
  5. 11
      test/core/end2end/generate_tests.bzl
  6. 10
      test/core/iomgr/BUILD
  7. 1
      test/cpp/common/BUILD
  8. 2
      test/cpp/end2end/BUILD
  9. 1
      test/cpp/interop/BUILD
  10. 18
      test/cpp/microbenchmarks/BUILD
  11. 5
      test/cpp/naming/generate_resolver_component_tests.bzl
  12. 1
      test/cpp/performance/BUILD
  13. 1
      test/cpp/qps/qps_benchmark_script.bzl
  14. 3
      test/cpp/server/BUILD
  15. 1
      test/cpp/server/load_reporter/BUILD
  16. 6
      tools/remote_build/README.md
  17. 3
      tools/remote_build/windows.bazelrc

36
BUILD

@ -361,10 +361,10 @@ grpc_cc_library(
"gpr",
"grpc",
"grpc++_base",
"grpc_cfstream",
"grpc++_codegen_base",
"grpc++_codegen_base_src",
"grpc++_codegen_proto",
"grpc_cfstream",
],
)
@ -2317,34 +2317,34 @@ grpc_cc_library(
name = "envoy_ads_upb",
srcs = [
"src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/cds.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/cds.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/eds.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c",
"src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c",
],
hdrs = [
"src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/cds.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/cds.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/eds.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h",
"src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h",
],
language = "c++",
external_deps = [
"upb_lib",
],
language = "c++",
deps = [
":envoy_core_upb",
":envoy_type_upb",
":google_api_upb",
":proto_gen_validate_upb",
]
],
)
grpc_cc_library(
@ -2365,15 +2365,16 @@ grpc_cc_library(
"src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h",
],
language = "c++",
external_deps = [
"upb_lib",
],
language = "c++",
tags = ["no_windows"],
deps = [
":envoy_type_upb",
":google_api_upb",
":proto_gen_validate_upb"
]
":proto_gen_validate_upb",
],
)
grpc_cc_library(
@ -2386,14 +2387,15 @@ grpc_cc_library(
"src/core/ext/upb-generated/envoy/type/percent.upb.h",
"src/core/ext/upb-generated/envoy/type/range.upb.h",
],
language = "c++",
external_deps = [
"upb_lib",
],
language = "c++",
tags = ["no_windows"],
deps = [
":google_api_upb",
":proto_gen_validate_upb"
]
":proto_gen_validate_upb",
],
)
grpc_cc_library(
@ -2406,13 +2408,14 @@ grpc_cc_library(
"src/core/ext/upb-generated/gogoproto/gogo.upb.h",
"src/core/ext/upb-generated/validate/validate.upb.h",
],
language = "c++",
external_deps = [
"upb_lib",
],
language = "c++",
tags = ["no_windows"],
deps = [
":google_api_upb",
]
],
)
grpc_cc_library(
@ -2441,10 +2444,11 @@ grpc_cc_library(
"src/core/ext/upb-generated/google/protobuf/wrappers.upb.h",
"src/core/ext/upb-generated/google/rpc/status.upb.h",
],
language = "c++",
external_deps = [
"upb_lib",
],
language = "c++",
tags = ["no_windows"],
)
grpc_generate_one_off_targets()

@ -80,7 +80,8 @@ def grpc_cc_library(
visibility = None,
alwayslink = 0,
data = [],
use_cfstream = False):
use_cfstream = False,
tags = []):
copts = []
if use_cfstream:
copts = if_mac(["-DGRPC_CFSTREAM"])
@ -117,6 +118,7 @@ def grpc_cc_library(
],
alwayslink = alwayslink,
data = data,
tags = tags,
)
def grpc_proto_plugin(name, srcs = [], deps = []):
@ -149,7 +151,6 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
if language.upper() == "C":
copts = copts + if_not_windows(["-std=c99"])
args = {
"name": name,
"srcs": srcs,
"args": args,
"data": data,
@ -161,7 +162,17 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
"exec_compatible_with": exec_compatible_with,
}
if uses_polling:
native.cc_test(testonly = True, tags = ["manual"], **args)
# Only run targets with pollers for non-MSVC
# TODO(yfen): Enable MSVC for poller-enabled targets without pollers
native.cc_test(
name = name,
testonly = True,
tags = [
"manual",
"no_windows",
],
**args
)
for poller in POLLERS:
native.sh_test(
name = name + "@poller=" + poller,
@ -175,13 +186,13 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
poller,
"$(location %s)" % name,
] + args["args"],
tags = tags,
tags = (tags + ["no_windows"]),
exec_compatible_with = exec_compatible_with,
)
else:
native.cc_test(**args)
native.cc_test(tags = tags, **args)
def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], data = [], language = "C++", testonly = False, linkshared = False, linkopts = []):
def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], data = [], language = "C++", testonly = False, linkshared = False, linkopts = [], tags = []):
copts = []
if language.upper() == "C":
copts = ["-std=c99"]
@ -195,6 +206,7 @@ def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], da
deps = deps + _get_external_deps(external_deps),
copts = copts,
linkopts = if_not_windows(["-pthread"]) + linkopts,
tags = tags,
)
def grpc_generate_one_off_targets():

@ -29,4 +29,5 @@ grpc_cc_binary(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)

@ -52,6 +52,7 @@ grpc_cc_test(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(

@ -31,7 +31,8 @@ def _fixture_options(
is_http2 = True,
supports_proxy_auth = False,
supports_write_buffering = True,
client_channel = True):
client_channel = True,
supports_msvc = True):
return struct(
fullstack = fullstack,
includes_proxy = includes_proxy,
@ -44,6 +45,7 @@ def _fixture_options(
supports_proxy_auth = supports_proxy_auth,
supports_write_buffering = supports_write_buffering,
client_channel = client_channel,
supports_msvc = supports_msvc,
#_platforms=_platforms,
)
@ -120,10 +122,11 @@ END2END_NOSEC_FIXTURES = {
client_channel = False,
secure = False,
_platforms = ["linux", "mac", "posix"],
supports_msvc = False,
),
"h2_full": _fixture_options(secure = False),
"h2_full+pipe": _fixture_options(secure = False, _platforms = ["linux"]),
"h2_full+trace": _fixture_options(secure = False, tracing = True),
"h2_full+pipe": _fixture_options(secure = False, _platforms = ["linux"], supports_msvc = False),
"h2_full+trace": _fixture_options(secure = False, tracing = True, supports_msvc = False),
"h2_full+workarounds": _fixture_options(secure = False),
"h2_http_proxy": _fixture_options(secure = False, supports_proxy_auth = True),
"h2_proxy": _fixture_options(secure = False, includes_proxy = True),
@ -152,6 +155,7 @@ END2END_NOSEC_FIXTURES = {
dns_resolver = False,
_platforms = ["linux", "mac", "posix"],
secure = False,
supports_msvc = False,
),
}
@ -463,4 +467,5 @@ def grpc_end2end_nosec_tests():
t,
poller,
],
tags = ["no_windows"],
)

@ -81,6 +81,7 @@ grpc_cc_test(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(
@ -92,6 +93,7 @@ grpc_cc_test(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(
@ -103,6 +105,7 @@ grpc_cc_test(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(
@ -139,6 +142,7 @@ grpc_cc_test(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(
@ -153,6 +157,7 @@ grpc_cc_test(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(
@ -214,6 +219,7 @@ grpc_cc_test(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(
@ -225,6 +231,7 @@ grpc_cc_test(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(
@ -237,6 +244,7 @@ grpc_cc_test(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(
@ -259,6 +267,7 @@ grpc_cc_test(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(
@ -303,4 +312,5 @@ grpc_cc_test(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)

@ -28,6 +28,7 @@ grpc_cc_test(
"//:grpc++_unsecure",
"//test/core/util:grpc_test_util_unsecure",
],
tags = ["no_windows"],
)
grpc_cc_test(

@ -99,6 +99,7 @@ grpc_cc_test(
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(
@ -633,6 +634,7 @@ grpc_cc_test(
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(

@ -161,4 +161,5 @@ grpc_cc_test(
"//test/cpp/util:test_config",
"//test/cpp/util:test_util",
],
tags = ["no_windows"],
)

@ -45,6 +45,7 @@ grpc_cc_library(
"//test/core/util:grpc_test_util_unsecure",
"//test/cpp/util:test_config",
],
tags = ["no_windows"],
)
grpc_cc_binary(
@ -52,6 +53,7 @@ grpc_cc_binary(
testonly = 1,
srcs = ["bm_closure.cc"],
deps = [":helpers"],
tags = ["no_windows"],
)
grpc_cc_binary(
@ -59,6 +61,7 @@ grpc_cc_binary(
testonly = 1,
srcs = ["bm_alarm.cc"],
deps = [":helpers"],
tags = ["no_windows"],
)
grpc_cc_binary(
@ -66,6 +69,7 @@ grpc_cc_binary(
testonly = 1,
srcs = ["bm_arena.cc"],
deps = [":helpers"],
tags = ["no_windows"],
)
grpc_cc_binary(
@ -73,6 +77,7 @@ grpc_cc_binary(
testonly = 1,
srcs = ["bm_byte_buffer.cc"],
deps = [":helpers"],
tags = ["no_windows"],
)
grpc_cc_binary(
@ -80,6 +85,7 @@ grpc_cc_binary(
testonly = 1,
srcs = ["bm_channel.cc"],
deps = [":helpers"],
tags = ["no_windows"],
)
grpc_cc_binary(
@ -87,6 +93,7 @@ grpc_cc_binary(
testonly = 1,
srcs = ["bm_call_create.cc"],
deps = [":helpers"],
tags = ["no_windows"],
)
grpc_cc_binary(
@ -94,6 +101,7 @@ grpc_cc_binary(
testonly = 1,
srcs = ["bm_cq.cc"],
deps = [":helpers"],
tags = ["no_windows"],
)
grpc_cc_binary(
@ -101,6 +109,7 @@ grpc_cc_binary(
testonly = 1,
srcs = ["bm_cq_multiple_threads.cc"],
deps = [":helpers"],
tags = ["no_windows"],
)
grpc_cc_binary(
@ -108,6 +117,7 @@ grpc_cc_binary(
testonly = 1,
srcs = ["bm_error.cc"],
deps = [":helpers"],
tags = ["no_windows"],
)
grpc_cc_library(
@ -117,6 +127,7 @@ grpc_cc_library(
"fullstack_streaming_ping_pong.h",
],
deps = [":helpers"],
tags = ["no_windows"],
)
grpc_cc_binary(
@ -126,6 +137,7 @@ grpc_cc_binary(
"bm_fullstack_streaming_ping_pong.cc",
],
deps = [":fullstack_streaming_ping_pong_h"],
tags = ["no_windows"],
)
grpc_cc_library(
@ -144,6 +156,7 @@ grpc_cc_binary(
"bm_fullstack_streaming_pump.cc",
],
deps = [":fullstack_streaming_pump_h"],
tags = ["no_windows"],
)
grpc_cc_binary(
@ -151,6 +164,7 @@ grpc_cc_binary(
testonly = 1,
srcs = ["bm_fullstack_trickle.cc"],
deps = [":helpers"],
tags = ["no_windows"],
)
grpc_cc_library(
@ -169,6 +183,7 @@ grpc_cc_binary(
"bm_fullstack_unary_ping_pong.cc",
],
deps = [":fullstack_unary_ping_pong_h"],
tags = ["no_windows"],
)
grpc_cc_binary(
@ -176,6 +191,7 @@ grpc_cc_binary(
testonly = 1,
srcs = ["bm_metadata.cc"],
deps = [":helpers"],
tags = ["no_windows"],
)
grpc_cc_binary(
@ -183,6 +199,7 @@ grpc_cc_binary(
testonly = 1,
srcs = ["bm_chttp2_hpack.cc"],
deps = [":helpers"],
tags = ["no_windows"],
)
grpc_cc_binary(
@ -202,4 +219,5 @@ grpc_cc_binary(
testonly = 1,
srcs = ["bm_timer.cc"],
deps = [":helpers"],
tags = ["no_windows"],
)

@ -33,6 +33,7 @@ def generate_resolver_component_tests():
"//:gpr",
"//test/cpp/util:test_config",
],
tags = ["no_windows"],
)
# meant to be invoked only through the top-level shell script driver
grpc_cc_binary(
@ -52,6 +53,7 @@ def generate_resolver_component_tests():
"//:gpr",
"//test/cpp/util:test_config",
],
tags = ["no_windows"],
)
grpc_cc_test(
name = "resolver_component_tests_runner_invoker%s" % unsecure_build_config_suffix,
@ -77,5 +79,6 @@ def generate_resolver_component_tests():
args = [
"--test_bin_name=resolver_component_test%s" % unsecure_build_config_suffix,
"--running_under_bazel=true",
]
],
tags = ["no_windows"],
)

@ -31,4 +31,5 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_proto",
"//test/core/util:grpc_test_util_base",
],
tags = ["no_windows"],
)

@ -75,5 +75,6 @@ def json_run_localhost_batch():
],
tags = [
"json_run_localhost",
"no_windows",
],
)

@ -29,6 +29,7 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_proto",
"//test/core/util:grpc_test_util_unsecure",
],
tags = ["no_windows"],
)
grpc_cc_test(
@ -42,6 +43,7 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_proto",
"//test/core/util:grpc_test_util_unsecure",
],
tags = ["no_windows"],
)
grpc_cc_test(
@ -55,4 +57,5 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_proto",
"//test/core/util:grpc_test_util_unsecure",
],
tags = ["no_windows"],
)

@ -45,6 +45,7 @@ grpc_cc_test(
"//:lb_server_load_reporting_filter",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(

@ -29,5 +29,11 @@ Sanitizer runs (asan, msan, tsan, ubsan):
bazel --bazelrc=tools/remote_build/manual.bazelrc test --config=asan //test/...
```
Run on Windows MSVC:
```
# local manual run only for C++ targets (RBE to be supported)
bazel --bazelrc=tools/remote_build/windows.bazelrc test //test/cpp/...
```
Available command line options can be found in
[Bazel command line reference](https://docs.bazel.build/versions/master/command-line-reference.html)

@ -0,0 +1,3 @@
# TODO(yfen): Merge with rbe_common.bazelrc and enable Windows RBE
build --test_tag_filters=-no_windows
build --build_tag_filters=-no_windows
Loading…
Cancel
Save