Merge pull request #20885 from lidizheng/buildifier-step-2

Format all Bazel files using buildifier
pull/20800/head
Lidi Zheng 5 years ago committed by GitHub
commit 15c67e255b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      BUILD
  2. 4
      WORKSPACE
  3. 38
      bazel/cython_library.bzl
  4. 1
      bazel/generate_cc.bzl
  5. 30
      bazel/generate_objc.bzl
  6. 37
      bazel/grpc_build_system.bzl
  7. 1
      bazel/grpc_python_deps.bzl
  8. 3
      bazel/objc_grpc_library.bzl
  9. 2
      bazel/protobuf.bzl
  10. 35
      bazel/python_rules.bzl
  11. 18
      bazel/test/python_test_repo/BUILD
  12. 2
      examples/BUILD
  13. 28
      examples/objective-c/BUILD
  14. 18
      examples/python/auth/BUILD.bazel
  15. 18
      examples/python/cancellation/BUILD.bazel
  16. 20
      examples/python/compression/BUILD.bazel
  17. 22
      examples/python/debug/BUILD.bazel
  18. 18
      examples/python/errors/BUILD.bazel
  19. 18
      examples/python/multiprocessing/BUILD
  20. 6
      examples/python/wait_for_ready/BUILD.bazel
  21. 154
      grpc.bzl
  22. 2
      src/compiler/BUILD
  23. 26
      src/core/tsi/test_creds/BUILD
  24. 70
      src/objective-c/BUILD
  25. 26
      src/objective-c/examples/BUILD
  26. 10
      src/objective-c/grpc_objc_internal_library.bzl
  27. 44
      src/objective-c/tests/BUILD
  28. 7
      src/proto/grpc/channelz/BUILD
  29. 7
      src/proto/grpc/core/BUILD
  30. 7
      src/proto/grpc/health/v1/BUILD
  31. 8
      src/proto/grpc/reflection/v1alpha/BUILD
  32. 7
      src/proto/grpc/status/BUILD
  33. 5
      src/proto/grpc/testing/BUILD
  34. 7
      src/proto/grpc/testing/duplicate/BUILD
  35. 4
      src/proto/grpc/testing/proto2/BUILD.bazel
  36. 15
      src/python/grpcio/grpc/BUILD.bazel
  37. 4
      src/python/grpcio/grpc/_cython/BUILD.bazel
  38. 2
      src/python/grpcio/grpc/experimental/BUILD.bazel
  39. 2
      src/python/grpcio/grpc/framework/BUILD.bazel
  40. 6
      src/python/grpcio/grpc/framework/common/BUILD.bazel
  41. 8
      src/python/grpcio/grpc/framework/foundation/BUILD.bazel
  42. 2
      src/python/grpcio/grpc/framework/interfaces/BUILD.bazel
  43. 6
      src/python/grpcio/grpc/framework/interfaces/base/BUILD.bazel
  44. 6
      src/python/grpcio/grpc/framework/interfaces/face/BUILD.bazel
  45. 9
      src/python/grpcio_channelz/grpc_channelz/v1/BUILD.bazel
  46. 14
      src/python/grpcio_health_checking/grpc_health/v1/BUILD.bazel
  47. 13
      src/python/grpcio_reflection/grpc_reflection/v1alpha/BUILD.bazel
  48. 6
      src/python/grpcio_status/grpc_status/BUILD.bazel
  49. 4
      src/python/grpcio_tests/tests/BUILD.bazel
  50. 6
      src/python/grpcio_tests/tests/channelz/BUILD.bazel
  51. 8
      src/python/grpcio_tests/tests/health_check/BUILD.bazel
  52. 5
      src/python/grpcio_tests/tests/interop/credentials/BUILD.bazel
  53. 23
      src/python/grpcio_tests/tests/reflection/BUILD.bazel
  54. 12
      src/python/grpcio_tests/tests/status/BUILD.bazel
  55. 20
      src/python/grpcio_tests/tests/stress/BUILD.bazel
  56. 9
      src/python/grpcio_tests/tests/testing/BUILD.bazel
  57. 40
      src/python/grpcio_tests/tests/unit/BUILD.bazel
  58. 29
      src/python/grpcio_tests/tests/unit/_cython/BUILD.bazel
  59. 6
      src/python/grpcio_tests/tests/unit/credentials/BUILD.bazel
  60. 1
      src/python/grpcio_tests/tests/unit/framework/common/BUILD.bazel
  61. 4
      src/python/grpcio_tests/tests/unit/framework/foundation/BUILD.bazel
  62. 44
      src/python/grpcio_tests/tests_aio/unit/BUILD.bazel
  63. 4
      templates/tools/dockerfile/buildifier.include
  64. 1
      templates/tools/dockerfile/test/sanity/Dockerfile.template
  65. 2
      test/build_test/BUILD
  66. 4
      test/core/avl/BUILD
  67. 4
      test/core/backoff/BUILD
  68. 2
      test/core/bad_client/BUILD
  69. 63
      test/core/bad_client/generate_tests.bzl
  70. 4
      test/core/bad_connection/BUILD
  71. 2
      test/core/bad_ssl/BUILD
  72. 61
      test/core/bad_ssl/generate_tests.bzl
  73. 12
      test/core/channel/BUILD
  74. 10
      test/core/client_channel/BUILD
  75. 6
      test/core/client_channel/resolvers/BUILD
  76. 10
      test/core/compression/BUILD
  77. 4
      test/core/debug/BUILD
  78. 16
      test/core/end2end/BUILD
  79. 18
      test/core/end2end/fuzzers/BUILD
  80. 26
      test/core/end2end/generate_tests.bzl
  81. 6
      test/core/fling/BUILD
  82. 26
      test/core/gpr/BUILD
  83. 18
      test/core/gprpp/BUILD
  84. 12
      test/core/handshake/BUILD
  85. 12
      test/core/http/BUILD
  86. 36
      test/core/iomgr/BUILD
  87. 10
      test/core/json/BUILD
  88. 10
      test/core/nanopb/BUILD
  89. 4
      test/core/network_benchmarks/BUILD
  90. 18
      test/core/security/BUILD
  91. 8
      test/core/security/etc/BUILD
  92. 20
      test/core/slice/BUILD
  93. 6
      test/core/surface/BUILD
  94. 14
      test/core/transport/BUILD
  95. 18
      test/core/transport/chttp2/BUILD
  96. 8
      test/core/tsi/BUILD
  97. 2
      test/core/tsi/alts/fake_handshaker/BUILD
  98. 12
      test/core/tsi/alts/handshaker/BUILD
  99. 8
      test/core/util/BUILD
  100. 26
      test/core/util/grpc_fuzzer.bzl
  101. Some files were not shown because too many files have changed in this diff Show More

@ -318,9 +318,9 @@ grpc_cc_library(
standalone = True, standalone = True,
deps = [ deps = [
"grpc_common", "grpc_common",
"grpc_lb_policy_cds",
"grpc_lb_policy_grpclb", "grpc_lb_policy_grpclb",
"grpc_lb_policy_xds", "grpc_lb_policy_xds",
"grpc_lb_policy_cds",
"grpc_resolver_xds", "grpc_resolver_xds",
], ],
) )
@ -336,9 +336,9 @@ grpc_cc_library(
standalone = True, standalone = True,
deps = [ deps = [
"grpc_common", "grpc_common",
"grpc_lb_policy_cds_secure",
"grpc_lb_policy_grpclb_secure", "grpc_lb_policy_grpclb_secure",
"grpc_lb_policy_xds_secure", "grpc_lb_policy_xds_secure",
"grpc_lb_policy_cds_secure",
"grpc_resolver_xds_secure", "grpc_resolver_xds_secure",
"grpc_secure", "grpc_secure",
"grpc_transport_chttp2_client_secure", "grpc_transport_chttp2_client_secure",

@ -43,7 +43,7 @@ rbe_autoconfig(
), ),
) )
load("@io_bazel_rules_python//python:pip.bzl", "pip_repositories", "pip_import") load("@io_bazel_rules_python//python:pip.bzl", "pip_import", "pip_repositories")
pip_import( pip_import(
name = "grpc_python_dependencies", name = "grpc_python_dependencies",
@ -51,5 +51,7 @@ pip_import(
) )
load("@grpc_python_dependencies//:requirements.bzl", "pip_install") load("@grpc_python_dependencies//:requirements.bzl", "pip_install")
pip_repositories() pip_repositories()
pip_install() pip_install()

@ -1,13 +1,12 @@
"""Custom rules for gRPC Python""" """Custom rules for gRPC Python"""
# Adapted with modifications from # Adapted with modifications from
# tensorflow/tensorflow/core/platform/default/build_config.bzl # tensorflow/tensorflow/core/platform/default/build_config.bzl
# Native Bazel rules don't exist yet to compile Cython code, but rules have # Native Bazel rules don't exist yet to compile Cython code, but rules have
# been written at cython/cython and tensorflow/tensorflow. We branch from # been written at cython/cython and tensorflow/tensorflow. We branch from
# Tensorflow's version as it is more actively maintained and works for gRPC # Tensorflow's version as it is more actively maintained and works for gRPC
# Python's needs. # Python's needs.
def pyx_library(name, deps=[], py_deps=[], srcs=[], **kwargs): def pyx_library(name, deps = [], py_deps = [], srcs = [], **kwargs):
"""Compiles a group of .pyx / .pxd / .py files. """Compiles a group of .pyx / .pxd / .py files.
First runs Cython to create .cpp files for each input .pyx or .py + .pxd First runs Cython to create .cpp files for each input .pyx or .py + .pxd
@ -23,6 +22,7 @@ def pyx_library(name, deps=[], py_deps=[], srcs=[], **kwargs):
srcs: .py, .pyx, or .pxd files to either compile or pass through. srcs: .py, .pyx, or .pxd files to either compile or pass through.
**kwargs: Extra keyword arguments passed to the py_library. **kwargs: Extra keyword arguments passed to the py_library.
""" """
# First filter out files that should be run compiled vs. passed through. # First filter out files that should be run compiled vs. passed through.
py_srcs = [] py_srcs = []
pyx_srcs = [] pyx_srcs = []
@ -41,14 +41,14 @@ def pyx_library(name, deps=[], py_deps=[], srcs=[], **kwargs):
# Invoke cython to produce the shared object libraries. # Invoke cython to produce the shared object libraries.
for filename in pyx_srcs: for filename in pyx_srcs:
native.genrule( native.genrule(
name=filename + "_cython_translation", name = filename + "_cython_translation",
srcs=[filename], srcs = [filename],
outs=[filename.split(".")[0] + ".cpp"], outs = [filename.split(".")[0] + ".cpp"],
# Optionally use PYTHON_BIN_PATH on Linux platforms so that python 3 # Optionally use PYTHON_BIN_PATH on Linux platforms so that python 3
# works. Windows has issues with cython_binary so skip PYTHON_BIN_PATH. # works. Windows has issues with cython_binary so skip PYTHON_BIN_PATH.
cmd= cmd =
"PYTHONHASHSEED=0 $(location @cython//:cython_binary) --cplus $(SRCS) --output-file $(OUTS)", "PYTHONHASHSEED=0 $(location @cython//:cython_binary) --cplus $(SRCS) --output-file $(OUTS)",
tools=["@cython//:cython_binary"] + pxd_srcs, tools = ["@cython//:cython_binary"] + pxd_srcs,
) )
shared_objects = [] shared_objects = []
@ -56,19 +56,19 @@ def pyx_library(name, deps=[], py_deps=[], srcs=[], **kwargs):
stem = src.split(".")[0] stem = src.split(".")[0]
shared_object_name = stem + ".so" shared_object_name = stem + ".so"
native.cc_binary( native.cc_binary(
name=shared_object_name, name = shared_object_name,
srcs=[stem + ".cpp"], srcs = [stem + ".cpp"],
deps=deps + ["@local_config_python//:python_headers"], deps = deps + ["@local_config_python//:python_headers"],
linkshared=1, linkshared = 1,
) )
shared_objects.append(shared_object_name) shared_objects.append(shared_object_name)
# Now create a py_library with these shared objects as data. # Now create a py_library with these shared objects as data.
native.py_library( native.py_library(
name=name, name = name,
srcs=py_srcs, srcs = py_srcs,
deps=py_deps, deps = py_deps,
srcs_version="PY2AND3", srcs_version = "PY2AND3",
data=shared_objects, data = shared_objects,
**kwargs) **kwargs
)

@ -111,6 +111,7 @@ def generate_cc_impl(ctx):
"--proto_path={}".format(get_include_directory(i)) "--proto_path={}".format(get_include_directory(i))
for i in includes for i in includes
] ]
# Include the output directory so that protoc puts the generated code in the # Include the output directory so that protoc puts the generated code in the
# right directory. # right directory.
arguments += ["--proto_path={0}{1}".format(dir_out, proto_root)] arguments += ["--proto_path={0}{1}".format(dir_out, proto_root)]

@ -4,7 +4,7 @@ load(
"get_plugin_args", "get_plugin_args",
"proto_path_to_generated_filename", "proto_path_to_generated_filename",
) )
load(":grpc_util.bzl", "to_upper_camel_with_extension",) load(":grpc_util.bzl", "to_upper_camel_with_extension")
_GRPC_PROTO_HEADER_FMT = "{}.pbrpc.h" _GRPC_PROTO_HEADER_FMT = "{}.pbrpc.h"
_GRPC_PROTO_SRC_FMT = "{}.pbrpc.m" _GRPC_PROTO_SRC_FMT = "{}.pbrpc.m"
@ -40,7 +40,9 @@ def _generate_objc_impl(ctx):
out_files = [ctx.actions.declare_file(out) for out in outs] out_files = [ctx.actions.declare_file(out) for out in outs]
dir_out = _join_directories([ dir_out = _join_directories([
str(ctx.genfiles_dir.path), target_package, _GENERATED_PROTOS_DIR str(ctx.genfiles_dir.path),
target_package,
_GENERATED_PROTOS_DIR,
]) ])
arguments = [] arguments = []
@ -70,6 +72,7 @@ def _generate_objc_impl(ctx):
well_known_proto_files = [] well_known_proto_files = []
if ctx.attr.use_well_known_protos: if ctx.attr.use_well_known_protos:
f = ctx.attr.well_known_protos.files.to_list()[0].dirname f = ctx.attr.well_known_protos.files.to_list()[0].dirname
# go two levels up so that #import "google/protobuf/..." is correct # go two levels up so that #import "google/protobuf/..." is correct
arguments += ["-I{0}".format(f + "/../..")] arguments += ["-I{0}".format(f + "/../..")]
well_known_proto_files = ctx.attr.well_known_protos.files.to_list() well_known_proto_files = ctx.attr.well_known_protos.files.to_list()
@ -90,6 +93,7 @@ def _label_to_full_file_path(src, package):
# "a.proto" -> ":a.proto" # "a.proto" -> ":a.proto"
src = ":" + src src = ":" + src
src = "//" + package + src src = "//" + package + src
# Converts //path/to/package:File.ext to path/to/package/File.ext. # Converts //path/to/package:File.ext to path/to/package/File.ext.
src = src.replace("//", "") src = src.replace("//", "")
src = src.replace(":", "/") src = src.replace(":", "/")
@ -119,6 +123,7 @@ def _get_directory_from_proto(proto):
def _get_full_path_from_file(file): def _get_full_path_from_file(file):
gen_dir_length = 0 gen_dir_length = 0
# if file is generated, then prepare to remote its root # if file is generated, then prepare to remote its root
# (including CPU architecture...) # (including CPU architecture...)
if not file.is_source: if not file.is_source:
@ -130,7 +135,6 @@ def _join_directories(directories):
massaged_directories = [directory for directory in directories if len(directory) != 0] massaged_directories = [directory for directory in directories if len(directory) != 0]
return "/".join(massaged_directories) return "/".join(massaged_directories)
generate_objc = rule( generate_objc = rule(
attrs = { attrs = {
"deps": attr.label_list( "deps": attr.label_list(
@ -146,14 +150,14 @@ generate_objc = rule(
), ),
"srcs": attr.string_list( "srcs": attr.string_list(
mandatory = False, mandatory = False,
allow_empty = True allow_empty = True,
), ),
"use_well_known_protos": attr.bool( "use_well_known_protos": attr.bool(
mandatory = False, mandatory = False,
default = False default = False,
), ),
"well_known_protos": attr.label( "well_known_protos": attr.label(
default = "@com_google_protobuf//:well_known_protos" default = "@com_google_protobuf//:well_known_protos",
), ),
"_protoc": attr.label( "_protoc": attr.label(
default = Label("//external:protocol_compiler"), default = Label("//external:protocol_compiler"),
@ -162,7 +166,7 @@ generate_objc = rule(
), ),
}, },
output_to_genfiles = True, output_to_genfiles = True,
implementation = _generate_objc_impl implementation = _generate_objc_impl,
) )
def _group_objc_files_impl(ctx): def _group_objc_files_impl(ctx):
@ -189,9 +193,9 @@ generate_objc_hdrs = rule(
), ),
"gen_mode": attr.int( "gen_mode": attr.int(
default = _GENERATE_HDRS, default = _GENERATE_HDRS,
) ),
}, },
implementation = _group_objc_files_impl implementation = _group_objc_files_impl,
) )
generate_objc_srcs = rule( generate_objc_srcs = rule(
@ -201,9 +205,9 @@ generate_objc_srcs = rule(
), ),
"gen_mode": attr.int( "gen_mode": attr.int(
default = _GENERATE_SRCS, default = _GENERATE_SRCS,
) ),
}, },
implementation = _group_objc_files_impl implementation = _group_objc_files_impl,
) )
generate_objc_non_arc_srcs = rule( generate_objc_non_arc_srcs = rule(
@ -213,7 +217,7 @@ generate_objc_non_arc_srcs = rule(
), ),
"gen_mode": attr.int( "gen_mode": attr.int(
default = _GENERATE_NON_ARC_SRCS, default = _GENERATE_NON_ARC_SRCS,
) ),
}, },
implementation = _group_objc_files_impl implementation = _group_objc_files_impl,
) )

