Merge pull request #11310 from nicolasnoble/import

Import mutations.
pull/11807/head
Nicolas Noble 7 years ago committed by GitHub
commit 9877189e45
  1. 294
      BUILD
  2. 5
      bazel/cc_grpc_library.bzl
  3. 8
      bazel/generate_cc.bzl
  4. 14
      bazel/grpc_build_system.bzl
  5. 2
      examples/BUILD
  6. 5
      include/grpc++/impl/codegen/status.h
  7. 14
      src/core/lib/iomgr/timer_manager.c
  8. 8
      src/proto/grpc/health/v1/BUILD
  9. 8
      src/proto/grpc/lb/v1/BUILD
  10. 8
      src/proto/grpc/reflection/v1alpha/BUILD
  11. 10
      src/proto/grpc/status/BUILD
  12. 8
      src/proto/grpc/testing/BUILD
  13. 8
      src/proto/grpc/testing/duplicate/BUILD
  14. 6
      src/python/grpcio/grpc/_cython/_cygrpc/security.pyx.pxi
  15. 7
      test/core/bad_client/BUILD
  16. 7
      test/core/bad_ssl/BUILD
  17. 7
      test/core/census/BUILD
  18. 7
      test/core/channel/BUILD
  19. 7
      test/core/client_channel/BUILD
  20. 7
      test/core/client_channel/resolvers/BUILD
  21. 7
      test/core/compression/BUILD
  22. 7
      test/core/end2end/BUILD
  23. 7
      test/core/end2end/fuzzers/BUILD
  24. 7
      test/core/fling/BUILD
  25. 7
      test/core/handshake/BUILD
  26. 7
      test/core/http/BUILD
  27. 8
      test/core/iomgr/BUILD
  28. 7
      test/core/json/BUILD
  29. 7
      test/core/nanopb/BUILD
  30. 7
      test/core/network_benchmarks/BUILD
  31. 7
      test/core/security/BUILD
  32. 7
      test/core/slice/BUILD
  33. 7
      test/core/support/BUILD
  34. 7
      test/core/surface/BUILD
  35. 7
      test/core/transport/BUILD
  36. 7
      test/core/transport/chttp2/BUILD
  37. 7
      test/core/tsi/BUILD
  38. 8
      test/core/util/BUILD
  39. 7
      test/cpp/codegen/BUILD
  40. 7
      test/cpp/common/BUILD
  41. 9
      test/cpp/end2end/BUILD
  42. 3
      test/cpp/end2end/grpclb_end2end_test.cc
  43. 6
      test/cpp/end2end/mock_test.cc
  44. 81
      test/cpp/interop/BUILD
  45. 7
      test/cpp/microbenchmarks/BUILD
  46. 10
      test/cpp/qps/BUILD
  47. 2
      test/cpp/qps/client_sync.cc
  48. 22
      test/cpp/util/BUILD

294
BUILD