@ -27,13 +27,12 @@ load("//bazel:cc_grpc_library.bzl", "cc_grpc_library")
load("@upb//bazel:upb_proto_library.bzl", "upb_proto_library") load("@upb//bazel:upb_proto_library.bzl", "upb_proto_library")
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test") load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
# The set of pollers to test against if a test exercises polling # The set of pollers to test against if a test exercises polling
POLLERS = ["epollex", "epoll1", "poll"] POLLERS = ["epollex", "epoll1", "poll"]
# set exec_properties = LARGE_MACHINE, to run the test on a large machine # set exec_properties = LARGE_MACHINE, to run the test on a large machine
# see //third_party/toolchains/machine_size for details # see //third_party/toolchains/machine_size for details
LARGE_MACHINE = { "gceMachineType" : "n1-standard-8"} LARGE_MACHINE = {"gceMachineType": "n1-standard-8"}
def if_not_windows(a): def if_not_windows(a):
return select({ return select({
@ -110,8 +109,8 @@ def grpc_cc_library(
testonly = testonly, testonly = testonly,
linkopts = linkopts, linkopts = linkopts,
includes = [ includes = [
"include", "include",
"src/core/ext/upb-generated", # Once upb code-gen issue is resolved, remove this. "src/core/ext/upb-generated", # Once upb code-gen issue is resolved, remove this.
], ],
alwayslink = alwayslink, alwayslink = alwayslink,
data = data, data = data,
@ -142,11 +141,12 @@ def grpc_proto_library(
use_external = use_external, use_external = use_external,
generate_mocks = generate_mocks, generate_mocks = generate_mocks,
) )
def ios_cc_test( def ios_cc_test(
name, name,
tags = [], tags = [],
**kwargs): **kwargs):
ios_test_adapter = "//third_party/objective_c/google_toolbox_for_mac:GTM_GoogleTestRunner_GTM_USING_XCTEST"; ios_test_adapter = "//third_party/objective_c/google_toolbox_for_mac:GTM_GoogleTestRunner_GTM_USING_XCTEST"
test_lib_ios = name + "_test_lib_ios" test_lib_ios = name + "_test_lib_ios"
ios_tags = tags + ["manual", "ios_cc_test"] ios_tags = tags + ["manual", "ios_cc_test"]
@ -186,7 +186,7 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
"exec_properties": exec_properties, "exec_properties": exec_properties,
} }
if uses_polling: if uses_polling:
# the vanilla version of the test should run on platforms that only # the vanilla version of the test should run on platforms that only
# support a single poller # support a single poller
native.cc_test( native.cc_test(
name = name, name = name,
@ -196,6 +196,7 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
]), ]),
**args **args
) )
# on linux we run the same test multiple times, once for each poller # on linux we run the same test multiple times, once for each poller
for poller in POLLERS: for poller in POLLERS:
native.sh_test( native.sh_test(
@ -223,7 +224,6 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
**args **args
) )
def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], data = [], language = "C++", testonly = False, linkshared = False, linkopts = [], tags = []): def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], data = [], language = "C++", testonly = False, linkshared = False, linkopts = [], tags = []):
copts = [] copts = []
if language.upper() == "C": if language.upper() == "C":
@ -266,14 +266,15 @@ def grpc_sh_binary(name, srcs, data = []):
data = data, data = data,
) )
def grpc_py_binary(name, def grpc_py_binary(
srcs, name,
data = [], srcs,
deps = [], data = [],
external_deps = [], deps = [],
testonly = False, external_deps = [],
python_version = "PY2", testonly = False,
**kwargs): python_version = "PY2",
**kwargs):
native.py_binary( native.py_binary(
name = name, name = name,
srcs = srcs, srcs = srcs,
@ -323,7 +324,7 @@ def grpc_objc_library(
deps: dependencies deps: dependencies
visibility: visibility, default to public visibility: visibility, default to public
""" """
native.objc_library( native.objc_library(
name = name, name = name,
hdrs = hdrs, hdrs = hdrs,
@ -335,14 +336,12 @@ def grpc_objc_library(
includes = includes, includes = includes,
visibility = visibility, visibility = visibility,
) )
def grpc_upb_proto_library(name, deps): def grpc_upb_proto_library(name, deps):
upb_proto_library(name = name, deps = deps) upb_proto_library(name = name, deps = deps)
def python_config_settings(): def python_config_settings():
native.config_setting( native.config_setting(
name = "python3", name = "python3",
flag_values = {"@bazel_tools//tools/python:python_version": "PY3"}, flag_values = {"@bazel_tools//tools/python:python_version": "PY3"},
) )

@ -71,4 +71,3 @@ def grpc_python_deps():
"https://github.com/cython/cython/archive/c2b80d87658a8525ce091cbe146cb7eaa29fed5c.tar.gz", "https://github.com/cython/cython/archive/c2b80d87658a8525ce091cbe146cb7eaa29fed5c.tar.gz",
], ],
) )

@ -2,8 +2,8 @@ load(
"//bazel:generate_objc.bzl", "//bazel:generate_objc.bzl",
"generate_objc", "generate_objc",
"generate_objc_hdrs", "generate_objc_hdrs",
"generate_objc_non_arc_srcs",
"generate_objc_srcs", "generate_objc_srcs",
"generate_objc_non_arc_srcs"
) )
load("//bazel:protobuf.bzl", "well_known_proto_libs") load("//bazel:protobuf.bzl", "well_known_proto_libs")
@ -66,4 +66,3 @@ def objc_grpc_library(name, deps, srcs = [], use_well_known_protos = False, **kw
], ],
**kwargs **kwargs
) )

@ -123,7 +123,7 @@ def get_plugin_args(
"--{plugin_name}_out={dir_out}".format( "--{plugin_name}_out={dir_out}".format(
plugin_name = plugin_name, plugin_name = plugin_name,
dir_out = augmented_dir_out, dir_out = augmented_dir_out,
) ),
] ]
def _get_staged_proto_file(context, source_file): def _get_staged_proto_file(context, source_file):

@ -2,13 +2,13 @@
load( load(
"//bazel:protobuf.bzl", "//bazel:protobuf.bzl",
"declare_out_files",
"get_include_directory", "get_include_directory",
"get_out_dir",
"get_plugin_args", "get_plugin_args",
"protos_from_context",
"includes_from_deps",
"get_proto_arguments", "get_proto_arguments",
"declare_out_files", "includes_from_deps",
"get_out_dir", "protos_from_context",
) )
_GENERATED_PROTO_FORMAT = "{}_pb2.py" _GENERATED_PROTO_FORMAT = "{}_pb2.py"
@ -35,7 +35,7 @@ def _generate_py_impl(context):
[], [],
out_dir.path, out_dir.path,
False, False,
context.attr.plugin.label.name context.attr.plugin.label.name,
) )
tools.append(context.executable.plugin) tools.append(context.executable.plugin)
@ -104,7 +104,6 @@ def py_proto_library(
if len(deps) != 1: if len(deps) != 1:
fail("Can only compile a single proto at a time.") fail("Can only compile a single proto at a time.")
_generate_pb2_src( _generate_pb2_src(
name = codegen_target, name = codegen_target,
deps = deps, deps = deps,
@ -144,7 +143,7 @@ def _generate_pb2_grpc_src_impl(context):
[], [],
out_dir.path, out_dir.path,
False, False,
context.attr.plugin.label.name context.attr.plugin.label.name,
) )
tools.append(context.executable.plugin) tools.append(context.executable.plugin)
@ -207,12 +206,12 @@ _generate_pb2_grpc_src = rule(
) )
def py_grpc_library( def py_grpc_library(
name, name,
srcs, srcs,
deps, deps,
plugin = None, plugin = None,
strip_prefixes = [], strip_prefixes = [],
**kwargs): **kwargs):
"""Generate python code for gRPC services defined in a protobuf. """Generate python code for gRPC services defined in a protobuf.
Args: Args:
@ -253,15 +252,15 @@ def py_grpc_library(
deps = [ deps = [
Label("//src/python/grpcio/grpc:grpcio"), Label("//src/python/grpcio/grpc:grpcio"),
] + deps + [ ] + deps + [
":{}".format(codegen_grpc_target) ":{}".format(codegen_grpc_target),
], ],
**kwargs **kwargs
) )
def py2and3_test(
def py2and3_test(name, name,
py_test = native.py_test, py_test = native.py_test,
**kwargs): **kwargs):
"""Runs a Python test under both Python 2 and Python 3. """Runs a Python test under both Python 2 and Python 3.
Args: Args:

@ -16,9 +16,9 @@
load( load(
"@com_github_grpc_grpc//bazel:python_rules.bzl", "@com_github_grpc_grpc//bazel:python_rules.bzl",
"py_proto_library",
"py_grpc_library",
"py2and3_test", "py2and3_test",
"py_grpc_library",
"py_proto_library",
) )
package(default_testonly = 1) package(default_testonly = 1)
@ -55,12 +55,12 @@ py_proto_library(
py2and3_test( py2and3_test(
name = "import_test", name = "import_test",
main = "helloworld.py",
srcs = ["helloworld.py"], srcs = ["helloworld.py"],
main = "helloworld.py",
deps = [ deps = [
":duration_py_pb2",
":helloworld_py_pb2", ":helloworld_py_pb2",
":helloworld_py_pb2_grpc", ":helloworld_py_pb2_grpc",
":duration_py_pb2",
":timestamp_py_pb2", ":timestamp_py_pb2",
], ],
) )
@ -71,19 +71,19 @@ py2and3_test(
proto_library( proto_library(
name = "helloworld_moved_proto", name = "helloworld_moved_proto",
srcs = ["helloworld.proto"], srcs = ["helloworld.proto"],
import_prefix = "google/cloud",
strip_import_prefix = "",
deps = [ deps = [
"@com_google_protobuf//:duration_proto", "@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:timestamp_proto", "@com_google_protobuf//:timestamp_proto",
], ],
import_prefix = "google/cloud",
strip_import_prefix = ""
) )
# Also test the custom plugin execution parameter # Also test the custom plugin execution parameter
py_proto_library( py_proto_library(
name = "helloworld_moved_py_pb2", name = "helloworld_moved_py_pb2",
plugin = ":dummy_plugin",
deps = [":helloworld_moved_proto"], deps = [":helloworld_moved_proto"],
plugin = ":dummy_plugin"
) )
py_grpc_library( py_grpc_library(
@ -94,12 +94,12 @@ py_grpc_library(
py2and3_test( py2and3_test(
name = "import_moved_test", name = "import_moved_test",
main = "helloworld_moved.py",
srcs = ["helloworld_moved.py"], srcs = ["helloworld_moved.py"],
main = "helloworld_moved.py",
deps = [ deps = [
":duration_py_pb2",
":helloworld_moved_py_pb2", ":helloworld_moved_py_pb2",
":helloworld_moved_py_pb2_grpc", ":helloworld_moved_py_pb2_grpc",
":duration_py_pb2",
":timestamp_py_pb2", ":timestamp_py_pb2",
], ],
) )

@ -18,7 +18,7 @@ package(default_visibility = ["//visibility:public"])
load("//bazel:grpc_build_system.bzl", "grpc_proto_library") load("//bazel:grpc_build_system.bzl", "grpc_proto_library")
load("//bazel:cc_grpc_library.bzl", "cc_grpc_library") load("//bazel:cc_grpc_library.bzl", "cc_grpc_library")
load("//bazel:python_rules.bzl", "py_proto_library", "py_grpc_library") load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")
load("@grpc_python_dependencies//:requirements.bzl", "requirement") load("@grpc_python_dependencies//:requirements.bzl", "requirement")
grpc_proto_library( grpc_proto_library(

@ -23,29 +23,29 @@ load("@build_bazel_rules_apple//apple:macos.bzl", "macos_application")
objc_grpc_library( objc_grpc_library(
name = "HelloWorld_grpc_proto", name = "HelloWorld_grpc_proto",
srcs = ["//examples:protos/helloworld.proto"], srcs = ["//examples:protos/helloworld.proto"],
deps = ["//examples:helloworld_proto"],
tags = ["manual"], tags = ["manual"],
deps = ["//examples:helloworld_proto"],
) )
# This one works with import "external/com_github_grpc_grpc/examples/protos/Helloworld.pbrpc.h" # This one works with import "external/com_github_grpc_grpc/examples/protos/Helloworld.pbrpc.h"
objc_grpc_library( objc_grpc_library(
name = "HelloWorld_grpc_proto_external", name = "HelloWorld_grpc_proto_external",
srcs = ["//external/com_github_grpc_grpc/examples:protos/helloworld.proto"], srcs = ["//external/com_github_grpc_grpc/examples:protos/helloworld.proto"],
deps = ["@com_github_grpc_grpc//examples:helloworld_proto"],
tags = ["manual"], tags = ["manual"],
deps = ["@com_github_grpc_grpc//examples:helloworld_proto"],
) )
objc_library( objc_library(
name = "HelloWorld-lib", name = "HelloWorld-lib",
srcs = glob(["helloworld/**/*.m",]), srcs = glob(["helloworld/**/*.m"]),
hdrs = glob(["helloworld/**/*.h"]), hdrs = glob(["helloworld/**/*.h"]),
data = glob([ data = glob([
"helloworld/HelloWorld/Base.lproj/**", "helloworld/HelloWorld/Base.lproj/**",
"helloworld/HelloWorld/Images.xcassets/**", "helloworld/HelloWorld/Images.xcassets/**",
]), ]),
includes = ["helloworld/HelloWorld"], includes = ["helloworld/HelloWorld"],
deps = [":HelloWorld_grpc_proto"],
tags = ["manual"], tags = ["manual"],
deps = [":HelloWorld_grpc_proto"],
) )
ios_application( ios_application(
@ -55,40 +55,40 @@ ios_application(
"iphone", "iphone",
"ipad", "ipad",
], ],
minimum_os_version = "8.0",
infoplists = ["helloworld/HelloWorld/Info.plist"], infoplists = ["helloworld/HelloWorld/Info.plist"],
deps = [":HelloWorld-lib"], minimum_os_version = "8.0",
tags = ["manual"], tags = ["manual"],
deps = [":HelloWorld-lib"],
) )
objc_library( objc_library(
name = "HelloWorldMacos-lib", name = "HelloWorldMacos-lib",
srcs = glob(["helloworld_macos/**/*.m",]), srcs = glob(["helloworld_macos/**/*.m"]),
hdrs = glob(["helloworld_macos/**/*.h"]), hdrs = glob(["helloworld_macos/**/*.h"]),
data = glob([ data = glob([
"helloworld_macos/HelloWorld/Base.lproj/**", "helloworld_macos/HelloWorld/Base.lproj/**",
"helloworld_macos/HelloWorld/Images.xcassets/**", "helloworld_macos/HelloWorld/Images.xcassets/**",
]), ]),
includes = ["helloworld_macos/HelloWorld"], includes = ["helloworld_macos/HelloWorld"],
deps = [":HelloWorld_grpc_proto"],
tags = ["manual"], tags = ["manual"],
deps = [":HelloWorld_grpc_proto"],
) )
macos_application( macos_application(
name = "HelloWorldMacos", name = "HelloWorldMacos",
bundle_id = "io.grpc.HelloWorld", bundle_id = "io.grpc.HelloWorld",
minimum_os_version = "10.13",
entitlements = "helloworld_macos/HelloWorld/Helloworld.entitlements", entitlements = "helloworld_macos/HelloWorld/Helloworld.entitlements",
infoplists = ["helloworld_macos/HelloWorld/Info.plist"], infoplists = ["helloworld_macos/HelloWorld/Info.plist"],
deps = [":HelloWorldMacos-lib"], minimum_os_version = "10.13",
tags = ["manual"], tags = ["manual"],
deps = [":HelloWorldMacos-lib"],
) )
objc_grpc_library( objc_grpc_library(
name = "RouteGuide", name = "RouteGuide",
srcs = ["//examples:protos/route_guide.proto"], srcs = ["//examples:protos/route_guide.proto"],
deps = ["//examples:route_guide_proto"],
tags = ["manual"], tags = ["manual"],
deps = ["//examples:route_guide_proto"],
) )
objc_library( objc_library(
@ -101,8 +101,8 @@ objc_library(
"route_guide/route_guide_db.json", "route_guide/route_guide_db.json",
]), ]),
includes = ["route_guide/Misc"], includes = ["route_guide/Misc"],
deps = [":RouteGuide"],
tags = ["manual"], tags = ["manual"],
deps = [":RouteGuide"],
) )
ios_application( ios_application(
@ -112,8 +112,8 @@ ios_application(
"iphone", "iphone",
"ipad", "ipad",
], ],
minimum_os_version = "8.0",
infoplists = ["route_guide/Misc/Info.plist"], infoplists = ["route_guide/Misc/Info.plist"],
deps = [":RouteGuideClient-lib"], minimum_os_version = "8.0",
tags = ["manual"], tags = ["manual"],
deps = [":RouteGuideClient-lib"],
) )

@ -16,8 +16,8 @@ filegroup(
name = "_credentials_files", name = "_credentials_files",
testonly = 1, testonly = 1,
srcs = [ srcs = [
"credentials/localhost.key",
"credentials/localhost.crt", "credentials/localhost.crt",
"credentials/localhost.key",
"credentials/root.crt", "credentials/root.crt",
], ],
) )
@ -33,37 +33,37 @@ py_binary(
name = "customized_auth_client", name = "customized_auth_client",
testonly = 1, testonly = 1,
srcs = ["customized_auth_client.py"], srcs = ["customized_auth_client.py"],
python_version = "PY3",
deps = [ deps = [
":_credentials", ":_credentials",
"//src/python/grpcio/grpc:grpcio",
"//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc", "//examples:helloworld_py_pb2_grpc",
"//src/python/grpcio/grpc:grpcio",
], ],
python_version = "PY3",
) )
py_binary( py_binary(
name = "customized_auth_server", name = "customized_auth_server",
testonly = 1, testonly = 1,
srcs = ["customized_auth_server.py"], srcs = ["customized_auth_server.py"],
python_version = "PY3",
deps = [ deps = [
":_credentials", ":_credentials",
"//src/python/grpcio/grpc:grpcio",
"//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc", "//examples:helloworld_py_pb2_grpc",
"//src/python/grpcio/grpc:grpcio",
], ],
python_version = "PY3",
) )
py_test( py_test(
name = "_auth_example_test", name = "_auth_example_test",
srcs = ["test/_auth_example_test.py"], srcs = ["test/_auth_example_test.py"],
python_version = "PY3",
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio", ":_credentials",
"//examples:helloworld_py_pb2",
":customized_auth_client", ":customized_auth_client",
":customized_auth_server", ":customized_auth_server",
":_credentials", "//examples:helloworld_py_pb2",
"//src/python/grpcio/grpc:grpcio",
], ],
python_version = "PY3",
) )

@ -15,7 +15,7 @@
# limitations under the License. # limitations under the License.
load("@grpc_python_dependencies//:requirements.bzl", "requirement") load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("//bazel:python_rules.bzl", "py_proto_library", "py_grpc_library") load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")
package(default_testonly = 1) package(default_testonly = 1)
@ -38,14 +38,14 @@ py_grpc_library(
py_binary( py_binary(
name = "client", name = "client",
srcs = ["client.py"], srcs = ["client.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio",
":hash_name_py_pb2", ":hash_name_py_pb2",
":hash_name_py_pb2_grpc", ":hash_name_py_pb2_grpc",
"//external:six" "//external:six",
"//src/python/grpcio/grpc:grpcio",
], ],
srcs_version = "PY2AND3",
python_version = "PY3",
) )
py_library( py_library(
@ -60,6 +60,8 @@ py_library(
py_binary( py_binary(
name = "server", name = "server",
srcs = ["server.py"], srcs = ["server.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio", "//src/python/grpcio/grpc:grpcio",
":hash_name_py_pb2", ":hash_name_py_pb2",
@ -68,17 +70,15 @@ py_binary(
"//conditions:default": ["@futures//:futures"], "//conditions:default": ["@futures//:futures"],
"//:python3": [], "//:python3": [],
}), }),
srcs_version = "PY2AND3",
python_version = "PY3",
) )
py_test( py_test(
name = "test/_cancellation_example_test", name = "test/_cancellation_example_test",
size = "small",
srcs = ["test/_cancellation_example_test.py"], srcs = ["test/_cancellation_example_test.py"],
data = [ data = [
":client", ":client",
":server" ":server",
], ],
size = "small",
python_version = "PY3", python_version = "PY3",
) )

@ -15,35 +15,35 @@
py_binary( py_binary(
name = "server", name = "server",
srcs = ["server.py"], srcs = ["server.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio",
"//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc", "//examples:helloworld_py_pb2_grpc",
"//src/python/grpcio/grpc:grpcio",
], ],
srcs_version = "PY2AND3",
python_version = "PY3",
) )
py_binary( py_binary(
name = "client", name = "client",
srcs = ["client.py"], srcs = ["client.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio",
"//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc", "//examples:helloworld_py_pb2_grpc",
"//src/python/grpcio/grpc:grpcio",
], ],
srcs_version = "PY2AND3",
python_version = "PY3",
) )
py_test( py_test(
name = "test/compression_example_test", name = "test/compression_example_test",
size = "small",
srcs = ["test/compression_example_test.py"], srcs = ["test/compression_example_test.py"],
srcs_version = "PY2AND3",
data = [ data = [
":client", ":client",
":server", ":server",
], ],
size = "small",
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3",
) )

@ -19,10 +19,10 @@ py_binary(
testonly = 1, testonly = 1,
srcs = ["debug_server.py"], srcs = ["debug_server.py"],
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz",
"//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc", "//examples:helloworld_py_pb2_grpc",
"//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz",
], ],
) )
@ -30,36 +30,36 @@ py_binary(
name = "send_message", name = "send_message",
testonly = 1, testonly = 1,
srcs = ["send_message.py"], srcs = ["send_message.py"],
python_version = "PY3",
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio",
"//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc", "//examples:helloworld_py_pb2_grpc",
"//src/python/grpcio/grpc:grpcio",
], ],
python_version = "PY3",
) )
py_binary( py_binary(
name = "get_stats", name = "get_stats",
testonly = 1, testonly = 1,
srcs = ["get_stats.py"], srcs = ["get_stats.py"],
python_version = "PY3",
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio", "//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz", "//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz",
], ],
python_version = "PY3",
) )
py_test( py_test(
name = "_debug_example_test", name = "_debug_example_test",
srcs = ["test/_debug_example_test.py"], srcs = ["test/_debug_example_test.py"],
python_version = "PY3",
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz",
"//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc",
":debug_server", ":debug_server",
":send_message",
":get_stats", ":get_stats",
":send_message",
"//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc",
"//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz",
], ],
python_version = "PY3",
) )

@ -19,11 +19,11 @@ py_library(
testonly = 1, testonly = 1,
srcs = ["client.py"], srcs = ["client.py"],
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_status/grpc_status:grpc_status",
"//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc", "//examples:helloworld_py_pb2_grpc",
requirement('googleapis-common-protos'), "//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_status/grpc_status",
requirement("googleapis-common-protos"),
], ],
) )
@ -44,16 +44,16 @@ py_library(
py_test( py_test(
name = "test/_error_handling_example_test", name = "test/_error_handling_example_test",
srcs = ["test/_error_handling_example_test.py"],
deps = [
":client",
":server",
"//src/python/grpcio_tests/tests:bazel_namespace_package_hack",
],
size = "small", size = "small",
srcs = ["test/_error_handling_example_test.py"],
imports = [ imports = [
"../../../src/python/grpcio_status", "../../../src/python/grpcio_status",
"../../../src/python/grpcio_tests", "../../../src/python/grpcio_tests",
], ],
python_version = "PY3", python_version = "PY3",
deps = [
":client",
":server",
"//src/python/grpcio_tests/tests:bazel_namespace_package_hack",
],
) )

@ -14,11 +14,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:python_rules.bzl", "py_proto_library", "py_grpc_library") load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")
proto_library( proto_library(
name = "prime_proto", name = "prime_proto",
srcs = ["prime.proto"] srcs = ["prime.proto"],
) )
py_proto_library( py_proto_library(
@ -36,19 +36,21 @@ py_binary(
name = "client", name = "client",
testonly = 1, testonly = 1,
srcs = ["client.py"], srcs = ["client.py"],
python_version = "PY3",
srcs_version = "PY3",
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio",
":prime_proto_pb2", ":prime_proto_pb2",
":prime_proto_pb2_grpc", ":prime_proto_pb2_grpc",
"//src/python/grpcio/grpc:grpcio",
], ],
srcs_version = "PY3",
python_version = "PY3",
) )
py_binary( py_binary(
name = "server", name = "server",
testonly = 1, testonly = 1,
srcs = ["server.py"], srcs = ["server.py"],
python_version = "PY3",
srcs_version = "PY3",
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio", "//src/python/grpcio/grpc:grpcio",
":prime_proto_pb2", ":prime_proto_pb2",
@ -57,17 +59,15 @@ py_binary(
"//conditions:default": ["@futures//:futures"], "//conditions:default": ["@futures//:futures"],
"//:python3": [], "//:python3": [],
}), }),
srcs_version = "PY3",
python_version = "PY3",
) )
py_test( py_test(
name = "test/_multiprocessing_example_test", name = "test/_multiprocessing_example_test",
size = "small",
srcs = ["test/_multiprocessing_example_test.py"], srcs = ["test/_multiprocessing_example_test.py"],
data = [ data = [
":client", ":client",
":server" ":server",
], ],
size = "small",
python_version = "PY3", python_version = "PY3",
) )

@ -19,16 +19,16 @@ py_library(
testonly = 1, testonly = 1,
srcs = ["wait_for_ready_example.py"], srcs = ["wait_for_ready_example.py"],
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio",
"//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc", "//examples:helloworld_py_pb2_grpc",
"//src/python/grpcio/grpc:grpcio",
], ],
) )
py_test( py_test(
name = "test/_wait_for_ready_example_test", name = "test/_wait_for_ready_example_test",
srcs = ["test/_wait_for_ready_example_test.py"],
deps = [":wait_for_ready_example",],
size = "small", size = "small",
srcs = ["test/_wait_for_ready_example_test.py"],
python_version = "PY3", python_version = "PY3",
deps = [":wait_for_ready_example"],
) )

@ -21,93 +21,93 @@ This file declares two macros:
""" """
def _lower_underscore_to_upper_camel(str): def _lower_underscore_to_upper_camel(str):
humps = [] humps = []
for hump in str.split('_'): for hump in str.split("_"):
humps += [hump[0].upper() + hump[1:]] humps += [hump[0].upper() + hump[1:]]
return "".join(humps) return "".join(humps)
def _file_to_upper_camel(src): def _file_to_upper_camel(src):
elements = src.rpartition('/') elements = src.rpartition("/")
upper_camel = _lower_underscore_to_upper_camel(elements[-1]) upper_camel = _lower_underscore_to_upper_camel(elements[-1])
return "".join(elements[:-1] + [upper_camel]) return "".join(elements[:-1] + [upper_camel])
def _file_with_extension(src, ext): def _file_with_extension(src, ext):
elements = src.rpartition('/') elements = src.rpartition("/")
basename = elements[-1].partition('.')[0] basename = elements[-1].partition(".")[0]
return "".join(elements[:-1] + [basename, ext]) return "".join(elements[:-1] + [basename, ext])
def _protoc_invocation(srcs, flags): def _protoc_invocation(srcs, flags):
"""Returns a command line to invoke protoc from a genrule, on the given """Returns a command line to invoke protoc from a genrule, on the given
sources, using the given flags. sources, using the given flags.
""" """
protoc_command = "$(location //external:protoc) -I . " protoc_command = "$(location //external:protoc) -I . "
srcs_params = "" srcs_params = ""
for src in srcs: for src in srcs:
srcs_params += " $(location %s)" % (src) srcs_params += " $(location %s)" % (src)
return protoc_command + flags + srcs_params return protoc_command + flags + srcs_params
def objc_proto_library(name, srcs, visibility=None): def objc_proto_library(name, srcs, visibility = None):
"""Declares an objc_library for the code generated by protoc from the given """Declares an objc_library for the code generated by protoc from the given
proto sources. This generated code doesn't include proto services. proto sources. This generated code doesn't include proto services.
""" """
h_files = [] h_files = []
m_files = [] m_files = []
for src in srcs: for src in srcs:
src = _file_to_upper_camel(src) src = _file_to_upper_camel(src)
h_files += [_file_with_extension(src, ".pbobjc.h")] h_files += [_file_with_extension(src, ".pbobjc.h")]
m_files += [_file_with_extension(src, ".pbobjc.m")] m_files += [_file_with_extension(src, ".pbobjc.m")]
protoc_flags = "--objc_out=$(GENDIR)" protoc_flags = "--objc_out=$(GENDIR)"
native.genrule( native.genrule(
name = name + "_codegen", name = name + "_codegen",
srcs = srcs + ["//external:protoc"], srcs = srcs + ["//external:protoc"],
outs = h_files + m_files, outs = h_files + m_files,
cmd = _protoc_invocation(srcs, protoc_flags), cmd = _protoc_invocation(srcs, protoc_flags),
) )
native.objc_library( native.objc_library(
name = name, name = name,
hdrs = h_files, hdrs = h_files,
includes = ["."], includes = ["."],
non_arc_srcs = m_files, non_arc_srcs = m_files,
deps = ["//external:protobuf_objc"], deps = ["//external:protobuf_objc"],
visibility = visibility, visibility = visibility,
) )
def objc_grpc_library(name, services, other_messages, visibility=None): def objc_grpc_library(name, services, other_messages, visibility = None):
"""Declares an objc_library for the code generated by gRPC and protoc from the """Declares an objc_library for the code generated by gRPC and protoc from the
given proto sources (services and other_messages). The generated code doesn't given proto sources (services and other_messages). The generated code doesn't
include proto services of the files passed as other_messages. include proto services of the files passed as other_messages.
""" """
objc_proto_library(name + "_messages", services + other_messages) objc_proto_library(name + "_messages", services + other_messages)
h_files = [] h_files = []
m_files = [] m_files = []
for src in services: for src in services:
src = _file_to_upper_camel(src) src = _file_to_upper_camel(src)
h_files += [_file_with_extension(src, ".pbrpc.h")] h_files += [_file_with_extension(src, ".pbrpc.h")]
m_files += [_file_with_extension(src, ".pbrpc.m")] m_files += [_file_with_extension(src, ".pbrpc.m")]
protoc_flags = ("--grpc_out=$(GENDIR) --plugin=" + protoc_flags = ("--grpc_out=$(GENDIR) --plugin=" +
"protoc-gen-grpc=$(location //external:grpc_protoc_plugin_objc)") "protoc-gen-grpc=$(location //external:grpc_protoc_plugin_objc)")
native.genrule( native.genrule(
name = name + "_codegen", name = name + "_codegen",
srcs = services + [ srcs = services + [
"//external:grpc_protoc_plugin_objc", "//external:grpc_protoc_plugin_objc",
"//external:protoc", "//external:protoc",
], ],
outs = h_files + m_files, outs = h_files + m_files,
cmd = _protoc_invocation(services, protoc_flags), cmd = _protoc_invocation(services, protoc_flags),
) )
native.objc_library( native.objc_library(
name = name, name = name,
hdrs = h_files, hdrs = h_files,
includes = ["."], includes = ["."],
srcs = m_files, srcs = m_files,
deps = [ deps = [
":" + name + "_messages", ":" + name + "_messages",
"//external:proto_objc_rpc", "//external:proto_objc_rpc",
], ],
visibility = visibility, visibility = visibility,
) )