@ -40,9 +40,154 @@ core_version = "4.0.0-dev"
version = "1.5.0-dev"
GPR_PUBLIC_HDRS = [
"include/grpc/support/alloc.h",
"include/grpc/support/atm.h",
"include/grpc/support/atm_gcc_atomic.h",
"include/grpc/support/atm_gcc_sync.h",
"include/grpc/support/atm_windows.h",
"include/grpc/support/avl.h",
"include/grpc/support/cmdline.h",
"include/grpc/support/cpu.h",
"include/grpc/support/histogram.h",
"include/grpc/support/host_port.h",
"include/grpc/support/log.h",
"include/grpc/support/log_windows.h",
"include/grpc/support/port_platform.h",
"include/grpc/support/string_util.h",
"include/grpc/support/subprocess.h",
"include/grpc/support/sync.h",
"include/grpc/support/sync_generic.h",
"include/grpc/support/sync_posix.h",
"include/grpc/support/sync_windows.h",
"include/grpc/support/thd.h",
"include/grpc/support/time.h",
"include/grpc/support/tls.h",
"include/grpc/support/tls_gcc.h",
"include/grpc/support/tls_msvc.h",
"include/grpc/support/tls_pthread.h",
"include/grpc/support/useful.h",
]
GRPC_PUBLIC_HDRS = [
"include/grpc/byte_buffer.h",
"include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h",
"include/grpc/load_reporting.h",
"include/grpc/grpc.h",
"include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h",
"include/grpc/slice.h",
"include/grpc/slice_buffer.h",
"include/grpc/status.h",
"include/grpc/support/workaround_list.h",
]
GRPC_SECURE_PUBLIC_HDRS = [
"include/grpc/grpc_security.h",
]
# TODO(ctiller): layer grpc atop grpc_unsecure, layer grpc++ atop grpc++_unsecure
GRPCXX_SRCS = [
"src/cpp/client/channel_cc.cc",
"src/cpp/client/client_context.cc",
"src/cpp/client/create_channel.cc",
"src/cpp/client/create_channel_internal.cc",
"src/cpp/client/create_channel_posix.cc",
"src/cpp/client/credentials_cc.cc",
"src/cpp/client/generic_stub.cc",
"src/cpp/common/channel_arguments.cc",
"src/cpp/common/channel_filter.cc",
"src/cpp/common/completion_queue_cc.cc",
"src/cpp/common/core_codegen.cc",
"src/cpp/common/resource_quota_cc.cc",
"src/cpp/common/rpc_method.cc",
"src/cpp/common/version_cc.cc",
"src/cpp/server/async_generic_service.cc",
"src/cpp/server/channel_argument_option.cc",
"src/cpp/server/create_default_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.cc",
"src/cpp/server/health/default_health_check_service.cc",
"src/cpp/server/health/health.pb.c",
"src/cpp/server/health/health_check_service.cc",
"src/cpp/server/health/health_check_service_server_builder_option.cc",
"src/cpp/server/server_builder.cc",
"src/cpp/server/server_cc.cc",
"src/cpp/server/server_context.cc",
"src/cpp/server/server_credentials.cc",
"src/cpp/server/server_posix.cc",
"src/cpp/thread_manager/thread_manager.cc",
"src/cpp/util/byte_buffer_cc.cc",
"src/cpp/util/slice_cc.cc",
"src/cpp/util/status.cc",
"src/cpp/util/string_ref.cc",
"src/cpp/util/time_cc.cc",
]
GRPCXX_HDRS = [
"src/cpp/client/create_channel_internal.h",
"src/cpp/common/channel_filter.h",
"src/cpp/server/dynamic_thread_pool.h",
"src/cpp/server/health/default_health_check_service.h",
"src/cpp/server/health/health.pb.h",
"src/cpp/server/thread_pool_interface.h",
"src/cpp/thread_manager/thread_manager.h",
]
GRPCXX_PUBLIC_HDRS = [
"include/grpc++/alarm.h",
"include/grpc++/channel.h",
"include/grpc++/client_context.h",
"include/grpc++/completion_queue.h",
"include/grpc++/create_channel.h",
"include/grpc++/create_channel_posix.h",
"include/grpc++/ext/health_check_service_server_builder_option.h",
"include/grpc++/generic/async_generic_service.h",
"include/grpc++/generic/generic_stub.h",
"include/grpc++/grpc++.h",
"include/grpc++/health_check_service_interface.h",
"include/grpc++/impl/call.h",
"include/grpc++/impl/channel_argument_option.h",
"include/grpc++/impl/client_unary_call.h",
"include/grpc++/impl/codegen/core_codegen.h",
"include/grpc++/impl/grpc_library.h",
"include/grpc++/impl/method_handler_impl.h",
"include/grpc++/impl/rpc_method.h",
"include/grpc++/impl/rpc_service_method.h",
"include/grpc++/impl/serialization_traits.h",
"include/grpc++/impl/server_builder_option.h",
"include/grpc++/impl/server_builder_plugin.h",
"include/grpc++/impl/server_initializer.h",
"include/grpc++/impl/service_type.h",
"include/grpc++/impl/sync_cxx11.h",
"include/grpc++/impl/sync_no_cxx11.h",
"include/grpc++/resource_quota.h",
"include/grpc++/security/auth_context.h",
"include/grpc++/security/auth_metadata_processor.h",
"include/grpc++/security/credentials.h",
"include/grpc++/security/server_credentials.h",
"include/grpc++/server.h",
"include/grpc++/server_builder.h",
"include/grpc++/server_context.h",
"include/grpc++/server_posix.h",
"include/grpc++/support/async_stream.h",
"include/grpc++/support/async_unary_call.h",
"include/grpc++/support/byte_buffer.h",
"include/grpc++/support/channel_arguments.h",
"include/grpc++/support/config.h",
"include/grpc++/support/slice.h",
"include/grpc++/support/status.h",
"include/grpc++/support/status_code_enum.h",
"include/grpc++/support/string_ref.h",
"include/grpc++/support/stub_options.h",
"include/grpc++/support/sync_stream.h",
"include/grpc++/support/time.h",
]
grpc_cc_library(
name = "gpr",
language = "c",
public_hdrs = GPR_PUBLIC_HDRS,
standalone = True,
deps = [
"gpr_base",
@ -57,6 +202,7 @@ grpc_cc_library(
"src/core/plugin_registry/grpc_unsecure_plugin_registry.c",
],
language = "c",
public_hdrs = GRPC_PUBLIC_HDRS,
standalone = True,
deps = [
"grpc_common",
@ -70,6 +216,7 @@ grpc_cc_library(
"src/core/plugin_registry/grpc_plugin_registry.c",
],
language = "c",
public_hdrs = GRPC_PUBLIC_HDRS + GRPC_SECURE_PUBLIC_HDRS,
standalone = True,
deps = [
"grpc_common",
@ -114,6 +261,7 @@ grpc_cc_library(
"src/cpp/server/secure_server_credentials.h",
],
language = "c++",
public_hdrs = GRPCXX_PUBLIC_HDRS,
standalone = True,
deps = [
"gpr",
@ -379,34 +527,7 @@ grpc_cc_library(
"src/core/lib/support/tmpfile.h",
],
language = "c",
public_hdrs = [
"include/grpc/support/alloc.h",
"include/grpc/support/atm.h",
"include/grpc/support/atm_gcc_atomic.h",
"include/grpc/support/atm_gcc_sync.h",
"include/grpc/support/atm_windows.h",
"include/grpc/support/avl.h",
"include/grpc/support/cmdline.h",
"include/grpc/support/cpu.h",
"include/grpc/support/histogram.h",
"include/grpc/support/host_port.h",
"include/grpc/support/log.h",
"include/grpc/support/log_windows.h",
"include/grpc/support/port_platform.h",
"include/grpc/support/string_util.h",
"include/grpc/support/subprocess.h",
"include/grpc/support/sync.h",
"include/grpc/support/sync_generic.h",
"include/grpc/support/sync_posix.h",
"include/grpc/support/sync_windows.h",
"include/grpc/support/thd.h",
"include/grpc/support/time.h",
"include/grpc/support/tls.h",
"include/grpc/support/tls_gcc.h",
"include/grpc/support/tls_msvc.h",
"include/grpc/support/tls_pthread.h",
"include/grpc/support/useful.h",
],
public_hdrs = GPR_PUBLIC_HDRS,
deps = [
"gpr_codegen",
],
@ -434,6 +555,7 @@ grpc_cc_library(
name = "grpc_trace",
srcs = ["src/core/lib/debug/trace.c"],
hdrs = ["src/core/lib/debug/trace.h"],
language = "c",
deps = [":gpr"],
)
@ -679,19 +801,7 @@ grpc_cc_library(
"zlib",
],
language = "c",
public_hdrs = [
"include/grpc/byte_buffer.h",
"include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h",
"include/grpc/load_reporting.h",
"include/grpc/grpc.h",
"include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h",
"include/grpc/slice.h",
"include/grpc/slice_buffer.h",
"include/grpc/status.h",
"include/grpc/support/workaround_list.h",
],
public_hdrs = GRPC_PUBLIC_HDRS,
deps = [
"gpr_base",
"grpc_codegen",
@ -712,6 +822,7 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_common",
language = "c",
deps = [
"grpc_base",
# standard plugins
@ -1083,9 +1194,7 @@ grpc_cc_library(
"src/core/lib/security/util/json_util.h",
],
language = "c",
public_hdrs = [
"include/grpc/grpc_security.h",
],
public_hdrs = GRPC_SECURE_PUBLIC_HDRS,
deps = [
"grpc_base",
"grpc_transport_chttp2_alpn",
@ -1299,103 +1408,6 @@ grpc_cc_library(
],
)
# TODO(ctiller): layer grpc atop grpc_unsecure, layer grpc++ atop grpc++_unsecure
GRPCXX_SRCS = [
"src/cpp/client/channel_cc.cc",
"src/cpp/client/client_context.cc",
"src/cpp/client/create_channel.cc",
"src/cpp/client/create_channel_internal.cc",
"src/cpp/client/create_channel_posix.cc",
"src/cpp/client/credentials_cc.cc",
"src/cpp/client/generic_stub.cc",
"src/cpp/common/channel_arguments.cc",
"src/cpp/common/channel_filter.cc",
"src/cpp/common/completion_queue_cc.cc",
"src/cpp/common/core_codegen.cc",
"src/cpp/common/resource_quota_cc.cc",
"src/cpp/common/rpc_method.cc",
"src/cpp/common/version_cc.cc",
"src/cpp/server/async_generic_service.cc",
"src/cpp/server/channel_argument_option.cc",
"src/cpp/server/create_default_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.cc",
"src/cpp/server/health/default_health_check_service.cc",
"src/cpp/server/health/health.pb.c",
"src/cpp/server/health/health_check_service.cc",
"src/cpp/server/health/health_check_service_server_builder_option.cc",
"src/cpp/server/server_builder.cc",
"src/cpp/server/server_cc.cc",
"src/cpp/server/server_context.cc",
"src/cpp/server/server_credentials.cc",
"src/cpp/server/server_posix.cc",
"src/cpp/thread_manager/thread_manager.cc",
"src/cpp/util/byte_buffer_cc.cc",
"src/cpp/util/slice_cc.cc",
"src/cpp/util/status.cc",
"src/cpp/util/string_ref.cc",
"src/cpp/util/time_cc.cc",
]
GRPCXX_HDRS = [
"src/cpp/client/create_channel_internal.h",
"src/cpp/common/channel_filter.h",
"src/cpp/server/dynamic_thread_pool.h",
"src/cpp/server/health/default_health_check_service.h",
"src/cpp/server/health/health.pb.h",
"src/cpp/server/thread_pool_interface.h",
"src/cpp/thread_manager/thread_manager.h",
]
GRPCXX_PUBLIC_HDRS = [
"include/grpc++/alarm.h",
"include/grpc++/channel.h",
"include/grpc++/client_context.h",
"include/grpc++/completion_queue.h",
"include/grpc++/create_channel.h",
"include/grpc++/create_channel_posix.h",
"include/grpc++/ext/health_check_service_server_builder_option.h",
"include/grpc++/generic/async_generic_service.h",
"include/grpc++/generic/generic_stub.h",
"include/grpc++/grpc++.h",
"include/grpc++/health_check_service_interface.h",
"include/grpc++/impl/call.h",
"include/grpc++/impl/channel_argument_option.h",
"include/grpc++/impl/client_unary_call.h",
"include/grpc++/impl/codegen/core_codegen.h",
"include/grpc++/impl/grpc_library.h",
"include/grpc++/impl/method_handler_impl.h",
"include/grpc++/impl/rpc_method.h",
"include/grpc++/impl/rpc_service_method.h",
"include/grpc++/impl/serialization_traits.h",
"include/grpc++/impl/server_builder_option.h",
"include/grpc++/impl/server_builder_plugin.h",
"include/grpc++/impl/server_initializer.h",
"include/grpc++/impl/service_type.h",
"include/grpc++/impl/sync_cxx11.h",
"include/grpc++/impl/sync_no_cxx11.h",
"include/grpc++/resource_quota.h",
"include/grpc++/security/auth_context.h",
"include/grpc++/security/auth_metadata_processor.h",
"include/grpc++/security/credentials.h",
"include/grpc++/security/server_credentials.h",
"include/grpc++/server.h",
"include/grpc++/server_builder.h",
"include/grpc++/server_context.h",
"include/grpc++/server_posix.h",
"include/grpc++/support/async_stream.h",
"include/grpc++/support/async_unary_call.h",
"include/grpc++/support/byte_buffer.h",
"include/grpc++/support/channel_arguments.h",
"include/grpc++/support/config.h",
"include/grpc++/support/slice.h",
"include/grpc++/support/status.h",
"include/grpc++/support/status_code_enum.h",
"include/grpc++/support/string_ref.h",
"include/grpc++/support/stub_options.h",
"include/grpc++/support/sync_stream.h",
"include/grpc++/support/time.h",
]
grpc_cc_library(
name = "grpc++_base",
srcs = GRPCXX_SRCS,

@ -12,9 +12,8 @@ def cc_grpc_library(name, srcs, deps, proto_only, well_known_protos, generate_mo
srcs: a single proto_library, which wraps the .proto files with services.
deps: a list of C++ proto_library (or cc_proto_library) which provides
the compiled code of any message that the services depend on.
well_known_protos: The target from protobuf library that exports well
known protos. Currently it will only work if the value is
"@com_google_protobuf//:well_known_protos"
well_known_protos: Should this library additionally depend on well known
protos
use_external: When True the grpc deps are prefixed with //external. This
allows grpc to be used as a dependency in other bazel projects.
generate_mock: When true GMOCk code for client stub is generated.

@ -57,7 +57,7 @@ def generate_cc_impl(ctx):
return struct(files=set(out_files))
generate_cc = rule(
_generate_cc = rule(
attrs = {
"srcs": attr.label_list(
mandatory = True,
@ -90,3 +90,9 @@ generate_cc = rule(
output_to_genfiles = True,
implementation = generate_cc_impl,
)
def generate_cc(well_known_protos, **kwargs):
if well_known_protos:
_generate_cc(well_known_protos="@com_google_protobuf//:well_known_protos", **kwargs)
else:
_generate_cc(**kwargs)

@ -52,7 +52,7 @@ def grpc_proto_plugin(name, srcs = [], deps = []):
load("//:bazel/cc_grpc_library.bzl", "cc_grpc_library")
def grpc_proto_library(name, srcs = [], deps = [], well_known_protos = None,
def grpc_proto_library(name, srcs = [], deps = [], well_known_protos = False,
has_services = True, use_external = False, generate_mock = False):
cc_grpc_library(
name = name,
@ -95,11 +95,11 @@ def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], da
)
def grpc_generate_one_off_targets():
pass
pass
def grpc_sh_test(name, srcs, args = [], data = []):
native.sh_test(
name = name,
srcs = srcs,
args = args,
data = data)
native.sh_test(
name = name,
srcs = srcs,
args = args,
data = data)

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
licenses(["notice"]) # 3-clause BSD
package(default_visibility = ["//visibility:public"])
load("//bazel:grpc_build_system.bzl", "grpc_proto_library")

@ -63,6 +63,11 @@ class Status {
/// Is the status OK?
bool ok() const { return code_ == StatusCode::OK; }
// Ignores any errors. This method does nothing except potentially suppress
// complaints from any tools that are checking that errors are not dropped on
// the floor.
void IgnoreError() const {}
private:
StatusCode code_;
grpc::string error_message_;

@ -56,7 +56,7 @@ static gpr_timespec g_timed_waiter_deadline;
// generation counter to track which thread is waiting for the next timer
static uint64_t g_timed_waiter_generation;
static void timer_thread(void *unused);
static void timer_thread(void *completed_thread_ptr);
static void gc_completed_threads(void) {
if (g_completed_threads != NULL) {
@ -81,10 +81,10 @@ static void start_timer_thread_and_unlock(void) {
if (GRPC_TRACER_ON(grpc_timer_check_trace)) {
gpr_log(GPR_DEBUG, "Spawn timer thread");
}
gpr_thd_id thd;
gpr_thd_options opt = gpr_thd_options_default();
gpr_thd_options_set_joinable(&opt);
gpr_thd_new(&thd, timer_thread, NULL, &opt);
completed_thread *ct = gpr_malloc(sizeof(*ct));
gpr_thd_new(&ct->t, timer_thread, ct, &opt);
}
void grpc_timer_manager_tick() {
@ -245,7 +245,7 @@ static void timer_main_loop(grpc_exec_ctx *exec_ctx) {
}
}
static void timer_thread_cleanup(void) {
static void timer_thread_cleanup(completed_thread *ct) {
gpr_mu_lock(&g_mu);
// terminate the thread: drop the waiter count, thread count, and let whomever
// stopped the threading stuff know that we're done
@ -254,8 +254,6 @@ static void timer_thread_cleanup(void) {
if (0 == g_thread_count) {
gpr_cv_signal(&g_cv_shutdown);
}
completed_thread *ct = gpr_malloc(sizeof(*ct));
ct->t = gpr_thd_currentid();
ct->next = g_completed_threads;
g_completed_threads = ct;
gpr_mu_unlock(&g_mu);
@ -264,14 +262,14 @@ static void timer_thread_cleanup(void) {
}
}
static void timer_thread(void *unused) {
static void timer_thread(void *completed_thread_ptr) {
// this threads exec_ctx: we try to run things through to completion here
// since it's easy to spin up new threads
grpc_exec_ctx exec_ctx =
GRPC_EXEC_CTX_INITIALIZER(0, grpc_never_ready_to_finish, NULL);
timer_main_loop(&exec_ctx);
grpc_exec_ctx_finish(&exec_ctx);
timer_thread_cleanup();
timer_thread_cleanup(completed_thread_ptr);
}
static void start_threads(void) {

@ -14,7 +14,13 @@
licenses(["notice"]) # Apache v2
package(default_visibility = ["//visibility:public"])
package(
default_visibility = ["//visibility:public"],
features = [
"-layering_check",
"-parse_headers",
],
)
load("//bazel:grpc_build_system.bzl", "grpc_proto_library")

@ -14,7 +14,13 @@
licenses(["notice"]) # Apache v2
package(default_visibility = ["//visibility:public"])
package(
default_visibility = ["//visibility:public"],
features = [
"-layering_check",
"-parse_headers",
],
)
load("//bazel:grpc_build_system.bzl", "grpc_proto_library")

@ -14,7 +14,13 @@
licenses(["notice"]) # Apache v2
package(default_visibility = ["//visibility:public"])
package(
default_visibility = ["//visibility:public"],
features = [
"-layering_check",
"-parse_headers",
],
)
load("//bazel:grpc_build_system.bzl", "grpc_proto_library")

@ -14,7 +14,13 @@
licenses(["notice"]) # Apache v2
package(default_visibility = ["//visibility:public"])
package(
default_visibility = ["//visibility:public"],
features = [
"-layering_check",
"-parse_headers",
],
)
load("//bazel:grpc_build_system.bzl", "grpc_proto_library")
@ -22,5 +28,5 @@ grpc_proto_library(
name = "status_proto",
srcs = ["status.proto"],
has_services = False,
well_known_protos = "@com_google_protobuf//:well_known_protos",
well_known_protos = True,
)

@ -14,7 +14,13 @@
licenses(["notice"]) # Apache v2
package(default_visibility = ["//visibility:public"])
package(
default_visibility = ["//visibility:public"],
features = [
"-layering_check",
"-parse_headers",
],
)
load("//bazel:grpc_build_system.bzl", "grpc_proto_library")

@ -14,7 +14,13 @@
licenses(["notice"]) # Apache v2
package(default_visibility = ["//visibility:public"])
package(
default_visibility = ["//visibility:public"],
features = [
"-layering_check",
"-parse_headers",
],
)
load("//bazel:grpc_build_system.bzl", "grpc_proto_library")

@ -34,7 +34,7 @@ cdef grpc_ssl_roots_override_result ssl_roots_override_callback(
def peer_identities(Call call):
cdef grpc_auth_context* auth_context
cdef grpc_auth_property_iterator properties
cdef grpc_auth_property* property
cdef const grpc_auth_property* property
auth_context = grpc_call_auth_context(call.c_call)
if auth_context == NULL:
@ -52,7 +52,7 @@ def peer_identities(Call call):
def peer_identity_key(Call call):
cdef grpc_auth_context* auth_context
cdef char* c_key
cdef const char* c_key
auth_context = grpc_call_auth_context(call.c_call)
if auth_context == NULL:
return None
@ -67,7 +67,7 @@ def peer_identity_key(Call call):
def auth_context(Call call):
cdef grpc_auth_context* auth_context
cdef grpc_auth_property_iterator properties
cdef grpc_auth_property* property
cdef const grpc_auth_property* property
auth_context = grpc_call_auth_context(call.c_call)
if auth_context == NULL:

@ -14,6 +14,13 @@
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary")
package(
features = [
"-layering_check",
"-parse_headers",
],
)
licenses(["notice"]) # Apache v2
load(":generate_tests.bzl", "grpc_bad_client_tests")

@ -14,6 +14,13 @@
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary")
package(
features = [
"-layering_check",
"-parse_headers",
],
)
licenses(["notice"]) # Apache v2
load(":generate_tests.bzl", "grpc_bad_ssl_tests")

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "context_test",
srcs = ["context_test.c"],

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "channel_args_test",
srcs = ["channel_args_test.c"],

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_fuzzer(

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "dns_resolver_connectivity_test",
srcs = ["dns_resolver_connectivity_test.c"],

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "algorithm_test",
srcs = ["algorithm_test.c"],

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load(":generate_tests.bzl", "grpc_end2end_tests")
grpc_cc_library(

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_fuzzer(

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_cc_binary(

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "client_ssl",
srcs = ["client_ssl.c"],

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_fuzzer(

@ -18,7 +18,13 @@ licenses(["notice"]) # Apache v2
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
package(default_visibility = ["//visibility:public"]) # Useful for third party devs to test their io manager implementation.
package(
default_visibility = ["//visibility:public"], # Useful for third party devs to test their io manager implementation.
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_library(
name = "endpoint_tests",

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_fuzzer(

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_fuzzer(

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_binary(
name = "low_level_ping_pong",
srcs = ["low_level_ping_pong.c"],

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_fuzzer(

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_fuzzer(

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "alloc_test",
srcs = ["alloc_test.c"],

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "alarm_test",
srcs = ["alarm_test.c"],

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "bdp_estimator_test",
srcs = ["bdp_estimator_test.c"],

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_fuzzer(

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "transport_security_test",
srcs = ["transport_security_test.c"],

@ -16,7 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(default_visibility = ["//visibility:public"])
package(
default_visibility = ["//visibility:public"],
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_library(
name = "gpr_test_util",

@ -16,6 +16,13 @@ licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_cc_test")
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "codegen_test_full",
srcs = ["codegen_test_full.cc"],

@ -16,6 +16,13 @@ licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_cc_test")
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "alarm_cpp_test",
srcs = ["alarm_cpp_test.cc"],

@ -16,10 +16,17 @@ licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test")
package(default_visibility=["//visibility:public"]) # Allows external users to implement end2end tests.
package(
default_visibility=["//visibility:public"], # Allows external users to implement end2end tests.
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_library(
name = "test_service_impl",
testonly = True,
srcs = ["test_service_impl.cc"],
hdrs = ["test_service_impl.h"],
deps = [

@ -32,7 +32,6 @@
#include <grpc/support/string_util.h>
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include <gtest/gtest.h>
extern "C" {
#include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h"
@ -46,6 +45,8 @@ extern "C" {
#include "src/proto/grpc/lb/v1/load_balancer.grpc.pb.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include <gtest/gtest.h>
// TODO(dgq): Other scenarios in need of testing:
// - Send a serverlist with faulty ip:port addresses (port > 2^16, etc).
// - Test reception of invalid serverlist

@ -19,7 +19,6 @@
#include <climits>
#include <thread>
#include <gmock/gmock.h>
#include <grpc++/channel.h>
#include <grpc++/client_context.h>
#include <grpc++/create_channel.h>
@ -31,14 +30,15 @@
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include <grpc++/test/mock_stream.h>
#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "src/proto/grpc/testing/echo_mock.grpc.pb.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
#include <grpc++/test/mock_stream.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <iostream>

@ -14,7 +14,16 @@
licenses(["notice"]) # Apache v2
cc_library(
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary")
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_library(
name = "server_helper_lib",
srcs = [
"server_helper.cc",
@ -22,21 +31,35 @@ cc_library(
hdrs = [
"server_helper.h",
],
external_deps = [
"gflags",
],
language = "C++",
deps = [
"//test/cpp/util:test_util",
"//external:gflags",
],
)
cc_binary(
grpc_cc_binary(
name = "interop_server",
srcs = [
"interop_server.cc",
"interop_server_bootstrap.cc",
],
language = "C++",
deps = [
":server_helper_lib",
":interop_server_lib",
"//:grpc++",
],
)
grpc_cc_library(
name = "interop_server_lib",
srcs = [
"interop_server.cc",
],
language = "C++",
deps = [
":server_helper_lib",
"//src/proto/grpc/testing:empty_proto",
"//src/proto/grpc/testing:messages_proto",
"//src/proto/grpc/testing:test_proto",
@ -44,7 +67,7 @@ cc_binary(
],
)
cc_library(
grpc_cc_library(
name = "client_helper_lib",
srcs = [
"client_helper.cc",
@ -54,22 +77,64 @@ cc_library(
"client_helper.h",
"interop_client.h",
],
language = "C++",
deps = [
"//test/cpp/util:test_util",
"//src/proto/grpc/testing:empty_proto",
"//src/proto/grpc/testing:messages_proto",
"//src/proto/grpc/testing:test_proto",
"//test/core/security:oauth2_utils",
"//test/cpp/util:test_config",
"//test/cpp/util:test_util",
],
)
cc_binary(
grpc_cc_binary(
name = "interop_client",
srcs = [
"client.cc",
],
deps = [
":client_helper_lib",
"//:grpc++",
],
)
grpc_cc_binary(
name = "reconnect_interop_client",
srcs = [
"reconnect_interop_client.cc",
],
deps = [
":client_helper_lib",
"//:grpc++",
"//test/core/util:grpc_test_util",
],
)
grpc_cc_binary(
name = "reconnect_interop_server",
srcs = [
"reconnect_interop_server.cc",
],
language = "C++",
deps = [
":interop_server_lib",
"//:grpc++",
"//test/core/util:grpc_test_util",
],
)
grpc_cc_binary(
name = "stress_test",
srcs = [
"stress_interop_client.cc",
"stress_interop_client.h",
"stress_test.cc",
],
deps = [
":client_helper_lib",
"//:grpc++",
"//test/cpp/util:metrics_server_lib",
"//test/cpp/util:test_config",
],
)

@ -16,6 +16,13 @@ licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_cc_library")
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "noop-benchmark",
srcs = ["noop-benchmark.cc"],

@ -16,6 +16,13 @@ licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_cc_library", "grpc_cc_binary")
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_library(
name = "parse_json",
srcs = ["parse_json.cc"],
@ -52,9 +59,6 @@ grpc_cc_library(
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
external_deps = [
"gtest",
],
)
grpc_cc_library(

@ -140,7 +140,7 @@ class SynchronousStreamingClient : public SynchronousClient {
if (*stream) {
// forcibly cancel the streams, then finish
context_[i].TryCancel();
(*stream)->Finish();
(*stream)->Finish().IgnoreError();
// don't log any error message on !ok since this was canceled
}
});

@ -14,9 +14,15 @@
licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_binary")
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_binary", "grpc_cc_test")
package(default_visibility = ["//visibility:public"])
package(
default_visibility = ["//visibility:public"],
features = [
"-layering_check",
"-parse_headers",
],
)
# The following builds a shared-object to confirm that grpc++_unsecure
# builds properly. Build-only is sufficient here
@ -126,19 +132,21 @@ grpc_cc_library(
],
)
cc_test(
grpc_cc_test(
name = "error_details_test",
srcs = [
"error_details_test.cc",
],
deps = [
"//:grpc++_error_details",
"//external:gtest",
"//src/proto/grpc/testing:echo_messages_proto",
],
external_deps = [
"gtest",
],
)
cc_binary(
grpc_cc_binary(
name = "grpc_cli",
srcs = [
"cli_call.cc",
@ -160,7 +168,9 @@ cc_binary(
],
deps = [
"//:grpc++",
"//external:gflags",
"//src/proto/grpc/reflection/v1alpha:reflection_proto",
],
external_deps = [
"gflags",
],
)

Loading…
Cancel
Save