@ -44,8 +44,8 @@ grpc_cc_library(
"ruby_generator.cc", "ruby_generator.cc",
], ],
hdrs = [ hdrs = [
"config_protobuf.h",
"config.h", "config.h",
"config_protobuf.h",
"cpp_generator.h", "cpp_generator.h",
"cpp_generator_helpers.h", "cpp_generator_helpers.h",
"cpp_plugin.h", "cpp_plugin.h",

@ -15,17 +15,17 @@
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
exports_files([ exports_files([
"ca.pem", "ca.pem",
"server1.key", "server1.key",
"server1.pem", "server1.pem",
"server0.key", "server0.key",
"server0.pem", "server0.pem",
"client.key", "client.key",
"client.pem", "client.pem",
"badserver.key", "badserver.key",
"badserver.pem", "badserver.pem",
"badclient.key", "badclient.key",
"badclient.pem", "badclient.pem",
"multi-domain.key", "multi-domain.key",
"multi-domain.pem", "multi-domain.pem",
]) ])

@ -18,7 +18,7 @@ licenses(["notice"]) # Apache v2
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("//bazel:grpc_build_system.bzl", "grpc_objc_library", "grpc_generate_objc_one_off_targets") load("//bazel:grpc_build_system.bzl", "grpc_generate_objc_one_off_targets", "grpc_objc_library")
exports_files(["LICENSE"]) exports_files(["LICENSE"])
@ -73,24 +73,24 @@ grpc_objc_library(
grpc_objc_library( grpc_objc_library(
name = "grpc_objc_interface", name = "grpc_objc_interface",
srcs = [
"GRPCClient/GRPCCall.m",
"GRPCClient/GRPCCall+Interceptor.m",
"GRPCClient/GRPCCallOptions.m",
"GRPCClient/GRPCInterceptor.m",
"GRPCClient/GRPCTransport.m",
"GRPCClient/private/GRPCTransport+Private.m",
],
hdrs = [ hdrs = [
"GRPCClient/GRPCCall.h", "GRPCClient/GRPCCall.h",
"GRPCClient/GRPCCall+Interceptor.h", "GRPCClient/GRPCCall+Interceptor.h",
"GRPCClient/GRPCCallOptions.h", "GRPCClient/GRPCCallOptions.h",
"GRPCClient/GRPCDispatchable.h",
"GRPCClient/GRPCInterceptor.h", "GRPCClient/GRPCInterceptor.h",
"GRPCClient/GRPCTransport.h", "GRPCClient/GRPCTransport.h",
"GRPCClient/GRPCDispatchable.h",
"GRPCClient/internal/GRPCCallOptions+Internal.h", "GRPCClient/internal/GRPCCallOptions+Internal.h",
"GRPCClient/version.h", "GRPCClient/version.h",
], ],
srcs = [
"GRPCClient/GRPCCall.m",
"GRPCClient/GRPCCall+Interceptor.m",
"GRPCClient/GRPCCallOptions.m",
"GRPCClient/GRPCInterceptor.m",
"GRPCClient/GRPCTransport.m",
"GRPCClient/private/GRPCTransport+Private.m",
],
includes = ["."], includes = ["."],
textual_hdrs = [ textual_hdrs = [
"GRPCClient/private/GRPCTransport+Private.h", "GRPCClient/private/GRPCTransport+Private.h",
@ -102,14 +102,6 @@ grpc_objc_library(
grpc_objc_library( grpc_objc_library(
name = "grpc_objc_client", name = "grpc_objc_client",
hdrs = [
"GRPCClient/GRPCCall+ChannelCredentials.h",
"GRPCClient/GRPCCall+Cronet.h",
"GRPCClient/GRPCCall+OAuth2.h",
"GRPCClient/GRPCCall+Tests.h",
"GRPCClient/GRPCCall+ChannelArg.h",
],
textual_hdrs = glob(["GRPCClient/private/GRPCCore/*.h"]),
srcs = [ srcs = [
"GRPCClient/GRPCCall+ChannelArg.m", "GRPCClient/GRPCCall+ChannelArg.m",
"GRPCClient/GRPCCall+ChannelCredentials.m", "GRPCClient/GRPCCall+ChannelCredentials.m",
@ -118,8 +110,16 @@ grpc_objc_library(
"GRPCClient/GRPCCall+Tests.m", "GRPCClient/GRPCCall+Tests.m",
"GRPCClient/GRPCCallLegacy.m", "GRPCClient/GRPCCallLegacy.m",
] + glob(["GRPCClient/private/GRPCCore/*.m"]), ] + glob(["GRPCClient/private/GRPCCore/*.m"]),
hdrs = [
"GRPCClient/GRPCCall+ChannelArg.h",
"GRPCClient/GRPCCall+ChannelCredentials.h",
"GRPCClient/GRPCCall+Cronet.h",
"GRPCClient/GRPCCall+OAuth2.h",
"GRPCClient/GRPCCall+Tests.h",
],
data = [":gRPCCertificates"], data = [":gRPCCertificates"],
includes = ["."], includes = ["."],
textual_hdrs = glob(["GRPCClient/private/GRPCCore/*.h"]),
deps = [ deps = [
":grpc_objc_interface", ":grpc_objc_interface",
":grpc_objc_interface_legacy", ":grpc_objc_interface_legacy",
@ -155,8 +155,8 @@ grpc_objc_library(
"ProtoRPC/ProtoRPC.h", "ProtoRPC/ProtoRPC.h",
"ProtoRPC/ProtoService.h", "ProtoRPC/ProtoService.h",
], ],
includes = ["."],
defines = ["GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=0"], defines = ["GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=0"],
includes = ["."],
deps = [ deps = [
":grpc_objc_interface", ":grpc_objc_interface",
":proto_objc_rpc_legacy_header", ":proto_objc_rpc_legacy_header",
@ -177,10 +177,10 @@ grpc_objc_library(
"ProtoRPC/ProtoService.h", "ProtoRPC/ProtoService.h",
], ],
deps = [ deps = [
":rx_library",
":proto_objc_rpc_v2",
":proto_objc_rpc_legacy_header",
":grpc_objc_client_core", ":grpc_objc_client_core",
":proto_objc_rpc_legacy_header",
":proto_objc_rpc_v2",
":rx_library",
"@com_google_protobuf//:protobuf_objc", "@com_google_protobuf//:protobuf_objc",
], ],
) )
@ -196,15 +196,6 @@ apple_resource_bundle(
# Internal target combining grpc_objc_client_core and proto_objc_rpc for testing # Internal target combining grpc_objc_client_core and proto_objc_rpc for testing
grpc_objc_library( grpc_objc_library(
name = "grpc_objc_client_core_internal_testing", name = "grpc_objc_client_core_internal_testing",
hdrs = [
"GRPCClient/GRPCCall+ChannelCredentials.h",
"GRPCClient/GRPCCall+Cronet.h",
"GRPCClient/GRPCCall+OAuth2.h",
"GRPCClient/GRPCCall+Tests.h",
"GRPCClient/GRPCCall+ChannelArg.h",
"GRPCClient/internal_testing/GRPCCall+InternalTests.h",
],
textual_hdrs = glob(["GRPCClient/private/GRPCCore/*.h"]),
srcs = [ srcs = [
"GRPCClient/GRPCCall+ChannelArg.m", "GRPCClient/GRPCCall+ChannelArg.m",
"GRPCClient/GRPCCall+ChannelCredentials.m", "GRPCClient/GRPCCall+ChannelCredentials.m",
@ -214,11 +205,20 @@ grpc_objc_library(
"GRPCClient/GRPCCallLegacy.m", "GRPCClient/GRPCCallLegacy.m",
"GRPCClient/internal_testing/GRPCCall+InternalTests.m", "GRPCClient/internal_testing/GRPCCall+InternalTests.m",
] + glob(["GRPCClient/private/GRPCCore/*.m"]), ] + glob(["GRPCClient/private/GRPCCore/*.m"]),
hdrs = [
"GRPCClient/GRPCCall+ChannelArg.h",
"GRPCClient/GRPCCall+ChannelCredentials.h",
"GRPCClient/GRPCCall+Cronet.h",
"GRPCClient/GRPCCall+OAuth2.h",
"GRPCClient/GRPCCall+Tests.h",
"GRPCClient/internal_testing/GRPCCall+InternalTests.h",
],
data = [":gRPCCertificates"], data = [":gRPCCertificates"],
includes = ["."],
defines = [ defines = [
"GRPC_TEST_OBJC=1", "GRPC_TEST_OBJC=1",
], ],
includes = ["."],
textual_hdrs = glob(["GRPCClient/private/GRPCCore/*.h"]),
deps = [ deps = [
":grpc_objc_interface", ":grpc_objc_interface",
":grpc_objc_interface_legacy", ":grpc_objc_interface_legacy",
@ -240,10 +240,10 @@ grpc_objc_library(
"ProtoRPC/ProtoService.h", "ProtoRPC/ProtoService.h",
], ],
deps = [ deps = [
":rx_library",
":proto_objc_rpc_v2",
":proto_objc_rpc_legacy_header",
":grpc_objc_client_core_internal_testing", ":grpc_objc_client_core_internal_testing",
":proto_objc_rpc_legacy_header",
":proto_objc_rpc_v2",
":rx_library",
"@com_google_protobuf//:protobuf_objc", "@com_google_protobuf//:protobuf_objc",
], ],
) )

@ -19,7 +19,7 @@ licenses(["notice"]) # 3-clause BSD
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load( load(
"//src/objective-c:grpc_objc_internal_library.bzl", "//src/objective-c:grpc_objc_internal_library.bzl",
"grpc_objc_examples_library", "grpc_objc_examples_library",
"local_objc_grpc_library", "local_objc_grpc_library",
"proto_library_objc_wrapper", "proto_library_objc_wrapper",
@ -36,8 +36,8 @@ proto_library_objc_wrapper(
proto_library_objc_wrapper( proto_library_objc_wrapper(
name = "test_proto", name = "test_proto",
srcs = ["RemoteTestClient/test.proto"], srcs = ["RemoteTestClient/test.proto"],
deps = [":messages_proto"],
use_well_known_protos = True, use_well_known_protos = True,
deps = [":messages_proto"],
) )
# use objc_grpc_library in bazel:objc_grpc_library.bzl when developing outside the repo # use objc_grpc_library in bazel:objc_grpc_library.bzl when developing outside the repo
@ -72,14 +72,14 @@ grpc_objc_examples_library(
ios_application( ios_application(
name = "Sample", name = "Sample",
bundle_id = "io.grpc.Sample", bundle_id = "io.grpc.Sample",
minimum_os_version = "8.0",
infoplists = ["Sample/Sample/Info.plist"],
families = [ families = [
"iphone", "iphone",
"ipad", "ipad",
], ],
deps = ["Sample-lib"], infoplists = ["Sample/Sample/Info.plist"],
minimum_os_version = "8.0",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = ["Sample-lib"],
) )
grpc_objc_examples_library( grpc_objc_examples_library(
@ -95,12 +95,12 @@ grpc_objc_examples_library(
ios_application( ios_application(
name = "InterceptorSample", name = "InterceptorSample",
bundle_id = "io.grpc.InterceptorSample", bundle_id = "io.grpc.InterceptorSample",
minimum_os_version = "9.0", # Safe Area Layout Guide used
infoplists = ["InterceptorSample/InterceptorSample/Info.plist"],
families = [ families = [
"iphone", "iphone",
"ipad", "ipad",
], ],
infoplists = ["InterceptorSample/InterceptorSample/Info.plist"],
minimum_os_version = "9.0", # Safe Area Layout Guide used
deps = ["InterceptorSample-lib"], deps = ["InterceptorSample-lib"],
) )
@ -118,8 +118,8 @@ grpc_objc_examples_library(
tvos_application( tvos_application(
name = "tvOS-sample", name = "tvOS-sample",
bundle_id = "io.grpc.tvOS-sample", bundle_id = "io.grpc.tvOS-sample",
minimum_os_version = "10.0",
infoplists = ["tvOS-sample/tvOS-sample/Info.plist"], infoplists = ["tvOS-sample/tvOS-sample/Info.plist"],
minimum_os_version = "10.0",
deps = [":tvOS-sample-lib"], deps = [":tvOS-sample-lib"],
) )
@ -146,27 +146,27 @@ grpc_objc_examples_library(
ios_application( ios_application(
name = "watchOS-sample", name = "watchOS-sample",
bundle_id = "io.grpc.watchOS-sample", bundle_id = "io.grpc.watchOS-sample",
minimum_os_version = "9.0", # Safe Area Layout Guide used
families = ["iphone"], families = ["iphone"],
infoplists = ["watchOS-sample/watchOS-sample/Info.plist"], infoplists = ["watchOS-sample/watchOS-sample/Info.plist"],
deps = [":watchOS-sample-iOS-lib"], minimum_os_version = "9.0", # Safe Area Layout Guide used
watch_application = "watchOS-sample-watchApp", watch_application = "watchOS-sample-watchApp",
deps = [":watchOS-sample-iOS-lib"],
) )
# c-ares does not support watchOS CPU architecture with Bazel yet # c-ares does not support watchOS CPU architecture with Bazel yet
watchos_application( watchos_application(
name = "watchOS-sample-watchApp", name = "watchOS-sample-watchApp",
bundle_id = "io.grpc.watchOS-sample.watchkitapp", bundle_id = "io.grpc.watchOS-sample.watchkitapp",
extension = ":watchOS-sample-extension",
infoplists = ["watchOS-sample/WatchKit-App/Info.plist"],
minimum_os_version = "4.0", minimum_os_version = "4.0",
storyboards = ["watchOS-sample/WatchKit-App/Base.lproj/Interface.storyboard"], storyboards = ["watchOS-sample/WatchKit-App/Base.lproj/Interface.storyboard"],
infoplists = ["watchOS-sample/WatchKit-App/Info.plist"],
extension = ":watchOS-sample-extension",
) )
watchos_extension( watchos_extension(
name = "watchOS-sample-extension", name = "watchOS-sample-extension",
bundle_id = "io.grpc.watchOS-sample.watchkitapp.watchkitextension", bundle_id = "io.grpc.watchOS-sample.watchkitapp.watchkitextension",
minimum_os_version = "4.0",
infoplists = ["watchOS-sample/WatchKit-Extension/Info.plist"], infoplists = ["watchOS-sample/WatchKit-Extension/Info.plist"],
minimum_os_version = "4.0",
deps = [":watchOS-sample-extension-lib"], deps = [":watchOS-sample-extension-lib"],
) )

@ -27,15 +27,15 @@ load(
"//bazel:generate_objc.bzl", "//bazel:generate_objc.bzl",
"generate_objc", "generate_objc",
"generate_objc_hdrs", "generate_objc_hdrs",
"generate_objc_non_arc_srcs",
"generate_objc_srcs", "generate_objc_srcs",
"generate_objc_non_arc_srcs"
) )
def proto_library_objc_wrapper( def proto_library_objc_wrapper(
name, name,
srcs, srcs,
deps = [], deps = [],
use_well_known_protos = False): use_well_known_protos = False):
"""proto_library for adding dependencies to google/protobuf protos """proto_library for adding dependencies to google/protobuf protos
use_well_known_protos - ignored in open source version use_well_known_protos - ignored in open source version
""" """

@ -39,15 +39,15 @@ proto_library_objc_wrapper(
proto_library_objc_wrapper( proto_library_objc_wrapper(
name = "test_proto", name = "test_proto",
srcs = ["RemoteTestClient/test.proto"], srcs = ["RemoteTestClient/test.proto"],
deps = [":messages_proto"],
use_well_known_protos = True, use_well_known_protos = True,
deps = [":messages_proto"],
) )
local_objc_grpc_library( local_objc_grpc_library(
name = "RemoteTest", name = "RemoteTest",
srcs = ["RemoteTestClient/test.proto"], srcs = ["RemoteTestClient/test.proto"],
use_well_known_protos = True,
testing = True, testing = True,
use_well_known_protos = True,
deps = [":test_proto"], deps = [":test_proto"],
) )
@ -78,12 +78,12 @@ objc_library(
ios_application( ios_application(
name = "ios-host", name = "ios-host",
bundle_id = "grpc.objc.tests.ios-host", bundle_id = "grpc.objc.tests.ios-host",
infoplists = ["Hosts/ios-host/Info.plist"],
minimum_os_version = "9.0",
families = [ families = [
"iphone", "iphone",
"ipad", "ipad",
], ],
infoplists = ["Hosts/ios-host/Info.plist"],
minimum_os_version = "9.0",
deps = ["host-lib"], deps = ["host-lib"],
) )
@ -97,8 +97,8 @@ tvos_application(
grpc_objc_testing_library( grpc_objc_testing_library(
name = "InteropTests-lib", name = "InteropTests-lib",
hdrs = ["InteropTests/InteropTests.h"],
srcs = ["InteropTests/InteropTests.m"], srcs = ["InteropTests/InteropTests.m"],
hdrs = ["InteropTests/InteropTests.h"],
deps = [ deps = [
":InteropTestsBlockCallbacks-lib", ":InteropTestsBlockCallbacks-lib",
], ],
@ -112,8 +112,8 @@ grpc_objc_testing_library(
grpc_objc_testing_library( grpc_objc_testing_library(
name = "InteropTestsBlockCallbacks-lib", name = "InteropTestsBlockCallbacks-lib",
hdrs = ["InteropTests/InteropTestsBlockCallbacks.h"],
srcs = ["InteropTests/InteropTestsBlockCallbacks.m"], srcs = ["InteropTests/InteropTestsBlockCallbacks.m"],
hdrs = ["InteropTests/InteropTestsBlockCallbacks.h"],
) )
grpc_objc_testing_library( grpc_objc_testing_library(
@ -175,26 +175,26 @@ grpc_objc_testing_library(
ios_unit_test( ios_unit_test(
name = "UnitTests", name = "UnitTests",
minimum_os_version = "8.0", minimum_os_version = "8.0",
test_host = ":ios-host",
deps = [ deps = [
":RxLibraryUnitTests-lib",
":GRPCClientTests-lib",
":APIv2Tests-lib", ":APIv2Tests-lib",
":ChannelPoolTest-lib", ":ChannelPoolTest-lib",
":ChannelTests-lib", ":ChannelTests-lib",
":GRPCClientTests-lib",
":NSErrorUnitTests-lib", ":NSErrorUnitTests-lib",
":RxLibraryUnitTests-lib",
], ],
test_host = ":ios-host",
) )
ios_unit_test( ios_unit_test(
name = "InteropTests", name = "InteropTests",
minimum_os_version = "8.0", minimum_os_version = "8.0",
test_host = ":ios-host",
deps = [ deps = [
":InteropTestsRemote-lib",
":InteropTestsLocalSSL-lib",
":InteropTestsLocalCleartext-lib", ":InteropTestsLocalCleartext-lib",
":InteropTestsLocalSSL-lib",
":InteropTestsRemote-lib",
], ],
test_host = ":ios-host",
) )
macos_unit_test( macos_unit_test(
@ -202,26 +202,26 @@ macos_unit_test(
minimum_os_version = "10.9", minimum_os_version = "10.9",
deps = [ deps = [
":APIv2Tests-lib", ":APIv2Tests-lib",
":RxLibraryUnitTests-lib",
":NSErrorUnitTests-lib",
":InteropTestsRemote-lib",
":InteropTestsLocalSSL-lib",
":InteropTestsLocalCleartext-lib", ":InteropTestsLocalCleartext-lib",
":InteropTestsLocalSSL-lib",
":InteropTestsRemote-lib",
":MacStressTests-lib", ":MacStressTests-lib",
] ":NSErrorUnitTests-lib",
":RxLibraryUnitTests-lib",
],
) )
# bazel run tvos_unit_test is not yet supported by xctestrunner # bazel run tvos_unit_test is not yet supported by xctestrunner
tvos_unit_test( tvos_unit_test(
name = "TvTests", name = "TvTests",
minimum_os_version = "10.0", minimum_os_version = "10.0",
test_host = ":tvos-host",
deps = [ deps = [
":APIv2Tests-lib", ":APIv2Tests-lib",
":RxLibraryUnitTests-lib",
":NSErrorUnitTests-lib",
":InteropTestsRemote-lib",
":InteropTestsLocalSSL-lib",
":InteropTestsLocalCleartext-lib", ":InteropTestsLocalCleartext-lib",
":InteropTestsLocalSSL-lib",
":InteropTestsRemote-lib",
":NSErrorUnitTests-lib",
":RxLibraryUnitTests-lib",
], ],
test_host = ":tvos-host",
) )

@ -14,9 +14,12 @@
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_proto_library", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library")
grpc_package(name = "channelz", visibility = "public") grpc_package(
name = "channelz",
visibility = "public",
)
grpc_proto_library( grpc_proto_library(
name = "channelz_proto", name = "channelz_proto",

@ -14,9 +14,12 @@
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_proto_library", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library")
grpc_package(name = "core", visibility = "public") grpc_package(
name = "core",
visibility = "public",
)
grpc_proto_library( grpc_proto_library(
name = "stats_proto", name = "stats_proto",

@ -14,9 +14,12 @@
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_proto_library", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library")
grpc_package(name = "health", visibility = "public") grpc_package(
name = "health",
visibility = "public",
)
grpc_proto_library( grpc_proto_library(
name = "health_proto", name = "health_proto",

@ -14,9 +14,12 @@
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_proto_library", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library")
grpc_package(name = "reflection", visibility = "public") grpc_package(
name = "reflection",
visibility = "public",
)
grpc_proto_library( grpc_proto_library(
name = "reflection_proto", name = "reflection_proto",
@ -34,4 +37,3 @@ filegroup(
"reflection.proto", "reflection.proto",
], ],
) )

@ -14,9 +14,12 @@
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_proto_library", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library")
grpc_package(name = "status", visibility = "public") grpc_package(
name = "status",
visibility = "public",
)
grpc_proto_library( grpc_proto_library(
name = "status_proto", name = "status_proto",

@ -14,9 +14,9 @@
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_proto_library", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library")
load("@grpc_python_dependencies//:requirements.bzl", "requirement") load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("//bazel:python_rules.bzl", "py_proto_library", "py_grpc_library") load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")
grpc_package( grpc_package(
name = "testing", name = "testing",
@ -231,4 +231,3 @@ py_grpc_library(
srcs = [":test_proto_descriptor"], srcs = [":test_proto_descriptor"],
deps = [":py_test_proto"], deps = [":py_test_proto"],
) )

@ -14,9 +14,12 @@
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_proto_library", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library")
grpc_package(name = "duplicate", visibility = "public") grpc_package(
name = "duplicate",
visibility = "public",
)
grpc_proto_library( grpc_proto_library(
name = "echo_duplicate_proto", name = "echo_duplicate_proto",

@ -1,6 +1,7 @@
load("@grpc_python_dependencies//:requirements.bzl", "requirement") load("@grpc_python_dependencies//:requirements.bzl", "requirement")
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("//bazel:python_rules.bzl", "py_proto_library") load("//bazel:python_rules.bzl", "py_proto_library")
proto_library( proto_library(
@ -18,11 +19,10 @@ proto_library(
srcs = ["empty2_extensions.proto"], srcs = ["empty2_extensions.proto"],
deps = [ deps = [
":empty2_proto_descriptor", ":empty2_proto_descriptor",
] ],
) )
py_proto_library( py_proto_library(
name = "empty2_extensions_proto", name = "empty2_extensions_proto",
deps = [":empty2_extensions_proto_descriptor"], deps = [":empty2_extensions_proto_descriptor"],
) )

@ -3,6 +3,10 @@ package(default_visibility = ["//visibility:public"])
py_library( py_library(
name = "grpcio", name = "grpcio",
srcs = ["__init__.py"], srcs = ["__init__.py"],
data = [
"//:grpc",
],
imports = ["../"],
deps = [ deps = [
":utilities", ":utilities",
":auth", ":auth",
@ -16,13 +20,9 @@ py_library(
"//src/python/grpcio/grpc/framework", "//src/python/grpcio/grpc/framework",
"@six_archive//:six", "@six_archive//:six",
] + select({ ] + select({
"//conditions:default": ["@enum34//:enum34",], "//conditions:default": ["@enum34//:enum34"],
"//:python3": [], "//:python3": [],
}), }),
data = [
"//:grpc",
],
imports = ["../",],
) )
py_library( py_library(
@ -40,8 +40,8 @@ py_library(
srcs = ["_channel.py"], srcs = ["_channel.py"],
deps = [ deps = [
":common", ":common",
":grpcio_metadata",
":compression", ":compression",
":grpcio_metadata",
], ],
) )
@ -65,7 +65,7 @@ py_library(
srcs = ["_plugin_wrapping.py"], srcs = ["_plugin_wrapping.py"],
deps = [ deps = [
":common", ":common",
] ],
) )
py_library( py_library(
@ -85,4 +85,3 @@ py_library(
":common", ":common",
], ],
) )

@ -10,8 +10,6 @@ pyx_library(
"_cygrpc/_hooks.pyx.pxi", "_cygrpc/_hooks.pyx.pxi",
"_cygrpc/aio/call.pxd.pxi", "_cygrpc/aio/call.pxd.pxi",
"_cygrpc/aio/call.pyx.pxi", "_cygrpc/aio/call.pyx.pxi",
"_cygrpc/aio/rpc_error.pxd.pxi",
"_cygrpc/aio/rpc_error.pyx.pxi",
"_cygrpc/aio/callbackcontext.pxd.pxi", "_cygrpc/aio/callbackcontext.pxd.pxi",
"_cygrpc/aio/cancel_status.pxd.pxi", "_cygrpc/aio/cancel_status.pxd.pxi",
"_cygrpc/aio/cancel_status.pyx.pxi", "_cygrpc/aio/cancel_status.pyx.pxi",
@ -26,6 +24,8 @@ pyx_library(
"_cygrpc/aio/iomgr/socket.pyx.pxi", "_cygrpc/aio/iomgr/socket.pyx.pxi",
"_cygrpc/aio/iomgr/timer.pxd.pxi", "_cygrpc/aio/iomgr/timer.pxd.pxi",
"_cygrpc/aio/iomgr/timer.pyx.pxi", "_cygrpc/aio/iomgr/timer.pyx.pxi",
"_cygrpc/aio/rpc_error.pxd.pxi",
"_cygrpc/aio/rpc_error.pyx.pxi",
"_cygrpc/aio/server.pxd.pxi", "_cygrpc/aio/server.pxd.pxi",
"_cygrpc/aio/server.pyx.pxi", "_cygrpc/aio/server.pyx.pxi",
"_cygrpc/arguments.pxd.pxi", "_cygrpc/arguments.pxd.pxi",

@ -15,7 +15,7 @@ py_library(
py_library( py_library(
name = "experimental", name = "experimental",
srcs = ["__init__.py",], srcs = ["__init__.py"],
deps = [ deps = [
":aio", ":aio",
":gevent", ":gevent",

@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
py_library( py_library(
name = "framework", name = "framework",
srcs = ["__init__.py",], srcs = ["__init__.py"],
deps = [ deps = [
"//src/python/grpcio/grpc/framework/common", "//src/python/grpcio/grpc/framework/common",
"//src/python/grpcio/grpc/framework/foundation", "//src/python/grpcio/grpc/framework/foundation",

@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
py_library( py_library(
name = "common", name = "common",
srcs = ["__init__.py",], srcs = ["__init__.py"],
deps = [ deps = [
":cardinality", ":cardinality",
":style", ":style",
@ -13,7 +13,7 @@ py_library(
name = "cardinality", name = "cardinality",
srcs = ["cardinality.py"], srcs = ["cardinality.py"],
deps = select({ deps = select({
"//conditions:default": ["@enum34//:enum34",], "//conditions:default": ["@enum34//:enum34"],
"//:python3": [], "//:python3": [],
}), }),
) )
@ -22,7 +22,7 @@ py_library(
name = "style", name = "style",
srcs = ["style.py"], srcs = ["style.py"],
deps = select({ deps = select({
"//conditions:default": ["@enum34//:enum34",], "//conditions:default": ["@enum34//:enum34"],
"//:python3": [], "//:python3": [],
}), }),
) )

@ -2,14 +2,14 @@ package(default_visibility = ["//visibility:public"])
py_library( py_library(
name = "foundation", name = "foundation",
srcs = ["__init__.py",], srcs = ["__init__.py"],
deps = [ deps = [
":abandonment", ":abandonment",
":callable_util", ":callable_util",
":future", ":future",
":logging_pool", ":logging_pool",
":stream_util",
":stream", ":stream",
":stream_util",
], ],
) )
@ -24,7 +24,7 @@ py_library(
deps = [ deps = [
"//external:six", "//external:six",
] + select({ ] + select({
"//conditions:default": ["@enum34//:enum34",], "//conditions:default": ["@enum34//:enum34"],
"//:python3": [], "//:python3": [],
}), }),
) )
@ -41,7 +41,7 @@ py_library(
name = "logging_pool", name = "logging_pool",
srcs = ["logging_pool.py"], srcs = ["logging_pool.py"],
deps = select({ deps = select({
"//conditions:default": ["@futures//:futures",], "//conditions:default": ["@futures//:futures"],
"//:python3": [], "//:python3": [],
}), }),
) )

@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
py_library( py_library(
name = "interfaces", name = "interfaces",
srcs = ["__init__.py",], srcs = ["__init__.py"],
deps = [ deps = [
"//src/python/grpcio/grpc/framework/interfaces/base", "//src/python/grpcio/grpc/framework/interfaces/base",
"//src/python/grpcio/grpc/framework/interfaces/face", "//src/python/grpcio/grpc/framework/interfaces/face",

@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
py_library( py_library(
name = "base_lib", name = "base_lib",
srcs = ["__init__.py",], srcs = ["__init__.py"],
deps = [ deps = [
":base", ":base",
":utilities", ":utilities",
@ -16,7 +16,7 @@ py_library(
"//src/python/grpcio/grpc/framework/foundation:abandonment", "//src/python/grpcio/grpc/framework/foundation:abandonment",
"//external:six", "//external:six",
] + select({ ] + select({
"//conditions:default": ["@enum34//:enum34",], "//conditions:default": ["@enum34//:enum34"],
"//:python3": [], "//:python3": [],
}), }),
) )
@ -25,7 +25,7 @@ py_library(
name = "utilities", name = "utilities",
srcs = ["utilities.py"], srcs = ["utilities.py"],
deps = select({ deps = select({
"//conditions:default": ["@enum34//:enum34",], "//conditions:default": ["@enum34//:enum34"],
"//:python3": [], "//:python3": [],
}), }),
) )

@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
py_library( py_library(
name = "face", name = "face",
srcs = ["__init__.py",], srcs = ["__init__.py"],
deps = [ deps = [
":face_lib", ":face_lib",
":utilities", ":utilities",
@ -17,7 +17,7 @@ py_library(
"//src/python/grpcio/grpc/framework/common", "//src/python/grpcio/grpc/framework/common",
"//external:six", "//external:six",
] + select({ ] + select({
"//conditions:default": ["@enum34//:enum34",], "//conditions:default": ["@enum34//:enum34"],
"//:python3": [], "//:python3": [],
}), }),
) )
@ -26,8 +26,8 @@ py_library(
name = "utilities", name = "utilities",
srcs = ["utilities.py"], srcs = ["utilities.py"],
deps = [ deps = [
":face_lib",
"//src/python/grpcio/grpc/framework/common", "//src/python/grpcio/grpc/framework/common",
"//src/python/grpcio/grpc/framework/foundation:stream", "//src/python/grpcio/grpc/framework/foundation:stream",
":face_lib",
], ],
) )

@ -1,4 +1,5 @@
load("//bazel:python_rules.bzl", "py_proto_library", "py_grpc_library") load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
py_proto_library( py_proto_library(
@ -9,17 +10,17 @@ py_proto_library(
py_grpc_library( py_grpc_library(
name = "channelz_py_pb2_grpc", name = "channelz_py_pb2_grpc",
srcs = ["//src/proto/grpc/channelz:channelz_proto_descriptors"], srcs = ["//src/proto/grpc/channelz:channelz_proto_descriptors"],
deps = [":channelz_py_pb2"],
strip_prefixes = ["src.python.grpcio_channelz."], strip_prefixes = ["src.python.grpcio_channelz."],
deps = [":channelz_py_pb2"],
) )
py_library( py_library(
name = "grpc_channelz", name = "grpc_channelz",
srcs = ["channelz.py",], srcs = ["channelz.py"],
imports = ["../../"],
deps = [ deps = [
":channelz_py_pb2", ":channelz_py_pb2",
":channelz_py_pb2_grpc", ":channelz_py_pb2_grpc",
"//src/python/grpcio/grpc:grpcio", "//src/python/grpcio/grpc:grpcio",
], ],
imports=["../../",],
) )

@ -1,26 +1,26 @@
load("//bazel:python_rules.bzl", "py_proto_library", "py_grpc_library") load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
py_proto_library( py_proto_library(
name = "health_py_pb2", name = "health_py_pb2",
deps = ["//src/proto/grpc/health/v1:health_proto_descriptor",], deps = ["//src/proto/grpc/health/v1:health_proto_descriptor"],
) )
py_grpc_library( py_grpc_library(
name = "health_py_pb2_grpc", name = "health_py_pb2_grpc",
srcs = ["//src/proto/grpc/health/v1:health_proto_descriptor",], srcs = ["//src/proto/grpc/health/v1:health_proto_descriptor"],
deps = [":health_py_pb2"],
strip_prefixes = ["src.python.grpcio_health_checking."], strip_prefixes = ["src.python.grpcio_health_checking."],
deps = [":health_py_pb2"],
) )
py_library( py_library(
name = "grpc_health", name = "grpc_health",
srcs = ["health.py",], srcs = ["health.py"],
imports = ["../../"],
deps = [ deps = [
":health_py_pb2", ":health_py_pb2",
":health_py_pb2_grpc", ":health_py_pb2_grpc",
"//src/python/grpcio/grpc:grpcio", "//src/python/grpcio/grpc:grpcio",
], ],
imports=["../../",],
) )

@ -1,29 +1,28 @@
load("//bazel:python_rules.bzl", "py_proto_library", "py_grpc_library") load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")
load("@grpc_python_dependencies//:requirements.bzl", "requirement") load("@grpc_python_dependencies//:requirements.bzl", "requirement")
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
py_proto_library( py_proto_library(
name = "reflection_py_pb2", name = "reflection_py_pb2",
deps = ["//src/proto/grpc/reflection/v1alpha:reflection_proto_descriptor",], deps = ["//src/proto/grpc/reflection/v1alpha:reflection_proto_descriptor"],
) )
py_grpc_library( py_grpc_library(
name = "reflection_py_pb2_grpc", name = "reflection_py_pb2_grpc",
srcs = ["//src/proto/grpc/reflection/v1alpha:reflection_proto_descriptor",], srcs = ["//src/proto/grpc/reflection/v1alpha:reflection_proto_descriptor"],
deps = ["reflection_py_pb2"],
strip_prefixes = ["src.python.grpcio_reflection."], strip_prefixes = ["src.python.grpcio_reflection."],
deps = ["reflection_py_pb2"],
) )
py_library( py_library(
name = "grpc_reflection", name = "grpc_reflection",
srcs = ["reflection.py",], srcs = ["reflection.py"],
imports = ["../../"],
deps = [ deps = [
":reflection_py_pb2", ":reflection_py_pb2",
":reflection_py_pb2_grpc", ":reflection_py_pb2_grpc",
"//src/python/grpcio/grpc:grpcio", "//src/python/grpcio/grpc:grpcio",
"@com_google_protobuf//:protobuf_python", "@com_google_protobuf//:protobuf_python",
], ],
imports=["../../",],
) )

@ -4,11 +4,11 @@ package(default_visibility = ["//visibility:public"])
py_library( py_library(
name = "grpc_status", name = "grpc_status",
srcs = ["rpc_status.py",], srcs = ["rpc_status.py"],
imports = ["../"],
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio", "//src/python/grpcio/grpc:grpcio",
"@com_google_protobuf//:protobuf_python", "@com_google_protobuf//:protobuf_python",
requirement('googleapis-common-protos'), requirement("googleapis-common-protos"),
], ],
imports=["../",],
) )

@ -2,8 +2,8 @@ py_library(
name = "bazel_namespace_package_hack", name = "bazel_namespace_package_hack",
srcs = ["bazel_namespace_package_hack.py"], srcs = ["bazel_namespace_package_hack.py"],
visibility = [ visibility = [
"//src/python/grpcio_tests/tests/status:__subpackages__",
"//src/python/grpcio_tests/tests/interop:__subpackages__",
"//examples/python/errors:__subpackages__", "//examples/python/errors:__subpackages__",
"//src/python/grpcio_tests/tests/interop:__subpackages__",
"//src/python/grpcio_tests/tests/status:__subpackages__",
], ],
) )

@ -4,14 +4,14 @@ load("//bazel:python_rules.bzl", "py2and3_test")
py2and3_test( py2and3_test(
name = "channelz_servicer_test", name = "channelz_servicer_test",
size = "small",
srcs = ["_channelz_servicer_test.py"], srcs = ["_channelz_servicer_test.py"],
imports = ["../../"],
main = "_channelz_servicer_test.py", main = "_channelz_servicer_test.py",
size = "small",
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio", "//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz", "//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz",
"//src/python/grpcio_tests/tests/unit:test_common", "//src/python/grpcio_tests/tests/unit:test_common",
"//src/python/grpcio_tests/tests/unit/framework/common:common", "//src/python/grpcio_tests/tests/unit/framework/common",
], ],
imports = ["../../",],
) )

@ -1,18 +1,18 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("//bazel:python_rules.bzl", "py2and3_test") load("//bazel:python_rules.bzl", "py2and3_test")
py2and3_test( py2and3_test(
name = "health_servicer_test", name = "health_servicer_test",
size = "small",
srcs = ["_health_servicer_test.py"], srcs = ["_health_servicer_test.py"],
imports = ["../../"],
main = "_health_servicer_test.py", main = "_health_servicer_test.py",
size = "small",
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio", "//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_health_checking/grpc_health/v1:grpc_health", "//src/python/grpcio_health_checking/grpc_health/v1:grpc_health",
"//src/python/grpcio_tests/tests/unit:test_common", "//src/python/grpcio_tests/tests/unit:test_common",
"//src/python/grpcio_tests/tests/unit:thread_pool", "//src/python/grpcio_tests/tests/unit:thread_pool",
"//src/python/grpcio_tests/tests/unit/framework/common:common", "//src/python/grpcio_tests/tests/unit/framework/common",
], ],
imports = ["../../",],
) )

@ -1,9 +1,8 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
filegroup( filegroup(
name="credentials", name = "credentials",
srcs=glob([ srcs = glob([
"**", "**",
]), ]),
) )

@ -4,20 +4,19 @@ load("//bazel:python_rules.bzl", "py2and3_test")
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
py2and3_test( py2and3_test(
name="_reflection_servicer_test", name = "_reflection_servicer_test",
size="small", size = "small",
timeout="moderate", timeout = "moderate",
srcs=["_reflection_servicer_test.py",], srcs = ["_reflection_servicer_test.py"],
main="_reflection_servicer_test.py", imports = ["../../"],
deps=[ main = "_reflection_servicer_test.py",
"//src/python/grpcio/grpc:grpcio", deps = [
"//src/python/grpcio_reflection/grpc_reflection/v1alpha:grpc_reflection",
"//src/python/grpcio_tests/tests/unit:test_common",
"//src/proto/grpc/testing:empty_py_pb2", "//src/proto/grpc/testing:empty_py_pb2",
"//src/proto/grpc/testing/proto2:empty2_extensions_proto", "//src/proto/grpc/testing/proto2:empty2_extensions_proto",
"//src/proto/grpc/testing/proto2:empty2_proto", "//src/proto/grpc/testing/proto2:empty2_proto",
requirement('protobuf'), "//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_reflection/grpc_reflection/v1alpha:grpc_reflection",
"//src/python/grpcio_tests/tests/unit:test_common",
requirement("protobuf"),
], ],
imports=["../../",],
) )

@ -5,17 +5,17 @@ package(default_visibility = ["//visibility:public"])
py2and3_test( py2and3_test(
name = "grpc_status_test", name = "grpc_status_test",
size = "small",
srcs = ["_grpc_status_test.py"], srcs = ["_grpc_status_test.py"],
imports = ["../../"],
main = "_grpc_status_test.py", main = "_grpc_status_test.py",
size = "small",
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio", "//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_status/grpc_status:grpc_status", "//src/python/grpcio_status/grpc_status",
"//src/python/grpcio_tests/tests:bazel_namespace_package_hack", "//src/python/grpcio_tests/tests:bazel_namespace_package_hack",
"//src/python/grpcio_tests/tests/unit:test_common", "//src/python/grpcio_tests/tests/unit:test_common",
"//src/python/grpcio_tests/tests/unit/framework/common:common", "//src/python/grpcio_tests/tests/unit/framework/common",
requirement('protobuf'), requirement("protobuf"),
requirement('googleapis-common-protos'), requirement("googleapis-common-protos"),
], ],
imports = ["../../",],
) )

@ -1,4 +1,4 @@
load("@com_github_grpc_grpc//bazel:python_rules.bzl", "py_proto_library", "py_grpc_library") load("@com_github_grpc_grpc//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")
proto_library( proto_library(
name = "unary_stream_benchmark_proto", name = "unary_stream_benchmark_proto",
@ -7,24 +7,24 @@ proto_library(
) )
py_proto_library( py_proto_library(
name = "unary_stream_benchmark_py_pb2", name = "unary_stream_benchmark_py_pb2",
deps = [":unary_stream_benchmark_proto"], deps = [":unary_stream_benchmark_proto"],
) )
py_grpc_library( py_grpc_library(
name = "unary_stream_benchmark_py_pb2_grpc", name = "unary_stream_benchmark_py_pb2_grpc",
srcs = [":unary_stream_benchmark_proto"], srcs = [":unary_stream_benchmark_proto"],
deps = [":unary_stream_benchmark_py_pb2"], deps = [":unary_stream_benchmark_py_pb2"],
) )
py_binary( py_binary(
name = "unary_stream_benchmark", name = "unary_stream_benchmark",
srcs_version = "PY3",
python_version = "PY3",
srcs = ["unary_stream_benchmark.py"], srcs = ["unary_stream_benchmark.py"],
python_version = "PY3",
srcs_version = "PY3",
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio",
":unary_stream_benchmark_py_pb2", ":unary_stream_benchmark_py_pb2",
":unary_stream_benchmark_py_pb2_grpc", ":unary_stream_benchmark_py_pb2_grpc",
] "//src/python/grpcio/grpc:grpcio",
],
) )

@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
py_library( py_library(
name = "testing", name = "testing",
srcs = ["__init__.py",], srcs = ["__init__.py"],
deps = [ deps = [
# ":_application_common", # ":_application_common",
":_server_application", ":_server_application",
@ -22,9 +22,6 @@ py_library(
py_library( py_library(
name = "_server_application", name = "_server_application",
srcs = ["_server_application.py",], srcs = ["_server_application.py"],
imports = ["../../",], imports = ["../../"],
) )

@ -53,7 +53,7 @@ py_library(
py_library( py_library(
name = "resources", name = "resources",
srcs = ["resources.py"], srcs = ["resources.py"],
data=[ data = [
"//src/python/grpcio_tests/tests/unit/credentials", "//src/python/grpcio_tests/tests/unit/credentials",
], ],
) )
@ -85,28 +85,28 @@ py_library(
[ [
py2and3_test( py2and3_test(
name=test_file_name[:-3], name = test_file_name[:-3],
size="small", size = "small",
srcs=[test_file_name], srcs = [test_file_name],
main=test_file_name, data = [
deps=[ "//src/python/grpcio_tests/tests/unit/credentials",
"//src/python/grpcio/grpc:grpcio", ],
":resources", imports = ["../../"],
":test_common", main = test_file_name,
":thread_pool", deps = [
":_exit_scenarios", ":_exit_scenarios",
":_server_shutdown_scenarios",
":_from_grpc_import_star", ":_from_grpc_import_star",
":_tcp_proxy", ":_server_shutdown_scenarios",
":_signal_client", ":_signal_client",
"//src/python/grpcio_tests/tests/unit/framework/common", ":_tcp_proxy",
":resources",
":test_common",
":thread_pool",
"//external:six",
"//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_tests/tests/testing", "//src/python/grpcio_tests/tests/testing",
"//external:six" "//src/python/grpcio_tests/tests/unit/framework/common",
],
imports=["../../",],
data=[
"//src/python/grpcio_tests/tests/unit/credentials",
], ],
) for test_file_name in GRPCIO_TESTS_UNIT )
for test_file_name in GRPCIO_TESTS_UNIT
] ]

@ -25,23 +25,22 @@ py_library(
[ [
py2and3_test( py2and3_test(
name=test_file_name[:-3], name = test_file_name[:-3],
size="small", size = "small",
srcs=[test_file_name], srcs = [test_file_name],
main=test_file_name, data = [
deps=[ "//src/python/grpcio_tests/tests/unit/credentials",
"//src/python/grpcio/grpc:grpcio", ],
imports = ["../../../"],
main = test_file_name,
deps = [
":common", ":common",
":test_utilities", ":test_utilities",
"//src/python/grpcio_tests/tests/unit/framework/common", "//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_tests/tests/unit:test_common",
"//src/python/grpcio_tests/tests/unit:resources", "//src/python/grpcio_tests/tests/unit:resources",
"//src/python/grpcio_tests/tests/unit:test_common",
"//src/python/grpcio_tests/tests/unit/framework/common",
], ],
imports=["../../../",], )
data=[ for test_file_name in GRPCIO_TESTS_UNIT_CYTHON
"//src/python/grpcio_tests/tests/unit/credentials",
],
) for test_file_name in GRPCIO_TESTS_UNIT_CYTHON
] ]

@ -1,10 +1,8 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
filegroup( filegroup(
name="credentials", name = "credentials",
srcs=glob([ srcs = glob([
"**", "**",
]), ]),
) )

@ -8,4 +8,3 @@ py_library(
"test_coverage.py", "test_coverage.py",
], ],
) )

@ -1,4 +1,5 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("//bazel:python_rules.bzl", "py2and3_test") load("//bazel:python_rules.bzl", "py2and3_test")
py_library( py_library(
@ -8,11 +9,10 @@ py_library(
py2and3_test( py2and3_test(
name = "logging_pool_test", name = "logging_pool_test",
size = "small",
srcs = ["_logging_pool_test.py"], srcs = ["_logging_pool_test.py"],
main = "_logging_pool_test.py", main = "_logging_pool_test.py",
size = "small",
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio", "//src/python/grpcio/grpc:grpcio",
], ],
) )

@ -19,45 +19,45 @@ package(
GRPC_ASYNC_TESTS = glob(["*_test.py"]) GRPC_ASYNC_TESTS = glob(["*_test.py"])
py_library( py_library(
name = "_test_base", name = "_test_base",
srcs_version = "PY3",
srcs = ["_test_base.py"], srcs = ["_test_base.py"],
srcs_version = "PY3",
) )
py_library( py_library(
name = "_test_server", name = "_test_server",
srcs_version = "PY3",
srcs = ["_test_server.py"], srcs = ["_test_server.py"],
srcs_version = "PY3",
deps = [ deps = [
"//src/python/grpcio/grpc:grpcio", "//src/proto/grpc/testing:empty_py_pb2",
"//src/proto/grpc/testing:py_messages_proto", "//src/proto/grpc/testing:py_messages_proto",
"//src/proto/grpc/testing:test_py_pb2_grpc", "//src/proto/grpc/testing:test_py_pb2_grpc",
"//src/proto/grpc/testing:empty_py_pb2", "//src/python/grpcio/grpc:grpcio",
] ],
) )
[ [
py_test( py_test(
name=test_file_name[:-3], name = test_file_name[:-3],
size="small", size = "small",
srcs=[test_file_name], srcs = [test_file_name],
main=test_file_name, data = [
python_version="PY3", "//src/python/grpcio_tests/tests/unit/credentials",
deps=[ ],
":_test_server", imports = ["../../"],
main = test_file_name,
python_version = "PY3",
deps = [
":_test_base", ":_test_base",
"//src/python/grpcio/grpc:grpcio", ":_test_server",
"//src/proto/grpc/testing:py_messages_proto", "//external:six",
"//src/proto/grpc/testing:benchmark_service_py_pb2_grpc",
"//src/proto/grpc/testing:benchmark_service_py_pb2", "//src/proto/grpc/testing:benchmark_service_py_pb2",
"//src/proto/grpc/testing:benchmark_service_py_pb2_grpc",
"//src/proto/grpc/testing:py_messages_proto",
"//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_tests/tests/unit/framework/common", "//src/python/grpcio_tests/tests/unit/framework/common",
"//external:six"
],
imports=["../../",],
data=[
"//src/python/grpcio_tests/tests/unit/credentials",
], ],
) for test_file_name in GRPC_ASYNC_TESTS )
for test_file_name in GRPC_ASYNC_TESTS
] ]

@ -0,0 +1,4 @@
# Install buildifier v0.29.0
RUN wget https://github.com/bazelbuild/buildtools/releases/download/0.29.0/buildifier
RUN chmod +x buildifier
RUN mv buildifier /usr/local/bin

@ -33,6 +33,7 @@
<%include file="../../clang5.include"/> <%include file="../../clang5.include"/>
<%include file="../../bazel.include"/> <%include file="../../bazel.include"/>
<%include file="../../buildifier.include"/>
# Define the default command. # Define the default command.
CMD ["bash"] CMD ["bash"]

@ -21,8 +21,8 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test")
# build test //test/build_test:objective_c_examples_test # build test //test/build_test:objective_c_examples_test
build_test( build_test(
name = "objective_c_examples_test", name = "objective_c_examples_test",
tags = ["manual"],
targets = [ targets = [
"//examples/objective-c:HelloWorld", "//examples/objective-c:HelloWorld",
], ],
tags = ["manual"],
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
@ -22,10 +22,10 @@ grpc_cc_test(
name = "avl_test", name = "avl_test",
srcs = ["avl_test.cc"], srcs = ["avl_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test")
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
@ -30,10 +30,10 @@ grpc_cc_test(
"gtest", "gtest",
], ],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
grpc_package(name = "test/core/bad_client") grpc_package(name = "test/core/bad_client")

@ -13,47 +13,44 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
"""Generates the appropriate build.json data for all the bad_client tests.""" """Generates the appropriate build.json data for all the bad_client tests."""
load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_cc_library") load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test")
def test_options(): def test_options():
return struct() return struct()
# maps test names to options # maps test names to options
BAD_CLIENT_TESTS = { BAD_CLIENT_TESTS = {
'badreq': test_options(), "badreq": test_options(),
'bad_streaming_id': test_options(), "bad_streaming_id": test_options(),
'connection_prefix': test_options(), "connection_prefix": test_options(),
'duplicate_header': test_options(), "duplicate_header": test_options(),
'headers': test_options(), "headers": test_options(),
'initial_settings_frame': test_options(), "initial_settings_frame": test_options(),
'head_of_line_blocking': test_options(), "head_of_line_blocking": test_options(),
'large_metadata': test_options(), "large_metadata": test_options(),
'out_of_bounds': test_options(), "out_of_bounds": test_options(),
'server_registered_method': test_options(), "server_registered_method": test_options(),
'simple_request': test_options(), "simple_request": test_options(),
'window_overflow': test_options(), "window_overflow": test_options(),
'unknown_frame': test_options(), "unknown_frame": test_options(),
} }
def grpc_bad_client_tests(): def grpc_bad_client_tests():
grpc_cc_library( grpc_cc_library(
name = 'bad_client_test', name = "bad_client_test",
srcs = ['bad_client.cc'], srcs = ["bad_client.cc"],
hdrs = ['bad_client.h'], hdrs = ["bad_client.h"],
language = "C++", language = "C++",
deps = ['//test/core/util:grpc_test_util', '//:grpc', '//:gpr', '//test/core/end2end:cq_verifier'] deps = ["//test/core/util:grpc_test_util", "//:grpc", "//:gpr", "//test/core/end2end:cq_verifier"],
)
for t, topt in BAD_CLIENT_TESTS.items():
grpc_cc_test(
name = '%s_bad_client_test' % t,
srcs = ['tests/%s.cc' % t],
deps = [':bad_client_test'],
external_deps = [
"gtest",
],
) )
for t, topt in BAD_CLIENT_TESTS.items():
grpc_cc_test(
name = "%s_bad_client_test" % t,
srcs = ["tests/%s.cc" % t],
deps = [":bad_client_test"],
external_deps = [
"gtest",
],
)

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
@ -24,10 +24,10 @@ grpc_cc_binary(
"close_fd_test.cc", "close_fd_test.cc",
], ],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
grpc_package(name = "test/core/bad_ssl") grpc_package(name = "test/core/bad_ssl")

@ -13,38 +13,43 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_cc_library", "grpc_cc_binary") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test")
def test_options(): def test_options():
return struct() return struct()
# maps test names to options # maps test names to options
BAD_SSL_TESTS = ['cert', 'alpn'] BAD_SSL_TESTS = ["cert", "alpn"]
def grpc_bad_ssl_tests(): def grpc_bad_ssl_tests():
grpc_cc_library( grpc_cc_library(
name = 'bad_ssl_test_server', name = "bad_ssl_test_server",
srcs = ['server_common.cc'], srcs = ["server_common.cc"],
hdrs = ['server_common.h'], hdrs = ["server_common.h"],
deps = ['//test/core/util:grpc_test_util', deps = [
'//:grpc', "//test/core/util:grpc_test_util",
'//test/core/end2end:ssl_test_data'] "//:grpc",
) "//test/core/end2end:ssl_test_data",
for t in BAD_SSL_TESTS: ],
grpc_cc_binary(
name = 'bad_ssl_%s_server' % t,
srcs = ['servers/%s.cc' % t],
deps = [':bad_ssl_test_server'],
)
grpc_cc_test(
name = 'bad_ssl_%s_test' % t,
srcs = ['bad_ssl_test.cc'],
data = [':bad_ssl_%s_server' % t,
'//src/core/tsi/test_creds:badserver.key',
'//src/core/tsi/test_creds:badserver.pem',],
deps = ['//test/core/util:grpc_test_util',
'//:gpr',
'//test/core/end2end:cq_verifier'],
tags = ["no_windows"],
) )
for t in BAD_SSL_TESTS:
grpc_cc_binary(
name = "bad_ssl_%s_server" % t,
srcs = ["servers/%s.cc" % t],
deps = [":bad_ssl_test_server"],
)
grpc_cc_test(
name = "bad_ssl_%s_test" % t,
srcs = ["bad_ssl_test.cc"],
data = [
":bad_ssl_%s_server" % t,
"//src/core/tsi/test_creds:badserver.key",
"//src/core/tsi/test_creds:badserver.pem",
],
deps = [
"//test/core/util:grpc_test_util",
"//:gpr",
"//test/core/end2end:cq_verifier",
],
tags = ["no_windows"],
)

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
grpc_package(name = "test/core/channel") grpc_package(name = "test/core/channel")
@ -22,24 +22,24 @@ grpc_cc_test(
name = "channel_args_test", name = "channel_args_test",
srcs = ["channel_args_test.cc"], srcs = ["channel_args_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "channel_stack_test", name = "channel_stack_test",
srcs = ["channel_stack_test.cc"], srcs = ["channel_stack_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -57,12 +57,12 @@ grpc_cc_test(
name = "minimal_stack_is_minimal_test", name = "minimal_stack_is_minimal_test",
srcs = ["minimal_stack_is_minimal_test.cc"], srcs = ["minimal_stack_is_minimal_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -104,13 +104,13 @@ grpc_cc_test(
"gtest", "gtest",
], ],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//:grpc++", "//:grpc++",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -120,9 +120,9 @@ grpc_cc_test(
"gtest", "gtest",
], ],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
grpc_package(name = "test/core/client_channel") grpc_package(name = "test/core/client_channel")
@ -25,12 +25,12 @@ grpc_fuzzer(
srcs = ["uri_fuzzer_test.cc"], srcs = ["uri_fuzzer_test.cc"],
corpus = "uri_corpus", corpus = "uri_corpus",
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
@ -48,13 +48,13 @@ grpc_cc_test(
name = "parse_address_with_named_scope_id_test", name = "parse_address_with_named_scope_id_test",
srcs = ["parse_address_with_named_scope_id_test.cc"], srcs = ["parse_address_with_named_scope_id_test.cc"],
language = "C++", language = "C++",
tags = ["no_windows"],
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -75,12 +75,12 @@ grpc_cc_test(
"gtest", "gtest",
], ],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
grpc_package(name = "test/core/client_channel_resolvers") grpc_package(name = "test/core/client_channel_resolvers")
@ -21,10 +21,10 @@ licenses(["notice"]) # Apache v2
grpc_cc_test( grpc_cc_test(
name = "dns_resolver_connectivity_using_ares_resolver_test", name = "dns_resolver_connectivity_using_ares_resolver_test",
srcs = ["dns_resolver_connectivity_test.cc"], srcs = ["dns_resolver_connectivity_test.cc"],
language = "C++",
args = [ args = [
"--resolver=ares", "--resolver=ares",
], ],
language = "C++",
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
@ -35,10 +35,10 @@ grpc_cc_test(
grpc_cc_test( grpc_cc_test(
name = "dns_resolver_connectivity_using_native_resolver_test", name = "dns_resolver_connectivity_using_native_resolver_test",
srcs = ["dns_resolver_connectivity_test.cc"], srcs = ["dns_resolver_connectivity_test.cc"],
language = "C++",
args = [ args = [
"--resolver=native", "--resolver=native",
], ],
language = "C++",
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
grpc_package(name = "test/core/compression") grpc_package(name = "test/core/compression")
@ -22,46 +22,46 @@ grpc_cc_test(
name = "algorithm_test", name = "algorithm_test",
srcs = ["algorithm_test.cc"], srcs = ["algorithm_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "compression_test", name = "compression_test",
srcs = ["compression_test.cc"], srcs = ["compression_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "message_compress_test", name = "message_compress_test",
srcs = ["message_compress_test.cc"], srcs = ["message_compress_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "stream_compression_test", name = "stream_compression_test",
srcs = ["stream_compression_test.cc"], srcs = ["stream_compression_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
grpc_package(name = "test/core/debug") grpc_package(name = "test/core/debug")
@ -25,10 +25,10 @@ grpc_cc_test(
"gtest", "gtest",
], ],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )

@ -12,13 +12,13 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
grpc_package(name = "test/core/end2end") grpc_package(name = "test/core/end2end")
load(":generate_tests.bzl", "grpc_end2end_tests", "grpc_end2end_nosec_tests") load(":generate_tests.bzl", "grpc_end2end_nosec_tests", "grpc_end2end_tests")
grpc_cc_library( grpc_cc_library(
name = "cq_verifier", name = "cq_verifier",
@ -73,14 +73,16 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "local_util", name = "local_util",
srcs = ["fixtures/local_util.cc"], srcs = ["fixtures/local_util.cc"],
hdrs = ["fixtures/local_util.h", hdrs = [
"end2end_tests.h"], "end2end_tests.h",
"fixtures/local_util.h",
],
language = "C++", language = "C++",
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
) )
grpc_cc_test( grpc_cc_test(
@ -111,13 +113,13 @@ grpc_cc_test(
name = "dualstack_socket_test", name = "dualstack_socket_test",
srcs = ["dualstack_socket_test.cc"], srcs = ["dualstack_socket_test.cc"],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
":cq_verifier", ":cq_verifier",
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
@ -136,13 +138,13 @@ grpc_cc_test(
name = "inproc_callback_test", name = "inproc_callback_test",
srcs = ["inproc_callback_test.cc"], srcs = ["inproc_callback_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
":end2end_tests", ":end2end_tests",
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
grpc_package(name = "test/core/end2end/fuzzers") grpc_package(name = "test/core/end2end/fuzzers")
@ -22,42 +22,42 @@ load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_fuzzer( grpc_fuzzer(
name = "api_fuzzer", name = "api_fuzzer",
srcs = ["api_fuzzer.cc"],
language = "C++",
corpus = "api_fuzzer_corpus",
size = "enormous", size = "enormous",
timeout = "eternal", timeout = "eternal",
srcs = ["api_fuzzer.cc"],
corpus = "api_fuzzer_corpus",
language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/end2end:ssl_test_data", "//test/core/end2end:ssl_test_data",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_fuzzer( grpc_fuzzer(
name = "client_fuzzer", name = "client_fuzzer",
srcs = ["client_fuzzer.cc"], srcs = ["client_fuzzer.cc"],
language = "C++",
corpus = "client_fuzzer_corpus", corpus = "client_fuzzer_corpus",
language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_fuzzer( grpc_fuzzer(
name = "server_fuzzer", name = "server_fuzzer",
srcs = ["server_fuzzer.cc"], srcs = ["server_fuzzer.cc"],
language = "C++",
corpus = "server_fuzzer_corpus", corpus = "server_fuzzer_corpus",
language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )

@ -46,7 +46,7 @@ def _fixture_options(
supports_write_buffering = supports_write_buffering, supports_write_buffering = supports_write_buffering,
client_channel = client_channel, client_channel = client_channel,
supports_msvc = supports_msvc, supports_msvc = supports_msvc,
_platforms=_platforms, _platforms = _platforms,
) )
# maps fixture name to whether it requires the security library # maps fixture name to whether it requires the security library
@ -369,14 +369,14 @@ def _compatible(fopt, topt):
return True return True
def _platform_support_tags(fopt): def _platform_support_tags(fopt):
result = [] result = []
if not "windows" in fopt._platforms: if not "windows" in fopt._platforms:
result += ["no_windows"] result += ["no_windows"]
if not "mac" in fopt._platforms: if not "mac" in fopt._platforms:
result += ["no_mac"] result += ["no_mac"]
if not "linux" in fopt._platforms: if not "linux" in fopt._platforms:
result += ["no_linux"] result += ["no_linux"]
return result return result
def grpc_end2end_tests(): def grpc_end2end_tests():
grpc_cc_library( grpc_cc_library(
@ -396,7 +396,7 @@ def grpc_end2end_tests():
":http_proxy", ":http_proxy",
":proxy", ":proxy",
":local_util", ":local_util",
] ],
) )
for f, fopt in END2END_FIXTURES.items(): for f, fopt in END2END_FIXTURES.items():
@ -424,7 +424,7 @@ def grpc_end2end_tests():
srcs = ["end2end_test.sh"], srcs = ["end2end_test.sh"],
args = [ args = [
"$(location %s_test)" % f, "$(location %s_test)" % f,
t t,
], ],
tags = ["no_linux"] + _platform_support_tags(fopt), tags = ["no_linux"] + _platform_support_tags(fopt),
) )
@ -461,7 +461,7 @@ def grpc_end2end_nosec_tests():
":http_proxy", ":http_proxy",
":proxy", ":proxy",
":local_util", ":local_util",
] ],
) )
for f, fopt in END2END_NOSEC_FIXTURES.items(): for f, fopt in END2END_NOSEC_FIXTURES.items():
@ -492,7 +492,7 @@ def grpc_end2end_nosec_tests():
srcs = ["end2end_test.sh"], srcs = ["end2end_test.sh"],
args = [ args = [
"$(location %s_nosec_test)" % f, "$(location %s_nosec_test)" % f,
t t,
], ],
tags = ["no_linux"] + _platform_support_tags(fopt), tags = ["no_linux"] + _platform_support_tags(fopt),
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
grpc_package(name = "test/core/fling") grpc_package(name = "test/core/fling")
@ -53,13 +53,13 @@ grpc_cc_test(
":fling_client", ":fling_client",
":fling_server", ":fling_server",
], ],
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/end2end:ssl_test_data", "//test/core/end2end:ssl_test_data",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
@ -69,11 +69,11 @@ grpc_cc_test(
":fling_client", ":fling_client",
":fling_server", ":fling_server",
], ],
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/end2end:ssl_test_data", "//test/core/end2end:ssl_test_data",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
@ -22,130 +22,130 @@ grpc_cc_test(
name = "alloc_test", name = "alloc_test",
srcs = ["alloc_test.cc"], srcs = ["alloc_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "arena_test", name = "arena_test",
srcs = ["arena_test.cc"], srcs = ["arena_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "cpu_test", name = "cpu_test",
srcs = ["cpu_test.cc"], srcs = ["cpu_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "env_test", name = "env_test",
srcs = ["env_test.cc"], srcs = ["env_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "log_test", name = "log_test",
srcs = ["log_test.cc"], srcs = ["log_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "murmur_hash_test", name = "murmur_hash_test",
srcs = ["murmur_hash_test.cc"], srcs = ["murmur_hash_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "string_test", name = "string_test",
srcs = ["string_test.cc"], srcs = ["string_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "spinlock_test", name = "spinlock_test",
srcs = ["spinlock_test.cc"], srcs = ["spinlock_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "sync_test", name = "sync_test",
srcs = ["sync_test.cc"], srcs = ["sync_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "time_test", name = "time_test",
srcs = ["time_test.cc"], srcs = ["time_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "tls_test", name = "tls_test",
srcs = ["tls_test.cc"], srcs = ["tls_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "useful_test", name = "useful_test",
srcs = ["useful_test.cc"], srcs = ["useful_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package", "LARGE_MACHINE") load("//bazel:grpc_build_system.bzl", "LARGE_MACHINE", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
@ -23,11 +23,11 @@ grpc_cc_test(
srcs = ["fork_test.cc"], srcs = ["fork_test.cc"],
language = "C++", language = "C++",
tags = ["no_windows"], tags = ["no_windows"],
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -37,11 +37,11 @@ grpc_cc_test(
"gtest", "gtest",
], ],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -52,33 +52,33 @@ grpc_cc_test(
], ],
language = "C++", language = "C++",
tags = ["no_windows"], # TODO(jtattermusch): fix the failure on windows tags = ["no_windows"], # TODO(jtattermusch): fix the failure on windows
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "manual_constructor_test", name = "manual_constructor_test",
srcs = ["manual_constructor_test.cc"], srcs = ["manual_constructor_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "host_port_test", name = "host_port_test",
srcs = ["host_port_test.cc"], srcs = ["host_port_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -88,11 +88,11 @@ grpc_cc_test(
"gtest", "gtest",
], ],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr_base", "//:gpr_base",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -114,11 +114,11 @@ grpc_cc_test(
exec_properties = LARGE_MACHINE, exec_properties = LARGE_MACHINE,
language = "C++", language = "C++",
tags = ["no_windows"], # LARGE_MACHINE is not configured for windows RBE tags = ["no_windows"], # LARGE_MACHINE is not configured for windows RBE
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -191,9 +191,9 @@ grpc_cc_test(
name = "thd_test", name = "thd_test",
srcs = ["thd_test.cc"], srcs = ["thd_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
grpc_package(name = "test/core/handshake") grpc_package(name = "test/core/handshake")
@ -27,24 +27,24 @@ grpc_cc_test(
"//src/core/tsi/test_creds:server1.pem", "//src/core/tsi/test_creds:server1.pem",
], ],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_library( grpc_cc_library(
name = "server_ssl_common", name = "server_ssl_common",
srcs = ["server_ssl_common.cc"], srcs = ["server_ssl_common.cc"],
hdrs = ["server_ssl_common.h"], hdrs = ["server_ssl_common.h"],
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
@ -56,13 +56,13 @@ grpc_cc_test(
"//src/core/tsi/test_creds:server1.pem", "//src/core/tsi/test_creds:server1.pem",
], ],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
":server_ssl_common", ":server_ssl_common",
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
@ -74,13 +74,13 @@ grpc_cc_test(
"//src/core/tsi/test_creds:server1.pem", "//src/core/tsi/test_creds:server1.pem",
], ],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
":server_ssl_common", ":server_ssl_common",
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
@ -92,10 +92,10 @@ grpc_cc_test(
"//src/core/tsi/test_creds:server1.pem", "//src/core/tsi/test_creds:server1.pem",
], ],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
grpc_package(name = "test/core/http") grpc_package(name = "test/core/http")
@ -25,12 +25,12 @@ grpc_fuzzer(
srcs = ["response_fuzzer.cc"], srcs = ["response_fuzzer.cc"],
corpus = "response_corpus", corpus = "response_corpus",
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_fuzzer( grpc_fuzzer(
@ -38,12 +38,12 @@ grpc_fuzzer(
srcs = ["request_fuzzer.cc"], srcs = ["request_fuzzer.cc"],
corpus = "request_corpus", corpus = "request_corpus",
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
# Copyright 2017 gRPC authors. # Copyright 2017 gRPC authors.
@ -74,13 +74,13 @@ grpc_cc_test(
"//src/core/tsi/test_creds:server1.pem", "//src/core/tsi/test_creds:server1.pem",
], ],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/end2end:ssl_test_data", "//test/core/end2end:ssl_test_data",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
@ -94,26 +94,26 @@ grpc_cc_test(
"//src/core/tsi/test_creds:server1.pem", "//src/core/tsi/test_creds:server1.pem",
], ],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/end2end:ssl_test_data", "//test/core/end2end:ssl_test_data",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
name = "parser_test", name = "parser_test",
srcs = ["parser_test.cc"], srcs = ["parser_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/end2end:ssl_test_data", "//test/core/end2end:ssl_test_data",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package", "LARGE_MACHINE") load("//bazel:grpc_build_system.bzl", "LARGE_MACHINE", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
@ -65,49 +65,49 @@ grpc_cc_test(
name = "error_test", name = "error_test",
srcs = ["error_test.cc"], srcs = ["error_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
":endpoint_tests", ":endpoint_tests",
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "ev_epollex_linux_test", name = "ev_epollex_linux_test",
srcs = ["ev_epollex_linux_test.cc"], srcs = ["ev_epollex_linux_test.cc"],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
name = "fd_conservation_posix_test", name = "fd_conservation_posix_test",
srcs = ["fd_conservation_posix_test.cc"], srcs = ["fd_conservation_posix_test.cc"],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
name = "fd_posix_test", name = "fd_posix_test",
srcs = ["fd_posix_test.cc"], srcs = ["fd_posix_test.cc"],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
@ -125,24 +125,24 @@ grpc_cc_test(
name = "load_file_test", name = "load_file_test",
srcs = ["load_file_test.cc"], srcs = ["load_file_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "mpmcqueue_test", name = "mpmcqueue_test",
srcs = ["mpmcqueue_test.cc"], srcs = ["mpmcqueue_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -152,12 +152,12 @@ grpc_cc_test(
"--resolver=ares", "--resolver=ares",
], ],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
@ -167,12 +167,12 @@ grpc_cc_test(
"--resolver=native", "--resolver=native",
], ],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
@ -229,37 +229,37 @@ grpc_cc_test(
name = "socket_utils_test", name = "socket_utils_test",
srcs = ["socket_utils_test.cc"], srcs = ["socket_utils_test.cc"],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
name = "tcp_client_posix_test", name = "tcp_client_posix_test",
srcs = ["tcp_client_posix_test.cc"], srcs = ["tcp_client_posix_test.cc"],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
name = "tcp_posix_test", name = "tcp_posix_test",
srcs = ["tcp_posix_test.cc"], srcs = ["tcp_posix_test.cc"],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
":endpoint_tests", ":endpoint_tests",
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
@ -277,70 +277,70 @@ grpc_cc_test(
name = "tcp_server_posix_test", name = "tcp_server_posix_test",
srcs = ["tcp_server_posix_test.cc"], srcs = ["tcp_server_posix_test.cc"],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
name = "threadpool_test", name = "threadpool_test",
srcs = ["threadpool_test.cc"], srcs = ["threadpool_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "time_averaged_stats_test", name = "time_averaged_stats_test",
srcs = ["time_averaged_stats_test.cc"], srcs = ["time_averaged_stats_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "timer_heap_test", name = "timer_heap_test",
srcs = ["timer_heap_test.cc"], srcs = ["timer_heap_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "timer_list_test", name = "timer_list_test",
srcs = ["timer_list_test.cc"], srcs = ["timer_list_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "udp_server_test", name = "udp_server_test",
srcs = ["udp_server_test.cc"], srcs = ["udp_server_test.cc"],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
grpc_package(name = "test/core/json") grpc_package(name = "test/core/json")
@ -25,12 +25,12 @@ grpc_fuzzer(
srcs = ["fuzzer.cc"], srcs = ["fuzzer.cc"],
corpus = "corpus", corpus = "corpus",
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_binary( grpc_cc_binary(
@ -55,34 +55,34 @@ grpc_cc_test(
":json_stream_error_test", ":json_stream_error_test",
], ],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "json_stream_error_test", name = "json_stream_error_test",
srcs = ["json_stream_error_test.cc"], srcs = ["json_stream_error_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "json_test", name = "json_test",
srcs = ["json_test.cc"], srcs = ["json_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
grpc_package(name = "test/core/nanopb") grpc_package(name = "test/core/nanopb")
@ -23,25 +23,25 @@ load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_fuzzer( grpc_fuzzer(
name = "fuzzer_response", name = "fuzzer_response",
srcs = ["fuzzer_response.cc"], srcs = ["fuzzer_response.cc"],
language = "C++",
corpus = "corpus_response", corpus = "corpus_response",
language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_fuzzer( grpc_fuzzer(
name = "fuzzer_serverlist", name = "fuzzer_serverlist",
srcs = ["fuzzer_serverlist.cc"], srcs = ["fuzzer_serverlist.cc"],
language = "C++",
corpus = "corpus_serverlist", corpus = "corpus_serverlist",
language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
grpc_package( grpc_package(
name = "test/core/network_benchmarks", name = "test/core/network_benchmarks",
@ -28,10 +28,10 @@ grpc_cc_binary(
name = "low_level_ping_pong", name = "low_level_ping_pong",
srcs = ["low_level_ping_pong.cc"], srcs = ["low_level_ping_pong.cc"],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
@ -25,12 +25,12 @@ grpc_fuzzer(
srcs = ["alts_credentials_fuzzer.cc"], srcs = ["alts_credentials_fuzzer.cc"],
corpus = "corpus/alts_credentials_corpus", corpus = "corpus/alts_credentials_corpus",
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_fuzzer( grpc_fuzzer(
@ -38,13 +38,13 @@ grpc_fuzzer(
srcs = ["ssl_server_fuzzer.cc"], srcs = ["ssl_server_fuzzer.cc"],
corpus = "corpus/ssl_server_corpus", corpus = "corpus/ssl_server_corpus",
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/end2end:ssl_test_data", "//test/core/end2end:ssl_test_data",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_library( grpc_cc_library(
@ -60,12 +60,12 @@ grpc_cc_test(
name = "auth_context_test", name = "auth_context_test",
srcs = ["auth_context_test.cc"], srcs = ["auth_context_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -96,24 +96,24 @@ grpc_cc_test(
name = "json_token_test", name = "json_token_test",
srcs = ["json_token_test.cc"], srcs = ["json_token_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "jwt_verifier_test", name = "jwt_verifier_test",
srcs = ["jwt_verifier_test.cc"], srcs = ["jwt_verifier_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -261,15 +261,15 @@ grpc_cc_test(
grpc_cc_test( grpc_cc_test(
name = "spiffe_security_connector_test", name = "spiffe_security_connector_test",
srcs = ["spiffe_security_connector_test.cc"], srcs = ["spiffe_security_connector_test.cc"],
language = "C++",
external_deps = [ external_deps = [
"gtest", "gtest",
], ],
language = "C++",
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//:grpc_secure", "//:grpc_secure",
"//test/core/util:grpc_test_util",
"//test/core/end2end:ssl_test_data", "//test/core/end2end:ssl_test_data",
"//test/core/util:grpc_test_util",
], ],
) )

@ -15,8 +15,8 @@
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
exports_files([ exports_files([
"bundle.pem", "bundle.pem",
"test_roots/cert1.pem", "test_roots/cert1.pem",
"test_roots/cert2.pem", "test_roots/cert2.pem",
"test_roots/cert3.pem", "test_roots/cert3.pem",
]) ])

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
grpc_package(name = "test/core/slice") grpc_package(name = "test/core/slice")
@ -25,12 +25,12 @@ grpc_fuzzer(
srcs = ["percent_encode_fuzzer.cc"], srcs = ["percent_encode_fuzzer.cc"],
corpus = "percent_encode_corpus", corpus = "percent_encode_corpus",
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_fuzzer( grpc_fuzzer(
@ -38,60 +38,60 @@ grpc_fuzzer(
srcs = ["percent_decode_fuzzer.cc"], srcs = ["percent_decode_fuzzer.cc"],
corpus = "percent_decode_corpus", corpus = "percent_decode_corpus",
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
name = "percent_encoding_test", name = "percent_encoding_test",
srcs = ["percent_encoding_test.cc"], srcs = ["percent_encoding_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "slice_test", name = "slice_test",
srcs = ["slice_test.cc"], srcs = ["slice_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "slice_string_helpers_test", name = "slice_string_helpers_test",
srcs = ["slice_string_helpers_test.cc"], srcs = ["slice_string_helpers_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "slice_buffer_test", name = "slice_buffer_test",
srcs = ["slice_buffer_test.cc"], srcs = ["slice_buffer_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -101,12 +101,12 @@ grpc_cc_test(
"gtest", "gtest",
], ],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -116,22 +116,22 @@ grpc_cc_test(
"gtest", "gtest",
], ],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "b64_test", name = "b64_test",
srcs = ["b64_test.cc"], srcs = ["b64_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
@ -22,12 +22,12 @@ grpc_cc_test(
name = "grpc_byte_buffer_reader_test", name = "grpc_byte_buffer_reader_test",
srcs = ["byte_buffer_reader_test.cc"], srcs = ["byte_buffer_reader_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -78,12 +78,12 @@ grpc_cc_test(
name = "init_test", name = "init_test",
srcs = ["init_test.cc"], srcs = ["init_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
@ -26,12 +26,12 @@ grpc_cc_test(
], ],
language = "C++", language = "C++",
tags = ["no_windows"], # TODO(jtattermusch): investigate the timeout on windows tags = ["no_windows"], # TODO(jtattermusch): investigate the timeout on windows
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -41,12 +41,12 @@ grpc_cc_test(
"gtest", "gtest",
], ],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -106,36 +106,36 @@ grpc_cc_test(
name = "status_conversion_test", name = "status_conversion_test",
srcs = ["status_conversion_test.cc"], srcs = ["status_conversion_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "stream_owned_slice_test", name = "stream_owned_slice_test",
srcs = ["stream_owned_slice_test.cc"], srcs = ["stream_owned_slice_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "timeout_encoding_test", name = "timeout_encoding_test",
srcs = ["timeout_encoding_test.cc"], srcs = ["timeout_encoding_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -145,9 +145,9 @@ grpc_cc_test(
"gtest", "gtest",
], ],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
@ -24,11 +24,11 @@ grpc_fuzzer(
name = "hpack_parser_fuzzer", name = "hpack_parser_fuzzer",
srcs = ["hpack_parser_fuzzer_test.cc"], srcs = ["hpack_parser_fuzzer_test.cc"],
corpus = "hpack_parser_corpus", corpus = "hpack_parser_corpus",
tags = ["no_windows"],
deps = [ deps = [
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
@ -46,24 +46,24 @@ grpc_cc_test(
name = "bin_decoder_test", name = "bin_decoder_test",
srcs = ["bin_decoder_test.cc"], srcs = ["bin_decoder_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "bin_encoder_test", name = "bin_encoder_test",
srcs = ["bin_encoder_test.cc"], srcs = ["bin_encoder_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -73,48 +73,48 @@ grpc_cc_test(
"gtest", "gtest",
], ],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "hpack_encoder_test", name = "hpack_encoder_test",
srcs = ["hpack_encoder_test.cc"], srcs = ["hpack_encoder_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "hpack_parser_test", name = "hpack_parser_test",
srcs = ["hpack_parser_test.cc"], srcs = ["hpack_parser_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
name = "hpack_table_test", name = "hpack_table_test",
srcs = ["hpack_table_test.cc"], srcs = ["hpack_table_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )
grpc_cc_test( grpc_cc_test(
@ -146,10 +146,10 @@ grpc_cc_test(
name = "varint_test", name = "varint_test",
srcs = ["varint_test.cc"], srcs = ["varint_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
uses_polling = False,
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
@ -70,14 +70,15 @@ grpc_cc_test(
"//src/core/tsi/test_creds:ca.pem", "//src/core/tsi/test_creds:ca.pem",
"//src/core/tsi/test_creds:client.key", "//src/core/tsi/test_creds:client.key",
"//src/core/tsi/test_creds:client.pem", "//src/core/tsi/test_creds:client.pem",
"//src/core/tsi/test_creds:multi-domain.key",
"//src/core/tsi/test_creds:multi-domain.pem",
"//src/core/tsi/test_creds:server0.key", "//src/core/tsi/test_creds:server0.key",
"//src/core/tsi/test_creds:server0.pem", "//src/core/tsi/test_creds:server0.pem",
"//src/core/tsi/test_creds:server1.key", "//src/core/tsi/test_creds:server1.key",
"//src/core/tsi/test_creds:server1.pem", "//src/core/tsi/test_creds:server1.pem",
"//src/core/tsi/test_creds:multi-domain.key",
"//src/core/tsi/test_creds:multi-domain.pem",
], ],
language = "C++", language = "C++",
tags = ["no_windows"],
deps = [ deps = [
":transport_security_test_lib", ":transport_security_test_lib",
"//:gpr", "//:gpr",
@ -85,7 +86,6 @@ grpc_cc_test(
"//:tsi", "//:tsi",
"//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(

@ -14,7 +14,7 @@
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_proto_library", "grpc_cc_library", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_package", "grpc_proto_library")
grpc_package( grpc_package(
name = "test/core/tsi/alts/fake_handshaker", name = "test/core/tsi/alts/fake_handshaker",

@ -83,16 +83,16 @@ grpc_cc_test(
srcs = [ srcs = [
"alts_concurrent_connectivity_test.cc", "alts_concurrent_connectivity_test.cc",
], ],
external_deps = ["gtest"],
language = "C++", language = "C++",
# TODO(apolcyn): make the fake TCP server used in this
# test portable to Windows.
tags = ["no_windows"],
deps = [ deps = [
"//:alts_util", "//:alts_util",
"//:grpc", "//:grpc",
"//test/core/util:grpc_test_util",
"//test/core/tsi/alts/fake_handshaker:fake_handshaker_lib",
"//test/core/end2end:cq_verifier", "//test/core/end2end:cq_verifier",
"//test/core/tsi/alts/fake_handshaker:fake_handshaker_lib",
"//test/core/util:grpc_test_util",
], ],
external_deps = ["gtest"],
# TODO(apolcyn): make the fake TCP server used in this
# test portable to Windows.
tags = ["no_windows"],
) )

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
licenses(["notice"]) # Apache v2 licenses(["notice"]) # Apache v2
@ -115,11 +115,11 @@ grpc_cc_test(
name = "cmdline_test", name = "cmdline_test",
srcs = ["cmdline_test.cc"], srcs = ["cmdline_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
":grpc_test_util", ":grpc_test_util",
"//:gpr", "//:gpr",
], ],
uses_polling = False,
) )
grpc_cc_library( grpc_cc_library(
@ -130,23 +130,23 @@ grpc_cc_library(
"gtest", "gtest",
"gflags", "gflags",
], ],
tags = ["no_windows"],
deps = [ deps = [
":grpc_test_util", ":grpc_test_util",
"//:grpc", "//:grpc",
"//test/cpp/util:test_config", "//test/cpp/util:test_config",
], ],
tags = ["no_windows"],
) )
grpc_cc_test( grpc_cc_test(
name = "histogram_test", name = "histogram_test",
srcs = ["histogram_test.cc"], srcs = ["histogram_test.cc"],
language = "C++", language = "C++",
uses_polling = False,
deps = [ deps = [
":grpc_test_util", ":grpc_test_util",
"//:gpr", "//:gpr",
], ],
uses_polling = False,
) )
sh_library( sh_library(

@ -15,16 +15,16 @@
load("//bazel:grpc_build_system.bzl", "grpc_cc_test") load("//bazel:grpc_build_system.bzl", "grpc_cc_test")
def grpc_fuzzer(name, corpus, srcs = [], deps = [], size = "large", timeout = "long", **kwargs): def grpc_fuzzer(name, corpus, srcs = [], deps = [], size = "large", timeout = "long", **kwargs):
grpc_cc_test( grpc_cc_test(
name = name, name = name,
srcs = srcs, srcs = srcs,
deps = deps + ["//test/core/util:fuzzer_corpus_test"], deps = deps + ["//test/core/util:fuzzer_corpus_test"],
data = native.glob([corpus + "/**"]), data = native.glob([corpus + "/**"]),
external_deps = [ external_deps = [
'gtest', "gtest",
], ],
size = size, size = size,
timeout = timeout, timeout = timeout,
args = ["--directory=" + native.package_name() + "/" + corpus,], args = ["--directory=" + native.package_name() + "/" + corpus],
**kwargs **kwargs
) )

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save