From 86c0f8adb8238a923b56bdecf7cf52395d4f31f1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 1 Dec 2015 20:05:40 -0800 Subject: [PATCH 01/28] Make pick_first fast path lock free, take channel lock for less time --- src/core/channel/client_channel.c | 9 ++-- .../client_config/lb_policies/pick_first.c | 48 ++++++++++++------- 2 files changed, 36 insertions(+), 21 deletions(-) diff --git a/src/core/channel/client_channel.c b/src/core/channel/client_channel.c index da0fdba6435..bd8fa70034b 100644 --- a/src/core/channel/client_channel.c +++ b/src/core/channel/client_channel.c @@ -338,10 +338,13 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp, return 1; } if (chand->lb_policy != NULL) { - int r = - grpc_lb_policy_pick(exec_ctx, chand->lb_policy, calld->pollset, - initial_metadata, connected_subchannel, on_ready); + grpc_lb_policy *lb_policy = chand->lb_policy; + int r; + GRPC_LB_POLICY_REF(lb_policy, "cc_pick_subchannel"); gpr_mu_unlock(&chand->mu_config); + r = grpc_lb_policy_pick(exec_ctx, lb_policy, calld->pollset, + initial_metadata, connected_subchannel, on_ready); + GRPC_LB_POLICY_UNREF(exec_ctx, lb_policy, "cc_pick_subchannel"); return r; } if (chand->resolver != NULL && !chand->started_resolving) { diff --git a/src/core/client_config/lb_policies/pick_first.c b/src/core/client_config/lb_policies/pick_first.c index b91f0609d2f..beacffcf233 100644 --- a/src/core/client_config/lb_policies/pick_first.c +++ b/src/core/client_config/lb_policies/pick_first.c @@ -57,10 +57,8 @@ typedef struct { /** mutex protecting remaining members */ gpr_mu mu; - /** the selected channel - TODO(ctiller): this should be atomically set so we don't - need to take a mutex in the common case */ - grpc_connected_subchannel *selected; + /** the selected channel (a grpc_connected_subchannel) */ + gpr_atm selected; /** have we started picking? */ int started_picking; /** are we shut down? */ @@ -76,15 +74,18 @@ typedef struct { grpc_connectivity_state_tracker state_tracker; } pick_first_lb_policy; +#define GET_SELECTED(p) ((grpc_connected_subchannel *)gpr_atm_no_barrier_load(&(p)->selected)) + void pf_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { pick_first_lb_policy *p = (pick_first_lb_policy *)pol; + grpc_connected_subchannel *selected = GET_SELECTED(p); size_t i; GPR_ASSERT(p->pending_picks == NULL); for (i = 0; i < p->num_subchannels; i++) { GRPC_SUBCHANNEL_UNREF(exec_ctx, p->subchannels[i], "pick_first"); } - if (p->selected) { - GRPC_CONNECTED_SUBCHANNEL_UNREF(exec_ctx, p->selected, "picked_first"); + if (selected != NULL) { + GRPC_CONNECTED_SUBCHANNEL_UNREF(exec_ctx, selected, "picked_first"); } grpc_connectivity_state_destroy(exec_ctx, &p->state_tracker); gpr_free(p->subchannels); @@ -95,16 +96,18 @@ void pf_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { pick_first_lb_policy *p = (pick_first_lb_policy *)pol; pending_pick *pp; + grpc_connected_subchannel *selected; gpr_mu_lock(&p->mu); + selected = GET_SELECTED(p); p->shutdown = 1; pp = p->pending_picks; p->pending_picks = NULL; grpc_connectivity_state_set(exec_ctx, &p->state_tracker, GRPC_CHANNEL_FATAL_FAILURE, "shutdown"); /* cancel subscription */ - if (p->selected != NULL) { + if (selected != NULL) { grpc_connected_subchannel_notify_on_state_change( - exec_ctx, p->selected, NULL, NULL, &p->connectivity_changed); + exec_ctx, selected, NULL, NULL, &p->connectivity_changed); } else { grpc_subchannel_notify_on_state_change( exec_ctx, p->subchannels[p->checking_subchannel], NULL, NULL, @@ -171,10 +174,16 @@ int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, grpc_pollset *pollset, grpc_connected_subchannel **target, grpc_closure *on_complete) { pick_first_lb_policy *p = (pick_first_lb_policy *)pol; pending_pick *pp; + grpc_connected_subchannel *selected = GET_SELECTED(p); + if (selected != NULL) { + *target = selected; + return 1; + } gpr_mu_lock(&p->mu); - if (p->selected) { + selected = GET_SELECTED(p); + if (selected) { gpr_mu_unlock(&p->mu); - *target = p->selected; + *target = selected; return 1; } else { if (!p->started_picking) { @@ -219,14 +228,17 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, pick_first_lb_policy *p = arg; grpc_subchannel *selected_subchannel; pending_pick *pp; + grpc_connected_subchannel *selected; gpr_mu_lock(&p->mu); + selected = GET_SELECTED(p); + if (p->shutdown) { gpr_mu_unlock(&p->mu); GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &p->base, "pick_first_connectivity"); return; - } else if (p->selected != NULL) { + } else if (selected != NULL) { if (p->checking_connectivity == GRPC_CHANNEL_TRANSIENT_FAILURE) { /* if the selected channel goes bad, we're done */ p->checking_connectivity = GRPC_CHANNEL_FATAL_FAILURE; @@ -235,7 +247,7 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, p->checking_connectivity, "selected_changed"); if (p->checking_connectivity != GRPC_CHANNEL_FATAL_FAILURE) { grpc_connected_subchannel_notify_on_state_change( - exec_ctx, p->selected, &p->base.interested_parties, + exec_ctx, selected, &p->base.interested_parties, &p->checking_connectivity, &p->connectivity_changed); } else { GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &p->base, "pick_first_connectivity"); @@ -247,10 +259,10 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_connectivity_state_set(exec_ctx, &p->state_tracker, GRPC_CHANNEL_READY, "connecting_ready"); selected_subchannel = p->subchannels[p->checking_subchannel]; - p->selected = - grpc_subchannel_get_connected_subchannel(selected_subchannel); - GPR_ASSERT(p->selected); - GRPC_CONNECTED_SUBCHANNEL_REF(p->selected, "picked_first"); + selected = grpc_subchannel_get_connected_subchannel(selected_subchannel); + GPR_ASSERT(selected != NULL); + gpr_atm_no_barrier_store(&p->selected, (gpr_atm)selected); + GRPC_CONNECTED_SUBCHANNEL_REF(selected, "picked_first"); /* drop the pick list: we are connected now */ GRPC_LB_POLICY_WEAK_REF(&p->base, "destroy_subchannels"); grpc_exec_ctx_enqueue(exec_ctx, @@ -258,14 +270,14 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, /* update any calls that were waiting for a pick */ while ((pp = p->pending_picks)) { p->pending_picks = pp->next; - *pp->target = p->selected; + *pp->target = selected; grpc_pollset_set_del_pollset(exec_ctx, &p->base.interested_parties, pp->pollset); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, 1); gpr_free(pp); } grpc_connected_subchannel_notify_on_state_change( - exec_ctx, p->selected, &p->base.interested_parties, + exec_ctx, selected, &p->base.interested_parties, &p->checking_connectivity, &p->connectivity_changed); break; case GRPC_CHANNEL_TRANSIENT_FAILURE: From 1b4e33029efc2dd57036270bd3a73b6841aadbf5 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 17 Dec 2015 16:35:00 -0800 Subject: [PATCH 02/28] Consolidate C++ proto files under src/proto - make the directory structure match the package structure - sanitize the package structure (test --> testing) - add auto-detection of proto file dependencies --- Makefile | 225 +++++++++--------- build.yaml | 55 ++--- src/proto/gen_build_yaml.py | 59 +++++ .../proto/grpc/testing}/control.proto | 15 +- .../testing/duplicate}/echo_duplicate.proto | 7 +- .../proto/grpc/testing}/echo.proto | 4 +- .../proto/grpc/testing/echo_messages.proto | 4 +- .../proto/grpc/testing}/empty.proto | 0 .../proto/grpc/testing}/messages.proto | 0 .../proto/grpc/testing}/metrics.proto | 7 +- .../proto/grpc/testing}/payloads.proto | 0 .../proto/grpc/testing}/perf_db.proto | 8 +- .../proto/grpc/testing}/services.proto | 4 +- .../proto/grpc/testing}/stats.proto | 4 +- .../proto/grpc/testing}/test.proto | 7 +- templates/Makefile.template | 4 +- test/cpp/end2end/async_end2end_test.cc | 20 +- test/cpp/end2end/client_crash_test.cc | 13 +- test/cpp/end2end/client_crash_test_server.cc | 9 +- test/cpp/end2end/end2end_test.cc | 34 ++- test/cpp/end2end/generic_end2end_test.cc | 8 +- test/cpp/end2end/mock_test.cc | 14 +- test/cpp/end2end/server_crash_test.cc | 11 +- test/cpp/end2end/server_crash_test_client.cc | 8 +- test/cpp/end2end/shutdown_test.cc | 12 +- test/cpp/end2end/streaming_throughput_test.cc | 14 +- test/cpp/end2end/thread_stress_test.cc | 19 +- test/cpp/end2end/zookeeper_test.cc | 13 +- test/cpp/interop/interop_client.cc | 6 +- test/cpp/interop/interop_client.h | 4 +- test/cpp/interop/metrics_client.cc | 4 +- test/cpp/interop/reconnect_interop_client.cc | 6 +- test/cpp/interop/reconnect_interop_server.cc | 6 +- test/cpp/interop/server.cc | 6 +- test/cpp/interop/stress_test.cc | 4 +- test/cpp/qps/client.h | 4 +- test/cpp/qps/client_async.cc | 2 +- test/cpp/qps/client_sync.cc | 2 +- test/cpp/qps/driver.cc | 2 +- test/cpp/qps/driver.h | 2 +- test/cpp/qps/histogram.h | 2 +- test/cpp/qps/perf_db_client.h | 2 +- test/cpp/qps/qps_worker.cc | 2 +- test/cpp/qps/server.h | 4 +- test/cpp/qps/server_async.cc | 2 +- test/cpp/qps/server_sync.cc | 2 +- test/cpp/util/cli_call_test.cc | 12 +- test/cpp/util/grpc_cli.cc | 9 +- test/cpp/util/metrics_server.cc | 4 +- test/cpp/util/metrics_server.h | 7 +- tools/buildgen/build-cleaner.py | 2 +- tools/buildgen/generate_build_additions.sh | 2 +- tools/run_tests/sources_and_headers.json | 123 +++++----- .../grpc++_test_util/grpc++_test_util.vcxproj | 24 +- .../grpc++_test_util.vcxproj.filters | 27 ++- .../interop_client_helper.vcxproj | 8 +- .../interop_client_helper.vcxproj.filters | 19 +- .../interop_client_main.vcxproj | 24 +- .../interop_client_main.vcxproj.filters | 27 ++- .../interop_server_main.vcxproj | 24 +- .../interop_server_main.vcxproj.filters | 27 ++- vsprojects/vcxproj/qps/qps.vcxproj | 48 ++-- vsprojects/vcxproj/qps/qps.vcxproj.filters | 42 ++-- .../metrics_client/metrics_client.vcxproj | 8 +- .../metrics_client.vcxproj.filters | 19 +- .../reconnect_interop_client.vcxproj | 24 +- .../reconnect_interop_client.vcxproj.filters | 27 ++- .../reconnect_interop_server.vcxproj | 24 +- .../reconnect_interop_server.vcxproj.filters | 27 ++- .../test/stress_test/stress_test.vcxproj | 32 +-- .../stress_test/stress_test.vcxproj.filters | 31 ++- 71 files changed, 697 insertions(+), 564 deletions(-) create mode 100755 src/proto/gen_build_yaml.py rename {test/proto/benchmarks => src/proto/grpc/testing}/control.proto (95%) rename {test/cpp/util => src/proto/grpc/testing/duplicate}/echo_duplicate.proto (90%) rename {test/cpp/util => src/proto/grpc/testing}/echo.proto (96%) rename test/cpp/util/messages.proto => src/proto/grpc/testing/echo_messages.proto (95%) rename {test/proto => src/proto/grpc/testing}/empty.proto (100%) rename {test/proto => src/proto/grpc/testing}/messages.proto (100%) rename {test/proto => src/proto/grpc/testing}/metrics.proto (96%) rename {test/proto/benchmarks => src/proto/grpc/testing}/payloads.proto (100%) rename {test/cpp/qps => src/proto/grpc/testing}/perf_db.proto (95%) rename {test/proto/benchmarks => src/proto/grpc/testing}/services.proto (96%) rename {test/proto/benchmarks => src/proto/grpc/testing}/stats.proto (94%) rename {test/proto => src/proto/grpc/testing}/test.proto (95%) diff --git a/Makefile b/Makefile index 58a501152f7..cea931116b6 100644 --- a/Makefile +++ b/Makefile @@ -5739,180 +5739,180 @@ $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc: $(Q) echo "$(GRPCXX_UNSECURE_PC_FILE)" | tr , '\n' >$@ ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/cpp/qps/perf_db.pb.cc: protoc_dep_error -$(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/control.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/cpp/qps/perf_db.pb.cc: test/cpp/qps/perf_db.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/control.pb.cc: src/proto/grpc/testing/control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc: test/cpp/qps/perf_db.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc: src/proto/grpc/testing/control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/cpp/util/echo.pb.cc: protoc_dep_error -$(GENDIR)/test/cpp/util/echo.grpc.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/cpp/util/echo.pb.cc: test/cpp/util/echo.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc: src/proto/grpc/testing/duplicate/echo_duplicate.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/cpp/util/echo.grpc.pb.cc: test/cpp/util/echo.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc: src/proto/grpc/testing/duplicate/echo_duplicate.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/cpp/util/echo_duplicate.pb.cc: protoc_dep_error -$(GENDIR)/test/cpp/util/echo_duplicate.grpc.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/echo.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/cpp/util/echo_duplicate.pb.cc: test/cpp/util/echo_duplicate.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/echo.pb.cc: src/proto/grpc/testing/echo.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/cpp/util/echo_duplicate.grpc.pb.cc: test/cpp/util/echo_duplicate.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc: src/proto/grpc/testing/echo.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/cpp/util/messages.pb.cc: protoc_dep_error -$(GENDIR)/test/cpp/util/messages.grpc.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/cpp/util/messages.pb.cc: test/cpp/util/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc: src/proto/grpc/testing/echo_messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/cpp/util/messages.grpc.pb.cc: test/cpp/util/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc: src/proto/grpc/testing/echo_messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/proto/benchmarks/control.pb.cc: protoc_dep_error -$(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/empty.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/proto/benchmarks/control.pb.cc: test/proto/benchmarks/control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/empty.pb.cc: src/proto/grpc/testing/empty.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc: test/proto/benchmarks/control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc: src/proto/grpc/testing/empty.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/proto/benchmarks/payloads.pb.cc: protoc_dep_error -$(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/messages.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/proto/benchmarks/payloads.pb.cc: test/proto/benchmarks/payloads.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/messages.pb.cc: src/proto/grpc/testing/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc: test/proto/benchmarks/payloads.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc: src/proto/grpc/testing/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/proto/benchmarks/services.pb.cc: protoc_dep_error -$(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/metrics.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/metrics.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/proto/benchmarks/services.pb.cc: test/proto/benchmarks/services.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/metrics.pb.cc: src/proto/grpc/testing/metrics.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc: test/proto/benchmarks/services.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/metrics.grpc.pb.cc: src/proto/grpc/testing/metrics.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/proto/benchmarks/stats.pb.cc: protoc_dep_error -$(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/payloads.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/proto/benchmarks/stats.pb.cc: test/proto/benchmarks/stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/payloads.pb.cc: src/proto/grpc/testing/payloads.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc: test/proto/benchmarks/stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc: src/proto/grpc/testing/payloads.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/proto/empty.pb.cc: protoc_dep_error -$(GENDIR)/test/proto/empty.grpc.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/proto/empty.pb.cc: test/proto/empty.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc: src/proto/grpc/testing/perf_db.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/proto/empty.grpc.pb.cc: test/proto/empty.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc: src/proto/grpc/testing/perf_db.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/proto/messages.pb.cc: protoc_dep_error -$(GENDIR)/test/proto/messages.grpc.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/services.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/proto/messages.pb.cc: test/proto/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/services.pb.cc: src/proto/grpc/testing/services.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/proto/messages.grpc.pb.cc: test/proto/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc: src/proto/grpc/testing/services.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/proto/metrics.pb.cc: protoc_dep_error -$(GENDIR)/test/proto/metrics.grpc.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/stats.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/proto/metrics.pb.cc: test/proto/metrics.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/stats.pb.cc: src/proto/grpc/testing/stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/proto/metrics.grpc.pb.cc: test/proto/metrics.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc: src/proto/grpc/testing/stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/proto/test.pb.cc: protoc_dep_error -$(GENDIR)/test/proto/test.grpc.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/test.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/proto/test.pb.cc: test/proto/test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/test.pb.cc: src/proto/grpc/testing/test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/proto/test.grpc.pb.cc: test/proto/test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc: src/proto/grpc/testing/test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< @@ -7118,9 +7118,9 @@ endif LIBGRPC++_TEST_UTIL_SRC = \ - $(GENDIR)/test/cpp/util/messages.pb.cc $(GENDIR)/test/cpp/util/messages.grpc.pb.cc \ - $(GENDIR)/test/cpp/util/echo.pb.cc $(GENDIR)/test/cpp/util/echo.grpc.pb.cc \ - $(GENDIR)/test/cpp/util/echo_duplicate.pb.cc $(GENDIR)/test/cpp/util/echo_duplicate.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc \ test/cpp/util/cli_call.cc \ test/cpp/util/create_test_channel.cc \ test/cpp/util/string_ref_helper.cc \ @@ -7168,10 +7168,10 @@ ifneq ($(NO_DEPS),true) -include $(LIBGRPC++_TEST_UTIL_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/util/cli_call.o: $(GENDIR)/test/cpp/util/messages.pb.cc $(GENDIR)/test/cpp/util/messages.grpc.pb.cc $(GENDIR)/test/cpp/util/echo.pb.cc $(GENDIR)/test/cpp/util/echo.grpc.pb.cc $(GENDIR)/test/cpp/util/echo_duplicate.pb.cc $(GENDIR)/test/cpp/util/echo_duplicate.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/create_test_channel.o: $(GENDIR)/test/cpp/util/messages.pb.cc $(GENDIR)/test/cpp/util/messages.grpc.pb.cc $(GENDIR)/test/cpp/util/echo.pb.cc $(GENDIR)/test/cpp/util/echo.grpc.pb.cc $(GENDIR)/test/cpp/util/echo_duplicate.pb.cc $(GENDIR)/test/cpp/util/echo_duplicate.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/string_ref_helper.o: $(GENDIR)/test/cpp/util/messages.pb.cc $(GENDIR)/test/cpp/util/messages.grpc.pb.cc $(GENDIR)/test/cpp/util/echo.pb.cc $(GENDIR)/test/cpp/util/echo.grpc.pb.cc $(GENDIR)/test/cpp/util/echo_duplicate.pb.cc $(GENDIR)/test/cpp/util/echo_duplicate.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/subprocess.o: $(GENDIR)/test/cpp/util/messages.pb.cc $(GENDIR)/test/cpp/util/messages.grpc.pb.cc $(GENDIR)/test/cpp/util/echo.pb.cc $(GENDIR)/test/cpp/util/echo.grpc.pb.cc $(GENDIR)/test/cpp/util/echo_duplicate.pb.cc $(GENDIR)/test/cpp/util/echo_duplicate.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/cli_call.o: $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/create_test_channel.o: $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/string_ref_helper.o: $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/subprocess.o: $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc LIBGRPC++_UNSECURE_SRC = \ @@ -7338,7 +7338,7 @@ endif LIBINTEROP_CLIENT_HELPER_SRC = \ - $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \ test/cpp/interop/client_helper.cc \ @@ -7383,13 +7383,13 @@ ifneq ($(NO_DEPS),true) -include $(LIBINTEROP_CLIENT_HELPER_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/interop/client_helper.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/interop/client_helper.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc LIBINTEROP_CLIENT_MAIN_SRC = \ - $(GENDIR)/test/proto/empty.pb.cc $(GENDIR)/test/proto/empty.grpc.pb.cc \ - $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc \ - $(GENDIR)/test/proto/test.pb.cc $(GENDIR)/test/proto/test.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc \ test/cpp/interop/client.cc \ test/cpp/interop/interop_client.cc \ @@ -7435,8 +7435,8 @@ ifneq ($(NO_DEPS),true) -include $(LIBINTEROP_CLIENT_MAIN_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/interop/client.o: $(GENDIR)/test/proto/empty.pb.cc $(GENDIR)/test/proto/empty.grpc.pb.cc $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/test.pb.cc $(GENDIR)/test/proto/test.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/interop/interop_client.o: $(GENDIR)/test/proto/empty.pb.cc $(GENDIR)/test/proto/empty.grpc.pb.cc $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/test.pb.cc $(GENDIR)/test/proto/test.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/interop/client.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/interop/interop_client.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc LIBINTEROP_SERVER_HELPER_SRC = \ @@ -7487,9 +7487,9 @@ endif LIBINTEROP_SERVER_MAIN_SRC = \ - $(GENDIR)/test/proto/empty.pb.cc $(GENDIR)/test/proto/empty.grpc.pb.cc \ - $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc \ - $(GENDIR)/test/proto/test.pb.cc $(GENDIR)/test/proto/test.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc \ test/cpp/interop/server.cc \ @@ -7534,16 +7534,16 @@ ifneq ($(NO_DEPS),true) -include $(LIBINTEROP_SERVER_MAIN_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/interop/server.o: $(GENDIR)/test/proto/empty.pb.cc $(GENDIR)/test/proto/empty.grpc.pb.cc $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/test.pb.cc $(GENDIR)/test/proto/test.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/interop/server.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc LIBQPS_SRC = \ - $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc \ - $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc \ - $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc \ - $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc \ - $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc \ - $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc \ test/cpp/qps/client_async.cc \ test/cpp/qps/client_sync.cc \ test/cpp/qps/driver.cc \ @@ -7597,16 +7597,16 @@ ifneq ($(NO_DEPS),true) -include $(LIBQPS_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/perf_db_client.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/timer.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/perf_db_client.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/timer.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc LIBGRPC_CSHARP_EXT_SRC = \ @@ -13849,7 +13849,7 @@ endif METRICS_CLIENT_SRC = \ - $(GENDIR)/test/proto/metrics.pb.cc $(GENDIR)/test/proto/metrics.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/metrics.pb.cc $(GENDIR)/src/proto/grpc/testing/metrics.grpc.pb.cc \ test/cpp/interop/metrics_client.cc \ METRICS_CLIENT_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(METRICS_CLIENT_SRC)))) @@ -13879,7 +13879,7 @@ endif endif -$(OBJDIR)/$(CONFIG)/test/proto/metrics.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/metrics.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(OBJDIR)/$(CONFIG)/test/cpp/interop/metrics_client.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a deps_metrics_client: $(METRICS_CLIENT_OBJS:.o=.dep) @@ -13888,7 +13888,7 @@ ifneq ($(NO_DEPS),true) -include $(METRICS_CLIENT_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/interop/metrics_client.o: $(GENDIR)/test/proto/metrics.pb.cc $(GENDIR)/test/proto/metrics.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/interop/metrics_client.o: $(GENDIR)/src/proto/grpc/testing/metrics.pb.cc $(GENDIR)/src/proto/grpc/testing/metrics.grpc.pb.cc MOCK_TEST_SRC = \ @@ -14132,9 +14132,9 @@ endif RECONNECT_INTEROP_CLIENT_SRC = \ - $(GENDIR)/test/proto/empty.pb.cc $(GENDIR)/test/proto/empty.grpc.pb.cc \ - $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc \ - $(GENDIR)/test/proto/test.pb.cc $(GENDIR)/test/proto/test.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc \ test/cpp/interop/reconnect_interop_client.cc \ RECONNECT_INTEROP_CLIENT_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(RECONNECT_INTEROP_CLIENT_SRC)))) @@ -14164,9 +14164,9 @@ endif endif -$(OBJDIR)/$(CONFIG)/test/proto/empty.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a -$(OBJDIR)/$(CONFIG)/test/proto/messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a -$(OBJDIR)/$(CONFIG)/test/proto/test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/empty.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(OBJDIR)/$(CONFIG)/test/cpp/interop/reconnect_interop_client.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a deps_reconnect_interop_client: $(RECONNECT_INTEROP_CLIENT_OBJS:.o=.dep) @@ -14175,13 +14175,13 @@ ifneq ($(NO_DEPS),true) -include $(RECONNECT_INTEROP_CLIENT_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/interop/reconnect_interop_client.o: $(GENDIR)/test/proto/empty.pb.cc $(GENDIR)/test/proto/empty.grpc.pb.cc $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/test.pb.cc $(GENDIR)/test/proto/test.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/interop/reconnect_interop_client.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc RECONNECT_INTEROP_SERVER_SRC = \ - $(GENDIR)/test/proto/empty.pb.cc $(GENDIR)/test/proto/empty.grpc.pb.cc \ - $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc \ - $(GENDIR)/test/proto/test.pb.cc $(GENDIR)/test/proto/test.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc \ test/cpp/interop/reconnect_interop_server.cc \ RECONNECT_INTEROP_SERVER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(RECONNECT_INTEROP_SERVER_SRC)))) @@ -14211,9 +14211,9 @@ endif endif -$(OBJDIR)/$(CONFIG)/test/proto/empty.o: $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a -$(OBJDIR)/$(CONFIG)/test/proto/messages.o: $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a -$(OBJDIR)/$(CONFIG)/test/proto/test.o: $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/empty.o: $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/messages.o: $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/test.o: $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(OBJDIR)/$(CONFIG)/test/cpp/interop/reconnect_interop_server.o: $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a deps_reconnect_interop_server: $(RECONNECT_INTEROP_SERVER_OBJS:.o=.dep) @@ -14222,7 +14222,7 @@ ifneq ($(NO_DEPS),true) -include $(RECONNECT_INTEROP_SERVER_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/interop/reconnect_interop_server.o: $(GENDIR)/test/proto/empty.pb.cc $(GENDIR)/test/proto/empty.grpc.pb.cc $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/test.pb.cc $(GENDIR)/test/proto/test.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/interop/reconnect_interop_server.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc SECURE_AUTH_CONTEXT_TEST_SRC = \ @@ -14506,10 +14506,10 @@ endif STRESS_TEST_SRC = \ - $(GENDIR)/test/proto/empty.pb.cc $(GENDIR)/test/proto/empty.grpc.pb.cc \ - $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc \ - $(GENDIR)/test/proto/metrics.pb.cc $(GENDIR)/test/proto/metrics.grpc.pb.cc \ - $(GENDIR)/test/proto/test.pb.cc $(GENDIR)/test/proto/test.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/metrics.pb.cc $(GENDIR)/src/proto/grpc/testing/metrics.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc \ test/cpp/interop/interop_client.cc \ test/cpp/interop/stress_interop_client.cc \ test/cpp/interop/stress_test.cc \ @@ -14542,10 +14542,10 @@ endif endif -$(OBJDIR)/$(CONFIG)/test/proto/empty.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a -$(OBJDIR)/$(CONFIG)/test/proto/messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a -$(OBJDIR)/$(CONFIG)/test/proto/metrics.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a -$(OBJDIR)/$(CONFIG)/test/proto/test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/empty.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/metrics.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(OBJDIR)/$(CONFIG)/test/cpp/interop/interop_client.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(OBJDIR)/$(CONFIG)/test/cpp/interop/stress_interop_client.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(OBJDIR)/$(CONFIG)/test/cpp/interop/stress_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a @@ -14557,10 +14557,10 @@ ifneq ($(NO_DEPS),true) -include $(STRESS_TEST_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/interop/interop_client.o: $(GENDIR)/test/proto/empty.pb.cc $(GENDIR)/test/proto/empty.grpc.pb.cc $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/metrics.pb.cc $(GENDIR)/test/proto/metrics.grpc.pb.cc $(GENDIR)/test/proto/test.pb.cc $(GENDIR)/test/proto/test.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/interop/stress_interop_client.o: $(GENDIR)/test/proto/empty.pb.cc $(GENDIR)/test/proto/empty.grpc.pb.cc $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/metrics.pb.cc $(GENDIR)/test/proto/metrics.grpc.pb.cc $(GENDIR)/test/proto/test.pb.cc $(GENDIR)/test/proto/test.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/interop/stress_test.o: $(GENDIR)/test/proto/empty.pb.cc $(GENDIR)/test/proto/empty.grpc.pb.cc $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/metrics.pb.cc $(GENDIR)/test/proto/metrics.grpc.pb.cc $(GENDIR)/test/proto/test.pb.cc $(GENDIR)/test/proto/test.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/metrics_server.o: $(GENDIR)/test/proto/empty.pb.cc $(GENDIR)/test/proto/empty.grpc.pb.cc $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/metrics.pb.cc $(GENDIR)/test/proto/metrics.grpc.pb.cc $(GENDIR)/test/proto/test.pb.cc $(GENDIR)/test/proto/test.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/interop/interop_client.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/metrics.pb.cc $(GENDIR)/src/proto/grpc/testing/metrics.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/interop/stress_interop_client.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/metrics.pb.cc $(GENDIR)/src/proto/grpc/testing/metrics.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/interop/stress_test.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/metrics.pb.cc $(GENDIR)/src/proto/grpc/testing/metrics.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/metrics_server.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/metrics.pb.cc $(GENDIR)/src/proto/grpc/testing/metrics.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc SYNC_STREAMING_PING_PONG_TEST_SRC = \ @@ -14684,6 +14684,7 @@ endif ZOOKEEPER_TEST_SRC = \ + $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc \ test/cpp/end2end/zookeeper_test.cc \ ZOOKEEPER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(ZOOKEEPER_TEST_SRC)))) @@ -14713,6 +14714,7 @@ endif endif +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/echo.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc_zookeeper.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OBJDIR)/$(CONFIG)/test/cpp/end2end/zookeeper_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc_zookeeper.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_zookeeper_test: $(ZOOKEEPER_TEST_OBJS:.o=.dep) @@ -14721,6 +14723,7 @@ ifneq ($(NO_DEPS),true) -include $(ZOOKEEPER_TEST_OBJS:.o=.dep) endif endif +$(OBJDIR)/$(CONFIG)/test/cpp/end2end/zookeeper_test.o: $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc ifeq ($(NO_SECURE),true) diff --git a/build.yaml b/build.yaml index d4caff2c4ec..19bd050cfca 100644 --- a/build.yaml +++ b/build.yaml @@ -639,9 +639,9 @@ libs: - test/cpp/util/string_ref_helper.h - test/cpp/util/subprocess.h src: - - test/cpp/util/messages.proto - - test/cpp/util/echo.proto - - test/cpp/util/echo_duplicate.proto + - src/proto/grpc/testing/echo_messages.proto + - src/proto/grpc/testing/echo.proto + - src/proto/grpc/testing/duplicate/echo_duplicate.proto - test/cpp/util/cli_call.cc - test/cpp/util/create_test_channel.cc - test/cpp/util/string_ref_helper.cc @@ -697,7 +697,7 @@ libs: headers: - test/cpp/interop/client_helper.h src: - - test/proto/messages.proto + - src/proto/grpc/testing/messages.proto - test/cpp/interop/client_helper.cc deps: - grpc++_test_util @@ -711,9 +711,9 @@ libs: headers: - test/cpp/interop/interop_client.h src: - - test/proto/empty.proto - - test/proto/messages.proto - - test/proto/test.proto + - src/proto/grpc/testing/empty.proto + - src/proto/grpc/testing/messages.proto + - src/proto/grpc/testing/test.proto - test/cpp/interop/client.cc - test/cpp/interop/interop_client.cc deps: @@ -741,9 +741,9 @@ libs: build: private language: c++ src: - - test/proto/empty.proto - - test/proto/messages.proto - - test/proto/test.proto + - src/proto/grpc/testing/empty.proto + - src/proto/grpc/testing/messages.proto + - src/proto/grpc/testing/test.proto - test/cpp/interop/server.cc deps: - interop_server_helper @@ -770,12 +770,12 @@ libs: - test/cpp/qps/timer.h - test/cpp/util/benchmark_config.h src: - - test/proto/messages.proto - - test/proto/benchmarks/control.proto - - test/proto/benchmarks/payloads.proto - - test/proto/benchmarks/services.proto - - test/proto/benchmarks/stats.proto - - test/cpp/qps/perf_db.proto + - src/proto/grpc/testing/messages.proto + - src/proto/grpc/testing/control.proto + - src/proto/grpc/testing/payloads.proto + - src/proto/grpc/testing/services.proto + - src/proto/grpc/testing/stats.proto + - src/proto/grpc/testing/perf_db.proto - test/cpp/qps/client_async.cc - test/cpp/qps/client_sync.cc - test/cpp/qps/driver.cc @@ -2084,7 +2084,7 @@ targets: headers: - test/cpp/util/metrics_server.h src: - - test/proto/metrics.proto + - src/proto/grpc/testing/metrics.proto - test/cpp/interop/metrics_client.cc deps: - grpc++ @@ -2196,9 +2196,9 @@ targets: run: false language: c++ src: - - test/proto/empty.proto - - test/proto/messages.proto - - test/proto/test.proto + - src/proto/grpc/testing/empty.proto + - src/proto/grpc/testing/messages.proto + - src/proto/grpc/testing/test.proto - test/cpp/interop/reconnect_interop_client.cc deps: - grpc++_test_util @@ -2213,9 +2213,9 @@ targets: run: false language: c++ src: - - test/proto/empty.proto - - test/proto/messages.proto - - test/proto/test.proto + - src/proto/grpc/testing/empty.proto + - src/proto/grpc/testing/messages.proto + - src/proto/grpc/testing/test.proto - test/cpp/interop/reconnect_interop_server.cc deps: - reconnect_server @@ -2334,10 +2334,10 @@ targets: - test/cpp/interop/stress_interop_client.h - test/cpp/util/metrics_server.h src: - - test/proto/empty.proto - - test/proto/messages.proto - - test/proto/metrics.proto - - test/proto/test.proto + - src/proto/grpc/testing/empty.proto + - src/proto/grpc/testing/messages.proto + - src/proto/grpc/testing/metrics.proto + - src/proto/grpc/testing/test.proto - test/cpp/interop/interop_client.cc - test/cpp/interop/stress_interop_client.cc - test/cpp/interop/stress_test.cc @@ -2401,6 +2401,7 @@ targets: run: false language: c++ src: + - src/proto/grpc/testing/echo.proto - test/cpp/end2end/zookeeper_test.cc deps: - grpc++_test_util diff --git a/src/proto/gen_build_yaml.py b/src/proto/gen_build_yaml.py new file mode 100755 index 00000000000..4e959830ea3 --- /dev/null +++ b/src/proto/gen_build_yaml.py @@ -0,0 +1,59 @@ +#!/usr/bin/env python2.7 +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +"""Generates the appropriate build.json data for all the proto files.""" +import yaml +import collections +import os +import re +import sys + +def main(): + deps = {} + for root, dirs, files in os.walk(os.path.dirname(sys.argv[0])): + for f in files: + if f[-6:] != '.proto': continue + look_at = os.path.join(root, f) + with open(look_at) as inp: + for line in inp: + imp = re.search(r'import "([^"]*)"', line) + if not imp: continue + if look_at[:-6] not in deps: deps[look_at[:-6]] = [] + deps[look_at[:-6]].append(imp.group(1)[:-6]) + + json = { + 'proto_deps': deps + } + + print yaml.dump(json) + +if __name__ == '__main__': + main() diff --git a/test/proto/benchmarks/control.proto b/src/proto/grpc/testing/control.proto similarity index 95% rename from test/proto/benchmarks/control.proto rename to src/proto/grpc/testing/control.proto index 42a5dd0a859..0784ebf91cb 100644 --- a/test/proto/benchmarks/control.proto +++ b/src/proto/grpc/testing/control.proto @@ -29,8 +29,8 @@ syntax = "proto3"; -import "test/proto/benchmarks/payloads.proto"; -import "test/proto/benchmarks/stats.proto"; +import "src/proto/grpc/testing/payloads.proto"; +import "src/proto/grpc/testing/stats.proto"; package grpc.testing; @@ -61,9 +61,7 @@ message UniformParams { double interarrival_hi = 2; } -message DeterministicParams { - double offered_load = 1; -} +message DeterministicParams { double offered_load = 1; } message ParetoParams { double interarrival_base = 1; @@ -72,8 +70,7 @@ message ParetoParams { // Once an RPC finishes, immediately start a new one. // No configuration parameters needed. -message ClosedLoopParams { -} +message ClosedLoopParams {} message LoadParams { oneof load { @@ -111,9 +108,7 @@ message ClientConfig { HistogramParams histogram_params = 12; } -message ClientStatus { - ClientStats stats = 1; -} +message ClientStatus { ClientStats stats = 1; } // Request current stats message Mark { diff --git a/test/cpp/util/echo_duplicate.proto b/src/proto/grpc/testing/duplicate/echo_duplicate.proto similarity index 90% rename from test/cpp/util/echo_duplicate.proto rename to src/proto/grpc/testing/duplicate/echo_duplicate.proto index 9c1d67825a4..d5891db4ceb 100644 --- a/test/cpp/util/echo_duplicate.proto +++ b/src/proto/grpc/testing/duplicate/echo_duplicate.proto @@ -32,11 +32,10 @@ syntax = "proto3"; -import "test/cpp/util/messages.proto"; +import "src/proto/grpc/testing/echo_messages.proto"; -package grpc.cpp.test.util.duplicate; +package grpc.testing.duplicate; service TestService { - rpc Echo(grpc.cpp.test.util.EchoRequest) - returns (grpc.cpp.test.util.EchoResponse); + rpc Echo(grpc.testing.EchoRequest) returns (grpc.testing.EchoResponse); } diff --git a/test/cpp/util/echo.proto b/src/proto/grpc/testing/echo.proto similarity index 96% rename from test/cpp/util/echo.proto rename to src/proto/grpc/testing/echo.proto index 8ea2f598978..0896f50a99f 100644 --- a/test/cpp/util/echo.proto +++ b/src/proto/grpc/testing/echo.proto @@ -30,9 +30,9 @@ syntax = "proto3"; -import "test/cpp/util/messages.proto"; +import "src/proto/grpc/testing/echo_messages.proto"; -package grpc.cpp.test.util; +package grpc.testing; service TestService { rpc Echo(EchoRequest) returns (EchoResponse); diff --git a/test/cpp/util/messages.proto b/src/proto/grpc/testing/echo_messages.proto similarity index 95% rename from test/cpp/util/messages.proto rename to src/proto/grpc/testing/echo_messages.proto index a022707be98..f01d645af73 100644 --- a/test/cpp/util/messages.proto +++ b/src/proto/grpc/testing/echo_messages.proto @@ -30,7 +30,7 @@ syntax = "proto3"; -package grpc.cpp.test.util; +package grpc.testing; message RequestParams { bool echo_deadline = 1; @@ -40,7 +40,7 @@ message RequestParams { bool check_auth_context = 5; int32 response_message_length = 6; bool echo_peer = 7; - string expected_client_identity = 8; // will force check_auth_context. + string expected_client_identity = 8; // will force check_auth_context. } message EchoRequest { diff --git a/test/proto/empty.proto b/src/proto/grpc/testing/empty.proto similarity index 100% rename from test/proto/empty.proto rename to src/proto/grpc/testing/empty.proto diff --git a/test/proto/messages.proto b/src/proto/grpc/testing/messages.proto similarity index 100% rename from test/proto/messages.proto rename to src/proto/grpc/testing/messages.proto diff --git a/test/proto/metrics.proto b/src/proto/grpc/testing/metrics.proto similarity index 96% rename from test/proto/metrics.proto rename to src/proto/grpc/testing/metrics.proto index f5a08e056a5..4485d3a53b5 100644 --- a/test/proto/metrics.proto +++ b/src/proto/grpc/testing/metrics.proto @@ -43,12 +43,9 @@ message GaugeResponse { } } -message GaugeRequest { - string name = 1; -} +message GaugeRequest { string name = 1; } -message EmptyMessage { -} +message EmptyMessage {} service MetricsService { rpc GetAllGauges(EmptyMessage) returns (stream GaugeResponse); diff --git a/test/proto/benchmarks/payloads.proto b/src/proto/grpc/testing/payloads.proto similarity index 100% rename from test/proto/benchmarks/payloads.proto rename to src/proto/grpc/testing/payloads.proto diff --git a/test/cpp/qps/perf_db.proto b/src/proto/grpc/testing/perf_db.proto similarity index 95% rename from test/cpp/qps/perf_db.proto rename to src/proto/grpc/testing/perf_db.proto index 8a691ddded4..0ba8596fe94 100644 --- a/test/cpp/qps/perf_db.proto +++ b/src/proto/grpc/testing/perf_db.proto @@ -29,15 +29,14 @@ syntax = "proto3"; -import "test/proto/benchmarks/control.proto"; +import "src/proto/grpc/testing/control.proto"; package grpc.testing; service PerfDbTransfer { // Sends client info rpc RecordSingleClientData(SingleUserRecordRequest) - returns (SingleUserRecordReply) { - } + returns (SingleUserRecordReply) {} } // Metrics to be stored @@ -67,5 +66,4 @@ message SingleUserRecordRequest { } // Reply to request for storing single user's data -message SingleUserRecordReply { -} +message SingleUserRecordReply {} diff --git a/test/proto/benchmarks/services.proto b/src/proto/grpc/testing/services.proto similarity index 96% rename from test/proto/benchmarks/services.proto rename to src/proto/grpc/testing/services.proto index ff295ed9702..af285ceab81 100644 --- a/test/proto/benchmarks/services.proto +++ b/src/proto/grpc/testing/services.proto @@ -31,8 +31,8 @@ // of unary/streaming requests/responses. syntax = "proto3"; -import "test/proto/messages.proto"; -import "test/proto/benchmarks/control.proto"; +import "src/proto/grpc/testing/messages.proto"; +import "src/proto/grpc/testing/control.proto"; package grpc.testing; diff --git a/test/proto/benchmarks/stats.proto b/src/proto/grpc/testing/stats.proto similarity index 94% rename from test/proto/benchmarks/stats.proto rename to src/proto/grpc/testing/stats.proto index 7e02707dbbe..f9d116110b0 100644 --- a/test/proto/benchmarks/stats.proto +++ b/src/proto/grpc/testing/stats.proto @@ -45,8 +45,8 @@ message ServerStats { // Histogram params based on grpc/support/histogram.c message HistogramParams { - double resolution = 1; // first bucket is [0, 1 + resolution) - double max_possible = 2; // use enough buckets to allow this value + double resolution = 1; // first bucket is [0, 1 + resolution) + double max_possible = 2; // use enough buckets to allow this value } // Histogram data based on grpc/support/histogram.c diff --git a/test/proto/test.proto b/src/proto/grpc/testing/test.proto similarity index 95% rename from test/proto/test.proto rename to src/proto/grpc/testing/test.proto index d3166a6540d..9faba297a37 100644 --- a/test/proto/test.proto +++ b/src/proto/grpc/testing/test.proto @@ -33,8 +33,8 @@ syntax = "proto3"; -import "test/proto/empty.proto"; -import "test/proto/messages.proto"; +import "src/proto/grpc/testing/empty.proto"; +import "src/proto/grpc/testing/messages.proto"; package grpc.testing; @@ -71,12 +71,11 @@ service TestService { returns (stream StreamingOutputCallResponse); } - // A simple service NOT implemented at servers so clients can test for // that case. service UnimplementedService { // A call that no server should implement - rpc UnimplementedCall(grpc.testing.Empty) returns(grpc.testing.Empty); + rpc UnimplementedCall(grpc.testing.Empty) returns (grpc.testing.Empty); } // A service used to control reconnect server. diff --git a/templates/Makefile.template b/templates/Makefile.template index 394ffb8c512..0efb3948fcf 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -1268,12 +1268,12 @@ $(GENDIR)/${p}.pb.cc: protoc_dep_error $(GENDIR)/${p}.grpc.pb.cc: protoc_dep_error else - $(GENDIR)/${p}.pb.cc: ${p}.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) + $(GENDIR)/${p}.pb.cc: ${p}.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) ${' '.join('$(GENDIR)/%s.pb.cc' % q for q in proto_deps.get(p, []))} $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< - $(GENDIR)/${p}.grpc.pb.cc: ${p}.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) + $(GENDIR)/${p}.grpc.pb.cc: ${p}.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) ${' '.join('$(GENDIR)/%s.pb.cc $(GENDIR)/%s.grpc.pb.cc' % (q,q) for q in proto_deps.get(p, []))} $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 279423a8cb8..4f99de43453 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -46,16 +46,16 @@ #include "test/core/util/port.h" #include "test/core/util/test_config.h" -#include "test/cpp/util/echo_duplicate.grpc.pb.h" -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/util/string_ref_helper.h" #ifdef GPR_POSIX_SOCKET #include "src/core/iomgr/pollset_posix.h" #endif -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; using std::chrono::system_clock; namespace grpc { @@ -186,7 +186,7 @@ class AsyncEnd2endTest : public ::testing::TestWithParam { build_bad.AddListeningPort(server_address_.str(), grpc::InsecureServerCredentials()); build_bad.RegisterAsyncService(&service_); - grpc::cpp::test::util::TestService::Service sync_service; + grpc::testing::TestService::Service sync_service; build_bad.RegisterService(&sync_service); GPR_ASSERT(build_bad.BuildAndStart() == nullptr); @@ -211,7 +211,7 @@ class AsyncEnd2endTest : public ::testing::TestWithParam { void ResetStub() { std::shared_ptr channel = CreateChannel(server_address_.str(), InsecureChannelCredentials()); - stub_ = grpc::cpp::test::util::TestService::NewStub(channel); + stub_ = grpc::testing::TestService::NewStub(channel); } void SendRpc(int num_rpcs) { @@ -249,9 +249,9 @@ class AsyncEnd2endTest : public ::testing::TestWithParam { } std::unique_ptr cq_; - std::unique_ptr stub_; + std::unique_ptr stub_; std::unique_ptr server_; - grpc::cpp::test::util::TestService::AsyncService service_; + grpc::testing::TestService::AsyncService service_; std::ostringstream server_address_; }; @@ -761,8 +761,8 @@ TEST_P(AsyncEnd2endTest, ServerCheckDone) { TEST_P(AsyncEnd2endTest, UnimplementedRpc) { std::shared_ptr channel = CreateChannel(server_address_.str(), InsecureChannelCredentials()); - std::unique_ptr stub; - stub = grpc::cpp::test::util::UnimplementedService::NewStub(channel); + std::unique_ptr stub; + stub = grpc::testing::UnimplementedService::NewStub(channel); EchoRequest send_request; EchoResponse recv_response; Status recv_status; diff --git a/test/cpp/end2end/client_crash_test.cc b/test/cpp/end2end/client_crash_test.cc index 116785bbf2c..68c63b2f93d 100644 --- a/test/cpp/end2end/client_crash_test.cc +++ b/test/cpp/end2end/client_crash_test.cc @@ -44,12 +44,12 @@ #include "test/core/util/port.h" #include "test/core/util/test_config.h" -#include "test/cpp/util/echo_duplicate.grpc.pb.h" -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/util/subprocess.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; using std::chrono::system_clock; static std::string g_root; @@ -63,8 +63,7 @@ class CrashTest : public ::testing::Test { protected: CrashTest() {} - std::unique_ptr - CreateServerAndStub() { + std::unique_ptr CreateServerAndStub() { auto port = grpc_pick_unused_port_or_die(); std::ostringstream addr_stream; addr_stream << "localhost:" << port; @@ -73,7 +72,7 @@ class CrashTest : public ::testing::Test { g_root + "/client_crash_test_server", "--address=" + addr, })); GPR_ASSERT(server_); - return grpc::cpp::test::util::TestService::NewStub( + return grpc::testing::TestService::NewStub( CreateChannel(addr, InsecureChannelCredentials())); } diff --git a/test/cpp/end2end/client_crash_test_server.cc b/test/cpp/end2end/client_crash_test_server.cc index 7ffeecca701..f9a9c187a7e 100644 --- a/test/cpp/end2end/client_crash_test_server.cc +++ b/test/cpp/end2end/client_crash_test_server.cc @@ -39,12 +39,12 @@ #include #include #include -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" DEFINE_string(address, "", "Address to bind to"); -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; // In some distros, gflags is in the namespace google, and in some others, // in gflags. This hack is enabling us to find both. @@ -56,8 +56,7 @@ using namespace gflags; namespace grpc { namespace testing { -class ServiceImpl GRPC_FINAL - : public ::grpc::cpp::test::util::TestService::Service { +class ServiceImpl GRPC_FINAL : public ::grpc::testing::TestService::Service { Status BidiStream(ServerContext* context, ServerReaderWriter* stream) GRPC_OVERRIDE { diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index bbeac7a30b3..28f8a8ec460 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -52,12 +52,12 @@ #include "test/core/end2end/data/ssl_test_data.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" -#include "test/cpp/util/echo_duplicate.grpc.pb.h" -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/util/string_ref_helper.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; using std::chrono::system_clock; namespace grpc { @@ -196,10 +196,10 @@ class TestAuthMetadataProcessor : public AuthMetadataProcessor { const char TestAuthMetadataProcessor::kGoodGuy[] = "Dr Jekyll"; const char TestAuthMetadataProcessor::kIdentityPropName[] = "novel identity"; -class Proxy : public ::grpc::cpp::test::util::TestService::Service { +class Proxy : public ::grpc::testing::TestService::Service { public: Proxy(std::shared_ptr channel) - : stub_(grpc::cpp::test::util::TestService::NewStub(channel)) {} + : stub_(grpc::testing::TestService::NewStub(channel)) {} Status Echo(ServerContext* server_context, const EchoRequest* request, EchoResponse* response) GRPC_OVERRIDE { @@ -209,10 +209,10 @@ class Proxy : public ::grpc::cpp::test::util::TestService::Service { } private: - std::unique_ptr< ::grpc::cpp::test::util::TestService::Stub> stub_; + std::unique_ptr< ::grpc::testing::TestService::Stub> stub_; }; -class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { +class TestServiceImpl : public ::grpc::testing::TestService::Service { public: TestServiceImpl() : signal_client_(false), host_() {} explicit TestServiceImpl(const grpc::string& host) @@ -344,7 +344,7 @@ class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { }; class TestServiceImplDupPkg - : public ::grpc::cpp::test::util::duplicate::TestService::Service { + : public ::grpc::testing::duplicate::TestService::Service { public: Status Echo(ServerContext* context, const EchoRequest* request, EchoResponse* response) GRPC_OVERRIDE { @@ -435,12 +435,12 @@ class End2endTest : public ::testing::TestWithParam { channel_ = CreateChannel(proxyaddr.str(), InsecureChannelCredentials()); } - stub_ = grpc::cpp::test::util::TestService::NewStub(channel_); + stub_ = grpc::testing::TestService::NewStub(channel_); } bool is_server_started_; std::shared_ptr channel_; - std::unique_ptr stub_; + std::unique_ptr stub_; std::unique_ptr server_; std::unique_ptr proxy_server_; std::unique_ptr proxy_service_; @@ -451,8 +451,7 @@ class End2endTest : public ::testing::TestWithParam { TestServiceImplDupPkg dup_pkg_service_; }; -static void SendRpc(grpc::cpp::test::util::TestService::Stub* stub, - int num_rpcs) { +static void SendRpc(grpc::testing::TestService::Stub* stub, int num_rpcs) { EchoRequest request; EchoResponse response; request.set_message("Hello hello hello hello"); @@ -562,9 +561,8 @@ TEST_P(End2endTest, DiffPackageServices) { EXPECT_EQ(response.message(), request.message()); EXPECT_TRUE(s.ok()); - std::unique_ptr - dup_pkg_stub( - grpc::cpp::test::util::duplicate::TestService::NewStub(channel_)); + std::unique_ptr dup_pkg_stub( + grpc::testing::duplicate::TestService::NewStub(channel_)); ClientContext context2; s = dup_pkg_stub->Echo(&context2, request, &response); EXPECT_EQ("no package", response.message()); @@ -783,8 +781,8 @@ TEST_P(End2endTest, ChannelStateTimeout) { // Talking to a non-existing service. TEST_P(End2endTest, NonExistingService) { ResetChannel(); - std::unique_ptr stub; - stub = grpc::cpp::test::util::UnimplementedService::NewStub(channel_); + std::unique_ptr stub; + stub = grpc::testing::UnimplementedService::NewStub(channel_); EchoRequest request; EchoResponse response; diff --git a/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc index 6ecf7eb2fee..104de995031 100644 --- a/test/cpp/end2end/generic_end2end_test.cc +++ b/test/cpp/end2end/generic_end2end_test.cc @@ -50,10 +50,10 @@ #include "test/core/util/port.h" #include "test/core/util/test_config.h" -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; using std::chrono::system_clock; namespace grpc { @@ -193,7 +193,7 @@ class GenericEnd2endTest : public ::testing::Test { CompletionQueue cli_cq_; std::unique_ptr srv_cq_; - std::unique_ptr stub_; + std::unique_ptr stub_; std::unique_ptr generic_stub_; std::unique_ptr server_; AsyncGenericService generic_service_; diff --git a/test/cpp/end2end/mock_test.cc b/test/cpp/end2end/mock_test.cc index bd34cfba671..dddd1d0a2e8 100644 --- a/test/cpp/end2end/mock_test.cc +++ b/test/cpp/end2end/mock_test.cc @@ -46,12 +46,12 @@ #include "test/core/util/port.h" #include "test/core/util/test_config.h" -#include "test/cpp/util/echo_duplicate.grpc.pb.h" -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; -using grpc::cpp::test::util::TestService; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; +using grpc::testing::TestService; using std::chrono::system_clock; namespace grpc { @@ -245,10 +245,10 @@ class MockTest : public ::testing::Test { void ResetStub() { std::shared_ptr channel = CreateChannel(server_address_.str(), InsecureChannelCredentials()); - stub_ = grpc::cpp::test::util::TestService::NewStub(channel); + stub_ = grpc::testing::TestService::NewStub(channel); } - std::unique_ptr stub_; + std::unique_ptr stub_; std::unique_ptr server_; std::ostringstream server_address_; TestServiceImpl service_; diff --git a/test/cpp/end2end/server_crash_test.cc b/test/cpp/end2end/server_crash_test.cc index 4b6793abe60..87ce6369d22 100644 --- a/test/cpp/end2end/server_crash_test.cc +++ b/test/cpp/end2end/server_crash_test.cc @@ -44,12 +44,12 @@ #include "test/core/util/port.h" #include "test/core/util/test_config.h" -#include "test/cpp/util/echo.grpc.pb.h" -#include "test/cpp/util/echo_duplicate.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" +#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "test/cpp/util/subprocess.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; using std::chrono::system_clock; static std::string g_root; @@ -59,8 +59,7 @@ namespace testing { namespace { -class ServiceImpl GRPC_FINAL - : public ::grpc::cpp::test::util::TestService::Service { +class ServiceImpl GRPC_FINAL : public ::grpc::testing::TestService::Service { public: ServiceImpl() : bidi_stream_count_(0), response_stream_count_(0) {} diff --git a/test/cpp/end2end/server_crash_test_client.cc b/test/cpp/end2end/server_crash_test_client.cc index 2baefcbf42d..b349ae7357e 100644 --- a/test/cpp/end2end/server_crash_test_client.cc +++ b/test/cpp/end2end/server_crash_test_client.cc @@ -40,13 +40,13 @@ #include #include #include -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" DEFINE_string(address, "", "Address to connect to"); DEFINE_string(mode, "", "Test mode to use"); -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; // In some distros, gflags is in the namespace google, and in some others, // in gflags. This hack is enabling us to find both. @@ -57,7 +57,7 @@ using namespace gflags; int main(int argc, char** argv) { ParseCommandLineFlags(&argc, &argv, true); - auto stub = grpc::cpp::test::util::TestService::NewStub( + auto stub = grpc::testing::TestService::NewStub( grpc::CreateChannel(FLAGS_address, grpc::InsecureChannelCredentials())); EchoRequest request; diff --git a/test/cpp/end2end/shutdown_test.cc b/test/cpp/end2end/shutdown_test.cc index b1b18b2a7f4..50d4f6dca39 100644 --- a/test/cpp/end2end/shutdown_test.cc +++ b/test/cpp/end2end/shutdown_test.cc @@ -46,15 +46,15 @@ #include "src/core/support/env.h" #include "test/core/util/test_config.h" #include "test/core/util/port.h" -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; namespace grpc { namespace testing { -class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { +class TestServiceImpl : public ::grpc::testing::TestService::Service { public: explicit TestServiceImpl(gpr_event* ev) : ev_(ev) {} @@ -94,7 +94,7 @@ class ShutdownTest : public ::testing::Test { void ResetStub() { string target = "dns:localhost:" + to_string(port_); channel_ = CreateChannel(target, InsecureChannelCredentials()); - stub_ = grpc::cpp::test::util::TestService::NewStub(channel_); + stub_ = grpc::testing::TestService::NewStub(channel_); } string to_string(const int number) { @@ -115,7 +115,7 @@ class ShutdownTest : public ::testing::Test { protected: std::shared_ptr channel_; - std::unique_ptr stub_; + std::unique_ptr stub_; std::unique_ptr server_; bool shutdown_; int port_; diff --git a/test/cpp/end2end/streaming_throughput_test.cc b/test/cpp/end2end/streaming_throughput_test.cc index b7e103a1ae0..ca563472a72 100644 --- a/test/cpp/end2end/streaming_throughput_test.cc +++ b/test/cpp/end2end/streaming_throughput_test.cc @@ -51,11 +51,11 @@ #include "test/core/util/port.h" #include "test/core/util/test_config.h" -#include "test/cpp/util/echo_duplicate.grpc.pb.h" -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; using std::chrono::system_clock; const char* kLargeString = @@ -99,7 +99,7 @@ const char* kLargeString = namespace grpc { namespace testing { -class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { +class TestServiceImpl : public ::grpc::testing::TestService::Service { public: static void BidiStream_Sender( ServerReaderWriter* stream, @@ -161,10 +161,10 @@ class End2endTest : public ::testing::Test { void ResetStub() { std::shared_ptr channel = CreateChannel(server_address_.str(), InsecureChannelCredentials()); - stub_ = grpc::cpp::test::util::TestService::NewStub(channel); + stub_ = grpc::testing::TestService::NewStub(channel); } - std::unique_ptr stub_; + std::unique_ptr stub_; std::unique_ptr server_; std::ostringstream server_address_; TestServiceImpl service_; diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc index fb82b961359..8efc645fa39 100644 --- a/test/cpp/end2end/thread_stress_test.cc +++ b/test/cpp/end2end/thread_stress_test.cc @@ -47,11 +47,11 @@ #include "test/core/util/port.h" #include "test/core/util/test_config.h" -#include "test/cpp/util/echo_duplicate.grpc.pb.h" -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; using std::chrono::system_clock; namespace grpc { @@ -74,7 +74,7 @@ void MaybeEchoDeadline(ServerContext* context, const EchoRequest* request, } // namespace -class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { +class TestServiceImpl : public ::grpc::testing::TestService::Service { public: TestServiceImpl() : signal_client_(false) {} @@ -159,7 +159,7 @@ class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { }; class TestServiceImplDupPkg - : public ::grpc::cpp::test::util::duplicate::TestService::Service { + : public ::grpc::testing::duplicate::TestService::Service { public: Status Echo(ServerContext* context, const EchoRequest* request, EchoResponse* response) GRPC_OVERRIDE { @@ -191,10 +191,10 @@ class End2endTest : public ::testing::Test { void ResetStub() { std::shared_ptr channel = CreateChannel(server_address_.str(), InsecureChannelCredentials()); - stub_ = grpc::cpp::test::util::TestService::NewStub(channel); + stub_ = grpc::testing::TestService::NewStub(channel); } - std::unique_ptr stub_; + std::unique_ptr stub_; std::unique_ptr server_; std::ostringstream server_address_; const int kMaxMessageSize_; @@ -202,8 +202,7 @@ class End2endTest : public ::testing::Test { TestServiceImplDupPkg dup_pkg_service_; }; -static void SendRpc(grpc::cpp::test::util::TestService::Stub* stub, - int num_rpcs) { +static void SendRpc(grpc::testing::TestService::Stub* stub, int num_rpcs) { EchoRequest request; EchoResponse response; request.set_message("Hello"); diff --git a/test/cpp/end2end/zookeeper_test.cc b/test/cpp/end2end/zookeeper_test.cc index e88c0f9c68a..4044624b734 100644 --- a/test/cpp/end2end/zookeeper_test.cc +++ b/test/cpp/end2end/zookeeper_test.cc @@ -44,17 +44,16 @@ #include "test/core/util/test_config.h" #include "test/core/util/port.h" -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" #include "src/core/support/env.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; namespace grpc { namespace testing { -class ZookeeperTestServiceImpl - : public ::grpc::cpp::test::util::TestService::Service { +class ZookeeperTestServiceImpl : public ::grpc::testing::TestService::Service { public: Status Echo(ServerContext* context, const EchoRequest* request, EchoResponse* response) GRPC_OVERRIDE { @@ -158,7 +157,7 @@ class ZookeeperTest : public ::testing::Test { void ResetStub() { string target = "zookeeper://" + zookeeper_address_ + "/test"; channel_ = CreateChannel(target, InsecureChannelCredentials()); - stub_ = std::move(grpc::cpp::test::util::TestService::NewStub(channel_)); + stub_ = std::move(grpc::testing::TestService::NewStub(channel_)); } string to_string(const int number) { @@ -168,7 +167,7 @@ class ZookeeperTest : public ::testing::Test { } std::shared_ptr channel_; - std::unique_ptr stub_; + std::unique_ptr stub_; std::unique_ptr server1_; std::unique_ptr server2_; ZookeeperTestServiceImpl service_; diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 05ef0c8d9d0..b7b3155a906 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -48,9 +48,9 @@ #include "src/core/transport/byte_stream.h" #include "test/cpp/interop/client_helper.h" -#include "test/proto/test.grpc.pb.h" -#include "test/proto/empty.grpc.pb.h" -#include "test/proto/messages.grpc.pb.h" +#include "src/proto/grpc/testing/test.grpc.pb.h" +#include "src/proto/grpc/testing/empty.grpc.pb.h" +#include "src/proto/grpc/testing/messages.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/interop/interop_client.h b/test/cpp/interop/interop_client.h index 97a6fd77cf9..3ecd3803985 100644 --- a/test/cpp/interop/interop_client.h +++ b/test/cpp/interop/interop_client.h @@ -38,8 +38,8 @@ #include #include -#include "test/proto/messages.grpc.pb.h" -#include "test/proto/test.grpc.pb.h" +#include "src/proto/grpc/testing/messages.grpc.pb.h" +#include "src/proto/grpc/testing/test.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/interop/metrics_client.cc b/test/cpp/interop/metrics_client.cc index 2865c855a2d..0c140ffd85e 100644 --- a/test/cpp/interop/metrics_client.cc +++ b/test/cpp/interop/metrics_client.cc @@ -39,8 +39,8 @@ #include "test/cpp/util/metrics_server.h" #include "test/cpp/util/test_config.h" -#include "test/proto/metrics.grpc.pb.h" -#include "test/proto/metrics.pb.h" +#include "src/proto/grpc/testing/metrics.grpc.pb.h" +#include "src/proto/grpc/testing/metrics.pb.h" DEFINE_string(metrics_server_address, "", "The metrics server addresses in the fomrat :"); diff --git a/test/cpp/interop/reconnect_interop_client.cc b/test/cpp/interop/reconnect_interop_client.cc index d332dcad844..1f6b352db17 100644 --- a/test/cpp/interop/reconnect_interop_client.cc +++ b/test/cpp/interop/reconnect_interop_client.cc @@ -41,9 +41,9 @@ #include #include "test/cpp/util/create_test_channel.h" #include "test/cpp/util/test_config.h" -#include "test/proto/test.grpc.pb.h" -#include "test/proto/empty.grpc.pb.h" -#include "test/proto/messages.grpc.pb.h" +#include "src/proto/grpc/testing/test.grpc.pb.h" +#include "src/proto/grpc/testing/empty.grpc.pb.h" +#include "src/proto/grpc/testing/messages.grpc.pb.h" DEFINE_int32(server_control_port, 0, "Server port for control rpcs."); DEFINE_int32(server_retry_port, 0, "Server port for testing reconnection."); diff --git a/test/cpp/interop/reconnect_interop_server.cc b/test/cpp/interop/reconnect_interop_server.cc index 92b5bf4dfaa..6023ae4f7ed 100644 --- a/test/cpp/interop/reconnect_interop_server.cc +++ b/test/cpp/interop/reconnect_interop_server.cc @@ -48,9 +48,9 @@ #include "test/core/util/reconnect_server.h" #include "test/cpp/util/test_config.h" -#include "test/proto/test.grpc.pb.h" -#include "test/proto/empty.grpc.pb.h" -#include "test/proto/messages.grpc.pb.h" +#include "src/proto/grpc/testing/test.grpc.pb.h" +#include "src/proto/grpc/testing/empty.grpc.pb.h" +#include "src/proto/grpc/testing/messages.grpc.pb.h" DEFINE_int32(control_port, 0, "Server port for controlling the server."); DEFINE_int32(retry_port, 0, diff --git a/test/cpp/interop/server.cc b/test/cpp/interop/server.cc index c0e1ec943d7..cdca060c237 100644 --- a/test/cpp/interop/server.cc +++ b/test/cpp/interop/server.cc @@ -50,9 +50,9 @@ #include "test/cpp/interop/server_helper.h" #include "test/cpp/util/test_config.h" -#include "test/proto/test.grpc.pb.h" -#include "test/proto/empty.grpc.pb.h" -#include "test/proto/messages.grpc.pb.h" +#include "src/proto/grpc/testing/test.grpc.pb.h" +#include "src/proto/grpc/testing/empty.grpc.pb.h" +#include "src/proto/grpc/testing/messages.grpc.pb.h" DEFINE_bool(use_tls, false, "Whether to use tls."); DEFINE_int32(port, 0, "Server port."); diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc index 934f4f5722d..ce72febaaa8 100644 --- a/test/cpp/interop/stress_test.cc +++ b/test/cpp/interop/stress_test.cc @@ -47,8 +47,8 @@ #include "test/cpp/interop/stress_interop_client.h" #include "test/cpp/util/metrics_server.h" #include "test/cpp/util/test_config.h" -#include "test/proto/metrics.grpc.pb.h" -#include "test/proto/metrics.pb.h" +#include "src/proto/grpc/testing/metrics.grpc.pb.h" +#include "src/proto/grpc/testing/metrics.pb.h" DEFINE_int32(metrics_port, 8081, "The metrics server port."); diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index b24a90adacd..ee0049578d3 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -41,8 +41,8 @@ #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/timer.h" #include "test/cpp/util/create_test_channel.h" -#include "test/proto/benchmarks/payloads.grpc.pb.h" -#include "test/proto/benchmarks/services.grpc.pb.h" +#include "src/proto/grpc/testing/payloads.grpc.pb.h" +#include "src/proto/grpc/testing/services.grpc.pb.h" namespace grpc { diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 9594179822d..3aaf06564ca 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -51,7 +51,7 @@ #include "test/cpp/qps/timer.h" #include "test/cpp/qps/client.h" #include "test/cpp/util/create_test_channel.h" -#include "test/proto/benchmarks/services.grpc.pb.h" +#include "src/proto/grpc/testing/services.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index 10d680860a9..9e94f43e351 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -57,7 +57,7 @@ #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/timer.h" -#include "test/proto/benchmarks/services.grpc.pb.h" +#include "src/proto/grpc/testing/services.grpc.pb.h" #include "src/core/profiling/timers.h" diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 20dc65046be..acb265b3086 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -48,7 +48,7 @@ #include "test/cpp/qps/driver.h" #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/qps_worker.h" -#include "test/proto/benchmarks/services.grpc.pb.h" +#include "src/proto/grpc/testing/services.grpc.pb.h" using std::list; using std::thread; diff --git a/test/cpp/qps/driver.h b/test/cpp/qps/driver.h index 50bf17ceab2..2a7cf805e57 100644 --- a/test/cpp/qps/driver.h +++ b/test/cpp/qps/driver.h @@ -37,7 +37,7 @@ #include #include "test/cpp/qps/histogram.h" -#include "test/proto/benchmarks/control.grpc.pb.h" +#include "src/proto/grpc/testing/control.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/histogram.h b/test/cpp/qps/histogram.h index 4161eac8266..acb415f0a10 100644 --- a/test/cpp/qps/histogram.h +++ b/test/cpp/qps/histogram.h @@ -35,7 +35,7 @@ #define TEST_QPS_HISTOGRAM_H #include -#include "test/proto/benchmarks/stats.grpc.pb.h" +#include "src/proto/grpc/testing/stats.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/perf_db_client.h b/test/cpp/qps/perf_db_client.h index 72ebe79c3c9..ece020aa9b3 100644 --- a/test/cpp/qps/perf_db_client.h +++ b/test/cpp/qps/perf_db_client.h @@ -42,7 +42,7 @@ #include #include #include -#include "test/cpp/qps/perf_db.grpc.pb.h" +#include "src/proto/grpc/testing/perf_db.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index dc59eab7ef6..b3f383253f7 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -55,7 +55,7 @@ #include "test/cpp/qps/client.h" #include "test/cpp/qps/server.h" #include "test/cpp/util/create_test_channel.h" -#include "test/proto/benchmarks/services.pb.h" +#include "src/proto/grpc/testing/services.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index 6e81edc8ffe..620bc32f4b4 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -40,8 +40,8 @@ #include "test/core/end2end/data/ssl_test_data.h" #include "test/core/util/port.h" #include "test/cpp/qps/timer.h" -#include "test/proto/messages.grpc.pb.h" -#include "test/proto/benchmarks/control.grpc.pb.h" +#include "src/proto/grpc/testing/messages.grpc.pb.h" +#include "src/proto/grpc/testing/control.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index c151918ce4c..03fde06e77f 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -50,7 +50,7 @@ #include #include "test/cpp/qps/server.h" -#include "test/proto/benchmarks/services.grpc.pb.h" +#include "src/proto/grpc/testing/services.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index 3a15bec888d..97a1ff52558 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -45,7 +45,7 @@ #include "test/cpp/qps/server.h" #include "test/cpp/qps/timer.h" -#include "test/proto/benchmarks/services.grpc.pb.h" +#include "src/proto/grpc/testing/services.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/util/cli_call_test.cc b/test/cpp/util/cli_call_test.cc index 32cd8e41030..2e223ec57ee 100644 --- a/test/cpp/util/cli_call_test.cc +++ b/test/cpp/util/cli_call_test.cc @@ -44,16 +44,16 @@ #include "test/core/util/port.h" #include "test/core/util/test_config.h" -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/util/string_ref_helper.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; namespace grpc { namespace testing { -class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { +class TestServiceImpl : public ::grpc::testing::TestService::Service { public: Status Echo(ServerContext* context, const EchoRequest* request, EchoResponse* response) GRPC_OVERRIDE { @@ -91,11 +91,11 @@ class CliCallTest : public ::testing::Test { void ResetStub() { channel_ = CreateChannel(server_address_.str(), InsecureChannelCredentials()); - stub_ = grpc::cpp::test::util::TestService::NewStub(channel_); + stub_ = grpc::testing::TestService::NewStub(channel_); } std::shared_ptr channel_; - std::unique_ptr stub_; + std::unique_ptr stub_; std::unique_ptr server_; std::ostringstream server_address_; TestServiceImpl service_; diff --git a/test/cpp/util/grpc_cli.cc b/test/cpp/util/grpc_cli.cc index 3f40b242fc0..f9b9f0c40a0 100644 --- a/test/cpp/util/grpc_cli.cc +++ b/test/cpp/util/grpc_cli.cc @@ -41,8 +41,9 @@ body: "hello world" } b. under grpc/ run - protoc --proto_path=test/proto/ \ - --encode=grpc.testing.SimpleRequest test/proto/messages.proto \ + protoc --proto_path=src/proto/grpc/testing/ \ + --encode=grpc.testing.SimpleRequest + src/proto/grpc/testing/messages.proto \ < input.txt > input.bin 2. Start a server make interop_server && bins/opt/interop_server --port=50051 @@ -51,8 +52,8 @@ /grpc.testing.TestService/UnaryCall --enable_ssl=false \ --input_binary_file=input.bin --output_binary_file=output.bin 4. Decode response - protoc --proto_path=test/proto/ \ - --decode=grpc.testing.SimpleResponse test/proto/messages.proto \ + protoc --proto_path=src/proto/grpc/testing/ \ + --decode=grpc.testing.SimpleResponse src/proto/grpc/testing/messages.proto \ < output.bin > output.txt 5. Now the text form of response should be in output.txt Optionally, metadata can be passed to server via flag --metadata, e.g. diff --git a/test/cpp/util/metrics_server.cc b/test/cpp/util/metrics_server.cc index 426295f9b44..40028d39573 100644 --- a/test/cpp/util/metrics_server.cc +++ b/test/cpp/util/metrics_server.cc @@ -35,8 +35,8 @@ #include -#include "test/proto/metrics.grpc.pb.h" -#include "test/proto/metrics.pb.h" +#include "src/proto/grpc/testing/metrics.grpc.pb.h" +#include "src/proto/grpc/testing/metrics.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/util/metrics_server.h b/test/cpp/util/metrics_server.h index edde37dc4c0..ce05e0be64c 100644 --- a/test/cpp/util/metrics_server.h +++ b/test/cpp/util/metrics_server.h @@ -36,11 +36,12 @@ #include #include -#include "test/proto/metrics.grpc.pb.h" -#include "test/proto/metrics.pb.h" +#include "src/proto/grpc/testing/metrics.grpc.pb.h" +#include "src/proto/grpc/testing/metrics.pb.h" /* - * This implements a Metrics server defined in test/proto/metrics.proto. Any + * This implements a Metrics server defined in + * src/proto/grpc/testing/metrics.proto. Any * test service can use this to export Metrics (TODO (sreek): Only Gauges for * now). * diff --git a/tools/buildgen/build-cleaner.py b/tools/buildgen/build-cleaner.py index 8288a8998d2..4e592ee3efd 100755 --- a/tools/buildgen/build-cleaner.py +++ b/tools/buildgen/build-cleaner.py @@ -37,7 +37,7 @@ import yaml TEST = (os.environ.get('TEST', 'false') == 'true') -_TOP_LEVEL_KEYS = ['settings', 'filegroups', 'libs', 'targets', 'vspackages'] +_TOP_LEVEL_KEYS = ['settings', 'proto_deps', 'filegroups', 'libs', 'targets', 'vspackages'] _VERSION_KEYS = ['major', 'minor', 'micro', 'build'] _ELEM_KEYS = [ 'name', diff --git a/tools/buildgen/generate_build_additions.sh b/tools/buildgen/generate_build_additions.sh index bd5a78cbc2e..1ff44e1136d 100644 --- a/tools/buildgen/generate_build_additions.sh +++ b/tools/buildgen/generate_build_additions.sh @@ -28,7 +28,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -gen_build_yaml_dirs="test/core/end2end test/core/bad_client test/core/bad_ssl" +gen_build_yaml_dirs="test/core/end2end test/core/bad_client test/core/bad_ssl src/proto" gen_build_files="" for gen_build_yaml in $gen_build_yaml_dirs do diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 5cd1b2c2de4..869ec4ff38e 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -1641,9 +1641,9 @@ "grpc++_test_config" ], "headers": [ - "test/cpp/util/metrics_server.h", - "test/proto/metrics.grpc.pb.h", - "test/proto/metrics.pb.h" + "src/proto/grpc/testing/metrics.grpc.pb.h", + "src/proto/grpc/testing/metrics.pb.h", + "test/cpp/util/metrics_server.h" ], "language": "c++", "name": "metrics_client", @@ -1773,12 +1773,12 @@ "grpc_test_util" ], "headers": [ - "test/proto/empty.grpc.pb.h", - "test/proto/empty.pb.h", - "test/proto/messages.grpc.pb.h", - "test/proto/messages.pb.h", - "test/proto/test.grpc.pb.h", - "test/proto/test.pb.h" + "src/proto/grpc/testing/empty.grpc.pb.h", + "src/proto/grpc/testing/empty.pb.h", + "src/proto/grpc/testing/messages.grpc.pb.h", + "src/proto/grpc/testing/messages.pb.h", + "src/proto/grpc/testing/test.grpc.pb.h", + "src/proto/grpc/testing/test.pb.h" ], "language": "c++", "name": "reconnect_interop_client", @@ -1799,12 +1799,12 @@ "test_tcp_server" ], "headers": [ - "test/proto/empty.grpc.pb.h", - "test/proto/empty.pb.h", - "test/proto/messages.grpc.pb.h", - "test/proto/messages.pb.h", - "test/proto/test.grpc.pb.h", - "test/proto/test.pb.h" + "src/proto/grpc/testing/empty.grpc.pb.h", + "src/proto/grpc/testing/empty.pb.h", + "src/proto/grpc/testing/messages.grpc.pb.h", + "src/proto/grpc/testing/messages.pb.h", + "src/proto/grpc/testing/test.grpc.pb.h", + "src/proto/grpc/testing/test.pb.h" ], "language": "c++", "name": "reconnect_interop_server", @@ -1935,18 +1935,18 @@ "grpc_test_util" ], "headers": [ + "src/proto/grpc/testing/empty.grpc.pb.h", + "src/proto/grpc/testing/empty.pb.h", + "src/proto/grpc/testing/messages.grpc.pb.h", + "src/proto/grpc/testing/messages.pb.h", + "src/proto/grpc/testing/metrics.grpc.pb.h", + "src/proto/grpc/testing/metrics.pb.h", + "src/proto/grpc/testing/test.grpc.pb.h", + "src/proto/grpc/testing/test.pb.h", "test/cpp/interop/client_helper.h", "test/cpp/interop/interop_client.h", "test/cpp/interop/stress_interop_client.h", - "test/cpp/util/metrics_server.h", - "test/proto/empty.grpc.pb.h", - "test/proto/empty.pb.h", - "test/proto/messages.grpc.pb.h", - "test/proto/messages.pb.h", - "test/proto/metrics.grpc.pb.h", - "test/proto/metrics.pb.h", - "test/proto/test.grpc.pb.h", - "test/proto/test.pb.h" + "test/cpp/util/metrics_server.h" ], "language": "c++", "name": "stress_test", @@ -2021,7 +2021,10 @@ "grpc_test_util", "grpc_zookeeper" ], - "headers": [], + "headers": [ + "src/proto/grpc/testing/echo.grpc.pb.h", + "src/proto/grpc/testing/echo.pb.h" + ], "language": "c++", "name": "zookeeper_test", "src": [ @@ -18600,14 +18603,14 @@ "grpc_test_util" ], "headers": [ + "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h", + "src/proto/grpc/testing/duplicate/echo_duplicate.pb.h", + "src/proto/grpc/testing/echo.grpc.pb.h", + "src/proto/grpc/testing/echo.pb.h", + "src/proto/grpc/testing/echo_messages.grpc.pb.h", + "src/proto/grpc/testing/echo_messages.pb.h", "test/cpp/util/cli_call.h", "test/cpp/util/create_test_channel.h", - "test/cpp/util/echo.grpc.pb.h", - "test/cpp/util/echo.pb.h", - "test/cpp/util/echo_duplicate.grpc.pb.h", - "test/cpp/util/echo_duplicate.pb.h", - "test/cpp/util/messages.grpc.pb.h", - "test/cpp/util/messages.pb.h", "test/cpp/util/string_ref_helper.h", "test/cpp/util/subprocess.h" ], @@ -18810,9 +18813,9 @@ "grpc_test_util" ], "headers": [ - "test/cpp/interop/client_helper.h", - "test/proto/messages.grpc.pb.h", - "test/proto/messages.pb.h" + "src/proto/grpc/testing/messages.grpc.pb.h", + "src/proto/grpc/testing/messages.pb.h", + "test/cpp/interop/client_helper.h" ], "language": "c++", "name": "interop_client_helper", @@ -18833,13 +18836,13 @@ "interop_client_helper" ], "headers": [ - "test/cpp/interop/interop_client.h", - "test/proto/empty.grpc.pb.h", - "test/proto/empty.pb.h", - "test/proto/messages.grpc.pb.h", - "test/proto/messages.pb.h", - "test/proto/test.grpc.pb.h", - "test/proto/test.pb.h" + "src/proto/grpc/testing/empty.grpc.pb.h", + "src/proto/grpc/testing/empty.pb.h", + "src/proto/grpc/testing/messages.grpc.pb.h", + "src/proto/grpc/testing/messages.pb.h", + "src/proto/grpc/testing/test.grpc.pb.h", + "src/proto/grpc/testing/test.pb.h", + "test/cpp/interop/interop_client.h" ], "language": "c++", "name": "interop_client_main", @@ -18878,12 +18881,12 @@ "interop_server_helper" ], "headers": [ - "test/proto/empty.grpc.pb.h", - "test/proto/empty.pb.h", - "test/proto/messages.grpc.pb.h", - "test/proto/messages.pb.h", - "test/proto/test.grpc.pb.h", - "test/proto/test.pb.h" + "src/proto/grpc/testing/empty.grpc.pb.h", + "src/proto/grpc/testing/empty.pb.h", + "src/proto/grpc/testing/messages.grpc.pb.h", + "src/proto/grpc/testing/messages.pb.h", + "src/proto/grpc/testing/test.grpc.pb.h", + "src/proto/grpc/testing/test.pb.h" ], "language": "c++", "name": "interop_server_main", @@ -18898,29 +18901,29 @@ "grpc_test_util" ], "headers": [ + "src/proto/grpc/testing/control.grpc.pb.h", + "src/proto/grpc/testing/control.pb.h", + "src/proto/grpc/testing/messages.grpc.pb.h", + "src/proto/grpc/testing/messages.pb.h", + "src/proto/grpc/testing/payloads.grpc.pb.h", + "src/proto/grpc/testing/payloads.pb.h", + "src/proto/grpc/testing/perf_db.grpc.pb.h", + "src/proto/grpc/testing/perf_db.pb.h", + "src/proto/grpc/testing/services.grpc.pb.h", + "src/proto/grpc/testing/services.pb.h", + "src/proto/grpc/testing/stats.grpc.pb.h", + "src/proto/grpc/testing/stats.pb.h", "test/cpp/qps/client.h", "test/cpp/qps/driver.h", "test/cpp/qps/histogram.h", "test/cpp/qps/interarrival.h", - "test/cpp/qps/perf_db.grpc.pb.h", - "test/cpp/qps/perf_db.pb.h", "test/cpp/qps/perf_db_client.h", "test/cpp/qps/qps_worker.h", "test/cpp/qps/report.h", "test/cpp/qps/server.h", "test/cpp/qps/stats.h", "test/cpp/qps/timer.h", - "test/cpp/util/benchmark_config.h", - "test/proto/benchmarks/control.grpc.pb.h", - "test/proto/benchmarks/control.pb.h", - "test/proto/benchmarks/payloads.grpc.pb.h", - "test/proto/benchmarks/payloads.pb.h", - "test/proto/benchmarks/services.grpc.pb.h", - "test/proto/benchmarks/services.pb.h", - "test/proto/benchmarks/stats.grpc.pb.h", - "test/proto/benchmarks/stats.pb.h", - "test/proto/messages.grpc.pb.h", - "test/proto/messages.pb.h" + "test/cpp/util/benchmark_config.h" ], "language": "c++", "name": "qps", diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj index f01f385f84e..a7413d23005 100644 --- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj @@ -143,29 +143,29 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters index 9ad0698c40e..657f81dfa47 100644 --- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters @@ -1,14 +1,14 @@ - - test\cpp\util + + src\proto\grpc\testing - - test\cpp\util + + src\proto\grpc\testing - - test\cpp\util + + src\proto\grpc\testing\duplicate test\cpp\util @@ -39,6 +39,21 @@ + + {21f220cf-c756-4172-000b-e8a1f0888097} + + + {58b0e1e0-f329-64ce-86e5-8f125c02b96e} + + + {f3daac52-2bfd-362e-9a76-04cd7a90aa34} + + + {3df5f11f-e018-1126-8c22-291540035aa8} + + + {4063b792-4f0a-a558-d4b1-0543a2b9fdeb} + {b1aaa210-fe1d-859a-67b3-95a2b286ec99} diff --git a/vsprojects/vcxproj/interop_client_helper/interop_client_helper.vcxproj b/vsprojects/vcxproj/interop_client_helper/interop_client_helper.vcxproj index 436368d16d6..5b6437b2bff 100644 --- a/vsprojects/vcxproj/interop_client_helper/interop_client_helper.vcxproj +++ b/vsprojects/vcxproj/interop_client_helper/interop_client_helper.vcxproj @@ -140,13 +140,13 @@ - + - + - + - + diff --git a/vsprojects/vcxproj/interop_client_helper/interop_client_helper.vcxproj.filters b/vsprojects/vcxproj/interop_client_helper/interop_client_helper.vcxproj.filters index 3296c896e2a..29404b235fd 100644 --- a/vsprojects/vcxproj/interop_client_helper/interop_client_helper.vcxproj.filters +++ b/vsprojects/vcxproj/interop_client_helper/interop_client_helper.vcxproj.filters @@ -1,8 +1,8 @@ - - test\proto + + src\proto\grpc\testing test\cpp\interop @@ -15,6 +15,18 @@ + + {f00fc868-0efd-6675-4891-42af1833c479} + + + {3c09bd5f-4d22-1faf-1a58-32118a5473e6} + + + {0c11c3d3-d0b6-7803-39c4-8521b045464e} + + + {0e888b7f-bacf-f718-56cf-e2db104e2263} + {2164d474-4a93-f014-982c-30ff23cb7ba5} @@ -24,9 +36,6 @@ {d07b9253-17d2-d5cf-0cbb-86223b2591b9} - - {00d5cdb1-193e-96f6-44cf-9a71c61dd117} - diff --git a/vsprojects/vcxproj/interop_client_main/interop_client_main.vcxproj b/vsprojects/vcxproj/interop_client_main/interop_client_main.vcxproj index 705e54c9b01..a152251cd44 100644 --- a/vsprojects/vcxproj/interop_client_main/interop_client_main.vcxproj +++ b/vsprojects/vcxproj/interop_client_main/interop_client_main.vcxproj @@ -140,29 +140,29 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/vsprojects/vcxproj/interop_client_main/interop_client_main.vcxproj.filters b/vsprojects/vcxproj/interop_client_main/interop_client_main.vcxproj.filters index 7fe201f7bff..308e67eab6d 100644 --- a/vsprojects/vcxproj/interop_client_main/interop_client_main.vcxproj.filters +++ b/vsprojects/vcxproj/interop_client_main/interop_client_main.vcxproj.filters @@ -1,14 +1,14 @@ - - test\proto + + src\proto\grpc\testing - - test\proto + + src\proto\grpc\testing - - test\proto + + src\proto\grpc\testing test\cpp\interop @@ -24,6 +24,18 @@ + + {14f6df92-cbdd-4e46-2357-47b6ad60530a} + + + {5c42148f-df9d-b35f-748d-30c00eb3be96} + + + {049f0174-42f7-6e52-a411-146353ad7e89} + + + {02f16533-e225-b418-f5b0-d118ad8534ad} + {bd02b37c-f3ec-86c0-0511-d2e1feeae251} @@ -33,9 +45,6 @@ {7b56f732-09fc-3a65-4d2e-bcdd9ce4309d} - - {243fbb01-7396-5edc-5680-2aed26221188} - diff --git a/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj b/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj index 3f8f4d61aac..9bb3650aa79 100644 --- a/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj +++ b/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj @@ -137,29 +137,29 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters b/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters index 93d8bf2b4a5..eda2c7dbcac 100644 --- a/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters +++ b/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters @@ -1,14 +1,14 @@ - - test\proto + + src\proto\grpc\testing - - test\proto + + src\proto\grpc\testing - - test\proto + + src\proto\grpc\testing test\cpp\interop @@ -16,6 +16,18 @@ + + {9dfb04b3-9e58-7efb-70a2-b02ec8c5e83e} + + + {ebd8177f-6130-a4fb-1c41-d894f801e3b9} + + + {1df1acf2-4654-4530-10af-912381c69012} + + + {ba56d830-1546-c07f-f5ee-03164e41914e} + {02523054-816a-75a0-b24b-f527e99c7142} @@ -25,9 +37,6 @@ {ca4121b0-3c58-ad24-318c-1d1684152ce1} - - {0d66af43-d873-cae8-4c0c-f953772dfc11} - diff --git a/vsprojects/vcxproj/qps/qps.vcxproj b/vsprojects/vcxproj/qps/qps.vcxproj index 549a3032926..f175efae5fc 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj +++ b/vsprojects/vcxproj/qps/qps.vcxproj @@ -150,53 +150,53 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/vsprojects/vcxproj/qps/qps.vcxproj.filters b/vsprojects/vcxproj/qps/qps.vcxproj.filters index afa71953164..1e416ba4e6b 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj.filters +++ b/vsprojects/vcxproj/qps/qps.vcxproj.filters @@ -1,23 +1,23 @@ - - test\proto + + src\proto\grpc\testing - - test\proto\benchmarks + + src\proto\grpc\testing - - test\proto\benchmarks + + src\proto\grpc\testing - - test\proto\benchmarks + + src\proto\grpc\testing - - test\proto\benchmarks + + src\proto\grpc\testing - - test\cpp\qps + + src\proto\grpc\testing test\cpp\qps @@ -87,6 +87,18 @@ + + {0a68b7ce-1b1a-8927-e173-5e8d7ebecf8a} + + + {7e654fb3-2440-c5ad-9cc1-c6c425cd91bd} + + + {d95c9d8c-ad29-576f-c974-aafa292a361e} + + + {0878a4bc-7ae5-7cad-e2e1-3a91cc0e7b59} + {2d898a55-573b-f256-2336-bddd04eb7c70} @@ -99,12 +111,6 @@ {9042d134-6d5a-a907-799e-01768a475055} - - {44e63a33-67f4-0575-e87a-711a7c9111e2} - - - {4180a094-39b4-e46c-1576-940bfe87d284} - diff --git a/vsprojects/vcxproj/test/metrics_client/metrics_client.vcxproj b/vsprojects/vcxproj/test/metrics_client/metrics_client.vcxproj index 8128756b5a2..10a094af714 100644 --- a/vsprojects/vcxproj/test/metrics_client/metrics_client.vcxproj +++ b/vsprojects/vcxproj/test/metrics_client/metrics_client.vcxproj @@ -151,13 +151,13 @@ - + - + - + - + diff --git a/vsprojects/vcxproj/test/metrics_client/metrics_client.vcxproj.filters b/vsprojects/vcxproj/test/metrics_client/metrics_client.vcxproj.filters index 73aaaa22c8f..dd19aad90f9 100644 --- a/vsprojects/vcxproj/test/metrics_client/metrics_client.vcxproj.filters +++ b/vsprojects/vcxproj/test/metrics_client/metrics_client.vcxproj.filters @@ -1,8 +1,8 @@ - - test\proto + + src\proto\grpc\testing test\cpp\interop @@ -15,6 +15,18 @@ + + {2f2185a6-32fc-013a-9860-d623721af645} + + + {bf59f117-18fd-cc4b-b073-1a6c11dcbbbd} + + + {a2d30ba0-0eec-29c7-9257-d55e8456eca3} + + + {47a85da2-170b-d623-a6c9-d3b4eaab5302} + {2c00b6b1-865c-55b2-0d9d-8d7b42ad7d03} @@ -27,9 +39,6 @@ {16f4e45d-a509-3e4d-4a19-9383576bec54} - - {c638ed75-9aa0-ccc3-a8d2-a1a6203977b1} - diff --git a/vsprojects/vcxproj/test/reconnect_interop_client/reconnect_interop_client.vcxproj b/vsprojects/vcxproj/test/reconnect_interop_client/reconnect_interop_client.vcxproj index 67d2ee0a0a4..001d3dba1d2 100644 --- a/vsprojects/vcxproj/test/reconnect_interop_client/reconnect_interop_client.vcxproj +++ b/vsprojects/vcxproj/test/reconnect_interop_client/reconnect_interop_client.vcxproj @@ -148,29 +148,29 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/vsprojects/vcxproj/test/reconnect_interop_client/reconnect_interop_client.vcxproj.filters b/vsprojects/vcxproj/test/reconnect_interop_client/reconnect_interop_client.vcxproj.filters index 344336c7046..94883c994f6 100644 --- a/vsprojects/vcxproj/test/reconnect_interop_client/reconnect_interop_client.vcxproj.filters +++ b/vsprojects/vcxproj/test/reconnect_interop_client/reconnect_interop_client.vcxproj.filters @@ -1,14 +1,14 @@ - - test\proto + + src\proto\grpc\testing - - test\proto + + src\proto\grpc\testing - - test\proto + + src\proto\grpc\testing test\cpp\interop @@ -16,6 +16,18 @@ + + {64f2b493-09f7-d7cb-f9e8-3c9340ed52b8} + + + {8adcf7eb-7c61-b465-3f50-24b72334ca70} + + + {8fc32b7e-6688-0959-39ef-ee82ef4629a3} + + + {db662faa-152b-3329-6672-553f842cc34e} + {9d06cc54-0814-e593-dea7-231f4cdd7839} @@ -25,9 +37,6 @@ {d2772815-610b-8123-ce83-d383ae42c5f5} - - {eb4ab688-fa6a-9b22-49d2-4c1d71522ef9} - diff --git a/vsprojects/vcxproj/test/reconnect_interop_server/reconnect_interop_server.vcxproj b/vsprojects/vcxproj/test/reconnect_interop_server/reconnect_interop_server.vcxproj index 7897d2b68f3..06e7f2b3099 100644 --- a/vsprojects/vcxproj/test/reconnect_interop_server/reconnect_interop_server.vcxproj +++ b/vsprojects/vcxproj/test/reconnect_interop_server/reconnect_interop_server.vcxproj @@ -148,29 +148,29 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/vsprojects/vcxproj/test/reconnect_interop_server/reconnect_interop_server.vcxproj.filters b/vsprojects/vcxproj/test/reconnect_interop_server/reconnect_interop_server.vcxproj.filters index ad7529ee214..16c70ff7bca 100644 --- a/vsprojects/vcxproj/test/reconnect_interop_server/reconnect_interop_server.vcxproj.filters +++ b/vsprojects/vcxproj/test/reconnect_interop_server/reconnect_interop_server.vcxproj.filters @@ -1,14 +1,14 @@ - - test\proto + + src\proto\grpc\testing - - test\proto + + src\proto\grpc\testing - - test\proto + + src\proto\grpc\testing test\cpp\interop @@ -16,6 +16,18 @@ + + {1fcb325d-f87d-6a3a-7966-dd085866559b} + + + {a0dd749f-006f-e766-3363-ddc21ddc7137} + + + {04d54dc7-4657-c6c1-48f3-17de7d737f13} + + + {12b2970d-42e0-b3ea-96e3-7ba58adcbc30} + {3b344672-cac7-682c-aa96-4c737cdbd4c9} @@ -25,9 +37,6 @@ {058c3798-9fdd-84e5-9ce8-71184a49e468} - - {4f3bfec8-02f3-5a7b-c235-2b0f937d0394} - diff --git a/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj b/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj index 16d2e550fee..9ada06042dc 100644 --- a/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj +++ b/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj @@ -154,37 +154,37 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj.filters b/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj.filters index b20bd35723a..a61fd224aa4 100644 --- a/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj.filters +++ b/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj.filters @@ -1,17 +1,17 @@ - - test\proto + + src\proto\grpc\testing - - test\proto + + src\proto\grpc\testing - - test\proto + + src\proto\grpc\testing - - test\proto + + src\proto\grpc\testing test\cpp\interop @@ -42,6 +42,18 @@ + + {2240848e-b50a-4076-464a-786310b2d6be} + + + {aaad45c2-b399-83f4-5950-6d90d3ee1c32} + + + {1a3222d0-0e47-792c-188e-207fcd8286c5} + + + {7f2f0ad6-9e60-abd3-c178-d82a346be435} + {0fddcdfd-8fd7-bb4b-e21d-f53728f4a766} @@ -54,9 +66,6 @@ {e4704307-621e-0e9c-08c2-3c698c1b827f} - - {7172a335-47bf-8284-380d-a28a05c07311} - From dacb38990735e0aacbb5a52cec840f72748314e9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 17 Dec 2015 19:31:00 -0800 Subject: [PATCH 03/28] Fix method name --- test/cpp/util/cli_call_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cpp/util/cli_call_test.cc b/test/cpp/util/cli_call_test.cc index 2e223ec57ee..94f54616a9c 100644 --- a/test/cpp/util/cli_call_test.cc +++ b/test/cpp/util/cli_call_test.cc @@ -115,7 +115,7 @@ TEST_F(CliCallTest, SimpleRpc) { EXPECT_EQ(response.message(), request.message()); EXPECT_TRUE(s.ok()); - const grpc::string kMethod("/grpc.cpp.test.util.TestService/Echo"); + const grpc::string kMethod("/grpc.testing.TestService/Echo"); grpc::string request_bin, response_bin, expected_response_bin; EXPECT_TRUE(request.SerializeToString(&request_bin)); EXPECT_TRUE(response.SerializeToString(&expected_response_bin)); From 320bee0e623f4d7cf7568db60bdcdd93a7556bed Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 6 Jan 2016 17:33:45 -0800 Subject: [PATCH 04/28] Review feedback --- src/core/client_config/lb_policies/pick_first.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/client_config/lb_policies/pick_first.c b/src/core/client_config/lb_policies/pick_first.c index 620b83d195f..9beaeba2b49 100644 --- a/src/core/client_config/lb_policies/pick_first.c +++ b/src/core/client_config/lb_policies/pick_first.c @@ -55,10 +55,11 @@ typedef struct { grpc_closure connectivity_changed; - /** mutex protecting remaining members */ - gpr_mu mu; /** the selected channel (a grpc_connected_subchannel) */ gpr_atm selected; + + /** mutex protecting remaining members */ + gpr_mu mu; /** have we started picking? */ int started_picking; /** are we shut down? */ @@ -174,11 +175,15 @@ int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, grpc_pollset *pollset, grpc_connected_subchannel **target, grpc_closure *on_complete) { pick_first_lb_policy *p = (pick_first_lb_policy *)pol; pending_pick *pp; + + /* Check atomically for a selected channel */ grpc_connected_subchannel *selected = GET_SELECTED(p); if (selected != NULL) { *target = selected; return 1; } + + /* No subchannel selected yet, so acquire lock and then attempt again */ gpr_mu_lock(&p->mu); selected = GET_SELECTED(p); if (selected) { From d27c78db0936d44599acbcd701f7a3159dec3fcd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 7 Jan 2016 07:11:20 -0800 Subject: [PATCH 05/28] Fix Makefile --- Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Makefile b/Makefile index c0d251797dd..4ef14b1b3ba 100644 --- a/Makefile +++ b/Makefile @@ -11653,6 +11653,7 @@ $(BINDIR)/$(CONFIG)/h2_census_test: $(H2_CENSUS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/l endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_census.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_census_test: $(H2_CENSUS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -11684,6 +11685,7 @@ $(BINDIR)/$(CONFIG)/h2_compress_test: $(H2_COMPRESS_TEST_OBJS) $(LIBDIR)/$(CONFI endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_compress.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_compress_test: $(H2_COMPRESS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -11715,6 +11717,7 @@ $(BINDIR)/$(CONFIG)/h2_fakesec_test: $(H2_FAKESEC_TEST_OBJS) $(LIBDIR)/$(CONFIG) endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_fakesec.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_fakesec_test: $(H2_FAKESEC_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -11746,6 +11749,7 @@ $(BINDIR)/$(CONFIG)/h2_full_test: $(H2_FULL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/liben endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_full_test: $(H2_FULL_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -11777,6 +11781,7 @@ $(BINDIR)/$(CONFIG)/h2_full+pipe_test: $(H2_FULL+PIPE_TEST_OBJS) $(LIBDIR)/$(CON endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+pipe.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_full+pipe_test: $(H2_FULL+PIPE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -11808,6 +11813,7 @@ $(BINDIR)/$(CONFIG)/h2_full+poll_test: $(H2_FULL+POLL_TEST_OBJS) $(LIBDIR)/$(CON endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_full+poll_test: $(H2_FULL+POLL_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -11839,6 +11845,7 @@ $(BINDIR)/$(CONFIG)/h2_full+poll+pipe_test: $(H2_FULL+POLL+PIPE_TEST_OBJS) $(LIB endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+poll+pipe.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_full+poll+pipe_test: $(H2_FULL+POLL+PIPE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -11870,6 +11877,7 @@ $(BINDIR)/$(CONFIG)/h2_oauth2_test: $(H2_OAUTH2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/l endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_oauth2.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_oauth2_test: $(H2_OAUTH2_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -11901,6 +11909,7 @@ $(BINDIR)/$(CONFIG)/h2_proxy_test: $(H2_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/lib endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_proxy.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_proxy_test: $(H2_PROXY_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -11932,6 +11941,7 @@ $(BINDIR)/$(CONFIG)/h2_sockpair_test: $(H2_SOCKPAIR_TEST_OBJS) $(LIBDIR)/$(CONFI endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_sockpair_test: $(H2_SOCKPAIR_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -11963,6 +11973,7 @@ $(BINDIR)/$(CONFIG)/h2_sockpair+trace_test: $(H2_SOCKPAIR+TRACE_TEST_OBJS) $(LIB endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair+trace.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_sockpair+trace_test: $(H2_SOCKPAIR+TRACE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -11994,6 +12005,7 @@ $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_test: $(H2_SOCKPAIR_1BYTE_TEST_OBJS) $(LIB endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair_1byte.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_sockpair_1byte_test: $(H2_SOCKPAIR_1BYTE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -12025,6 +12037,7 @@ $(BINDIR)/$(CONFIG)/h2_ssl_test: $(H2_SSL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2 endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_ssl.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_ssl_test: $(H2_SSL_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -12056,6 +12069,7 @@ $(BINDIR)/$(CONFIG)/h2_ssl+poll_test: $(H2_SSL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFI endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_ssl+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_ssl+poll_test: $(H2_SSL+POLL_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -12087,6 +12101,7 @@ $(BINDIR)/$(CONFIG)/h2_ssl_proxy_test: $(H2_SSL_PROXY_TEST_OBJS) $(LIBDIR)/$(CON endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_ssl_proxy.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_ssl_proxy_test: $(H2_SSL_PROXY_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -12118,6 +12133,7 @@ $(BINDIR)/$(CONFIG)/h2_uchannel_test: $(H2_UCHANNEL_TEST_OBJS) $(LIBDIR)/$(CONFI endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uchannel.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_uchannel_test: $(H2_UCHANNEL_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -12149,6 +12165,7 @@ $(BINDIR)/$(CONFIG)/h2_uds_test: $(H2_UDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2 endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uds.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_uds_test: $(H2_UDS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -12180,6 +12197,7 @@ $(BINDIR)/$(CONFIG)/h2_uds+poll_test: $(H2_UDS+POLL_TEST_OBJS) $(LIBDIR)/$(CONFI endif $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uds+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_uds+poll_test: $(H2_UDS+POLL_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -12201,6 +12219,7 @@ $(BINDIR)/$(CONFIG)/h2_census_nosec_test: $(H2_CENSUS_NOSEC_TEST_OBJS) $(LIBDIR) $(Q) $(LD) $(LDFLAGS) $(H2_CENSUS_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_census_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_census.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_census_nosec_test: $(H2_CENSUS_NOSEC_TEST_OBJS:.o=.dep) ifneq ($(NO_DEPS),true) @@ -12220,6 +12239,7 @@ $(BINDIR)/$(CONFIG)/h2_compress_nosec_test: $(H2_COMPRESS_NOSEC_TEST_OBJS) $(LIB $(Q) $(LD) $(LDFLAGS) $(H2_COMPRESS_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_compress_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_compress.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_compress_nosec_test: $(H2_COMPRESS_NOSEC_TEST_OBJS:.o=.dep) ifneq ($(NO_DEPS),true) @@ -12239,6 +12259,7 @@ $(BINDIR)/$(CONFIG)/h2_full_nosec_test: $(H2_FULL_NOSEC_TEST_OBJS) $(LIBDIR)/$(C $(Q) $(LD) $(LDFLAGS) $(H2_FULL_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_full_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_full_nosec_test: $(H2_FULL_NOSEC_TEST_OBJS:.o=.dep) ifneq ($(NO_DEPS),true) @@ -12258,6 +12279,7 @@ $(BINDIR)/$(CONFIG)/h2_full+pipe_nosec_test: $(H2_FULL+PIPE_NOSEC_TEST_OBJS) $(L $(Q) $(LD) $(LDFLAGS) $(H2_FULL+PIPE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_full+pipe_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+pipe.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_full+pipe_nosec_test: $(H2_FULL+PIPE_NOSEC_TEST_OBJS:.o=.dep) ifneq ($(NO_DEPS),true) @@ -12277,6 +12299,7 @@ $(BINDIR)/$(CONFIG)/h2_full+poll_nosec_test: $(H2_FULL+POLL_NOSEC_TEST_OBJS) $(L $(Q) $(LD) $(LDFLAGS) $(H2_FULL+POLL_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_full+poll_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_full+poll_nosec_test: $(H2_FULL+POLL_NOSEC_TEST_OBJS:.o=.dep) ifneq ($(NO_DEPS),true) @@ -12296,6 +12319,7 @@ $(BINDIR)/$(CONFIG)/h2_full+poll+pipe_nosec_test: $(H2_FULL+POLL+PIPE_NOSEC_TEST $(Q) $(LD) $(LDFLAGS) $(H2_FULL+POLL+PIPE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_full+poll+pipe_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+poll+pipe.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_full+poll+pipe_nosec_test: $(H2_FULL+POLL+PIPE_NOSEC_TEST_OBJS:.o=.dep) ifneq ($(NO_DEPS),true) @@ -12315,6 +12339,7 @@ $(BINDIR)/$(CONFIG)/h2_proxy_nosec_test: $(H2_PROXY_NOSEC_TEST_OBJS) $(LIBDIR)/$ $(Q) $(LD) $(LDFLAGS) $(H2_PROXY_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_proxy_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_proxy.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_proxy_nosec_test: $(H2_PROXY_NOSEC_TEST_OBJS:.o=.dep) ifneq ($(NO_DEPS),true) @@ -12334,6 +12359,7 @@ $(BINDIR)/$(CONFIG)/h2_sockpair_nosec_test: $(H2_SOCKPAIR_NOSEC_TEST_OBJS) $(LIB $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_sockpair_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_sockpair_nosec_test: $(H2_SOCKPAIR_NOSEC_TEST_OBJS:.o=.dep) ifneq ($(NO_DEPS),true) @@ -12353,6 +12379,7 @@ $(BINDIR)/$(CONFIG)/h2_sockpair+trace_nosec_test: $(H2_SOCKPAIR+TRACE_NOSEC_TEST $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR+TRACE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_sockpair+trace_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair+trace.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_sockpair+trace_nosec_test: $(H2_SOCKPAIR+TRACE_NOSEC_TEST_OBJS:.o=.dep) ifneq ($(NO_DEPS),true) @@ -12372,6 +12399,7 @@ $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_nosec_test: $(H2_SOCKPAIR_1BYTE_NOSEC_TEST $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR_1BYTE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair_1byte.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_sockpair_1byte_nosec_test: $(H2_SOCKPAIR_1BYTE_NOSEC_TEST_OBJS:.o=.dep) ifneq ($(NO_DEPS),true) @@ -12391,6 +12419,7 @@ $(BINDIR)/$(CONFIG)/h2_uchannel_nosec_test: $(H2_UCHANNEL_NOSEC_TEST_OBJS) $(LIB $(Q) $(LD) $(LDFLAGS) $(H2_UCHANNEL_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_uchannel_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uchannel.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_uchannel_nosec_test: $(H2_UCHANNEL_NOSEC_TEST_OBJS:.o=.dep) ifneq ($(NO_DEPS),true) @@ -12410,6 +12439,7 @@ $(BINDIR)/$(CONFIG)/h2_uds_nosec_test: $(H2_UDS_NOSEC_TEST_OBJS) $(LIBDIR)/$(CON $(Q) $(LD) $(LDFLAGS) $(H2_UDS_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_uds_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uds.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_uds_nosec_test: $(H2_UDS_NOSEC_TEST_OBJS:.o=.dep) ifneq ($(NO_DEPS),true) @@ -12429,6 +12459,7 @@ $(BINDIR)/$(CONFIG)/h2_uds+poll_nosec_test: $(H2_UDS+POLL_NOSEC_TEST_OBJS) $(LIB $(Q) $(LD) $(LDFLAGS) $(H2_UDS+POLL_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_uds+poll_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uds+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_h2_uds+poll_nosec_test: $(H2_UDS+POLL_NOSEC_TEST_OBJS:.o=.dep) ifneq ($(NO_DEPS),true) From 093193edb785aee0ae90a604b4fae876b8a626b0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 7 Jan 2016 07:14:44 -0800 Subject: [PATCH 06/28] Fix pings --- src/core/client_config/lb_policies/pick_first.c | 7 +++---- templates/test/core/end2end/end2end_defs.include | 2 +- test/core/end2end/end2end_nosec_tests.c | 2 +- test/core/end2end/end2end_tests.c | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/core/client_config/lb_policies/pick_first.c b/src/core/client_config/lb_policies/pick_first.c index 9beaeba2b49..4a90b070026 100644 --- a/src/core/client_config/lb_policies/pick_first.c +++ b/src/core/client_config/lb_policies/pick_first.c @@ -368,13 +368,12 @@ void pf_notify_on_state_change(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, void pf_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, grpc_closure *closure) { pick_first_lb_policy *p = (pick_first_lb_policy *)pol; - gpr_mu_lock(&p->mu); - if (p->selected) { - grpc_connected_subchannel_ping(exec_ctx, p->selected, closure); + grpc_connected_subchannel *selected = GET_SELECTED(p); + if (selected) { + grpc_connected_subchannel_ping(exec_ctx, selected, closure); } else { grpc_exec_ctx_enqueue(exec_ctx, closure, 0); } - gpr_mu_unlock(&p->mu); } static const grpc_lb_policy_vtable pick_first_lb_policy_vtable = { diff --git a/templates/test/core/end2end/end2end_defs.include b/templates/test/core/end2end/end2end_defs.include index e95bd4a8b62..18a33b7d329 100644 --- a/templates/test/core/end2end/end2end_defs.include +++ b/templates/test/core/end2end/end2end_defs.include @@ -61,7 +61,7 @@ void grpc_end2end_tests(int argc, char **argv, continue; } % endfor - gpr_log(GPR_DEBUG, "not a test: '%%s'", argv[i]); + gpr_log(GPR_DEBUG, "not a test: '%s'", argv[i]); abort(); } } \ No newline at end of file diff --git a/test/core/end2end/end2end_nosec_tests.c b/test/core/end2end/end2end_nosec_tests.c index c0bea7bb365..e1974a7d658 100644 --- a/test/core/end2end/end2end_nosec_tests.c +++ b/test/core/end2end/end2end_nosec_tests.c @@ -259,7 +259,7 @@ void grpc_end2end_tests(int argc, char **argv, trailing_metadata(config); continue; } - gpr_log(GPR_DEBUG, "not a test: '%%s'", argv[i]); + gpr_log(GPR_DEBUG, "not a test: '%s'", argv[i]); abort(); } } diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c index 4c3a018ad2d..271b81efeb0 100644 --- a/test/core/end2end/end2end_tests.c +++ b/test/core/end2end/end2end_tests.c @@ -265,7 +265,7 @@ void grpc_end2end_tests(int argc, char **argv, trailing_metadata(config); continue; } - gpr_log(GPR_DEBUG, "not a test: '%%s'", argv[i]); + gpr_log(GPR_DEBUG, "not a test: '%s'", argv[i]); abort(); } } From 116982ea89e85c046fbc3a48b8829e3c4d4a5c1a Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Fri, 11 Dec 2015 15:53:38 -0800 Subject: [PATCH 07/28] Include core in Python distribution --- .gitignore | 9 +- MANIFEST.in | 8 + build.yaml | 4 + .../requirements.txt => requirements.txt | 0 src/python/grpcio/setup.cfg => setup.cfg | 0 src/python/grpcio/setup.py => setup.py | 42 ++-- src/python/grpcio/MANIFEST.in | 4 - src/python/grpcio/commands.py | 8 +- .../_cygrpc/{call.pxd => call.pxd.pxi} | 4 +- .../_cygrpc/{call.pyx => call.pyx.pxi} | 30 +-- .../_cygrpc/{channel.pxd => channel.pxd.pxi} | 4 +- .../_cygrpc/{channel.pyx => channel.pyx.pxi} | 44 ++-- ...ion_queue.pxd => completion_queue.pxd.pxi} | 6 +- ...ion_queue.pyx => completion_queue.pyx.pxi} | 56 ++--- .../{credentials.pxd => credentials.pxd.pxi} | 21 +- .../{credentials.pyx => credentials.pyx.pxi} | 59 +++-- .../_cython/_cygrpc/{grpc.pxd => grpc.pxi} | 0 .../_cygrpc/{records.pxd => records.pxd.pxi} | 34 ++- .../_cygrpc/{records.pyx => records.pyx.pxi} | 238 +++++++++--------- .../_cygrpc/{server.pxd => server.pxd.pxi} | 7 +- .../_cygrpc/{server.pyx => server.pyx.pxi} | 56 ++--- src/python/grpcio/grpc/_cython/cygrpc.pxd | 8 + src/python/grpcio/grpc/_cython/cygrpc.pyx | 84 +------ src/python/grpcio/grpc_core_dependencies.py | 195 ++++++++++++++ .../tests/unit/_cython/test_utilities.py | 2 +- src/python/grpcio/tox.ini | 19 -- .../grpcio/grpc_core_dependencies.py.template | 13 + .../plugins/transitive_dependencies.py | 6 +- tools/distrib/python/submit.py | 2 +- tools/jenkins/grpc_interop_python/Dockerfile | 1 + .../grpc_interop_python/build_interop.sh | 2 +- tools/run_tests/build_python.sh | 6 +- tools/run_tests/run_interop_tests.py | 8 +- tools/run_tests/run_python.sh | 6 +- tox.ini | 17 ++ 35 files changed, 563 insertions(+), 440 deletions(-) create mode 100644 MANIFEST.in rename src/python/grpcio/requirements.txt => requirements.txt (100%) rename src/python/grpcio/setup.cfg => setup.cfg (100%) rename src/python/grpcio/setup.py => setup.py (85%) delete mode 100644 src/python/grpcio/MANIFEST.in rename src/python/grpcio/grpc/_cython/_cygrpc/{call.pxd => call.pxd.pxi} (95%) rename src/python/grpcio/grpc/_cython/_cygrpc/{call.pyx => call.pyx.pxi} (77%) rename src/python/grpcio/grpc/_cython/_cygrpc/{channel.pxd => channel.pxd.pxi} (95%) rename src/python/grpcio/grpc/_cython/_cygrpc/{channel.pyx => channel.pyx.pxi} (72%) rename src/python/grpcio/grpc/_cython/_cygrpc/{completion_queue.pxd => completion_queue.pxd.pxi} (91%) rename src/python/grpcio/grpc/_cython/_cygrpc/{completion_queue.pyx => completion_queue.pyx.pxi} (77%) rename src/python/grpcio/grpc/_cython/_cygrpc/{credentials.pxd => credentials.pxd.pxi} (76%) rename src/python/grpcio/grpc/_cython/_cygrpc/{credentials.pyx => credentials.pyx.pxi} (83%) rename src/python/grpcio/grpc/_cython/_cygrpc/{grpc.pxd => grpc.pxi} (100%) rename src/python/grpcio/grpc/_cython/_cygrpc/{records.pxd => records.pxd.pxi} (80%) rename src/python/grpcio/grpc/_cython/_cygrpc/{records.pyx => records.pyx.pxi} (70%) rename src/python/grpcio/grpc/_cython/_cygrpc/{server.pxd => server.pxd.pxi} (90%) rename src/python/grpcio/grpc/_cython/_cygrpc/{server.pyx => server.pyx.pxi} (75%) create mode 100644 src/python/grpcio/grpc/_cython/cygrpc.pxd create mode 100644 src/python/grpcio/grpc_core_dependencies.py delete mode 100644 src/python/grpcio/tox.ini create mode 100644 templates/src/python/grpcio/grpc_core_dependencies.py.template create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index f059eca2393..471649d7a04 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,13 @@ gens libs objs -# Python virtual environments -python*_virtual_environment +# Python items +.coverage* +.eggs +.tox +htmlcov/ +dist/ +*.egg # gcov coverage data reports diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000000..5b4ab04207a --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,8 @@ +graft src/python/grpcio/grpc +graft src/python/grpcio/tests +graft src/core +graft include/grpc +include src/python/grpcio/commands.py +include src/python/grpcio/grpc_core_dependencies.py +include src/python/grpcio/README.rst +include requirements.txt diff --git a/build.yaml b/build.yaml index 51d417ed0e2..4abef736d77 100644 --- a/build.yaml +++ b/build.yaml @@ -2474,3 +2474,7 @@ node_modules: - src/node/ext/server.cc - src/node/ext/server_credentials.cc - src/node/ext/timeval.cc +python_dependencies: + deps: + - grpc + - gpr diff --git a/src/python/grpcio/requirements.txt b/requirements.txt similarity index 100% rename from src/python/grpcio/requirements.txt rename to requirements.txt diff --git a/src/python/grpcio/setup.cfg b/setup.cfg similarity index 100% rename from src/python/grpcio/setup.cfg rename to setup.cfg diff --git a/src/python/grpcio/setup.py b/setup.py similarity index 85% rename from src/python/grpcio/setup.py rename to setup.py index 366ebe3b3fb..e0b0bf7622d 100644 --- a/src/python/grpcio/setup.py +++ b/setup.py @@ -37,11 +37,16 @@ from distutils import core as _core from distutils import extension as _extension import setuptools +PYTHON_STEM = './src/python/grpcio/' +CORE_INCLUDE = ('./include', './',) + # Ensure we're in the proper directory whether or not we're being used by pip. os.chdir(os.path.dirname(os.path.abspath(__file__))) +sys.path.insert(0, PYTHON_STEM) -# Break import-style to ensure we can actually find our commands module. +# Break import-style to ensure we can actually find our in-repo dependencies. import commands +import grpc_core_dependencies # Environment variable to determine whether or not the Cython extension should # *use* Cython or use the generated C files. Note that this requires the C files @@ -59,23 +64,13 @@ INSTALL_TESTS = os.environ.get('GRPC_PYTHON_INSTALL_TESTS', False) CYTHON_EXTENSION_PACKAGE_NAMES = () -CYTHON_EXTENSION_MODULE_NAMES = ( - 'grpc._cython.cygrpc', - 'grpc._cython._cygrpc.call', - 'grpc._cython._cygrpc.channel', - 'grpc._cython._cygrpc.completion_queue', - 'grpc._cython._cygrpc.credentials', - 'grpc._cython._cygrpc.records', - 'grpc._cython._cygrpc.server', -) +CYTHON_EXTENSION_MODULE_NAMES = ('grpc._cython.cygrpc',) -EXTENSION_INCLUDE_DIRECTORIES = ( - '.', -) +EXTENSION_INCLUDE_DIRECTORIES = (PYTHON_STEM,) + CORE_INCLUDE EXTENSION_LIBRARIES = ( - 'grpc', - 'gpr', + 'ssl', + 'crypto', ) if not "darwin" in sys.platform: EXTENSION_LIBRARIES += ('rt',) @@ -84,11 +79,13 @@ if not "darwin" in sys.platform: def cython_extensions(package_names, module_names, include_dirs, libraries, build_with_cython=False): file_extension = 'pyx' if build_with_cython else 'c' - module_files = [name.replace('.', '/') + '.' + file_extension + module_files = [os.path.join(PYTHON_STEM, + name.replace('.', '/') + '.' + file_extension) for name in module_names] extensions = [ _extension.Extension( - name=module_name, sources=[module_file], + name=module_name, + sources=[module_file] + grpc_core_dependencies.CORE_SOURCE_FILES, include_dirs=include_dirs, libraries=libraries, define_macros=[('CYTHON_TRACE_NOGIL', 1)] if ENABLE_CYTHON_TRACING else [] ) for (module_name, module_file) in zip(module_names, module_files) @@ -97,6 +94,7 @@ def cython_extensions(package_names, module_names, include_dirs, libraries, import Cython.Build return Cython.Build.cythonize( extensions, + include_path=include_dirs, compiler_directives={'linetrace': bool(ENABLE_CYTHON_TRACING)}) else: return extensions @@ -107,7 +105,7 @@ CYTHON_EXTENSION_MODULES = cython_extensions( bool(BUILD_WITH_CYTHON)) PACKAGE_DIRECTORIES = { - '': '.', + '': PYTHON_STEM, } INSTALL_REQUIRES = ( @@ -157,16 +155,18 @@ TEST_RUNNER = 'tests:Runner' PACKAGE_DATA = {} if INSTALL_TESTS: PACKAGE_DATA = dict(PACKAGE_DATA, **TEST_PACKAGE_DATA) - PACKAGES = setuptools.find_packages('.') + PACKAGES = setuptools.find_packages(PYTHON_STEM) else: - PACKAGES = setuptools.find_packages('.', exclude=['tests', 'tests.*']) + PACKAGES = setuptools.find_packages( + PYTHON_STEM, exclude=['tests', 'tests.*']) setuptools.setup( name='grpcio', - version='0.12.0b0', + version='0.12.0b1', ext_modules=CYTHON_EXTENSION_MODULES, packages=list(PACKAGES), package_dir=PACKAGE_DIRECTORIES, + package_data=PACKAGE_DATA, install_requires=INSTALL_REQUIRES, setup_requires=SETUP_REQUIRES, cmdclass=COMMAND_CLASS, diff --git a/src/python/grpcio/MANIFEST.in b/src/python/grpcio/MANIFEST.in deleted file mode 100644 index 407eeabc179..00000000000 --- a/src/python/grpcio/MANIFEST.in +++ /dev/null @@ -1,4 +0,0 @@ -graft grpc -graft tests -include commands.py -include requirements.txt diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index d9fd023b214..7450e5b455e 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -40,6 +40,8 @@ import setuptools from setuptools.command import build_py from setuptools.command import test +PYTHON_STEM = os.path.dirname(os.path.abspath(__file__)) + CONF_PY_ADDENDUM = """ extensions.append('sphinx.ext.napoleon') napoleon_google_docstring = True @@ -68,7 +70,7 @@ class SphinxDocumentation(setuptools.Command): import sphinx.apidoc metadata = self.distribution.metadata src_dir = os.path.join( - os.getcwd(), self.distribution.package_dir[''], 'grpc') + PYTHON_STEM, self.distribution.package_dir[''], 'grpc') sys.path.append(src_dir) sphinx.apidoc.main([ '', '--force', '--full', '-H', metadata.name, '-A', metadata.author, @@ -104,7 +106,7 @@ class BuildProtoModules(setuptools.Command): include_regex = re.compile(self.include) exclude_regex = re.compile(self.exclude) if self.exclude else None paths = [] - root_directory = os.getcwd() + root_directory = PYTHON_STEM for walk_root, directories, filenames in os.walk(root_directory): for filename in filenames: path = os.path.join(walk_root, filename) @@ -140,7 +142,7 @@ class BuildProjectMetadata(setuptools.Command): pass def run(self): - with open('grpc/_grpcio_metadata.py', 'w') as module_file: + with open(os.path.join(PYTHON_STEM, 'grpc/_grpcio_metadata.py'), 'w') as module_file: module_file.write('__version__ = """{}"""'.format( self.distribution.get_version())) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/call.pxd b/src/python/grpcio/grpc/_cython/_cygrpc/call.pxd.pxi similarity index 95% rename from src/python/grpcio/grpc/_cython/_cygrpc/call.pxd rename to src/python/grpcio/grpc/_cython/_cygrpc/call.pxd.pxi index fe9b81e3d3a..6a316746fbd 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/call.pxd +++ b/src/python/grpcio/grpc/_cython/_cygrpc/call.pxd.pxi @@ -27,11 +27,9 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from grpc._cython._cygrpc cimport grpc - cdef class Call: - cdef grpc.grpc_call *c_call + cdef grpc_call *c_call cdef list references diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx b/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi similarity index 77% rename from src/python/grpcio/grpc/_cython/_cygrpc/call.pyx rename to src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi index 1c07f9f4f4c..80f4da51e8c 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx +++ b/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi @@ -29,10 +29,6 @@ cimport cpython -from grpc._cython._cygrpc cimport credentials -from grpc._cython._cygrpc cimport grpc -from grpc._cython._cygrpc cimport records - cdef class Call: @@ -44,24 +40,24 @@ cdef class Call: def start_batch(self, operations, tag): if not self.is_valid: raise ValueError("invalid call object cannot be used from Python") - cdef records.Operations cy_operations = records.Operations(operations) - cdef records.OperationTag operation_tag = records.OperationTag(tag) + cdef Operations cy_operations = Operations(operations) + cdef OperationTag operation_tag = OperationTag(tag) operation_tag.operation_call = self operation_tag.batch_operations = cy_operations cpython.Py_INCREF(operation_tag) - return grpc.grpc_call_start_batch( + return grpc_call_start_batch( self.c_call, cy_operations.c_ops, cy_operations.c_nops, operation_tag, NULL) def cancel( - self, grpc.grpc_status_code error_code=grpc.GRPC_STATUS__DO_NOT_USE, + self, grpc_status_code error_code=GRPC_STATUS__DO_NOT_USE, details=None): if not self.is_valid: raise ValueError("invalid call object cannot be used from Python") - if (details is None) != (error_code == grpc.GRPC_STATUS__DO_NOT_USE): + if (details is None) != (error_code == GRPC_STATUS__DO_NOT_USE): raise ValueError("if error_code is specified, so must details " "(and vice-versa)") - if error_code != grpc.GRPC_STATUS__DO_NOT_USE: + if error_code != GRPC_STATUS__DO_NOT_USE: if isinstance(details, bytes): pass elif isinstance(details, basestring): @@ -69,25 +65,25 @@ cdef class Call: else: raise TypeError("expected details to be str or bytes") self.references.append(details) - return grpc.grpc_call_cancel_with_status( + return grpc_call_cancel_with_status( self.c_call, error_code, details, NULL) else: - return grpc.grpc_call_cancel(self.c_call, NULL) + return grpc_call_cancel(self.c_call, NULL) def set_credentials( - self, credentials.CallCredentials call_credentials not None): - return grpc.grpc_call_set_credentials( + self, CallCredentials call_credentials not None): + return grpc_call_set_credentials( self.c_call, call_credentials.c_credentials) def peer(self): - cdef char *peer = grpc.grpc_call_get_peer(self.c_call) + cdef char *peer = grpc_call_get_peer(self.c_call) result = peer - grpc.gpr_free(peer) + gpr_free(peer) return result def __dealloc__(self): if self.c_call != NULL: - grpc.grpc_call_destroy(self.c_call) + grpc_call_destroy(self.c_call) # The object *should* always be valid from Python. Used for debugging. @property diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pxd b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pxd.pxi similarity index 95% rename from src/python/grpcio/grpc/_cython/_cygrpc/channel.pxd rename to src/python/grpcio/grpc/_cython/_cygrpc/channel.pxd.pxi index 3e341bf2225..70da63db978 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pxd +++ b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pxd.pxi @@ -27,10 +27,8 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from grpc._cython._cygrpc cimport grpc - cdef class Channel: - cdef grpc.grpc_channel *c_channel + cdef grpc_channel *c_channel cdef list references diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi similarity index 72% rename from src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx rename to src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi index a944a83576c..ac67f32d923 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx +++ b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi @@ -29,18 +29,12 @@ cimport cpython -from grpc._cython._cygrpc cimport call -from grpc._cython._cygrpc cimport completion_queue -from grpc._cython._cygrpc cimport credentials -from grpc._cython._cygrpc cimport grpc -from grpc._cython._cygrpc cimport records - cdef class Channel: - def __cinit__(self, target, records.ChannelArgs arguments=None, - credentials.ChannelCredentials channel_credentials=None): - cdef grpc.grpc_channel_args *c_arguments = NULL + def __cinit__(self, target, ChannelArgs arguments=None, + ChannelCredentials channel_credentials=None): + cdef grpc_channel_args *c_arguments = NULL self.c_channel = NULL self.references = [] if arguments is not None: @@ -52,18 +46,18 @@ cdef class Channel: else: raise TypeError("expected target to be str or bytes") if channel_credentials is None: - self.c_channel = grpc.grpc_insecure_channel_create(target, c_arguments, + self.c_channel = grpc_insecure_channel_create(target, c_arguments, NULL) else: - self.c_channel = grpc.grpc_secure_channel_create( + self.c_channel = grpc_secure_channel_create( channel_credentials.c_credentials, target, c_arguments, NULL) self.references.append(channel_credentials) self.references.append(target) self.references.append(arguments) - def create_call(self, call.Call parent, int flags, - completion_queue.CompletionQueue queue not None, - method, host, records.Timespec deadline not None): + def create_call(self, Call parent, int flags, + CompletionQueue queue not None, + method, host, Timespec deadline not None): if queue.is_shutting_down: raise ValueError("queue must not be shutting down or shutdown") if isinstance(method, bytes): @@ -82,36 +76,36 @@ cdef class Channel: host_c_string = host else: raise TypeError("expected host to be str, bytes, or None") - cdef call.Call operation_call = call.Call() + cdef Call operation_call = Call() operation_call.references = [self, method, host, queue] - cdef grpc.grpc_call *parent_call = NULL + cdef grpc_call *parent_call = NULL if parent is not None: parent_call = parent.c_call - operation_call.c_call = grpc.grpc_channel_create_call( + operation_call.c_call = grpc_channel_create_call( self.c_channel, parent_call, flags, queue.c_completion_queue, method, host_c_string, deadline.c_time, NULL) return operation_call def check_connectivity_state(self, bint try_to_connect): - return grpc.grpc_channel_check_connectivity_state(self.c_channel, + return grpc_channel_check_connectivity_state(self.c_channel, try_to_connect) def watch_connectivity_state( - self, last_observed_state, records.Timespec deadline not None, - completion_queue.CompletionQueue queue not None, tag): - cdef records.OperationTag operation_tag = records.OperationTag(tag) + self, last_observed_state, Timespec deadline not None, + CompletionQueue queue not None, tag): + cdef OperationTag operation_tag = OperationTag(tag) cpython.Py_INCREF(operation_tag) - grpc.grpc_channel_watch_connectivity_state( + grpc_channel_watch_connectivity_state( self.c_channel, last_observed_state, deadline.c_time, queue.c_completion_queue, operation_tag) def target(self): - cdef char * target = grpc.grpc_channel_get_target(self.c_channel) + cdef char * target = grpc_channel_get_target(self.c_channel) result = target - grpc.gpr_free(target) + gpr_free(target) return result def __dealloc__(self): if self.c_channel != NULL: - grpc.grpc_channel_destroy(self.c_channel) + grpc_channel_destroy(self.c_channel) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pxd b/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pxd.pxi similarity index 91% rename from src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pxd rename to src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pxd.pxi index 1ed5d4b2299..757f1245e85 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pxd +++ b/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pxd.pxi @@ -27,15 +27,13 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from grpc._cython._cygrpc cimport grpc - cdef class CompletionQueue: - cdef grpc.grpc_completion_queue *c_completion_queue + cdef grpc_completion_queue *c_completion_queue cdef object poll_condition cdef bint is_polling cdef bint is_shutting_down cdef bint is_shutdown - cdef _interpret_event(self, grpc.grpc_event event) + cdef _interpret_event(self, grpc_event event) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx b/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi similarity index 77% rename from src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx rename to src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi index 635a38fe28e..bbf84132993 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx +++ b/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi @@ -29,10 +29,6 @@ cimport cpython -from grpc._cython._cygrpc cimport call -from grpc._cython._cygrpc cimport grpc -from grpc._cython._cygrpc cimport records - import threading import time @@ -40,29 +36,29 @@ import time cdef class CompletionQueue: def __cinit__(self): - self.c_completion_queue = grpc.grpc_completion_queue_create(NULL) + self.c_completion_queue = grpc_completion_queue_create(NULL) self.is_shutting_down = False self.is_shutdown = False self.poll_condition = threading.Condition() self.is_polling = False - cdef _interpret_event(self, grpc.grpc_event event): - cdef records.OperationTag tag = None + cdef _interpret_event(self, grpc_event event): + cdef OperationTag tag = None cdef object user_tag = None - cdef call.Call operation_call = None - cdef records.CallDetails request_call_details = None - cdef records.Metadata request_metadata = None - cdef records.Operations batch_operations = None - if event.type == grpc.GRPC_QUEUE_TIMEOUT: - return records.Event( + cdef Call operation_call = None + cdef CallDetails request_call_details = None + cdef Metadata request_metadata = None + cdef Operations batch_operations = None + if event.type == GRPC_QUEUE_TIMEOUT: + return Event( event.type, False, None, None, None, None, False, None) - elif event.type == grpc.GRPC_QUEUE_SHUTDOWN: + elif event.type == GRPC_QUEUE_SHUTDOWN: self.is_shutdown = True - return records.Event( + return Event( event.type, True, None, None, None, None, False, None) else: if event.tag != NULL: - tag = event.tag + tag = event.tag # We receive event tags only after they've been inc-ref'd elsewhere in # the code. cpython.Py_DECREF(tag) @@ -77,19 +73,19 @@ cdef class CompletionQueue: # Stuff in the tag not explicitly handled by us needs to live through # the life of the call operation_call.references.extend(tag.references) - return records.Event( + return Event( event.type, event.success, user_tag, operation_call, request_call_details, request_metadata, tag.is_new_request, batch_operations) - def poll(self, records.Timespec deadline=None): + def poll(self, Timespec deadline=None): # We name this 'poll' to avoid problems with CPython's expectations for # 'special' methods (like next and __next__). - cdef grpc.gpr_timespec c_deadline = grpc.gpr_inf_future( - grpc.GPR_CLOCK_REALTIME) + cdef gpr_timespec c_deadline = gpr_inf_future( + GPR_CLOCK_REALTIME) if deadline is not None: c_deadline = deadline.c_time - cdef grpc.grpc_event event + cdef grpc_event event # Poll within a critical section # TODO(atash) consider making queue polling contention a hard error to @@ -99,21 +95,21 @@ cdef class CompletionQueue: self.poll_condition.wait(float(deadline) - time.time()) self.is_polling = True with nogil: - event = grpc.grpc_completion_queue_next( + event = grpc_completion_queue_next( self.c_completion_queue, c_deadline, NULL) with self.poll_condition: self.is_polling = False self.poll_condition.notify() return self._interpret_event(event) - def pluck(self, records.OperationTag tag, records.Timespec deadline=None): + def pluck(self, OperationTag tag, Timespec deadline=None): # Plucking a 'None' tag is equivalent to passing control to GRPC core until # the deadline. - cdef grpc.gpr_timespec c_deadline = grpc.gpr_inf_future( - grpc.GPR_CLOCK_REALTIME) + cdef gpr_timespec c_deadline = gpr_inf_future( + GPR_CLOCK_REALTIME) if deadline is not None: c_deadline = deadline.c_time - cdef grpc.grpc_event event + cdef grpc_event event # Poll within a critical section # TODO(atash) consider making queue polling contention a hard error to @@ -123,7 +119,7 @@ cdef class CompletionQueue: self.poll_condition.wait(float(deadline) - time.time()) self.is_polling = True with nogil: - event = grpc.grpc_completion_queue_pluck( + event = grpc_completion_queue_pluck( self.c_completion_queue, tag, c_deadline, NULL) with self.poll_condition: self.is_polling = False @@ -131,13 +127,13 @@ cdef class CompletionQueue: return self._interpret_event(event) def shutdown(self): - grpc.grpc_completion_queue_shutdown(self.c_completion_queue) + grpc_completion_queue_shutdown(self.c_completion_queue) self.is_shutting_down = True def clear(self): if not self.is_shutting_down: raise ValueError('queue must be shutting down to be cleared') - while self.poll().type != grpc.GRPC_QUEUE_SHUTDOWN: + while self.poll().type != GRPC_QUEUE_SHUTDOWN: pass def __dealloc__(self): @@ -147,4 +143,4 @@ cdef class CompletionQueue: self.shutdown() while not self.is_shutdown: self.poll() - grpc.grpc_completion_queue_destroy(self.c_completion_queue) + grpc_completion_queue_destroy(self.c_completion_queue) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi similarity index 76% rename from src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd rename to src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi index db9f8ddec99..c793c8f5e58 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd +++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi @@ -29,27 +29,24 @@ cimport cpython -from grpc._cython._cygrpc cimport grpc -from grpc._cython._cygrpc cimport records - cdef class ChannelCredentials: - cdef grpc.grpc_channel_credentials *c_credentials - cdef grpc.grpc_ssl_pem_key_cert_pair c_ssl_pem_key_cert_pair + cdef grpc_channel_credentials *c_credentials + cdef grpc_ssl_pem_key_cert_pair c_ssl_pem_key_cert_pair cdef list references cdef class CallCredentials: - cdef grpc.grpc_call_credentials *c_credentials + cdef grpc_call_credentials *c_credentials cdef list references cdef class ServerCredentials: - cdef grpc.grpc_server_credentials *c_credentials - cdef grpc.grpc_ssl_pem_key_cert_pair *c_ssl_pem_key_cert_pairs + cdef grpc_server_credentials *c_credentials + cdef grpc_ssl_pem_key_cert_pair *c_ssl_pem_key_cert_pairs cdef size_t c_ssl_pem_key_cert_pairs_count cdef list references @@ -59,16 +56,16 @@ cdef class CredentialsMetadataPlugin: cdef object plugin_callback cdef str plugin_name - cdef grpc.grpc_metadata_credentials_plugin make_c_plugin(self) + cdef grpc_metadata_credentials_plugin make_c_plugin(self) cdef class AuthMetadataContext: - cdef grpc.grpc_auth_metadata_context context + cdef grpc_auth_metadata_context context cdef void plugin_get_metadata( - void *state, grpc.grpc_auth_metadata_context context, - grpc.grpc_credentials_plugin_metadata_cb cb, void *user_data) with gil + void *state, grpc_auth_metadata_context context, + grpc_credentials_plugin_metadata_cb cb, void *user_data) with gil cdef void plugin_destroy_c_plugin_state(void *state) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi similarity index 83% rename from src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx rename to src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi index a968894967a..3f439c8900f 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx +++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi @@ -29,9 +29,6 @@ cimport cpython -from grpc._cython._cygrpc cimport grpc -from grpc._cython._cygrpc cimport records - cdef class ChannelCredentials: @@ -49,7 +46,7 @@ cdef class ChannelCredentials: def __dealloc__(self): if self.c_credentials != NULL: - grpc.grpc_channel_credentials_release(self.c_credentials) + grpc_channel_credentials_release(self.c_credentials) cdef class CallCredentials: @@ -66,7 +63,7 @@ cdef class CallCredentials: def __dealloc__(self): if self.c_credentials != NULL: - grpc.grpc_call_credentials_release(self.c_credentials) + grpc_call_credentials_release(self.c_credentials) cdef class ServerCredentials: @@ -77,7 +74,7 @@ cdef class ServerCredentials: def __dealloc__(self): if self.c_credentials != NULL: - grpc.grpc_server_credentials_release(self.c_credentials) + grpc_server_credentials_release(self.c_credentials) cdef class CredentialsMetadataPlugin: @@ -86,8 +83,8 @@ cdef class CredentialsMetadataPlugin: """ Args: plugin_callback (callable): Callback accepting a service URL (str/bytes) - and callback object (accepting a records.Metadata, - grpc.grpc_status_code, and a str/bytes error message). This argument + and callback object (accepting a Metadata, + grpc_status_code, and a str/bytes error message). This argument when called should be non-blocking and eventually call the callback object with the appropriate status code/details and metadata (if successful). @@ -99,8 +96,8 @@ cdef class CredentialsMetadataPlugin: self.plugin_name = name @staticmethod - cdef grpc.grpc_metadata_credentials_plugin make_c_plugin(self): - cdef grpc.grpc_metadata_credentials_plugin result + cdef grpc_metadata_credentials_plugin make_c_plugin(self): + cdef grpc_metadata_credentials_plugin result result.get_metadata = plugin_get_metadata result.destroy = plugin_destroy_c_plugin_state result.state = self @@ -125,10 +122,10 @@ cdef class AuthMetadataContext: cdef void plugin_get_metadata( - void *state, grpc.grpc_auth_metadata_context context, - grpc.grpc_credentials_plugin_metadata_cb cb, void *user_data) with gil: + void *state, grpc_auth_metadata_context context, + grpc_credentials_plugin_metadata_cb cb, void *user_data) with gil: def python_callback( - records.Metadata metadata, grpc.grpc_status_code status, + Metadata metadata, grpc_status_code status, const char *error_details): cb(user_data, metadata.c_metadata_array.metadata, metadata.c_metadata_array.count, status, error_details) @@ -142,11 +139,11 @@ cdef void plugin_destroy_c_plugin_state(void *state): def channel_credentials_google_default(): cdef ChannelCredentials credentials = ChannelCredentials(); - credentials.c_credentials = grpc.grpc_google_default_credentials_create() + credentials.c_credentials = grpc_google_default_credentials_create() return credentials def channel_credentials_ssl(pem_root_certificates, - records.SslPemKeyCertPair ssl_pem_key_cert_pair): + SslPemKeyCertPair ssl_pem_key_cert_pair): if pem_root_certificates is None: pass elif isinstance(pem_root_certificates, bytes): @@ -161,11 +158,11 @@ def channel_credentials_ssl(pem_root_certificates, c_pem_root_certificates = pem_root_certificates credentials.references.append(pem_root_certificates) if ssl_pem_key_cert_pair is not None: - credentials.c_credentials = grpc.grpc_ssl_credentials_create( + credentials.c_credentials = grpc_ssl_credentials_create( c_pem_root_certificates, &ssl_pem_key_cert_pair.c_pair, NULL) credentials.references.append(ssl_pem_key_cert_pair) else: - credentials.c_credentials = grpc.grpc_ssl_credentials_create( + credentials.c_credentials = grpc_ssl_credentials_create( c_pem_root_certificates, NULL, NULL) return credentials @@ -175,7 +172,7 @@ def channel_credentials_composite( if not credentials_1.is_valid or not credentials_2.is_valid: raise ValueError("passed credentials must both be valid") cdef ChannelCredentials credentials = ChannelCredentials() - credentials.c_credentials = grpc.grpc_composite_channel_credentials_create( + credentials.c_credentials = grpc_composite_channel_credentials_create( credentials_1.c_credentials, credentials_2.c_credentials, NULL) credentials.references.append(credentials_1) credentials.references.append(credentials_2) @@ -187,7 +184,7 @@ def call_credentials_composite( if not credentials_1.is_valid or not credentials_2.is_valid: raise ValueError("passed credentials must both be valid") cdef CallCredentials credentials = CallCredentials() - credentials.c_credentials = grpc.grpc_composite_call_credentials_create( + credentials.c_credentials = grpc_composite_call_credentials_create( credentials_1.c_credentials, credentials_2.c_credentials, NULL) credentials.references.append(credentials_1) credentials.references.append(credentials_2) @@ -196,11 +193,11 @@ def call_credentials_composite( def call_credentials_google_compute_engine(): cdef CallCredentials credentials = CallCredentials() credentials.c_credentials = ( - grpc.grpc_google_compute_engine_credentials_create(NULL)) + grpc_google_compute_engine_credentials_create(NULL)) return credentials def call_credentials_service_account_jwt_access( - json_key, records.Timespec token_lifetime not None): + json_key, Timespec token_lifetime not None): if isinstance(json_key, bytes): pass elif isinstance(json_key, basestring): @@ -209,7 +206,7 @@ def call_credentials_service_account_jwt_access( raise TypeError("expected json_key to be str or bytes") cdef CallCredentials credentials = CallCredentials() credentials.c_credentials = ( - grpc.grpc_service_account_jwt_access_credentials_create( + grpc_service_account_jwt_access_credentials_create( json_key, token_lifetime.c_time, NULL)) credentials.references.append(json_key) return credentials @@ -222,7 +219,7 @@ def call_credentials_google_refresh_token(json_refresh_token): else: raise TypeError("expected json_refresh_token to be str or bytes") cdef CallCredentials credentials = CallCredentials() - credentials.c_credentials = grpc.grpc_google_refresh_token_credentials_create( + credentials.c_credentials = grpc_google_refresh_token_credentials_create( json_refresh_token, NULL) credentials.references.append(json_refresh_token) return credentials @@ -241,7 +238,7 @@ def call_credentials_google_iam(authorization_token, authority_selector): else: raise TypeError("expected authority_selector to be str or bytes") cdef CallCredentials credentials = CallCredentials() - credentials.c_credentials = grpc.grpc_google_iam_credentials_create( + credentials.c_credentials = grpc_google_iam_credentials_create( authorization_token, authority_selector, NULL) credentials.references.append(authorization_token) credentials.references.append(authority_selector) @@ -250,7 +247,7 @@ def call_credentials_google_iam(authorization_token, authority_selector): def call_credentials_metadata_plugin(CredentialsMetadataPlugin plugin): cdef CallCredentials credentials = CallCredentials() credentials.c_credentials = ( - grpc.grpc_metadata_credentials_create_from_plugin(plugin.make_c_plugin(), + grpc_metadata_credentials_create_from_plugin(plugin.make_c_plugin(), NULL)) # TODO(atash): the following held reference is *probably* never necessary credentials.references.append(plugin) @@ -270,22 +267,22 @@ def server_credentials_ssl(pem_root_certs, pem_key_cert_pairs, raise TypeError("expected pem_root_certs to be str or bytes") pem_key_cert_pairs = list(pem_key_cert_pairs) for pair in pem_key_cert_pairs: - if not isinstance(pair, records.SslPemKeyCertPair): + if not isinstance(pair, SslPemKeyCertPair): raise TypeError("expected pem_key_cert_pairs to be sequence of " - "records.SslPemKeyCertPair") + "SslPemKeyCertPair") cdef ServerCredentials credentials = ServerCredentials() credentials.references.append(pem_key_cert_pairs) credentials.references.append(pem_root_certs) credentials.c_ssl_pem_key_cert_pairs_count = len(pem_key_cert_pairs) credentials.c_ssl_pem_key_cert_pairs = ( - grpc.gpr_malloc( - sizeof(grpc.grpc_ssl_pem_key_cert_pair) * + gpr_malloc( + sizeof(grpc_ssl_pem_key_cert_pair) * credentials.c_ssl_pem_key_cert_pairs_count )) for i in range(credentials.c_ssl_pem_key_cert_pairs_count): credentials.c_ssl_pem_key_cert_pairs[i] = ( - (pem_key_cert_pairs[i]).c_pair) - credentials.c_credentials = grpc.grpc_ssl_server_credentials_create( + (pem_key_cert_pairs[i]).c_pair) + credentials.c_credentials = grpc_ssl_server_credentials_create( c_pem_root_certs, credentials.c_ssl_pem_key_cert_pairs, credentials.c_ssl_pem_key_cert_pairs_count, force_client_auth, NULL) return credentials diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxd b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi similarity index 100% rename from src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxd rename to src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pxd b/src/python/grpcio/grpc/_cython/_cygrpc/records.pxd.pxi similarity index 80% rename from src/python/grpcio/grpc/_cython/_cygrpc/records.pxd rename to src/python/grpcio/grpc/_cython/_cygrpc/records.pxd.pxi index 4c844e4cb6c..30397818a15 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pxd +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pxd.pxi @@ -27,19 +27,15 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from grpc._cython._cygrpc cimport grpc -from grpc._cython._cygrpc cimport call -from grpc._cython._cygrpc cimport server - cdef class Timespec: - cdef grpc.gpr_timespec c_time + cdef gpr_timespec c_time cdef class CallDetails: - cdef grpc.grpc_call_details c_details + cdef grpc_call_details c_details cdef class OperationTag: @@ -48,8 +44,8 @@ cdef class OperationTag: cdef list references # This allows CompletionQueue to notify the Python Server object that the # underlying GRPC core server has shutdown - cdef server.Server shutting_down_server - cdef call.Call operation_call + cdef Server shutting_down_server + cdef Call operation_call cdef CallDetails request_call_details cdef Metadata request_metadata cdef Operations batch_operations @@ -58,12 +54,12 @@ cdef class OperationTag: cdef class Event: - cdef readonly grpc.grpc_completion_type type + cdef readonly grpc_completion_type type cdef readonly bint success cdef readonly object tag # For operations with calls - cdef readonly call.Call operation_call + cdef readonly Call operation_call # For Server.request_call cdef readonly bint is_new_request @@ -76,45 +72,45 @@ cdef class Event: cdef class ByteBuffer: - cdef grpc.grpc_byte_buffer *c_byte_buffer + cdef grpc_byte_buffer *c_byte_buffer cdef class SslPemKeyCertPair: - cdef grpc.grpc_ssl_pem_key_cert_pair c_pair + cdef grpc_ssl_pem_key_cert_pair c_pair cdef readonly object private_key, certificate_chain cdef class ChannelArg: - cdef grpc.grpc_arg c_arg + cdef grpc_arg c_arg cdef readonly object key, value cdef class ChannelArgs: - cdef grpc.grpc_channel_args c_args + cdef grpc_channel_args c_args cdef list args cdef class Metadatum: - cdef grpc.grpc_metadata c_metadata + cdef grpc_metadata c_metadata cdef object _key, _value cdef class Metadata: - cdef grpc.grpc_metadata_array c_metadata_array + cdef grpc_metadata_array c_metadata_array cdef object metadata cdef class Operation: - cdef grpc.grpc_op c_op + cdef grpc_op c_op cdef ByteBuffer _received_message cdef Metadata _received_metadata - cdef grpc.grpc_status_code _received_status_code + cdef grpc_status_code _received_status_code cdef char *_received_status_details cdef size_t _received_status_details_capacity cdef int _received_cancelled @@ -124,7 +120,7 @@ cdef class Operation: cdef class Operations: - cdef grpc.grpc_op *c_ops + cdef grpc_op *c_ops cdef size_t c_nops cdef list operations diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi similarity index 70% rename from src/python/grpcio/grpc/_cython/_cygrpc/records.pyx rename to src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi index 79a7f8f563b..d7ad9e5215b 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi @@ -27,103 +27,99 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from grpc._cython._cygrpc cimport grpc -from grpc._cython._cygrpc cimport call -from grpc._cython._cygrpc cimport server - class ConnectivityState: - idle = grpc.GRPC_CHANNEL_IDLE - connecting = grpc.GRPC_CHANNEL_CONNECTING - ready = grpc.GRPC_CHANNEL_READY - transient_failure = grpc.GRPC_CHANNEL_TRANSIENT_FAILURE - fatal_failure = grpc.GRPC_CHANNEL_FATAL_FAILURE + idle = GRPC_CHANNEL_IDLE + connecting = GRPC_CHANNEL_CONNECTING + ready = GRPC_CHANNEL_READY + transient_failure = GRPC_CHANNEL_TRANSIENT_FAILURE + fatal_failure = GRPC_CHANNEL_FATAL_FAILURE class ChannelArgKey: - enable_census = grpc.GRPC_ARG_ENABLE_CENSUS - max_concurrent_streams = grpc.GRPC_ARG_MAX_CONCURRENT_STREAMS - max_message_length = grpc.GRPC_ARG_MAX_MESSAGE_LENGTH - http2_initial_sequence_number = grpc.GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER - default_authority = grpc.GRPC_ARG_DEFAULT_AUTHORITY - primary_user_agent_string = grpc.GRPC_ARG_PRIMARY_USER_AGENT_STRING - secondary_user_agent_string = grpc.GRPC_ARG_SECONDARY_USER_AGENT_STRING - ssl_target_name_override = grpc.GRPC_SSL_TARGET_NAME_OVERRIDE_ARG + enable_census = GRPC_ARG_ENABLE_CENSUS + max_concurrent_streams = GRPC_ARG_MAX_CONCURRENT_STREAMS + max_message_length = GRPC_ARG_MAX_MESSAGE_LENGTH + http2_initial_sequence_number = GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER + default_authority = GRPC_ARG_DEFAULT_AUTHORITY + primary_user_agent_string = GRPC_ARG_PRIMARY_USER_AGENT_STRING + secondary_user_agent_string = GRPC_ARG_SECONDARY_USER_AGENT_STRING + ssl_target_name_override = GRPC_SSL_TARGET_NAME_OVERRIDE_ARG class WriteFlag: - buffer_hint = grpc.GRPC_WRITE_BUFFER_HINT - no_compress = grpc.GRPC_WRITE_NO_COMPRESS + buffer_hint = GRPC_WRITE_BUFFER_HINT + no_compress = GRPC_WRITE_NO_COMPRESS class StatusCode: - ok = grpc.GRPC_STATUS_OK - cancelled = grpc.GRPC_STATUS_CANCELLED - unknown = grpc.GRPC_STATUS_UNKNOWN - invalid_argument = grpc.GRPC_STATUS_INVALID_ARGUMENT - deadline_exceeded = grpc.GRPC_STATUS_DEADLINE_EXCEEDED - not_found = grpc.GRPC_STATUS_NOT_FOUND - already_exists = grpc.GRPC_STATUS_ALREADY_EXISTS - permission_denied = grpc.GRPC_STATUS_PERMISSION_DENIED - unauthenticated = grpc.GRPC_STATUS_UNAUTHENTICATED - resource_exhausted = grpc.GRPC_STATUS_RESOURCE_EXHAUSTED - failed_precondition = grpc.GRPC_STATUS_FAILED_PRECONDITION - aborted = grpc.GRPC_STATUS_ABORTED - out_of_range = grpc.GRPC_STATUS_OUT_OF_RANGE - unimplemented = grpc.GRPC_STATUS_UNIMPLEMENTED - internal = grpc.GRPC_STATUS_INTERNAL - unavailable = grpc.GRPC_STATUS_UNAVAILABLE - data_loss = grpc.GRPC_STATUS_DATA_LOSS + ok = GRPC_STATUS_OK + cancelled = GRPC_STATUS_CANCELLED + unknown = GRPC_STATUS_UNKNOWN + invalid_argument = GRPC_STATUS_INVALID_ARGUMENT + deadline_exceeded = GRPC_STATUS_DEADLINE_EXCEEDED + not_found = GRPC_STATUS_NOT_FOUND + already_exists = GRPC_STATUS_ALREADY_EXISTS + permission_denied = GRPC_STATUS_PERMISSION_DENIED + unauthenticated = GRPC_STATUS_UNAUTHENTICATED + resource_exhausted = GRPC_STATUS_RESOURCE_EXHAUSTED + failed_precondition = GRPC_STATUS_FAILED_PRECONDITION + aborted = GRPC_STATUS_ABORTED + out_of_range = GRPC_STATUS_OUT_OF_RANGE + unimplemented = GRPC_STATUS_UNIMPLEMENTED + internal = GRPC_STATUS_INTERNAL + unavailable = GRPC_STATUS_UNAVAILABLE + data_loss = GRPC_STATUS_DATA_LOSS class CallError: - ok = grpc.GRPC_CALL_OK - error = grpc.GRPC_CALL_ERROR - not_on_server = grpc.GRPC_CALL_ERROR_NOT_ON_SERVER - not_on_client = grpc.GRPC_CALL_ERROR_NOT_ON_CLIENT - already_accepted = grpc.GRPC_CALL_ERROR_ALREADY_ACCEPTED - already_invoked = grpc.GRPC_CALL_ERROR_ALREADY_INVOKED - not_invoked = grpc.GRPC_CALL_ERROR_NOT_INVOKED - already_finished = grpc.GRPC_CALL_ERROR_ALREADY_FINISHED - too_many_operations = grpc.GRPC_CALL_ERROR_TOO_MANY_OPERATIONS - invalid_flags = grpc.GRPC_CALL_ERROR_INVALID_FLAGS - invalid_metadata = grpc.GRPC_CALL_ERROR_INVALID_METADATA + ok = GRPC_CALL_OK + error = GRPC_CALL_ERROR + not_on_server = GRPC_CALL_ERROR_NOT_ON_SERVER + not_on_client = GRPC_CALL_ERROR_NOT_ON_CLIENT + already_accepted = GRPC_CALL_ERROR_ALREADY_ACCEPTED + already_invoked = GRPC_CALL_ERROR_ALREADY_INVOKED + not_invoked = GRPC_CALL_ERROR_NOT_INVOKED + already_finished = GRPC_CALL_ERROR_ALREADY_FINISHED + too_many_operations = GRPC_CALL_ERROR_TOO_MANY_OPERATIONS + invalid_flags = GRPC_CALL_ERROR_INVALID_FLAGS + invalid_metadata = GRPC_CALL_ERROR_INVALID_METADATA class CompletionType: - queue_shutdown = grpc.GRPC_QUEUE_SHUTDOWN - queue_timeout = grpc.GRPC_QUEUE_TIMEOUT - operation_complete = grpc.GRPC_OP_COMPLETE + queue_shutdown = GRPC_QUEUE_SHUTDOWN + queue_timeout = GRPC_QUEUE_TIMEOUT + operation_complete = GRPC_OP_COMPLETE class OperationType: - send_initial_metadata = grpc.GRPC_OP_SEND_INITIAL_METADATA - send_message = grpc.GRPC_OP_SEND_MESSAGE - send_close_from_client = grpc.GRPC_OP_SEND_CLOSE_FROM_CLIENT - send_status_from_server = grpc.GRPC_OP_SEND_STATUS_FROM_SERVER - receive_initial_metadata = grpc.GRPC_OP_RECV_INITIAL_METADATA - receive_message = grpc.GRPC_OP_RECV_MESSAGE - receive_status_on_client = grpc.GRPC_OP_RECV_STATUS_ON_CLIENT - receive_close_on_server = grpc.GRPC_OP_RECV_CLOSE_ON_SERVER + send_initial_metadata = GRPC_OP_SEND_INITIAL_METADATA + send_message = GRPC_OP_SEND_MESSAGE + send_close_from_client = GRPC_OP_SEND_CLOSE_FROM_CLIENT + send_status_from_server = GRPC_OP_SEND_STATUS_FROM_SERVER + receive_initial_metadata = GRPC_OP_RECV_INITIAL_METADATA + receive_message = GRPC_OP_RECV_MESSAGE + receive_status_on_client = GRPC_OP_RECV_STATUS_ON_CLIENT + receive_close_on_server = GRPC_OP_RECV_CLOSE_ON_SERVER cdef class Timespec: def __cinit__(self, time): if time is None: - self.c_time = grpc.gpr_now(grpc.GPR_CLOCK_REALTIME) + self.c_time = gpr_now(GPR_CLOCK_REALTIME) return if isinstance(time, int): time = float(time) if isinstance(time, float): if time == float("+inf"): - self.c_time = grpc.gpr_inf_future(grpc.GPR_CLOCK_REALTIME) + self.c_time = gpr_inf_future(GPR_CLOCK_REALTIME) elif time == float("-inf"): - self.c_time = grpc.gpr_inf_past(grpc.GPR_CLOCK_REALTIME) + self.c_time = gpr_inf_past(GPR_CLOCK_REALTIME) else: self.c_time.seconds = time self.c_time.nanoseconds = (time - float(self.c_time.seconds)) * 1e9 - self.c_time.clock_type = grpc.GPR_CLOCK_REALTIME + self.c_time.clock_type = GPR_CLOCK_REALTIME elif isinstance(time, Timespec): self.c_time = (time).c_time else: @@ -135,19 +131,19 @@ cdef class Timespec: # TODO(atash) ensure that everywhere a Timespec is created that it's # converted to GPR_CLOCK_REALTIME then and not every time someone wants to # read values off in Python. - cdef grpc.gpr_timespec real_time = ( - grpc.gpr_convert_clock_type(self.c_time, grpc.GPR_CLOCK_REALTIME)) + cdef gpr_timespec real_time = ( + gpr_convert_clock_type(self.c_time, GPR_CLOCK_REALTIME)) return real_time.seconds @property def nanoseconds(self): - cdef grpc.gpr_timespec real_time = ( - grpc.gpr_convert_clock_type(self.c_time, grpc.GPR_CLOCK_REALTIME)) + cdef gpr_timespec real_time = ( + gpr_convert_clock_type(self.c_time, GPR_CLOCK_REALTIME)) return real_time.nanoseconds def __float__(self): - cdef grpc.gpr_timespec real_time = ( - grpc.gpr_convert_clock_type(self.c_time, grpc.GPR_CLOCK_REALTIME)) + cdef gpr_timespec real_time = ( + gpr_convert_clock_type(self.c_time, GPR_CLOCK_REALTIME)) return real_time.seconds + real_time.nanoseconds / 1e9 infinite_future = Timespec(float("+inf")) @@ -157,10 +153,10 @@ cdef class Timespec: cdef class CallDetails: def __cinit__(self): - grpc.grpc_call_details_init(&self.c_details) + grpc_call_details_init(&self.c_details) def __dealloc__(self): - grpc.grpc_call_details_destroy(&self.c_details) + grpc_call_details_destroy(&self.c_details) @property def method(self): @@ -192,8 +188,8 @@ cdef class OperationTag: cdef class Event: - def __cinit__(self, grpc.grpc_completion_type type, bint success, - object tag, call.Call operation_call, + def __cinit__(self, grpc_completion_type type, bint success, + object tag, Call operation_call, CallDetails request_call_details, Metadata request_metadata, bint is_new_request, @@ -228,31 +224,31 @@ cdef class ByteBuffer: "ByteBuffer, not {}".format(type(data))) cdef char *c_data = data - data_slice = grpc.gpr_slice_from_copied_buffer(c_data, len(data)) - self.c_byte_buffer = grpc.grpc_raw_byte_buffer_create( + data_slice = gpr_slice_from_copied_buffer(c_data, len(data)) + self.c_byte_buffer = grpc_raw_byte_buffer_create( &data_slice, 1) - grpc.gpr_slice_unref(data_slice) + gpr_slice_unref(data_slice) def bytes(self): - cdef grpc.grpc_byte_buffer_reader reader - cdef grpc.gpr_slice data_slice + cdef grpc_byte_buffer_reader reader + cdef gpr_slice data_slice cdef size_t data_slice_length cdef void *data_slice_pointer if self.c_byte_buffer != NULL: - grpc.grpc_byte_buffer_reader_init(&reader, self.c_byte_buffer) + grpc_byte_buffer_reader_init(&reader, self.c_byte_buffer) result = b"" - while grpc.grpc_byte_buffer_reader_next(&reader, &data_slice): - data_slice_pointer = grpc.gpr_slice_start_ptr(data_slice) - data_slice_length = grpc.gpr_slice_length(data_slice) + while grpc_byte_buffer_reader_next(&reader, &data_slice): + data_slice_pointer = gpr_slice_start_ptr(data_slice) + data_slice_length = gpr_slice_length(data_slice) result += (data_slice_pointer)[:data_slice_length] - grpc.grpc_byte_buffer_reader_destroy(&reader) + grpc_byte_buffer_reader_destroy(&reader) return result else: return None def __len__(self): if self.c_byte_buffer != NULL: - return grpc.grpc_byte_buffer_length(self.c_byte_buffer) + return grpc_byte_buffer_length(self.c_byte_buffer) else: return 0 @@ -261,7 +257,7 @@ cdef class ByteBuffer: def __dealloc__(self): if self.c_byte_buffer != NULL: - grpc.grpc_byte_buffer_destroy(self.c_byte_buffer) + grpc_byte_buffer_destroy(self.c_byte_buffer) cdef class SslPemKeyCertPair: @@ -295,15 +291,15 @@ cdef class ChannelArg: raise TypeError("expected key to be of type str or bytes") if isinstance(value, bytes): self.value = value - self.c_arg.type = grpc.GRPC_ARG_STRING + self.c_arg.type = GRPC_ARG_STRING self.c_arg.value.string = self.value elif isinstance(value, basestring): self.value = value.encode() - self.c_arg.type = grpc.GRPC_ARG_STRING + self.c_arg.type = GRPC_ARG_STRING self.c_arg.value.string = self.value elif isinstance(value, int): self.value = int(value) - self.c_arg.type = grpc.GRPC_ARG_INTEGER + self.c_arg.type = GRPC_ARG_INTEGER self.c_arg.value.integer = self.value else: raise TypeError("expected value to be of type str or bytes or int") @@ -318,14 +314,14 @@ cdef class ChannelArgs: if not isinstance(arg, ChannelArg): raise TypeError("expected list of ChannelArg") self.c_args.arguments_length = len(self.args) - self.c_args.arguments = grpc.gpr_malloc( - self.c_args.arguments_length*sizeof(grpc.grpc_arg) + self.c_args.arguments = gpr_malloc( + self.c_args.arguments_length*sizeof(grpc_arg) ) for i in range(self.c_args.arguments_length): self.c_args.arguments[i] = (self.args[i]).c_arg def __dealloc__(self): - grpc.gpr_free(self.c_args.arguments) + gpr_free(self.c_args.arguments) def __len__(self): # self.args is never stale; it's only updated from this file @@ -406,11 +402,11 @@ cdef class Metadata: for metadatum in metadata: if not isinstance(metadatum, Metadatum): raise TypeError("expected list of Metadatum") - grpc.grpc_metadata_array_init(&self.c_metadata_array) + grpc_metadata_array_init(&self.c_metadata_array) self.c_metadata_array.count = len(self.metadata) self.c_metadata_array.capacity = len(self.metadata) - self.c_metadata_array.metadata = grpc.gpr_malloc( - self.c_metadata_array.count*sizeof(grpc.grpc_metadata) + self.c_metadata_array.metadata = gpr_malloc( + self.c_metadata_array.count*sizeof(grpc_metadata) ) for i in range(self.c_metadata_array.count): self.c_metadata_array.metadata[i] = ( @@ -420,7 +416,7 @@ cdef class Metadata: # this frees the allocated memory for the grpc_metadata_array (although # it'd be nice if that were documented somewhere...) TODO(atash): document # this in the C core - grpc.grpc_metadata_array_destroy(&self.c_metadata_array) + grpc_metadata_array_destroy(&self.c_metadata_array) def __len__(self): return self.c_metadata_array.count @@ -449,49 +445,49 @@ cdef class Operation: @property def has_status(self): - return self.c_op.type == grpc.GRPC_OP_RECV_STATUS_ON_CLIENT + return self.c_op.type == GRPC_OP_RECV_STATUS_ON_CLIENT @property def received_message(self): - if self.c_op.type != grpc.GRPC_OP_RECV_MESSAGE: + if self.c_op.type != GRPC_OP_RECV_MESSAGE: raise TypeError("self must be an operation receiving a message") return self._received_message @property def received_message_or_none(self): - if self.c_op.type != grpc.GRPC_OP_RECV_MESSAGE: + if self.c_op.type != GRPC_OP_RECV_MESSAGE: return None return self._received_message @property def received_metadata(self): - if (self.c_op.type != grpc.GRPC_OP_RECV_INITIAL_METADATA and - self.c_op.type != grpc.GRPC_OP_RECV_STATUS_ON_CLIENT): + if (self.c_op.type != GRPC_OP_RECV_INITIAL_METADATA and + self.c_op.type != GRPC_OP_RECV_STATUS_ON_CLIENT): raise TypeError("self must be an operation receiving metadata") return self._received_metadata @property def received_metadata_or_none(self): - if (self.c_op.type != grpc.GRPC_OP_RECV_INITIAL_METADATA and - self.c_op.type != grpc.GRPC_OP_RECV_STATUS_ON_CLIENT): + if (self.c_op.type != GRPC_OP_RECV_INITIAL_METADATA and + self.c_op.type != GRPC_OP_RECV_STATUS_ON_CLIENT): return None return self._received_metadata @property def received_status_code(self): - if self.c_op.type != grpc.GRPC_OP_RECV_STATUS_ON_CLIENT: + if self.c_op.type != GRPC_OP_RECV_STATUS_ON_CLIENT: raise TypeError("self must be an operation receiving a status code") return self._received_status_code @property def received_status_code_or_none(self): - if self.c_op.type != grpc.GRPC_OP_RECV_STATUS_ON_CLIENT: + if self.c_op.type != GRPC_OP_RECV_STATUS_ON_CLIENT: return None return self._received_status_code @property def received_status_details(self): - if self.c_op.type != grpc.GRPC_OP_RECV_STATUS_ON_CLIENT: + if self.c_op.type != GRPC_OP_RECV_STATUS_ON_CLIENT: raise TypeError("self must be an operation receiving status details") if self._received_status_details: return self._received_status_details @@ -500,7 +496,7 @@ cdef class Operation: @property def received_status_details_or_none(self): - if self.c_op.type != grpc.GRPC_OP_RECV_STATUS_ON_CLIENT: + if self.c_op.type != GRPC_OP_RECV_STATUS_ON_CLIENT: return None if self._received_status_details: return self._received_status_details @@ -509,14 +505,14 @@ cdef class Operation: @property def received_cancelled(self): - if self.c_op.type != grpc.GRPC_OP_RECV_CLOSE_ON_SERVER: + if self.c_op.type != GRPC_OP_RECV_CLOSE_ON_SERVER: raise TypeError("self must be an operation receiving cancellation " "information") return False if self._received_cancelled == 0 else True @property def received_cancelled_or_none(self): - if self.c_op.type != grpc.GRPC_OP_RECV_CLOSE_ON_SERVER: + if self.c_op.type != GRPC_OP_RECV_CLOSE_ON_SERVER: return None return False if self._received_cancelled == 0 else True @@ -524,12 +520,12 @@ cdef class Operation: # We *almost* don't need to do anything; most of the objects are handled by # Python. The remaining one(s) are primitive fields filled in by GRPC core. # This means that we need to clean up after receive_status_on_client. - if self.c_op.type == grpc.GRPC_OP_RECV_STATUS_ON_CLIENT: - grpc.gpr_free(self._received_status_details) + if self.c_op.type == GRPC_OP_RECV_STATUS_ON_CLIENT: + gpr_free(self._received_status_details) def operation_send_initial_metadata(Metadata metadata): cdef Operation op = Operation() - op.c_op.type = grpc.GRPC_OP_SEND_INITIAL_METADATA + op.c_op.type = GRPC_OP_SEND_INITIAL_METADATA op.c_op.data.send_initial_metadata.count = metadata.c_metadata_array.count op.c_op.data.send_initial_metadata.metadata = ( metadata.c_metadata_array.metadata) @@ -539,7 +535,7 @@ def operation_send_initial_metadata(Metadata metadata): def operation_send_message(data): cdef Operation op = Operation() - op.c_op.type = grpc.GRPC_OP_SEND_MESSAGE + op.c_op.type = GRPC_OP_SEND_MESSAGE byte_buffer = ByteBuffer(data) op.c_op.data.send_message = byte_buffer.c_byte_buffer op.references.append(byte_buffer) @@ -548,12 +544,12 @@ def operation_send_message(data): def operation_send_close_from_client(): cdef Operation op = Operation() - op.c_op.type = grpc.GRPC_OP_SEND_CLOSE_FROM_CLIENT + op.c_op.type = GRPC_OP_SEND_CLOSE_FROM_CLIENT op.is_valid = True return op def operation_send_status_from_server( - Metadata metadata, grpc.grpc_status_code code, details): + Metadata metadata, grpc_status_code code, details): if isinstance(details, bytes): pass elif isinstance(details, basestring): @@ -561,7 +557,7 @@ def operation_send_status_from_server( else: raise TypeError("expected a str or bytes object for details") cdef Operation op = Operation() - op.c_op.type = grpc.GRPC_OP_SEND_STATUS_FROM_SERVER + op.c_op.type = GRPC_OP_SEND_STATUS_FROM_SERVER op.c_op.data.send_status_from_server.trailing_metadata_count = ( metadata.c_metadata_array.count) op.c_op.data.send_status_from_server.trailing_metadata = ( @@ -575,7 +571,7 @@ def operation_send_status_from_server( def operation_receive_initial_metadata(): cdef Operation op = Operation() - op.c_op.type = grpc.GRPC_OP_RECV_INITIAL_METADATA + op.c_op.type = GRPC_OP_RECV_INITIAL_METADATA op._received_metadata = Metadata([]) op.c_op.data.receive_initial_metadata = ( &op._received_metadata.c_metadata_array) @@ -584,7 +580,7 @@ def operation_receive_initial_metadata(): def operation_receive_message(): cdef Operation op = Operation() - op.c_op.type = grpc.GRPC_OP_RECV_MESSAGE + op.c_op.type = GRPC_OP_RECV_MESSAGE op._received_message = ByteBuffer(None) # n.b. the c_op.data.receive_message field needs to be deleted by us, # anyway, so we just let that be handled by the ByteBuffer() we allocated @@ -595,7 +591,7 @@ def operation_receive_message(): def operation_receive_status_on_client(): cdef Operation op = Operation() - op.c_op.type = grpc.GRPC_OP_RECV_STATUS_ON_CLIENT + op.c_op.type = GRPC_OP_RECV_STATUS_ON_CLIENT op._received_metadata = Metadata([]) op.c_op.data.receive_status_on_client.trailing_metadata = ( &op._received_metadata.c_metadata_array) @@ -610,7 +606,7 @@ def operation_receive_status_on_client(): def operation_receive_close_on_server(): cdef Operation op = Operation() - op.c_op.type = grpc.GRPC_OP_RECV_CLOSE_ON_SERVER + op.c_op.type = GRPC_OP_RECV_CLOSE_ON_SERVER op.c_op.data.receive_close_on_server.cancelled = &op._received_cancelled op.is_valid = True return op @@ -647,8 +643,8 @@ cdef class Operations: if not isinstance(operation, Operation): raise TypeError("expected operations to be iterable of Operation") self.c_nops = len(self.operations) - self.c_ops = grpc.gpr_malloc( - sizeof(grpc.grpc_op)*self.c_nops) + self.c_ops = gpr_malloc( + sizeof(grpc_op)*self.c_nops) for i in range(self.c_nops): self.c_ops[i] = ((self.operations[i])).c_op @@ -660,7 +656,7 @@ cdef class Operations: return self.operations[i] def __dealloc__(self): - grpc.gpr_free(self.c_ops) + gpr_free(self.c_ops) def __iter__(self): return _OperationsIterator(self) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/server.pxd b/src/python/grpcio/grpc/_cython/_cygrpc/server.pxd.pxi similarity index 90% rename from src/python/grpcio/grpc/_cython/_cygrpc/server.pxd rename to src/python/grpcio/grpc/_cython/_cygrpc/server.pxd.pxi index 0257542a037..9db49e4d307 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/server.pxd +++ b/src/python/grpcio/grpc/_cython/_cygrpc/server.pxd.pxi @@ -27,18 +27,15 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from grpc._cython._cygrpc cimport grpc -from grpc._cython._cygrpc cimport completion_queue - cdef class Server: - cdef grpc.grpc_server *c_server + cdef grpc_server *c_server cdef bint is_started # start has been called cdef bint is_shutting_down # shutdown has been called cdef bint is_shutdown # notification of complete shutdown received # used at dealloc when user forgets to shutdown - cdef completion_queue.CompletionQueue backup_shutdown_queue + cdef CompletionQueue backup_shutdown_queue cdef list references cdef list registered_completion_queues diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi similarity index 75% rename from src/python/grpcio/grpc/_cython/_cygrpc/server.pyx rename to src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi index b0bafbc1f49..8b65935c3b9 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx +++ b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi @@ -29,45 +29,39 @@ cimport cpython -from grpc._cython._cygrpc cimport call -from grpc._cython._cygrpc cimport completion_queue -from grpc._cython._cygrpc cimport credentials -from grpc._cython._cygrpc cimport grpc -from grpc._cython._cygrpc cimport records - import time cdef class Server: - def __cinit__(self, records.ChannelArgs arguments=None): - cdef grpc.grpc_channel_args *c_arguments = NULL + def __cinit__(self, ChannelArgs arguments=None): + cdef grpc_channel_args *c_arguments = NULL self.references = [] self.registered_completion_queues = [] if arguments is not None: c_arguments = &arguments.c_args self.references.append(arguments) - self.c_server = grpc.grpc_server_create(c_arguments, NULL) + self.c_server = grpc_server_create(c_arguments, NULL) self.is_started = False self.is_shutting_down = False self.is_shutdown = False def request_call( - self, completion_queue.CompletionQueue call_queue not None, - completion_queue.CompletionQueue server_queue not None, tag): + self, CompletionQueue call_queue not None, + CompletionQueue server_queue not None, tag): if not self.is_started or self.is_shutting_down: raise ValueError("server must be started and not shutting down") if server_queue not in self.registered_completion_queues: raise ValueError("server_queue must be a registered completion queue") - cdef records.OperationTag operation_tag = records.OperationTag(tag) - operation_tag.operation_call = call.Call() - operation_tag.request_call_details = records.CallDetails() - operation_tag.request_metadata = records.Metadata([]) + cdef OperationTag operation_tag = OperationTag(tag) + operation_tag.operation_call = Call() + operation_tag.request_call_details = CallDetails() + operation_tag.request_metadata = Metadata([]) operation_tag.references.extend([self, call_queue, server_queue]) operation_tag.is_new_request = True - operation_tag.batch_operations = records.Operations([]) + operation_tag.batch_operations = Operations([]) cpython.Py_INCREF(operation_tag) - return grpc.grpc_server_request_call( + return grpc_server_request_call( self.c_server, &operation_tag.operation_call.c_call, &operation_tag.request_call_details.c_details, &operation_tag.request_metadata.c_metadata_array, @@ -75,25 +69,25 @@ cdef class Server: operation_tag) def register_completion_queue( - self, completion_queue.CompletionQueue queue not None): + self, CompletionQueue queue not None): if self.is_started: raise ValueError("cannot register completion queues after start") - grpc.grpc_server_register_completion_queue( + grpc_server_register_completion_queue( self.c_server, queue.c_completion_queue, NULL) self.registered_completion_queues.append(queue) def start(self): if self.is_started: raise ValueError("the server has already started") - self.backup_shutdown_queue = completion_queue.CompletionQueue() + self.backup_shutdown_queue = CompletionQueue() self.register_completion_queue(self.backup_shutdown_queue) self.is_started = True - grpc.grpc_server_start(self.c_server) + grpc_server_start(self.c_server) # Ensure the core has gotten a chance to do the start-up work - self.backup_shutdown_queue.pluck(None, records.Timespec(None)) + self.backup_shutdown_queue.pluck(None, Timespec(None)) def add_http2_port(self, address, - credentials.ServerCredentials server_credentials=None): + ServerCredentials server_credentials=None): if isinstance(address, bytes): pass elif isinstance(address, basestring): @@ -103,13 +97,13 @@ cdef class Server: self.references.append(address) if server_credentials is not None: self.references.append(server_credentials) - return grpc.grpc_server_add_secure_http2_port( + return grpc_server_add_secure_http2_port( self.c_server, address, server_credentials.c_credentials) else: - return grpc.grpc_server_add_insecure_http2_port(self.c_server, address) + return grpc_server_add_insecure_http2_port(self.c_server, address) - def shutdown(self, completion_queue.CompletionQueue queue not None, tag): - cdef records.OperationTag operation_tag + def shutdown(self, CompletionQueue queue not None, tag): + cdef OperationTag operation_tag if queue.is_shutting_down: raise ValueError("queue must be live") elif not self.is_started: @@ -120,11 +114,11 @@ cdef class Server: raise ValueError("expected registered completion queue") else: self.is_shutting_down = True - operation_tag = records.OperationTag(tag) + operation_tag = OperationTag(tag) operation_tag.shutting_down_server = self operation_tag.references.extend([self, queue]) cpython.Py_INCREF(operation_tag) - grpc.grpc_server_shutdown_and_notify( + grpc_server_shutdown_and_notify( self.c_server, queue.c_completion_queue, operation_tag) @@ -138,7 +132,7 @@ cdef class Server: elif self.is_shutdown: return else: - grpc.grpc_server_cancel_all_calls(self.c_server) + grpc_server_cancel_all_calls(self.c_server) def __dealloc__(self): if self.c_server != NULL: @@ -157,5 +151,5 @@ cdef class Server: # much but repeatedly release the GIL and wait while not self.is_shutdown: time.sleep(0) - grpc.grpc_server_destroy(self.c_server) + grpc_server_destroy(self.c_server) diff --git a/src/python/grpcio/grpc/_cython/cygrpc.pxd b/src/python/grpcio/grpc/_cython/cygrpc.pxd new file mode 100644 index 00000000000..f38134efedd --- /dev/null +++ b/src/python/grpcio/grpc/_cython/cygrpc.pxd @@ -0,0 +1,8 @@ +include "grpc/_cython/_cygrpc/grpc.pxi" + +include "grpc/_cython/_cygrpc/call.pxd.pxi" +include "grpc/_cython/_cygrpc/channel.pxd.pxi" +include "grpc/_cython/_cygrpc/credentials.pxd.pxi" +include "grpc/_cython/_cygrpc/completion_queue.pxd.pxi" +include "grpc/_cython/_cygrpc/records.pxd.pxi" +include "grpc/_cython/_cygrpc/server.pxd.pxi" diff --git a/src/python/grpcio/grpc/_cython/cygrpc.pyx b/src/python/grpcio/grpc/_cython/cygrpc.pyx index 16ec12dac0d..297c8001c5e 100644 --- a/src/python/grpcio/grpc/_cython/cygrpc.pyx +++ b/src/python/grpcio/grpc/_cython/cygrpc.pyx @@ -29,78 +29,14 @@ cimport cpython -from grpc._cython._cygrpc cimport grpc -from grpc._cython._cygrpc cimport call -from grpc._cython._cygrpc cimport channel -from grpc._cython._cygrpc cimport credentials -from grpc._cython._cygrpc cimport completion_queue -from grpc._cython._cygrpc cimport records -from grpc._cython._cygrpc cimport server - -from grpc._cython._cygrpc import call -from grpc._cython._cygrpc import channel -from grpc._cython._cygrpc import credentials -from grpc._cython._cygrpc import completion_queue -from grpc._cython._cygrpc import records -from grpc._cython._cygrpc import server - -ConnectivityState = records.ConnectivityState -ChannelArgKey = records.ChannelArgKey -WriteFlag = records.WriteFlag -StatusCode = records.StatusCode -CallError = records.CallError -CompletionType = records.CompletionType -OperationType = records.OperationType -Timespec = records.Timespec -CallDetails = records.CallDetails -Event = records.Event -ByteBuffer = records.ByteBuffer -SslPemKeyCertPair = records.SslPemKeyCertPair -ChannelArg = records.ChannelArg -ChannelArgs = records.ChannelArgs -Metadatum = records.Metadatum -Metadata = records.Metadata -Operation = records.Operation - -operation_send_initial_metadata = records.operation_send_initial_metadata -operation_send_message = records.operation_send_message -operation_send_close_from_client = records.operation_send_close_from_client -operation_send_status_from_server = records.operation_send_status_from_server -operation_receive_initial_metadata = records.operation_receive_initial_metadata -operation_receive_message = records.operation_receive_message -operation_receive_status_on_client = records.operation_receive_status_on_client -operation_receive_close_on_server = records.operation_receive_close_on_server - -Operations = records.Operations - -CallCredentials = credentials.CallCredentials -ChannelCredentials = credentials.ChannelCredentials -ServerCredentials = credentials.ServerCredentials -CredentialsMetadataPlugin = credentials.CredentialsMetadataPlugin -AuthMetadataContext = credentials.AuthMetadataContext - -channel_credentials_google_default = ( - credentials.channel_credentials_google_default) -channel_credentials_ssl = credentials.channel_credentials_ssl -channel_credentials_composite = ( - credentials.channel_credentials_composite) -call_credentials_composite = ( - credentials.call_credentials_composite) -call_credentials_google_compute_engine = ( - credentials.call_credentials_google_compute_engine) -call_credentials_jwt_access = ( - credentials.call_credentials_service_account_jwt_access) -call_credentials_refresh_token = ( - credentials.call_credentials_google_refresh_token) -call_credentials_google_iam = credentials.call_credentials_google_iam -call_credentials_metadata_plugin = credentials.call_credentials_metadata_plugin -server_credentials_ssl = credentials.server_credentials_ssl - -CompletionQueue = completion_queue.CompletionQueue -Channel = channel.Channel -Server = server.Server -Call = call.Call - +# TODO(atash): figure out why the coverage tool gets confused about the Cython +# coverage plugin when the following files don't have a '.pxi' suffix. +include "grpc/_cython/_cygrpc/call.pyx.pxi" +include "grpc/_cython/_cygrpc/channel.pyx.pxi" +include "grpc/_cython/_cygrpc/credentials.pyx.pxi" +include "grpc/_cython/_cygrpc/completion_queue.pyx.pxi" +include "grpc/_cython/_cygrpc/records.pyx.pxi" +include "grpc/_cython/_cygrpc/server.pyx.pxi" # # Global state @@ -109,10 +45,10 @@ Call = call.Call cdef class _ModuleState: def __cinit__(self): - grpc.grpc_init() + grpc_init() def __dealloc__(self): - grpc.grpc_shutdown() + grpc_shutdown() _module_state = _ModuleState() diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py new file mode 100644 index 00000000000..cd4b7101d43 --- /dev/null +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -0,0 +1,195 @@ +# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_core_dependencies.py.template`!!! + +CORE_SOURCE_FILES = [ + 'src/core/profiling/basic_timers.c', + 'src/core/profiling/stap_timers.c', + 'src/core/support/alloc.c', + 'src/core/support/avl.c', + 'src/core/support/cmdline.c', + 'src/core/support/cpu_iphone.c', + 'src/core/support/cpu_linux.c', + 'src/core/support/cpu_posix.c', + 'src/core/support/cpu_windows.c', + 'src/core/support/env_linux.c', + 'src/core/support/env_posix.c', + 'src/core/support/env_win32.c', + 'src/core/support/file.c', + 'src/core/support/file_posix.c', + 'src/core/support/file_win32.c', + 'src/core/support/histogram.c', + 'src/core/support/host_port.c', + 'src/core/support/log.c', + 'src/core/support/log_android.c', + 'src/core/support/log_linux.c', + 'src/core/support/log_posix.c', + 'src/core/support/log_win32.c', + 'src/core/support/murmur_hash.c', + 'src/core/support/slice.c', + 'src/core/support/slice_buffer.c', + 'src/core/support/stack_lockfree.c', + 'src/core/support/string.c', + 'src/core/support/string_posix.c', + 'src/core/support/string_win32.c', + 'src/core/support/subprocess_posix.c', + 'src/core/support/sync.c', + 'src/core/support/sync_posix.c', + 'src/core/support/sync_win32.c', + 'src/core/support/thd.c', + 'src/core/support/thd_posix.c', + 'src/core/support/thd_win32.c', + 'src/core/support/time.c', + 'src/core/support/time_posix.c', + 'src/core/support/time_precise.c', + 'src/core/support/time_win32.c', + 'src/core/support/tls_pthread.c', + 'src/core/httpcli/httpcli_security_connector.c', + 'src/core/security/base64.c', + 'src/core/security/client_auth_filter.c', + 'src/core/security/credentials.c', + 'src/core/security/credentials_metadata.c', + 'src/core/security/credentials_posix.c', + 'src/core/security/credentials_win32.c', + 'src/core/security/google_default_credentials.c', + 'src/core/security/handshake.c', + 'src/core/security/json_token.c', + 'src/core/security/jwt_verifier.c', + 'src/core/security/secure_endpoint.c', + 'src/core/security/security_connector.c', + 'src/core/security/security_context.c', + 'src/core/security/server_auth_filter.c', + 'src/core/security/server_secure_chttp2.c', + 'src/core/surface/init_secure.c', + 'src/core/surface/secure_channel_create.c', + 'src/core/tsi/fake_transport_security.c', + 'src/core/tsi/ssl_transport_security.c', + 'src/core/tsi/transport_security.c', + 'src/core/census/grpc_context.c', + 'src/core/census/grpc_filter.c', + 'src/core/channel/channel_args.c', + 'src/core/channel/channel_stack.c', + 'src/core/channel/client_channel.c', + 'src/core/channel/client_uchannel.c', + 'src/core/channel/compress_filter.c', + 'src/core/channel/connected_channel.c', + 'src/core/channel/http_client_filter.c', + 'src/core/channel/http_server_filter.c', + 'src/core/channel/subchannel_call_holder.c', + 'src/core/client_config/client_config.c', + 'src/core/client_config/connector.c', + 'src/core/client_config/default_initial_connect_string.c', + 'src/core/client_config/initial_connect_string.c', + 'src/core/client_config/lb_policies/pick_first.c', + 'src/core/client_config/lb_policies/round_robin.c', + 'src/core/client_config/lb_policy.c', + 'src/core/client_config/lb_policy_factory.c', + 'src/core/client_config/lb_policy_registry.c', + 'src/core/client_config/resolver.c', + 'src/core/client_config/resolver_factory.c', + 'src/core/client_config/resolver_registry.c', + 'src/core/client_config/resolvers/dns_resolver.c', + 'src/core/client_config/resolvers/sockaddr_resolver.c', + 'src/core/client_config/subchannel.c', + 'src/core/client_config/subchannel_factory.c', + 'src/core/client_config/uri_parser.c', + 'src/core/compression/algorithm.c', + 'src/core/compression/message_compress.c', + 'src/core/debug/trace.c', + 'src/core/httpcli/format_request.c', + 'src/core/httpcli/httpcli.c', + 'src/core/httpcli/parser.c', + 'src/core/iomgr/closure.c', + 'src/core/iomgr/endpoint.c', + 'src/core/iomgr/endpoint_pair_posix.c', + 'src/core/iomgr/endpoint_pair_windows.c', + 'src/core/iomgr/exec_ctx.c', + 'src/core/iomgr/executor.c', + 'src/core/iomgr/fd_posix.c', + 'src/core/iomgr/iocp_windows.c', + 'src/core/iomgr/iomgr.c', + 'src/core/iomgr/iomgr_posix.c', + 'src/core/iomgr/iomgr_windows.c', + 'src/core/iomgr/pollset_multipoller_with_epoll.c', + 'src/core/iomgr/pollset_multipoller_with_poll_posix.c', + 'src/core/iomgr/pollset_posix.c', + 'src/core/iomgr/pollset_set_posix.c', + 'src/core/iomgr/pollset_set_windows.c', + 'src/core/iomgr/pollset_windows.c', + 'src/core/iomgr/resolve_address_posix.c', + 'src/core/iomgr/resolve_address_windows.c', + 'src/core/iomgr/sockaddr_utils.c', + 'src/core/iomgr/socket_utils_common_posix.c', + 'src/core/iomgr/socket_utils_linux.c', + 'src/core/iomgr/socket_utils_posix.c', + 'src/core/iomgr/socket_windows.c', + 'src/core/iomgr/tcp_client_posix.c', + 'src/core/iomgr/tcp_client_windows.c', + 'src/core/iomgr/tcp_posix.c', + 'src/core/iomgr/tcp_server_posix.c', + 'src/core/iomgr/tcp_server_windows.c', + 'src/core/iomgr/tcp_windows.c', + 'src/core/iomgr/time_averaged_stats.c', + 'src/core/iomgr/timer.c', + 'src/core/iomgr/timer_heap.c', + 'src/core/iomgr/udp_server.c', + 'src/core/iomgr/wakeup_fd_eventfd.c', + 'src/core/iomgr/wakeup_fd_nospecial.c', + 'src/core/iomgr/wakeup_fd_pipe.c', + 'src/core/iomgr/wakeup_fd_posix.c', + 'src/core/iomgr/workqueue_posix.c', + 'src/core/iomgr/workqueue_windows.c', + 'src/core/json/json.c', + 'src/core/json/json_reader.c', + 'src/core/json/json_string.c', + 'src/core/json/json_writer.c', + 'src/core/surface/api_trace.c', + 'src/core/surface/byte_buffer.c', + 'src/core/surface/byte_buffer_reader.c', + 'src/core/surface/call.c', + 'src/core/surface/call_details.c', + 'src/core/surface/call_log_batch.c', + 'src/core/surface/channel.c', + 'src/core/surface/channel_connectivity.c', + 'src/core/surface/channel_create.c', + 'src/core/surface/channel_ping.c', + 'src/core/surface/completion_queue.c', + 'src/core/surface/event_string.c', + 'src/core/surface/init.c', + 'src/core/surface/lame_client.c', + 'src/core/surface/metadata_array.c', + 'src/core/surface/server.c', + 'src/core/surface/server_chttp2.c', + 'src/core/surface/server_create.c', + 'src/core/surface/version.c', + 'src/core/transport/byte_stream.c', + 'src/core/transport/chttp2/alpn.c', + 'src/core/transport/chttp2/bin_encoder.c', + 'src/core/transport/chttp2/frame_data.c', + 'src/core/transport/chttp2/frame_goaway.c', + 'src/core/transport/chttp2/frame_ping.c', + 'src/core/transport/chttp2/frame_rst_stream.c', + 'src/core/transport/chttp2/frame_settings.c', + 'src/core/transport/chttp2/frame_window_update.c', + 'src/core/transport/chttp2/hpack_encoder.c', + 'src/core/transport/chttp2/hpack_parser.c', + 'src/core/transport/chttp2/hpack_table.c', + 'src/core/transport/chttp2/huffsyms.c', + 'src/core/transport/chttp2/incoming_metadata.c', + 'src/core/transport/chttp2/parsing.c', + 'src/core/transport/chttp2/status_conversion.c', + 'src/core/transport/chttp2/stream_lists.c', + 'src/core/transport/chttp2/stream_map.c', + 'src/core/transport/chttp2/timeout_encoding.c', + 'src/core/transport/chttp2/varint.c', + 'src/core/transport/chttp2/writing.c', + 'src/core/transport/chttp2_transport.c', + 'src/core/transport/connectivity_state.c', + 'src/core/transport/metadata.c', + 'src/core/transport/metadata_batch.c', + 'src/core/transport/static_metadata.c', + 'src/core/transport/transport.c', + 'src/core/transport/transport_op_string.c', + 'src/core/census/context.c', + 'src/core/census/initialize.c', + 'src/core/census/operation.c', + 'src/core/census/tracing.c', +] diff --git a/src/python/grpcio/tests/unit/_cython/test_utilities.py b/src/python/grpcio/tests/unit/_cython/test_utilities.py index 21ea3075b47..6a097396431 100644 --- a/src/python/grpcio/tests/unit/_cython/test_utilities.py +++ b/src/python/grpcio/tests/unit/_cython/test_utilities.py @@ -29,7 +29,7 @@ import threading -from grpc._cython._cygrpc import completion_queue +from grpc._cython import cygrpc class CompletionQueuePollFuture: diff --git a/src/python/grpcio/tox.ini b/src/python/grpcio/tox.ini deleted file mode 100644 index bfb1ca0cfad..00000000000 --- a/src/python/grpcio/tox.ini +++ /dev/null @@ -1,19 +0,0 @@ -# Tox (http://tox.testrun.org/) is a tool for running tests -# in multiple virtualenvs. This configuration file will run the -# test suite on all supported python versions. To use it, "pip install tox" -# and then run "tox" from this directory. - -[tox] -skipsdist = true -envlist = py27 - -[testenv] -commands = - {envpython} setup.py build_py - {envpython} setup.py test - coverage combine - coverage html --include='grpc/*' --omit='grpc/framework/alpha/*','grpc/early_adopter/*','grpc/framework/base/*','grpc/framework/face/*','grpc/_adapter/fore.py','grpc/_adapter/rear.py' - coverage report --include='grpc/*' --omit='grpc/framework/alpha/*','grpc/early_adopter/*','grpc/framework/base/*','grpc/framework/face/*','grpc/_adapter/fore.py','grpc/_adapter/rear.py' -deps = - -rrequirements.txt -passenv = * diff --git a/templates/src/python/grpcio/grpc_core_dependencies.py.template b/templates/src/python/grpcio/grpc_core_dependencies.py.template new file mode 100644 index 00000000000..1ca5f7ad6c7 --- /dev/null +++ b/templates/src/python/grpcio/grpc_core_dependencies.py.template @@ -0,0 +1,13 @@ +%YAML 1.2 +--- | + # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_core_dependencies.py.template`!!! + + CORE_SOURCE_FILES = [ + % for lib in libs: + % if lib.name in python_dependencies.transitive_deps: + % for src in lib.src: + '${src}', + % endfor + % endif + % endfor + ] diff --git a/tools/buildgen/plugins/transitive_dependencies.py b/tools/buildgen/plugins/transitive_dependencies.py index c2d3da3a3b2..1fc76a3cd51 100644 --- a/tools/buildgen/plugins/transitive_dependencies.py +++ b/tools/buildgen/plugins/transitive_dependencies.py @@ -58,6 +58,10 @@ def mako_plugin(dictionary): node_modules = dictionary.get('node_modules') targets = dictionary.get('targets') - for target_list in (libs, node_modules, targets): + for target_list in (libs, targets, node_modules): for target in target_list: target['transitive_deps'] = transitive_deps(target, libs) + + python_dependencies = dictionary.get('python_dependencies') + python_dependencies['transitive_deps'] = ( + transitive_deps(python_dependencies, libs)) diff --git a/tools/distrib/python/submit.py b/tools/distrib/python/submit.py index dffbefd5fe4..08ace7c6901 100755 --- a/tools/distrib/python/submit.py +++ b/tools/distrib/python/submit.py @@ -59,7 +59,7 @@ args = parser.parse_args() # Move to the root directory of Python GRPC. pkgdir = os.path.join(os.path.dirname(os.path.abspath(__file__)), - '../../../src/python/grpcio') + '../../../') # Remove previous distributions; they somehow confuse twine. try: shutil.rmtree(os.path.join(pkgdir, 'dist/')) diff --git a/tools/jenkins/grpc_interop_python/Dockerfile b/tools/jenkins/grpc_interop_python/Dockerfile index 6034cbf9550..047604b1b79 100644 --- a/tools/jenkins/grpc_interop_python/Dockerfile +++ b/tools/jenkins/grpc_interop_python/Dockerfile @@ -48,6 +48,7 @@ RUN apt-get update && apt-get install -y \ libc6-dbg \ libc6-dev \ libgtest-dev \ + libssl-dev \ libtool \ make \ strace \ diff --git a/tools/jenkins/grpc_interop_python/build_interop.sh b/tools/jenkins/grpc_interop_python/build_interop.sh index 8f5bfd11e20..39c93677d8b 100755 --- a/tools/jenkins/grpc_interop_python/build_interop.sh +++ b/tools/jenkins/grpc_interop_python/build_interop.sh @@ -43,5 +43,5 @@ make install-certs make # build Python interop client and server -CONFIG=opt ./tools/run_tests/build_python.sh 2.7 +CONFIG=opt ./tools/run_tests/build_python.sh diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index 57080ce9348..8159e5a464f 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -34,16 +34,14 @@ set -ex cd $(dirname $0)/../.. ROOT=`pwd` -GRPCIO=$ROOT/src/python/grpcio export LD_LIBRARY_PATH=$ROOT/libs/$CONFIG export DYLD_LIBRARY_PATH=$ROOT/libs/$CONFIG export PATH=$ROOT/bins/$CONFIG:$ROOT/bins/$CONFIG/protobuf:$PATH export CFLAGS="-I$ROOT/include -std=c89" -export LDFLAGS="-L$ROOT/libs/$CONFIG" +export LDFLAGS="-L$ROOT/libs/$CONFIG -L$ROOT/libs/$CONFIG/openssl" export GRPC_PYTHON_BUILD_WITH_CYTHON=1 export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1 -cd $GRPCIO tox --notest -$GRPCIO/.tox/py27/bin/python $GRPCIO/setup.py build +$ROOT/.tox/py27/bin/python $ROOT/setup.py build diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index e69e9877c5c..1a806ab206e 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -298,8 +298,8 @@ class PythonLanguage: def client_cmd(self, args): return [ - 'src/python/grpcio/.tox/py27/bin/python', - 'src/python/grpcio/setup.py', + '.tox/py27/bin/python', + 'setup.py', 'run_interop', '--client', '--args=\'{}\''.format(' '.join(args)) @@ -310,8 +310,8 @@ class PythonLanguage: def server_cmd(self, args): return [ - 'src/python/grpcio/.tox/py27/bin/python', - 'src/python/grpcio/setup.py', + '.tox/py27/bin/python', + 'setup.py', 'run_interop', '--server', '--args=\'{}\''.format(' '.join(args) + ' --use_tls=true') diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh index 042b40485df..35144926460 100755 --- a/tools/run_tests/run_python.sh +++ b/tools/run_tests/run_python.sh @@ -34,18 +34,16 @@ set -ex cd $(dirname $0)/../.. ROOT=`pwd` -GRPCIO=$ROOT/src/python/grpcio export LD_LIBRARY_PATH=$ROOT/libs/$CONFIG export DYLD_LIBRARY_PATH=$ROOT/libs/$CONFIG export PATH=$ROOT/bins/$CONFIG:$ROOT/bins/$CONFIG/protobuf:$PATH export CFLAGS="-I$ROOT/include -std=c89" -export LDFLAGS="-L$ROOT/libs/$CONFIG" +export LDFLAGS="-L$ROOT/libs/$CONFIG -L$ROOT/libs/$CONFIG/openssl" export GRPC_PYTHON_BUILD_WITH_CYTHON=1 export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1 -cd $GRPCIO tox mkdir -p $ROOT/reports rm -rf $ROOT/reports/python-coverage -(mv -T $GRPCIO/htmlcov $ROOT/reports/python-coverage) || true +(mv -T $ROOT/htmlcov $ROOT/reports/python-coverage) || true diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000000..8bb5fc2bc60 --- /dev/null +++ b/tox.ini @@ -0,0 +1,17 @@ +[tox] +skipsdist = true +envlist = py27 + +[testenv] +setenv = + PYGRPC_ROOT = {toxinidir}/src/python/grpcio/ +commands = + {envpython} setup.py build_py + {envpython} setup.py test + {envbindir}/coverage combine +# TODO(atash): we currently ignore cygrpc.pyx due to an insufficiency in Cython's coverage plug-in. Discussion is ongoing. + {envbindir}/coverage html --include='{env:PYGRPC_ROOT}/grpc/*' --omit='{env:PYGRPC_ROOT}/grpc/framework/alpha/*','{env:PYGRPC_ROOT}/grpc/early_adopter/*','{env:PYGRPC_ROOT}/grpc/framework/base/*','{env:PYGRPC_ROOT}/grpc/framework/face/*','{env:PYGRPC_ROOT}/grpc/_adapter/fore.py','{env:PYGRPC_ROOT}/grpc/_adapter/rear.py','{env:PYGRPC_ROOT}/grpc/_cython/cygrpc.pyx' + {envbindir}/coverage report --include='{env:PYGRPC_ROOT}/grpc/*' --omit='{env:PYGRPC_ROOT}/grpc/framework/alpha/*','{env:PYGRPC_ROOT}/grpc/early_adopter/*','{env:PYGRPC_ROOT}/grpc/framework/base/*','{env:PYGRPC_ROOT}/grpc/framework/face/*','{env:PYGRPC_ROOT}/grpc/_adapter/fore.py','{env:PYGRPC_ROOT}/grpc/_adapter/rear.py','{env:PYGRPC_ROOT}/grpc/_cython/cygrpc.pyx' +deps = + -rrequirements.txt +passenv = * From 974e8d5d683edf4d280ad37238be58765b5f086b Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Mon, 14 Dec 2015 18:34:58 -0800 Subject: [PATCH 08/28] Add an inventory of top-level items --- INVENTORY.md | 13 +++++++++++++ README.md | 14 ++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 INVENTORY.md diff --git a/INVENTORY.md b/INVENTORY.md new file mode 100644 index 00000000000..7da7f9253c3 --- /dev/null +++ b/INVENTORY.md @@ -0,0 +1,13 @@ +# Top-level Items by language + +## Node +* [binding.gyp](binding.gyp) + +## Objective-C +* [gRPC.podspec](gRPC.podspec) + +## Python +* [requirements.txt](requirements.txt) +* [setup.cfg](setup.cfg) +* [setup.py](setup.py) +* [tox.ini](tox.ini) diff --git a/README.md b/README.md index 9701930547e..ebbc36487b3 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,16 @@ You can find more detailed documentation and examples in the [doc](doc) and [exa #Installation -See grpc/INSTALL for installation instructions for various platforms. +See [grpc/INSTALL](INSTALL) for installation instructions for various platforms. #Repository Structure & Status This repository contains source code for gRPC libraries for multiple languages written on top of shared C core library [src/core] (src/core). -Libraries in different languages are in different state of development. We are seeking contributions for all of these libraries. +Libraries in different languages are in different states of development. We are seeking contributions for all of these libraries. -| Language | Source | Status | -|-------------------------|-------------------------------------|---------------------------------| +| Language | Source | Status | +|-------------------------|-------------------------------------|----------------------------------| | Shared C [core library] | [src/core] (src/core) | Beta - the surface API is stable | | C++ | [src/cpp] (src/cpp) | Beta - the surface API is stable | | Ruby | [src/ruby] (src/ruby) | Beta - the surface API is stable | @@ -31,10 +31,12 @@ Libraries in different languages are in different state of development. We are s | Objective-C | [src/objective-c] (src/objective-c) | Beta - the surface API is stable | -Java source code is in [grpc-java] (http://github.com/grpc/grpc-java) repository. -Go source code is in [grpc-go] (http://github.com/grpc/grpc-go) repository. +Java source code is in the [grpc-java] (http://github.com/grpc/grpc-java) repository. +Go source code is in the [grpc-go] (http://github.com/grpc/grpc-go) repository. +See [INVENTORY.md](INVENTORY.md) for a listing of top-level items in the +repository. #Overview From b7e7b3f759051991d00b75aeb2caceb118b68923 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 17 Dec 2015 00:16:49 -0800 Subject: [PATCH 09/28] Redirect Python manifest to less ambiguous filename --- INVENTORY.md | 1 + MANIFEST.in => PYTHON-MANIFEST.in | 0 setup.py | 4 ++++ 3 files changed, 5 insertions(+) rename MANIFEST.in => PYTHON-MANIFEST.in (100%) diff --git a/INVENTORY.md b/INVENTORY.md index 7da7f9253c3..b523f8f6fa5 100644 --- a/INVENTORY.md +++ b/INVENTORY.md @@ -11,3 +11,4 @@ * [setup.cfg](setup.cfg) * [setup.py](setup.py) * [tox.ini](tox.ini) +* [PYTHON-MANIFEST.in](PYTHON-MANIFEST.in) diff --git a/MANIFEST.in b/PYTHON-MANIFEST.in similarity index 100% rename from MANIFEST.in rename to PYTHON-MANIFEST.in diff --git a/setup.py b/setup.py index e0b0bf7622d..646c01342c6 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,10 @@ import sys from distutils import core as _core from distutils import extension as _extension import setuptools +from setuptools.command import egg_info + +# Redirect the manifest template from MANIFEST.in to PYTHON-MANIFEST.in. +egg_info.manifest_maker.template = 'PYTHON-MANIFEST.in' PYTHON_STEM = './src/python/grpcio/' CORE_INCLUDE = ('./include', './',) From 5cab41fcd7c809ec843531d8061e81b0006475d5 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 17 Dec 2015 00:18:35 -0800 Subject: [PATCH 10/28] Rename INVENTORY.md to MANIFEST.md --- INVENTORY.md => MANIFEST.md | 0 README.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename INVENTORY.md => MANIFEST.md (100%) diff --git a/INVENTORY.md b/MANIFEST.md similarity index 100% rename from INVENTORY.md rename to MANIFEST.md diff --git a/README.md b/README.md index ebbc36487b3..e0553ecc861 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Java source code is in the [grpc-java] (http://github.com/grpc/grpc-java) reposi Go source code is in the [grpc-go] (http://github.com/grpc/grpc-go) repository. -See [INVENTORY.md](INVENTORY.md) for a listing of top-level items in the +See [MANIFEST.md](MANIFEST.md) for a listing of top-level items in the repository. #Overview From 4352e8745ebb51bf23e43479330cb925b185a6d7 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 17 Dec 2015 00:29:22 -0800 Subject: [PATCH 11/28] Add used-by-Python comments to top-level files --- requirements.txt | 1 + setup.cfg | 2 ++ tox.ini | 1 + 3 files changed, 4 insertions(+) diff --git a/requirements.txt b/requirements.txt index 06516ee0d7b..9d002744495 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +# GRPC Python setup requirements enum34>=1.0.4 futures>=2.2.0 cython>=0.23 diff --git a/setup.cfg b/setup.cfg index 52b6b509007..add6ee87492 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,5 @@ +# Setup settings for GRPC Python + [coverage:run] plugins = Cython.Coverage diff --git a/tox.ini b/tox.ini index 8bb5fc2bc60..f89f34e1319 100644 --- a/tox.ini +++ b/tox.ini @@ -1,3 +1,4 @@ +# GRPC Python tox (test environment) settings [tox] skipsdist = true envlist = py27 From 0467295ee6555d778bda27b3d12a6bbb3f02efa0 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Mon, 21 Dec 2015 12:16:50 -0800 Subject: [PATCH 12/28] Fail test build if protoc can't be found --- src/python/grpcio/commands.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index 7450e5b455e..4b172142b1e 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -103,6 +103,11 @@ class BuildProtoModules(setuptools.Command): 'grpc_python_plugin') def run(self): + if not self.protoc_command: + raise Exception('could not find protoc') + if not self.grpc_python_plugin_command: + raise Exception('could not find grpc_python_plugin ' + '(protoc plugin for GRPC Python)') include_regex = re.compile(self.include) exclude_regex = re.compile(self.exclude) if self.exclude else None paths = [] From ccc1610b95bdb20a561246a7ce8a54bd5e2ea92b Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 17 Dec 2015 14:32:44 -0800 Subject: [PATCH 13/28] Use tox commands to run interop client/server --- tools/run_tests/run_interop_tests.py | 14 ++++---------- tox.ini | 8 ++++++++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 1a806ab206e..40bbe3cc3ca 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -298,11 +298,8 @@ class PythonLanguage: def client_cmd(self, args): return [ - '.tox/py27/bin/python', - 'setup.py', - 'run_interop', - '--client', - '--args=\'{}\''.format(' '.join(args)) + 'tox -einterop_client --', + ' '.join(args) ] def cloud_to_prod_env(self): @@ -310,11 +307,8 @@ class PythonLanguage: def server_cmd(self, args): return [ - '.tox/py27/bin/python', - 'setup.py', - 'run_interop', - '--server', - '--args=\'{}\''.format(' '.join(args) + ' --use_tls=true') + 'tox -einterop_server --', + ' '.join(args) + ' --use_tls=true' ] def global_env(self): diff --git a/tox.ini b/tox.ini index f89f34e1319..a655935219f 100644 --- a/tox.ini +++ b/tox.ini @@ -16,3 +16,11 @@ commands = deps = -rrequirements.txt passenv = * + +[testenv:interop_client] +commands = + {envpython} setup.py run_interop --client --args='{posargs}' + +[testenv:interop_server] +commands = + {envpython} setup.py run_interop --server --args='{posargs}' From 8fefe37693489e74a7f5fac263b1a626c4fc2c50 Mon Sep 17 00:00:00 2001 From: yang-g Date: Thu, 7 Jan 2016 16:24:55 -0800 Subject: [PATCH 14/28] Remove from all epoll sets when releasing an fd --- src/core/iomgr/fd_posix.c | 23 ++++--- .../iomgr/pollset_multipoller_with_epoll.c | 65 ++++++++++++++++++- src/core/iomgr/pollset_posix.h | 2 + 3 files changed, 79 insertions(+), 11 deletions(-) diff --git a/src/core/iomgr/fd_posix.c b/src/core/iomgr/fd_posix.c index 3e28f0ffb42..b4bd6bf2268 100644 --- a/src/core/iomgr/fd_posix.c +++ b/src/core/iomgr/fd_posix.c @@ -101,6 +101,7 @@ static grpc_fd *alloc_fd(int fd) { r->read_watcher = r->write_watcher = NULL; r->on_done_closure = NULL; r->closed = 0; + r->released = 0; return r; } @@ -210,6 +211,16 @@ static int has_watchers(grpc_fd *fd) { fd->inactive_watcher_root.next != &fd->inactive_watcher_root; } +static void close_fd_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { + fd->closed = 1; + if (!fd->released) { + close(fd->fd); + } else { + grpc_remove_fd_from_all_epoll_sets(fd->fd); + } + grpc_exec_ctx_enqueue(exec_ctx, fd->on_done_closure, 1); +} + void grpc_fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *on_done, int *release_fd, const char *reason) { fd->on_done_closure = on_done; @@ -222,11 +233,7 @@ void grpc_fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *on_done, gpr_mu_lock(&fd->mu); REF_BY(fd, 1, reason); /* remove active status, but keep referenced */ if (!has_watchers(fd)) { - fd->closed = 1; - if (!fd->released) { - close(fd->fd); - } - grpc_exec_ctx_enqueue(exec_ctx, fd->on_done_closure, 1); + close_fd_locked(exec_ctx, fd); } else { wake_all_watchers_locked(fd); } @@ -416,11 +423,7 @@ void grpc_fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, maybe_wake_one_watcher_locked(fd); } if (grpc_fd_is_orphaned(fd) && !has_watchers(fd) && !fd->closed) { - fd->closed = 1; - if (!fd->released) { - close(fd->fd); - } - grpc_exec_ctx_enqueue(exec_ctx, fd->on_done_closure, 1); + close_fd_locked(exec_ctx, fd); } gpr_mu_unlock(&fd->mu); diff --git a/src/core/iomgr/pollset_multipoller_with_epoll.c b/src/core/iomgr/pollset_multipoller_with_epoll.c index 6e31efa013d..dae33e42f24 100644 --- a/src/core/iomgr/pollset_multipoller_with_epoll.c +++ b/src/core/iomgr/pollset_multipoller_with_epoll.c @@ -43,9 +43,66 @@ #include #include +#include #include "src/core/iomgr/fd_posix.h" -#include "src/core/support/block_annotate.h" #include "src/core/profiling/timers.h" +#include "src/core/support/block_annotate.h" + +struct epoll_fd_list { + int *epoll_fds; + size_t count; + size_t capacity; +}; + +static struct epoll_fd_list epoll_fd_global_list; +static gpr_once init_epoll_fd_list_mu = GPR_ONCE_INIT; +static gpr_mu epoll_fd_list_mu; + +static void init_mu(void) { gpr_mu_init(&epoll_fd_list_mu); } + +static void add_epoll_fd_to_global_list(int epoll_fd) { + gpr_once_init(&init_epoll_fd_list_mu, init_mu); + + gpr_mu_lock(&epoll_fd_list_mu); + if (epoll_fd_global_list.count == epoll_fd_global_list.capacity) { + epoll_fd_global_list.capacity = + GPR_MAX((size_t)8, epoll_fd_global_list.capacity * 2); + epoll_fd_global_list.epoll_fds = + gpr_realloc(epoll_fd_global_list.epoll_fds, + epoll_fd_global_list.capacity * sizeof(int)); + } + epoll_fd_global_list.epoll_fds[epoll_fd_global_list.count++] = epoll_fd; + gpr_mu_unlock(&epoll_fd_list_mu); +} + +static void remove_epoll_fd_from_global_list(int epoll_fd) { + gpr_mu_lock(&epoll_fd_list_mu); + GPR_ASSERT(epoll_fd_global_list.count > 0); + for (size_t i = 0; i < epoll_fd_global_list.count; i++) { + if (epoll_fd == epoll_fd_global_list.epoll_fds[i]) { + epoll_fd_global_list.epoll_fds[i] = + epoll_fd_global_list.epoll_fds[--(epoll_fd_global_list.count)]; + break; + } + } + gpr_mu_unlock(&epoll_fd_list_mu); +} + +void grpc_remove_fd_from_all_epoll_sets(int fd) { + int err; + gpr_mu_lock(&epoll_fd_list_mu); + if (epoll_fd_global_list.count == 0) { + return; + } + for (size_t i = 0; i < epoll_fd_global_list.count; i++) { + err = epoll_ctl(epoll_fd_global_list.epoll_fds[i], EPOLL_CTL_DEL, fd, NULL); + if (err < 0 && errno != ENOENT) { + gpr_log(GPR_ERROR, "epoll_ctl del for %d failed: %s", fd, + strerror(errno)); + } + } + gpr_mu_unlock(&epoll_fd_list_mu); +} typedef struct { grpc_pollset *pollset; @@ -211,6 +268,7 @@ static void multipoll_with_epoll_pollset_finish_shutdown( static void multipoll_with_epoll_pollset_destroy(grpc_pollset *pollset) { pollset_hdr *h = pollset->data.ptr; close(h->epoll_fd); + remove_epoll_fd_from_global_list(h->epoll_fd); gpr_free(h); } @@ -236,6 +294,7 @@ static void epoll_become_multipoller(grpc_exec_ctx *exec_ctx, gpr_log(GPR_ERROR, "epoll_create1 failed: %s", strerror(errno)); abort(); } + add_epoll_fd_to_global_list(h->epoll_fd); ev.events = (uint32_t)(EPOLLIN | EPOLLET); ev.data.ptr = NULL; @@ -255,4 +314,8 @@ static void epoll_become_multipoller(grpc_exec_ctx *exec_ctx, grpc_platform_become_multipoller_type grpc_platform_become_multipoller = epoll_become_multipoller; +#else /* GPR_LINUX_MULTIPOLL_WITH_EPOLL */ + +void grpc_remove_fd_from_all_epoll_sets(int fd) {} + #endif /* GPR_LINUX_MULTIPOLL_WITH_EPOLL */ diff --git a/src/core/iomgr/pollset_posix.h b/src/core/iomgr/pollset_posix.h index 78fc27d2b37..8b1616a1012 100644 --- a/src/core/iomgr/pollset_posix.h +++ b/src/core/iomgr/pollset_posix.h @@ -139,6 +139,8 @@ void grpc_poll_become_multipoller(grpc_exec_ctx *exec_ctx, * be locked) */ int grpc_pollset_has_workers(grpc_pollset *pollset); +void grpc_remove_fd_from_all_epoll_sets(int fd); + /* override to allow tests to hook poll() usage */ typedef int (*grpc_poll_function_type)(struct pollfd *, nfds_t, int); extern grpc_poll_function_type grpc_poll_function; From cd92509e40adaae67edd683593da07e9b98fc6d9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 7 Jan 2016 17:10:25 -0800 Subject: [PATCH 15/28] Update some wrapped stuff --- doc/connection-backoff-interop-test-description.md | 2 +- src/csharp/generate_proto_csharp.sh | 2 +- src/node/interop/interop_client.js | 2 +- src/node/interop/interop_server.js | 2 +- src/node/performance/benchmark_client.js | 2 +- src/node/performance/benchmark_server.js | 2 +- src/node/performance/worker_server.js | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/connection-backoff-interop-test-description.md b/doc/connection-backoff-interop-test-description.md index 64405431d2a..4778efe4530 100644 --- a/doc/connection-backoff-interop-test-description.md +++ b/doc/connection-backoff-interop-test-description.md @@ -18,7 +18,7 @@ which translates to about 13 retries. are conforming the spec or do its own check on the backoffs in the response. Client and server use -[test.proto](https://github.com/grpc/grpc/blob/master/test/proto/test.proto). +[test.proto](https://github.com/grpc/grpc/blob/master/src/proto/grpc/testing/test.proto). Each language should implement its own client. The C++ server is shared among languages. diff --git a/src/csharp/generate_proto_csharp.sh b/src/csharp/generate_proto_csharp.sh index 4dbd9c33085..8e75fea9d04 100755 --- a/src/csharp/generate_proto_csharp.sh +++ b/src/csharp/generate_proto_csharp.sh @@ -45,4 +45,4 @@ $PROTOC --plugin=$PLUGIN --csharp_out=$HEALTHCHECK_DIR --grpc_out=$HEALTHCHECK_D -I src/proto/grpc/health/v1alpha src/proto/grpc/health/v1alpha/health.proto $PROTOC --plugin=$PLUGIN --csharp_out=$TESTING_DIR --grpc_out=$TESTING_DIR \ - -I . test/proto/{empty,messages,test}.proto test/proto/benchmarks/*.proto + -I . src/proto/grpc/testing/{empty,messages,test}.proto test/proto/benchmarks/*.proto diff --git a/src/node/interop/interop_client.js b/src/node/interop/interop_client.js index 53ffa385bdb..7e65d20be2b 100644 --- a/src/node/interop/interop_client.js +++ b/src/node/interop/interop_client.js @@ -38,7 +38,7 @@ var path = require('path'); var grpc = require('..'); var testProto = grpc.load({ root: __dirname + '/../../..', - file: 'test/proto/test.proto'}).grpc.testing; + file: 'src/proto/grpc/testing/test.proto'}).grpc.testing; var GoogleAuth = require('google-auth-library'); var assert = require('assert'); diff --git a/src/node/interop/interop_server.js b/src/node/interop/interop_server.js index 9526b5d1834..72807623054 100644 --- a/src/node/interop/interop_server.js +++ b/src/node/interop/interop_server.js @@ -40,7 +40,7 @@ var AsyncDelayQueue = require('./async_delay_queue'); var grpc = require('..'); var testProto = grpc.load({ root: __dirname + '/../../..', - file: 'test/proto/test.proto'}).grpc.testing; + file: 'src/proto/grpc/testing/test.proto'}).grpc.testing; var ECHO_INITIAL_KEY = 'x-grpc-test-echo-initial'; var ECHO_TRAILING_KEY = 'x-grpc-test-echo-trailing-bin'; diff --git a/src/node/performance/benchmark_client.js b/src/node/performance/benchmark_client.js index d97bdbbcaf7..9e956d40278 100644 --- a/src/node/performance/benchmark_client.js +++ b/src/node/performance/benchmark_client.js @@ -48,7 +48,7 @@ var Histogram = require('./histogram'); var grpc = require('../../../'); var serviceProto = grpc.load({ root: __dirname + '/../../..', - file: 'test/proto/benchmarks/services.proto'}).grpc.testing; + file: 'src/proto/grpc/testing/services.proto'}).grpc.testing; /** * Create a buffer filled with size zeroes diff --git a/src/node/performance/benchmark_server.js b/src/node/performance/benchmark_server.js index ac96fc5edb3..858f21945b4 100644 --- a/src/node/performance/benchmark_server.js +++ b/src/node/performance/benchmark_server.js @@ -44,7 +44,7 @@ var path = require('path'); var grpc = require('../../../'); var serviceProto = grpc.load({ root: __dirname + '/../../..', - file: 'test/proto/benchmarks/services.proto'}).grpc.testing; + file: 'src/proto/grpc/testing/services.proto'}).grpc.testing; /** * Create a buffer filled with size zeroes diff --git a/src/node/performance/worker_server.js b/src/node/performance/worker_server.js index 43b86e5ecfa..98577bdbc97 100644 --- a/src/node/performance/worker_server.js +++ b/src/node/performance/worker_server.js @@ -38,7 +38,7 @@ var worker_service_impl = require('./worker_service_impl'); var grpc = require('../../../'); var serviceProto = grpc.load({ root: __dirname + '/../../..', - file: 'test/proto/benchmarks/services.proto'}).grpc.testing; + file: 'src/proto/grpc/testing/services.proto'}).grpc.testing; function runServer(port) { var server_creds = grpc.ServerCredentials.createInsecure(); From 169006688a791f0fb402b100c55bfb73950b5a3a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 7 Jan 2016 19:30:54 -0800 Subject: [PATCH 16/28] Refine coverage language list --- tools/run_tests/run_tests.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 857e7b5f5d7..bbee5c91575 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -726,9 +726,11 @@ if 'all' in args.language: lang_list = _LANGUAGES.keys() else: lang_list = args.language -# We don't support code coverage on ObjC -if 'gcov' in args.config and 'objc' in lang_list: - lang_list.remove('objc') +# We don't support code coverage on some languages +if 'gcov' in args.config: + for bad in ['objc', 'sanity', 'build']: + if bad in lang_list: + lang_list.remove(bad) languages = set(_LANGUAGES[l] for l in lang_list) From eb9de8b05f4bbef22cde862dc991b9f9b0c23a98 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 8 Jan 2016 08:57:41 -0800 Subject: [PATCH 17/28] Tweak run_tests exit status handling --- tools/run_tests/run_tests.py | 45 +++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 857e7b5f5d7..a2f34247312 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -961,6 +961,15 @@ def _calculate_num_runs_failures(list_of_results): return num_runs, num_failures +# _build_and_run results +class BuildAndRunError(object): + + BUILD = object() + TEST = object() + POST_TEST = object() + + +# returns a list of things that failed (or an empty list on success) def _build_and_run( check_cancelled, newline_on_success, cache, xml_report=None, build_only=False): """Do one pass of building & running tests.""" @@ -969,10 +978,10 @@ def _build_and_run( build_steps, maxjobs=1, stop_on_failure=True, newline_on_success=newline_on_success, travis=args.travis) if num_failures: - return 1 + return [BuildAndRunError.BUILD] if build_only: - return 0 + return [] # start antagonists antagonists = [subprocess.Popen(['tools/run_tests/antagonist.py']) @@ -1030,12 +1039,16 @@ def _build_and_run( number_failures, _ = jobset.run( post_tests_steps, maxjobs=1, stop_on_failure=True, newline_on_success=newline_on_success, travis=args.travis) - if num_test_failures or number_failures: - return 2 + + out = [] + if number_failures: + out.append(BuildAndRunError.POST_TEST) + if num_test_failures: + out.append(BuildAndRunError.TEST) if cache: cache.save() - return 0 + return out test_cache = TestCache(runs_per_test == 1) @@ -1048,11 +1061,11 @@ if forever: initial_time = dw.most_recent_change() have_files_changed = lambda: dw.most_recent_change() != initial_time previous_success = success - success = _build_and_run(check_cancelled=have_files_changed, - newline_on_success=False, - cache=test_cache, - build_only=args.build_only) == 0 - if not previous_success and success: + errors = _build_and_run(check_cancelled=have_files_changed, + newline_on_success=False, + cache=test_cache, + build_only=args.build_only) == 0 + if not previous_success and not errors: jobset.message('SUCCESS', 'All tests are now passing properly', do_newline=True) @@ -1060,13 +1073,19 @@ if forever: while not have_files_changed(): time.sleep(1) else: - result = _build_and_run(check_cancelled=lambda: False, + errors = _build_and_run(check_cancelled=lambda: False, newline_on_success=args.newline_on_success, cache=test_cache, xml_report=args.xml_report, build_only=args.build_only) - if result == 0: + if not errors: jobset.message('SUCCESS', 'All tests passed', do_newline=True) else: jobset.message('FAILED', 'Some tests failed', do_newline=True) - sys.exit(result) + exit_code = 0 + if BuildAndRunError.BUILD in errors: + exit_code |= 1 + if BuildAndRunError.POST_TEST in errors: + exit_code |= 2 + # BuildAndRunError.TEST does not cause run_tests.py to fail + sys.exit(exit_code) From 4f2be36df26c49e153c497ed1376a4ace3e753bd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 8 Jan 2016 08:59:20 -0800 Subject: [PATCH 18/28] Flag errors better --- tools/run_tests/run_tests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index a2f34247312..669d2e91f40 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -1085,7 +1085,9 @@ else: exit_code = 0 if BuildAndRunError.BUILD in errors: exit_code |= 1 - if BuildAndRunError.POST_TEST in errors: + if BuildAndRunError.TEST in errors and not args.travis: exit_code |= 2 - # BuildAndRunError.TEST does not cause run_tests.py to fail + if BuildAndRunError.POST_TEST in errors: + exit_code |= 4 sys.exit(exit_code) + From 61bc8ab49be59ae24e27f18638b97235881ce1a6 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 8 Jan 2016 12:12:05 -0800 Subject: [PATCH 19/28] Disable ccache for the moment --- tools/jenkins/grpc_jenkins_slave/Dockerfile | 9 --------- tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile | 9 --------- 2 files changed, 18 deletions(-) diff --git a/tools/jenkins/grpc_jenkins_slave/Dockerfile b/tools/jenkins/grpc_jenkins_slave/Dockerfile index 294175bd158..f3bf6bc4f0d 100644 --- a/tools/jenkins/grpc_jenkins_slave/Dockerfile +++ b/tools/jenkins/grpc_jenkins_slave/Dockerfile @@ -38,7 +38,6 @@ RUN apt-get update && apt-get install -y \ autotools-dev \ build-essential \ bzip2 \ - ccache \ curl \ gcc \ gcc-multilib \ @@ -62,14 +61,6 @@ RUN apt-get update && apt-get install -y \ wget \ zip && apt-get clean -# Prepare ccache -RUN ln -s /usr/bin/ccache /usr/local/bin/gcc -RUN ln -s /usr/bin/ccache /usr/local/bin/g++ -RUN ln -s /usr/bin/ccache /usr/local/bin/cc -RUN ln -s /usr/bin/ccache /usr/local/bin/c++ -RUN ln -s /usr/bin/ccache /usr/local/bin/clang -RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ - ################## # C++ dependencies RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang diff --git a/tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile b/tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile index ad7df5b090d..1a86c5a5d7d 100644 --- a/tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile +++ b/tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile @@ -38,7 +38,6 @@ RUN apt-get update && apt-get install -y \ autotools-dev \ build-essential \ bzip2 \ - ccache \ curl \ gcc \ gcc-multilib \ @@ -62,14 +61,6 @@ RUN apt-get update && apt-get install -y \ wget \ zip && apt-get clean -# Prepare ccache -RUN ln -s /usr/bin/ccache /usr/local/bin/gcc -RUN ln -s /usr/bin/ccache /usr/local/bin/g++ -RUN ln -s /usr/bin/ccache /usr/local/bin/cc -RUN ln -s /usr/bin/ccache /usr/local/bin/c++ -RUN ln -s /usr/bin/ccache /usr/local/bin/clang -RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ - ################## # C++ dependencies RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang From 6d2ef17f30228e43223c7a10cff3228e943f2bf2 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Mon, 4 Jan 2016 15:33:17 -0800 Subject: [PATCH 20/28] Use default gRPC roots.pem if none provided --- PYTHON-MANIFEST.in | 1 + setup.py | 12 ++++++++++++ src/python/grpcio/.gitignore | 1 + src/python/grpcio/commands.py | 2 ++ src/python/grpcio/grpc/_adapter/_low.py | 5 +++++ 5 files changed, 21 insertions(+) diff --git a/PYTHON-MANIFEST.in b/PYTHON-MANIFEST.in index 5b4ab04207a..0208a88ab14 100644 --- a/PYTHON-MANIFEST.in +++ b/PYTHON-MANIFEST.in @@ -6,3 +6,4 @@ include src/python/grpcio/commands.py include src/python/grpcio/grpc_core_dependencies.py include src/python/grpcio/README.rst include requirements.txt +include etc/roots.pem diff --git a/setup.py b/setup.py index 646c01342c6..436db7dd465 100644 --- a/setup.py +++ b/setup.py @@ -31,6 +31,7 @@ import os import os.path +import shutil import sys from distutils import core as _core @@ -130,6 +131,14 @@ COMMAND_CLASS = { 'run_interop': commands.RunInterop, } +# Ensure that package data is copied over before any commands have been run: +credentials_dir = os.path.join(PYTHON_STEM, 'grpc/_adapter/credentials') +try: + os.mkdir(credentials_dir) +except OSError: + pass +shutil.copyfile('etc/roots.pem', os.path.join(credentials_dir, 'roots.pem')) + TEST_PACKAGE_DATA = { 'tests.interop': [ 'credentials/ca.pem', @@ -144,6 +153,9 @@ TEST_PACKAGE_DATA = { 'credentials/server1.key', 'credentials/server1.pem', ], + 'grpc._adapter': [ + 'credentials/roots.pem' + ], } TESTS_REQUIRE = ( diff --git a/src/python/grpcio/.gitignore b/src/python/grpcio/.gitignore index 95b96f7c1e9..1d804e1ffc8 100644 --- a/src/python/grpcio/.gitignore +++ b/src/python/grpcio/.gitignore @@ -14,3 +14,4 @@ nosetests.xml doc/ _grpcio_metadata.py htmlcov/ +grpc/_adapter/credentials diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index 4b172142b1e..5497311405f 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -156,6 +156,8 @@ class BuildPy(build_py.build_py): """Custom project build command.""" def run(self): + # TODO(atash): make this warn if the proto modules couldn't be built rather + # than cause build failure self.run_command('build_proto_modules') self.run_command('build_project_metadata') build_py.build_py.run(self) diff --git a/src/python/grpcio/grpc/_adapter/_low.py b/src/python/grpcio/grpc/_adapter/_low.py index b13d8dd9dda..dd3669f66c9 100644 --- a/src/python/grpcio/grpc/_adapter/_low.py +++ b/src/python/grpcio/grpc/_adapter/_low.py @@ -27,6 +27,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +import pkg_resources import threading from grpc import _grpcio_metadata @@ -34,6 +35,7 @@ from grpc._cython import cygrpc from grpc._adapter import _implementations from grpc._adapter import _types +_ROOT_CERTIFICATES_RESOURCE_PATH = 'credentials/roots.pem' _USER_AGENT = 'Python-gRPC-{}'.format(_grpcio_metadata.__version__) ChannelCredentials = cygrpc.ChannelCredentials @@ -54,6 +56,9 @@ def channel_credentials_ssl( pair = None if private_key is not None or certificate_chain is not None: pair = cygrpc.SslPemKeyCertPair(private_key, certificate_chain) + if root_certificates is None: + root_certificates = pkg_resources.resource_string( + __name__, _ROOT_CERTIFICATES_RESOURCE_PATH) return cygrpc.channel_credentials_ssl(root_certificates, pair) From 387e116fd6e3afd2413bd2d01b25eb19decd842e Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Tue, 5 Jan 2016 10:16:12 -0800 Subject: [PATCH 21/28] Use BoringSSL for Python gRPC --- PYTHON-MANIFEST.in | 1 + build.yaml | 1 + setup.py | 22 +- src/python/grpcio/grpc_core_dependencies.py | 294 ++++++++++++++++++++ tools/run_tests/build_python.sh | 4 +- tools/run_tests/run_python.sh | 2 +- 6 files changed, 314 insertions(+), 10 deletions(-) diff --git a/PYTHON-MANIFEST.in b/PYTHON-MANIFEST.in index 0208a88ab14..02bd9b52294 100644 --- a/PYTHON-MANIFEST.in +++ b/PYTHON-MANIFEST.in @@ -2,6 +2,7 @@ graft src/python/grpcio/grpc graft src/python/grpcio/tests graft src/core graft include/grpc +graft third_party/boringssl include src/python/grpcio/commands.py include src/python/grpcio/grpc_core_dependencies.py include src/python/grpcio/README.rst diff --git a/build.yaml b/build.yaml index 4abef736d77..7ca6d525a40 100644 --- a/build.yaml +++ b/build.yaml @@ -2478,3 +2478,4 @@ python_dependencies: deps: - grpc - gpr + - boringssl diff --git a/setup.py b/setup.py index 436db7dd465..3d313e6936a 100644 --- a/setup.py +++ b/setup.py @@ -44,6 +44,7 @@ egg_info.manifest_maker.template = 'PYTHON-MANIFEST.in' PYTHON_STEM = './src/python/grpcio/' CORE_INCLUDE = ('./include', './',) +BORINGSSL_INCLUDE = ('./third_party/boringssl/include',) # Ensure we're in the proper directory whether or not we're being used by pip. os.chdir(os.path.dirname(os.path.abspath(__file__))) @@ -71,18 +72,24 @@ CYTHON_EXTENSION_PACKAGE_NAMES = () CYTHON_EXTENSION_MODULE_NAMES = ('grpc._cython.cygrpc',) -EXTENSION_INCLUDE_DIRECTORIES = (PYTHON_STEM,) + CORE_INCLUDE +EXTENSION_INCLUDE_DIRECTORIES = ( + (PYTHON_STEM,) + CORE_INCLUDE + BORINGSSL_INCLUDE) -EXTENSION_LIBRARIES = ( - 'ssl', - 'crypto', -) +EXTENSION_LIBRARIES = () if not "darwin" in sys.platform: EXTENSION_LIBRARIES += ('rt',) +EXTRA_COMPILE_ARGS = () +if not "win" in sys.platform: + EXTRA_COMPILE_ARGS = ('-pthread',) + +DEFINE_MACROS = (('OPENSSL_NO_ASM', 1),) def cython_extensions(package_names, module_names, include_dirs, libraries, + define_macros, extra_compile_args, build_with_cython=False): + if ENABLE_CYTHON_TRACING: + define_macros = define_macros + [('CYTHON_TRACE_NOGIL', 1)] file_extension = 'pyx' if build_with_cython else 'c' module_files = [os.path.join(PYTHON_STEM, name.replace('.', '/') + '.' + file_extension) @@ -92,7 +99,8 @@ def cython_extensions(package_names, module_names, include_dirs, libraries, name=module_name, sources=[module_file] + grpc_core_dependencies.CORE_SOURCE_FILES, include_dirs=include_dirs, libraries=libraries, - define_macros=[('CYTHON_TRACE_NOGIL', 1)] if ENABLE_CYTHON_TRACING else [] + extra_compile_args=extra_compile_args, + define_macros=define_macros, ) for (module_name, module_file) in zip(module_names, module_files) ] if build_with_cython: @@ -107,7 +115,7 @@ def cython_extensions(package_names, module_names, include_dirs, libraries, CYTHON_EXTENSION_MODULES = cython_extensions( list(CYTHON_EXTENSION_PACKAGE_NAMES), list(CYTHON_EXTENSION_MODULE_NAMES), list(EXTENSION_INCLUDE_DIRECTORIES), list(EXTENSION_LIBRARIES), - bool(BUILD_WITH_CYTHON)) + list(DEFINE_MACROS), list(EXTRA_COMPILE_ARGS), bool(BUILD_WITH_CYTHON)) PACKAGE_DIRECTORIES = { '': PYTHON_STEM, diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index cd4b7101d43..d394c1c86e6 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -192,4 +192,298 @@ CORE_SOURCE_FILES = [ 'src/core/census/initialize.c', 'src/core/census/operation.c', 'src/core/census/tracing.c', + 'src/boringssl/err_data.c', + 'third_party/boringssl/crypto/aes/aes.c', + 'third_party/boringssl/crypto/aes/mode_wrappers.c', + 'third_party/boringssl/crypto/asn1/a_bitstr.c', + 'third_party/boringssl/crypto/asn1/a_bool.c', + 'third_party/boringssl/crypto/asn1/a_bytes.c', + 'third_party/boringssl/crypto/asn1/a_d2i_fp.c', + 'third_party/boringssl/crypto/asn1/a_dup.c', + 'third_party/boringssl/crypto/asn1/a_enum.c', + 'third_party/boringssl/crypto/asn1/a_gentm.c', + 'third_party/boringssl/crypto/asn1/a_i2d_fp.c', + 'third_party/boringssl/crypto/asn1/a_int.c', + 'third_party/boringssl/crypto/asn1/a_mbstr.c', + 'third_party/boringssl/crypto/asn1/a_object.c', + 'third_party/boringssl/crypto/asn1/a_octet.c', + 'third_party/boringssl/crypto/asn1/a_print.c', + 'third_party/boringssl/crypto/asn1/a_strnid.c', + 'third_party/boringssl/crypto/asn1/a_time.c', + 'third_party/boringssl/crypto/asn1/a_type.c', + 'third_party/boringssl/crypto/asn1/a_utctm.c', + 'third_party/boringssl/crypto/asn1/a_utf8.c', + 'third_party/boringssl/crypto/asn1/asn1_lib.c', + 'third_party/boringssl/crypto/asn1/asn1_par.c', + 'third_party/boringssl/crypto/asn1/asn_pack.c', + 'third_party/boringssl/crypto/asn1/bio_asn1.c', + 'third_party/boringssl/crypto/asn1/bio_ndef.c', + 'third_party/boringssl/crypto/asn1/f_enum.c', + 'third_party/boringssl/crypto/asn1/f_int.c', + 'third_party/boringssl/crypto/asn1/f_string.c', + 'third_party/boringssl/crypto/asn1/t_bitst.c', + 'third_party/boringssl/crypto/asn1/t_pkey.c', + 'third_party/boringssl/crypto/asn1/tasn_dec.c', + 'third_party/boringssl/crypto/asn1/tasn_enc.c', + 'third_party/boringssl/crypto/asn1/tasn_fre.c', + 'third_party/boringssl/crypto/asn1/tasn_new.c', + 'third_party/boringssl/crypto/asn1/tasn_prn.c', + 'third_party/boringssl/crypto/asn1/tasn_typ.c', + 'third_party/boringssl/crypto/asn1/tasn_utl.c', + 'third_party/boringssl/crypto/asn1/x_bignum.c', + 'third_party/boringssl/crypto/asn1/x_long.c', + 'third_party/boringssl/crypto/base64/base64.c', + 'third_party/boringssl/crypto/bio/bio.c', + 'third_party/boringssl/crypto/bio/bio_mem.c', + 'third_party/boringssl/crypto/bio/buffer.c', + 'third_party/boringssl/crypto/bio/connect.c', + 'third_party/boringssl/crypto/bio/fd.c', + 'third_party/boringssl/crypto/bio/file.c', + 'third_party/boringssl/crypto/bio/hexdump.c', + 'third_party/boringssl/crypto/bio/pair.c', + 'third_party/boringssl/crypto/bio/printf.c', + 'third_party/boringssl/crypto/bio/socket.c', + 'third_party/boringssl/crypto/bio/socket_helper.c', + 'third_party/boringssl/crypto/bn/add.c', + 'third_party/boringssl/crypto/bn/asm/x86_64-gcc.c', + 'third_party/boringssl/crypto/bn/bn.c', + 'third_party/boringssl/crypto/bn/bn_asn1.c', + 'third_party/boringssl/crypto/bn/cmp.c', + 'third_party/boringssl/crypto/bn/convert.c', + 'third_party/boringssl/crypto/bn/ctx.c', + 'third_party/boringssl/crypto/bn/div.c', + 'third_party/boringssl/crypto/bn/exponentiation.c', + 'third_party/boringssl/crypto/bn/gcd.c', + 'third_party/boringssl/crypto/bn/generic.c', + 'third_party/boringssl/crypto/bn/kronecker.c', + 'third_party/boringssl/crypto/bn/montgomery.c', + 'third_party/boringssl/crypto/bn/mul.c', + 'third_party/boringssl/crypto/bn/prime.c', + 'third_party/boringssl/crypto/bn/random.c', + 'third_party/boringssl/crypto/bn/rsaz_exp.c', + 'third_party/boringssl/crypto/bn/shift.c', + 'third_party/boringssl/crypto/bn/sqrt.c', + 'third_party/boringssl/crypto/buf/buf.c', + 'third_party/boringssl/crypto/bytestring/ber.c', + 'third_party/boringssl/crypto/bytestring/cbb.c', + 'third_party/boringssl/crypto/bytestring/cbs.c', + 'third_party/boringssl/crypto/chacha/chacha_generic.c', + 'third_party/boringssl/crypto/chacha/chacha_vec.c', + 'third_party/boringssl/crypto/cipher/aead.c', + 'third_party/boringssl/crypto/cipher/cipher.c', + 'third_party/boringssl/crypto/cipher/derive_key.c', + 'third_party/boringssl/crypto/cipher/e_aes.c', + 'third_party/boringssl/crypto/cipher/e_chacha20poly1305.c', + 'third_party/boringssl/crypto/cipher/e_des.c', + 'third_party/boringssl/crypto/cipher/e_null.c', + 'third_party/boringssl/crypto/cipher/e_rc2.c', + 'third_party/boringssl/crypto/cipher/e_rc4.c', + 'third_party/boringssl/crypto/cipher/e_ssl3.c', + 'third_party/boringssl/crypto/cipher/e_tls.c', + 'third_party/boringssl/crypto/cipher/tls_cbc.c', + 'third_party/boringssl/crypto/cmac/cmac.c', + 'third_party/boringssl/crypto/conf/conf.c', + 'third_party/boringssl/crypto/cpu-arm.c', + 'third_party/boringssl/crypto/cpu-intel.c', + 'third_party/boringssl/crypto/crypto.c', + 'third_party/boringssl/crypto/curve25519/curve25519.c', + 'third_party/boringssl/crypto/des/des.c', + 'third_party/boringssl/crypto/dh/check.c', + 'third_party/boringssl/crypto/dh/dh.c', + 'third_party/boringssl/crypto/dh/dh_asn1.c', + 'third_party/boringssl/crypto/dh/params.c', + 'third_party/boringssl/crypto/digest/digest.c', + 'third_party/boringssl/crypto/digest/digests.c', + 'third_party/boringssl/crypto/directory_posix.c', + 'third_party/boringssl/crypto/directory_win.c', + 'third_party/boringssl/crypto/dsa/dsa.c', + 'third_party/boringssl/crypto/dsa/dsa_asn1.c', + 'third_party/boringssl/crypto/ec/ec.c', + 'third_party/boringssl/crypto/ec/ec_asn1.c', + 'third_party/boringssl/crypto/ec/ec_key.c', + 'third_party/boringssl/crypto/ec/ec_montgomery.c', + 'third_party/boringssl/crypto/ec/oct.c', + 'third_party/boringssl/crypto/ec/p224-64.c', + 'third_party/boringssl/crypto/ec/p256-64.c', + 'third_party/boringssl/crypto/ec/p256-x86_64.c', + 'third_party/boringssl/crypto/ec/simple.c', + 'third_party/boringssl/crypto/ec/util-64.c', + 'third_party/boringssl/crypto/ec/wnaf.c', + 'third_party/boringssl/crypto/ecdh/ecdh.c', + 'third_party/boringssl/crypto/ecdsa/ecdsa.c', + 'third_party/boringssl/crypto/ecdsa/ecdsa_asn1.c', + 'third_party/boringssl/crypto/engine/engine.c', + 'third_party/boringssl/crypto/err/err.c', + 'third_party/boringssl/crypto/evp/algorithm.c', + 'third_party/boringssl/crypto/evp/digestsign.c', + 'third_party/boringssl/crypto/evp/evp.c', + 'third_party/boringssl/crypto/evp/evp_asn1.c', + 'third_party/boringssl/crypto/evp/evp_ctx.c', + 'third_party/boringssl/crypto/evp/p_dsa_asn1.c', + 'third_party/boringssl/crypto/evp/p_ec.c', + 'third_party/boringssl/crypto/evp/p_ec_asn1.c', + 'third_party/boringssl/crypto/evp/p_rsa.c', + 'third_party/boringssl/crypto/evp/p_rsa_asn1.c', + 'third_party/boringssl/crypto/evp/pbkdf.c', + 'third_party/boringssl/crypto/evp/sign.c', + 'third_party/boringssl/crypto/ex_data.c', + 'third_party/boringssl/crypto/hkdf/hkdf.c', + 'third_party/boringssl/crypto/hmac/hmac.c', + 'third_party/boringssl/crypto/lhash/lhash.c', + 'third_party/boringssl/crypto/md4/md4.c', + 'third_party/boringssl/crypto/md5/md5.c', + 'third_party/boringssl/crypto/mem.c', + 'third_party/boringssl/crypto/modes/cbc.c', + 'third_party/boringssl/crypto/modes/cfb.c', + 'third_party/boringssl/crypto/modes/ctr.c', + 'third_party/boringssl/crypto/modes/gcm.c', + 'third_party/boringssl/crypto/modes/ofb.c', + 'third_party/boringssl/crypto/obj/obj.c', + 'third_party/boringssl/crypto/obj/obj_xref.c', + 'third_party/boringssl/crypto/pem/pem_all.c', + 'third_party/boringssl/crypto/pem/pem_info.c', + 'third_party/boringssl/crypto/pem/pem_lib.c', + 'third_party/boringssl/crypto/pem/pem_oth.c', + 'third_party/boringssl/crypto/pem/pem_pk8.c', + 'third_party/boringssl/crypto/pem/pem_pkey.c', + 'third_party/boringssl/crypto/pem/pem_x509.c', + 'third_party/boringssl/crypto/pem/pem_xaux.c', + 'third_party/boringssl/crypto/pkcs8/p5_pbe.c', + 'third_party/boringssl/crypto/pkcs8/p5_pbev2.c', + 'third_party/boringssl/crypto/pkcs8/p8_pkey.c', + 'third_party/boringssl/crypto/pkcs8/pkcs8.c', + 'third_party/boringssl/crypto/poly1305/poly1305.c', + 'third_party/boringssl/crypto/poly1305/poly1305_arm.c', + 'third_party/boringssl/crypto/poly1305/poly1305_vec.c', + 'third_party/boringssl/crypto/rand/rand.c', + 'third_party/boringssl/crypto/rand/urandom.c', + 'third_party/boringssl/crypto/rand/windows.c', + 'third_party/boringssl/crypto/rc4/rc4.c', + 'third_party/boringssl/crypto/refcount_c11.c', + 'third_party/boringssl/crypto/refcount_lock.c', + 'third_party/boringssl/crypto/rsa/blinding.c', + 'third_party/boringssl/crypto/rsa/padding.c', + 'third_party/boringssl/crypto/rsa/rsa.c', + 'third_party/boringssl/crypto/rsa/rsa_asn1.c', + 'third_party/boringssl/crypto/rsa/rsa_impl.c', + 'third_party/boringssl/crypto/sha/sha1.c', + 'third_party/boringssl/crypto/sha/sha256.c', + 'third_party/boringssl/crypto/sha/sha512.c', + 'third_party/boringssl/crypto/stack/stack.c', + 'third_party/boringssl/crypto/thread.c', + 'third_party/boringssl/crypto/thread_none.c', + 'third_party/boringssl/crypto/thread_pthread.c', + 'third_party/boringssl/crypto/thread_win.c', + 'third_party/boringssl/crypto/time_support.c', + 'third_party/boringssl/crypto/x509/a_digest.c', + 'third_party/boringssl/crypto/x509/a_sign.c', + 'third_party/boringssl/crypto/x509/a_strex.c', + 'third_party/boringssl/crypto/x509/a_verify.c', + 'third_party/boringssl/crypto/x509/asn1_gen.c', + 'third_party/boringssl/crypto/x509/by_dir.c', + 'third_party/boringssl/crypto/x509/by_file.c', + 'third_party/boringssl/crypto/x509/i2d_pr.c', + 'third_party/boringssl/crypto/x509/pkcs7.c', + 'third_party/boringssl/crypto/x509/t_crl.c', + 'third_party/boringssl/crypto/x509/t_req.c', + 'third_party/boringssl/crypto/x509/t_x509.c', + 'third_party/boringssl/crypto/x509/t_x509a.c', + 'third_party/boringssl/crypto/x509/x509.c', + 'third_party/boringssl/crypto/x509/x509_att.c', + 'third_party/boringssl/crypto/x509/x509_cmp.c', + 'third_party/boringssl/crypto/x509/x509_d2.c', + 'third_party/boringssl/crypto/x509/x509_def.c', + 'third_party/boringssl/crypto/x509/x509_ext.c', + 'third_party/boringssl/crypto/x509/x509_lu.c', + 'third_party/boringssl/crypto/x509/x509_obj.c', + 'third_party/boringssl/crypto/x509/x509_r2x.c', + 'third_party/boringssl/crypto/x509/x509_req.c', + 'third_party/boringssl/crypto/x509/x509_set.c', + 'third_party/boringssl/crypto/x509/x509_trs.c', + 'third_party/boringssl/crypto/x509/x509_txt.c', + 'third_party/boringssl/crypto/x509/x509_v3.c', + 'third_party/boringssl/crypto/x509/x509_vfy.c', + 'third_party/boringssl/crypto/x509/x509_vpm.c', + 'third_party/boringssl/crypto/x509/x509cset.c', + 'third_party/boringssl/crypto/x509/x509name.c', + 'third_party/boringssl/crypto/x509/x509rset.c', + 'third_party/boringssl/crypto/x509/x509spki.c', + 'third_party/boringssl/crypto/x509/x509type.c', + 'third_party/boringssl/crypto/x509/x_algor.c', + 'third_party/boringssl/crypto/x509/x_all.c', + 'third_party/boringssl/crypto/x509/x_attrib.c', + 'third_party/boringssl/crypto/x509/x_crl.c', + 'third_party/boringssl/crypto/x509/x_exten.c', + 'third_party/boringssl/crypto/x509/x_info.c', + 'third_party/boringssl/crypto/x509/x_name.c', + 'third_party/boringssl/crypto/x509/x_pkey.c', + 'third_party/boringssl/crypto/x509/x_pubkey.c', + 'third_party/boringssl/crypto/x509/x_req.c', + 'third_party/boringssl/crypto/x509/x_sig.c', + 'third_party/boringssl/crypto/x509/x_spki.c', + 'third_party/boringssl/crypto/x509/x_val.c', + 'third_party/boringssl/crypto/x509/x_x509.c', + 'third_party/boringssl/crypto/x509/x_x509a.c', + 'third_party/boringssl/crypto/x509v3/pcy_cache.c', + 'third_party/boringssl/crypto/x509v3/pcy_data.c', + 'third_party/boringssl/crypto/x509v3/pcy_lib.c', + 'third_party/boringssl/crypto/x509v3/pcy_map.c', + 'third_party/boringssl/crypto/x509v3/pcy_node.c', + 'third_party/boringssl/crypto/x509v3/pcy_tree.c', + 'third_party/boringssl/crypto/x509v3/v3_akey.c', + 'third_party/boringssl/crypto/x509v3/v3_akeya.c', + 'third_party/boringssl/crypto/x509v3/v3_alt.c', + 'third_party/boringssl/crypto/x509v3/v3_bcons.c', + 'third_party/boringssl/crypto/x509v3/v3_bitst.c', + 'third_party/boringssl/crypto/x509v3/v3_conf.c', + 'third_party/boringssl/crypto/x509v3/v3_cpols.c', + 'third_party/boringssl/crypto/x509v3/v3_crld.c', + 'third_party/boringssl/crypto/x509v3/v3_enum.c', + 'third_party/boringssl/crypto/x509v3/v3_extku.c', + 'third_party/boringssl/crypto/x509v3/v3_genn.c', + 'third_party/boringssl/crypto/x509v3/v3_ia5.c', + 'third_party/boringssl/crypto/x509v3/v3_info.c', + 'third_party/boringssl/crypto/x509v3/v3_int.c', + 'third_party/boringssl/crypto/x509v3/v3_lib.c', + 'third_party/boringssl/crypto/x509v3/v3_ncons.c', + 'third_party/boringssl/crypto/x509v3/v3_pci.c', + 'third_party/boringssl/crypto/x509v3/v3_pcia.c', + 'third_party/boringssl/crypto/x509v3/v3_pcons.c', + 'third_party/boringssl/crypto/x509v3/v3_pku.c', + 'third_party/boringssl/crypto/x509v3/v3_pmaps.c', + 'third_party/boringssl/crypto/x509v3/v3_prn.c', + 'third_party/boringssl/crypto/x509v3/v3_purp.c', + 'third_party/boringssl/crypto/x509v3/v3_skey.c', + 'third_party/boringssl/crypto/x509v3/v3_sxnet.c', + 'third_party/boringssl/crypto/x509v3/v3_utl.c', + 'third_party/boringssl/ssl/custom_extensions.c', + 'third_party/boringssl/ssl/d1_both.c', + 'third_party/boringssl/ssl/d1_clnt.c', + 'third_party/boringssl/ssl/d1_lib.c', + 'third_party/boringssl/ssl/d1_meth.c', + 'third_party/boringssl/ssl/d1_pkt.c', + 'third_party/boringssl/ssl/d1_srtp.c', + 'third_party/boringssl/ssl/d1_srvr.c', + 'third_party/boringssl/ssl/dtls_record.c', + 'third_party/boringssl/ssl/pqueue/pqueue.c', + 'third_party/boringssl/ssl/s3_both.c', + 'third_party/boringssl/ssl/s3_clnt.c', + 'third_party/boringssl/ssl/s3_enc.c', + 'third_party/boringssl/ssl/s3_lib.c', + 'third_party/boringssl/ssl/s3_meth.c', + 'third_party/boringssl/ssl/s3_pkt.c', + 'third_party/boringssl/ssl/s3_srvr.c', + 'third_party/boringssl/ssl/ssl_aead_ctx.c', + 'third_party/boringssl/ssl/ssl_asn1.c', + 'third_party/boringssl/ssl/ssl_buffer.c', + 'third_party/boringssl/ssl/ssl_cert.c', + 'third_party/boringssl/ssl/ssl_cipher.c', + 'third_party/boringssl/ssl/ssl_file.c', + 'third_party/boringssl/ssl/ssl_lib.c', + 'third_party/boringssl/ssl/ssl_rsa.c', + 'third_party/boringssl/ssl/ssl_session.c', + 'third_party/boringssl/ssl/ssl_stat.c', + 'third_party/boringssl/ssl/t1_enc.c', + 'third_party/boringssl/ssl/t1_lib.c', + 'third_party/boringssl/ssl/tls_record.c', ] diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index 8159e5a464f..80b0088579c 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -37,8 +37,8 @@ ROOT=`pwd` export LD_LIBRARY_PATH=$ROOT/libs/$CONFIG export DYLD_LIBRARY_PATH=$ROOT/libs/$CONFIG export PATH=$ROOT/bins/$CONFIG:$ROOT/bins/$CONFIG/protobuf:$PATH -export CFLAGS="-I$ROOT/include -std=c89" -export LDFLAGS="-L$ROOT/libs/$CONFIG -L$ROOT/libs/$CONFIG/openssl" +export CFLAGS="-I$ROOT/include -std=gnu99" +export LDFLAGS="-L$ROOT/libs/$CONFIG" export GRPC_PYTHON_BUILD_WITH_CYTHON=1 export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1 diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh index 35144926460..23f2122905a 100755 --- a/tools/run_tests/run_python.sh +++ b/tools/run_tests/run_python.sh @@ -38,7 +38,7 @@ export LD_LIBRARY_PATH=$ROOT/libs/$CONFIG export DYLD_LIBRARY_PATH=$ROOT/libs/$CONFIG export PATH=$ROOT/bins/$CONFIG:$ROOT/bins/$CONFIG/protobuf:$PATH export CFLAGS="-I$ROOT/include -std=c89" -export LDFLAGS="-L$ROOT/libs/$CONFIG -L$ROOT/libs/$CONFIG/openssl" +export LDFLAGS="-L$ROOT/libs/$CONFIG" export GRPC_PYTHON_BUILD_WITH_CYTHON=1 export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1 From 8e7a4b66e8d5480c9f3040f5d2098fa9138f0925 Mon Sep 17 00:00:00 2001 From: Ian Coolidge Date: Mon, 11 Jan 2016 13:31:03 -0800 Subject: [PATCH 22/28] Fix R/W template argument order in prototypes In some cases, the prototype argument order was different than the declaration order. Based on a patch from Sam Leffler. --- include/grpc++/channel.h | 8 ++++---- include/grpc++/client_context.h | 8 ++++---- include/grpc++/completion_queue.h | 8 ++++---- include/grpc++/server_context.h | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/grpc++/channel.h b/include/grpc++/channel.h index d6d72a9cf98..de3ebfebd48 100644 --- a/include/grpc++/channel.h +++ b/include/grpc++/channel.h @@ -54,13 +54,13 @@ template class ClientReader; template class ClientWriter; -template +template class ClientReaderWriter; template class ClientAsyncReader; template class ClientAsyncWriter; -template +template class ClientAsyncReaderWriter; template class ClientAsyncResponseReader; @@ -98,13 +98,13 @@ class Channel GRPC_FINAL : public GrpcLibrary, friend class ::grpc::ClientReader; template friend class ::grpc::ClientWriter; - template + template friend class ::grpc::ClientReaderWriter; template friend class ::grpc::ClientAsyncReader; template friend class ::grpc::ClientAsyncWriter; - template + template friend class ::grpc::ClientAsyncReaderWriter; template friend class ::grpc::ClientAsyncResponseReader; diff --git a/include/grpc++/client_context.h b/include/grpc++/client_context.h index ab8ffb6474f..24f80abdc8b 100644 --- a/include/grpc++/client_context.h +++ b/include/grpc++/client_context.h @@ -76,13 +76,13 @@ template class ClientReader; template class ClientWriter; -template +template class ClientReaderWriter; template class ClientAsyncReader; template class ClientAsyncWriter; -template +template class ClientAsyncReaderWriter; template class ClientAsyncResponseReader; @@ -304,13 +304,13 @@ class ClientContext { friend class ::grpc::ClientReader; template friend class ::grpc::ClientWriter; - template + template friend class ::grpc::ClientReaderWriter; template friend class ::grpc::ClientAsyncReader; template friend class ::grpc::ClientAsyncWriter; - template + template friend class ::grpc::ClientAsyncReaderWriter; template friend class ::grpc::ClientAsyncResponseReader; diff --git a/include/grpc++/completion_queue.h b/include/grpc++/completion_queue.h index 0ea970417e6..b479239b63d 100644 --- a/include/grpc++/completion_queue.h +++ b/include/grpc++/completion_queue.h @@ -49,13 +49,13 @@ template class ClientReader; template class ClientWriter; -template +template class ClientReaderWriter; template class ServerReader; template class ServerWriter; -template +template class ServerReaderWriter; template class RpcMethodHandler; @@ -151,13 +151,13 @@ class CompletionQueue : public GrpcLibrary { friend class ::grpc::ClientReader; template friend class ::grpc::ClientWriter; - template + template friend class ::grpc::ClientReaderWriter; template friend class ::grpc::ServerReader; template friend class ::grpc::ServerWriter; - template + template friend class ::grpc::ServerReaderWriter; template friend class RpcMethodHandler; diff --git a/include/grpc++/server_context.h b/include/grpc++/server_context.h index 85f384d4773..abb3e5aa03d 100644 --- a/include/grpc++/server_context.h +++ b/include/grpc++/server_context.h @@ -58,13 +58,13 @@ template class ServerAsyncWriter; template class ServerAsyncResponseWriter; -template +template class ServerAsyncReaderWriter; template class ServerReader; template class ServerWriter; -template +template class ServerReaderWriter; template class RpcMethodHandler; @@ -145,13 +145,13 @@ class ServerContext { friend class ::grpc::ServerAsyncWriter; template friend class ::grpc::ServerAsyncResponseWriter; - template + template friend class ::grpc::ServerAsyncReaderWriter; template friend class ::grpc::ServerReader; template friend class ::grpc::ServerWriter; - template + template friend class ::grpc::ServerReaderWriter; template friend class RpcMethodHandler; From 069384da5e82b9e4274a967589bdbd58bff44507 Mon Sep 17 00:00:00 2001 From: Ian Coolidge Date: Mon, 11 Jan 2016 13:41:02 -0800 Subject: [PATCH 23/28] base64: clarify signedness in negative initialization Some platforms do not use signed char (arm) --- src/core/security/base64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/security/base64.c b/src/core/security/base64.c index e68359602e6..0c3645788eb 100644 --- a/src/core/security/base64.c +++ b/src/core/security/base64.c @@ -33,6 +33,7 @@ #include "src/core/security/base64.h" +#include #include #include @@ -41,7 +42,7 @@ /* --- Constants. --- */ -static const char base64_bytes[] = { +static const int8_t base64_bytes[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, From 81afdda8c21368477401cbb5ff76a91d636628e3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 11 Jan 2016 17:09:18 -0800 Subject: [PATCH 24/28] Fix formatting --- src/core/client_config/lb_policies/pick_first.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/client_config/lb_policies/pick_first.c b/src/core/client_config/lb_policies/pick_first.c index 4a90b070026..8f95028295d 100644 --- a/src/core/client_config/lb_policies/pick_first.c +++ b/src/core/client_config/lb_policies/pick_first.c @@ -75,7 +75,8 @@ typedef struct { grpc_connectivity_state_tracker state_tracker; } pick_first_lb_policy; -#define GET_SELECTED(p) ((grpc_connected_subchannel *)gpr_atm_no_barrier_load(&(p)->selected)) +#define GET_SELECTED(p) \ + ((grpc_connected_subchannel *)gpr_atm_no_barrier_load(&(p)->selected)) void pf_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { pick_first_lb_policy *p = (pick_first_lb_policy *)pol; @@ -264,7 +265,8 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_connectivity_state_set(exec_ctx, &p->state_tracker, GRPC_CHANNEL_READY, "connecting_ready"); selected_subchannel = p->subchannels[p->checking_subchannel]; - selected = grpc_subchannel_get_connected_subchannel(selected_subchannel); + selected = + grpc_subchannel_get_connected_subchannel(selected_subchannel); GPR_ASSERT(selected != NULL); gpr_atm_no_barrier_store(&p->selected, (gpr_atm)selected); GRPC_CONNECTED_SUBCHANNEL_REF(selected, "picked_first"); From 750d3ed81666206a43dab96fa35dbd6e4aee04e3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 12 Jan 2016 09:38:25 -0800 Subject: [PATCH 25/28] Fix check_copyright.py --- tools/distrib/check_copyright.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/distrib/check_copyright.py b/tools/distrib/check_copyright.py index f54e5fad807..5158c11417a 100755 --- a/tools/distrib/check_copyright.py +++ b/tools/distrib/check_copyright.py @@ -117,6 +117,7 @@ def log(cond, why, filename): # scan files, validate the text +ok = True for filename in subprocess.check_output('git ls-tree -r --name-only -r HEAD', shell=True).splitlines(): if filename in KNOWN_BAD: continue @@ -130,7 +131,6 @@ for filename in subprocess.check_output('git ls-tree -r --name-only -r HEAD', log(args.skips, 'skip', filename) continue text = load(filename) - ok = True m = re.search(re_license, text) if m: last_modified = int(subprocess.check_output('git log -1 --format="%ad" --date=short -- ' + filename, shell=True)[0:4]) From 3466c4b55db807560dfec4a30b3a9cae396033c9 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 12 Jan 2016 10:26:04 -0800 Subject: [PATCH 26/28] Updated copyrights --- Makefile | 2 +- include/grpc++/channel.h | 2 +- include/grpc++/client_context.h | 2 +- include/grpc++/completion_queue.h | 2 +- include/grpc++/server_context.h | 2 +- include/grpc++/support/async_stream.h | 2 +- setup.py | 2 +- .../client_config/lb_policies/pick_first.c | 2 +- src/core/iomgr/fd_posix.c | 2 +- src/core/iomgr/fd_posix.h | 2 +- .../iomgr/pollset_multipoller_with_epoll.c | 2 +- .../pollset_multipoller_with_poll_posix.c | 2 +- src/core/iomgr/pollset_posix.h | 2 +- src/core/iomgr/tcp_posix.c | 2 +- src/core/iomgr/tcp_posix.h | 2 +- src/core/security/base64.c | 2 +- src/core/support/sync_posix.c | 2 +- src/core/transport/chttp2/internal.h | 2 +- src/core/transport/chttp2_transport.c | 2 +- src/csharp/generate_proto_csharp.sh | 2 +- src/node/interop/interop_client.js | 2 +- src/node/interop/interop_server.js | 2 +- src/node/performance/benchmark_client.js | 2 +- src/node/performance/benchmark_server.js | 2 +- src/node/performance/worker_server.js | 2 +- src/python/grpcio/commands.py | 2 +- src/python/grpcio/grpc/_adapter/_low.py | 2 +- src/python/grpcio/grpc/_cython/cygrpc.pxd | 29 +++++++++++++++++ .../grpc/framework/interfaces/face/face.py | 2 +- src/python/grpcio/grpc_core_dependencies.py | 29 +++++++++++++++++ templates/Makefile.template | 2 +- .../grpcio/grpc_core_dependencies.py.template | 31 ++++++++++++++++++- test/core/iomgr/tcp_posix_test.c | 2 +- test/core/security/jwt_verifier_test.c | 2 +- test/core/support/cpu_test.c | 2 +- test/cpp/end2end/async_end2end_test.cc | 2 +- test/cpp/end2end/generic_end2end_test.cc | 2 +- test/cpp/interop/interop_client.cc | 2 +- test/cpp/interop/reconnect_interop_server.cc | 2 +- test/cpp/interop/stress_interop_client.cc | 2 +- test/cpp/interop/stress_test.cc | 2 +- tools/jenkins/grpc_jenkins_slave/Dockerfile | 2 +- .../grpc_jenkins_slave_32bits/Dockerfile | 2 +- tools/jenkins/run_jenkins.sh | 3 +- tools/run_tests/build_python.sh | 2 +- tools/run_tests/jobset.py | 3 +- tools/run_tests/run_python.sh | 2 +- 47 files changed, 132 insertions(+), 47 deletions(-) diff --git a/Makefile b/Makefile index 18363ec31ef..52414cffc18 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ # This file can be regenerated from the template by running # tools/buildgen/generate_projects.sh -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/include/grpc++/channel.h b/include/grpc++/channel.h index de3ebfebd48..541be1345f8 100644 --- a/include/grpc++/channel.h +++ b/include/grpc++/channel.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/include/grpc++/client_context.h b/include/grpc++/client_context.h index 24f80abdc8b..a0d5c0e3c41 100644 --- a/include/grpc++/client_context.h +++ b/include/grpc++/client_context.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/include/grpc++/completion_queue.h b/include/grpc++/completion_queue.h index b479239b63d..5c2bc202c33 100644 --- a/include/grpc++/completion_queue.h +++ b/include/grpc++/completion_queue.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/include/grpc++/server_context.h b/include/grpc++/server_context.h index abb3e5aa03d..8ba73486dc4 100644 --- a/include/grpc++/server_context.h +++ b/include/grpc++/server_context.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/include/grpc++/support/async_stream.h b/include/grpc++/support/async_stream.h index 823fcd2e8e1..0c96352ccdd 100644 --- a/include/grpc++/support/async_stream.h +++ b/include/grpc++/support/async_stream.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/setup.py b/setup.py index 3d313e6936a..93b1a3ae473 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/src/core/client_config/lb_policies/pick_first.c b/src/core/client_config/lb_policies/pick_first.c index 8f95028295d..e6ddb1a11f1 100644 --- a/src/core/client_config/lb_policies/pick_first.c +++ b/src/core/client_config/lb_policies/pick_first.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/iomgr/fd_posix.c b/src/core/iomgr/fd_posix.c index 079cb06d486..89c938bc048 100644 --- a/src/core/iomgr/fd_posix.c +++ b/src/core/iomgr/fd_posix.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/iomgr/fd_posix.h b/src/core/iomgr/fd_posix.h index 8062dd01dbe..17e7de88ffa 100644 --- a/src/core/iomgr/fd_posix.h +++ b/src/core/iomgr/fd_posix.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/iomgr/pollset_multipoller_with_epoll.c b/src/core/iomgr/pollset_multipoller_with_epoll.c index dae33e42f24..911d820fc77 100644 --- a/src/core/iomgr/pollset_multipoller_with_epoll.c +++ b/src/core/iomgr/pollset_multipoller_with_epoll.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/iomgr/pollset_multipoller_with_poll_posix.c b/src/core/iomgr/pollset_multipoller_with_poll_posix.c index a7282b9896e..809f8f39daa 100644 --- a/src/core/iomgr/pollset_multipoller_with_poll_posix.c +++ b/src/core/iomgr/pollset_multipoller_with_poll_posix.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/iomgr/pollset_posix.h b/src/core/iomgr/pollset_posix.h index 8b1616a1012..b34bb094268 100644 --- a/src/core/iomgr/pollset_posix.h +++ b/src/core/iomgr/pollset_posix.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/iomgr/tcp_posix.c b/src/core/iomgr/tcp_posix.c index 65783a7afaa..4fa8ca8c711 100644 --- a/src/core/iomgr/tcp_posix.c +++ b/src/core/iomgr/tcp_posix.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/iomgr/tcp_posix.h b/src/core/iomgr/tcp_posix.h index 495ed009c8d..2a40cdd3859 100644 --- a/src/core/iomgr/tcp_posix.h +++ b/src/core/iomgr/tcp_posix.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/security/base64.c b/src/core/security/base64.c index 0c3645788eb..8367c160c36 100644 --- a/src/core/security/base64.c +++ b/src/core/security/base64.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/support/sync_posix.c b/src/core/support/sync_posix.c index 4d59a100024..d3c483f1b53 100644 --- a/src/core/support/sync_posix.c +++ b/src/core/support/sync_posix.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 0b0fccfcd48..a8262b7af2c 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index c154c07772f..05b25fd8b01 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/csharp/generate_proto_csharp.sh b/src/csharp/generate_proto_csharp.sh index 8e75fea9d04..3aeda21ba3a 100755 --- a/src/csharp/generate_proto_csharp.sh +++ b/src/csharp/generate_proto_csharp.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/src/node/interop/interop_client.js b/src/node/interop/interop_client.js index 7e65d20be2b..db383e4d000 100644 --- a/src/node/interop/interop_client.js +++ b/src/node/interop/interop_client.js @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/node/interop/interop_server.js b/src/node/interop/interop_server.js index 72807623054..c09481712aa 100644 --- a/src/node/interop/interop_server.js +++ b/src/node/interop/interop_server.js @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/node/performance/benchmark_client.js b/src/node/performance/benchmark_client.js index 9e956d40278..620aecde97b 100644 --- a/src/node/performance/benchmark_client.js +++ b/src/node/performance/benchmark_client.js @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/node/performance/benchmark_server.js b/src/node/performance/benchmark_server.js index 858f21945b4..ba61e52ba1b 100644 --- a/src/node/performance/benchmark_server.js +++ b/src/node/performance/benchmark_server.js @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/node/performance/worker_server.js b/src/node/performance/worker_server.js index 98577bdbc97..7c8ab000265 100644 --- a/src/node/performance/worker_server.js +++ b/src/node/performance/worker_server.js @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index 5497311405f..81dab1b5186 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/src/python/grpcio/grpc/_adapter/_low.py b/src/python/grpcio/grpc/_adapter/_low.py index dd3669f66c9..a850c577414 100644 --- a/src/python/grpcio/grpc/_adapter/_low.py +++ b/src/python/grpcio/grpc/_adapter/_low.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/src/python/grpcio/grpc/_cython/cygrpc.pxd b/src/python/grpcio/grpc/_cython/cygrpc.pxd index f38134efedd..f22346c4f3b 100644 --- a/src/python/grpcio/grpc/_cython/cygrpc.pxd +++ b/src/python/grpcio/grpc/_cython/cygrpc.pxd @@ -1,3 +1,32 @@ +# Copyright 2015-2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + include "grpc/_cython/_cygrpc/grpc.pxi" include "grpc/_cython/_cygrpc/call.pxd.pxi" diff --git a/src/python/grpcio/grpc/framework/interfaces/face/face.py b/src/python/grpcio/grpc/framework/interfaces/face/face.py index 59da83dc9c3..404c3a7937a 100644 --- a/src/python/grpcio/grpc/framework/interfaces/face/face.py +++ b/src/python/grpcio/grpc/framework/interfaces/face/face.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index d394c1c86e6..63cf0a4c74c 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -1,3 +1,32 @@ +# Copyright 2015-2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_core_dependencies.py.template`!!! CORE_SOURCE_FILES = [ diff --git a/templates/Makefile.template b/templates/Makefile.template index ba5a80659c0..1582cae20ac 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -7,7 +7,7 @@ # This file can be regenerated from the template by running # tools/buildgen/generate_projects.sh - # Copyright 2015, Google Inc. + # Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/templates/src/python/grpcio/grpc_core_dependencies.py.template b/templates/src/python/grpcio/grpc_core_dependencies.py.template index 1ca5f7ad6c7..2fc7a03f181 100644 --- a/templates/src/python/grpcio/grpc_core_dependencies.py.template +++ b/templates/src/python/grpcio/grpc_core_dependencies.py.template @@ -1,7 +1,36 @@ %YAML 1.2 --- | + # Copyright 2015-2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_core_dependencies.py.template`!!! - + CORE_SOURCE_FILES = [ % for lib in libs: % if lib.name in python_dependencies.transitive_deps: diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index b59ba1014b1..e0136b3cd75 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index 9f37e0374c4..f396398cefb 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/test/core/support/cpu_test.c b/test/core/support/cpu_test.c index a5c52442ad4..da16f13fd85 100644 --- a/test/core/support/cpu_test.c +++ b/test/core/support/cpu_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index dc07eb67774..62023b24fd2 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc index f8ceca5f1d6..14b534fbd20 100644 --- a/test/cpp/end2end/generic_end2end_test.cc +++ b/test/cpp/end2end/generic_end2end_test.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 6747127c225..b06310781a2 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/test/cpp/interop/reconnect_interop_server.cc b/test/cpp/interop/reconnect_interop_server.cc index e0165476d09..3602b8c2b05 100644 --- a/test/cpp/interop/reconnect_interop_server.cc +++ b/test/cpp/interop/reconnect_interop_server.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/test/cpp/interop/stress_interop_client.cc b/test/cpp/interop/stress_interop_client.cc index 04671fb935e..b581e9b33cc 100644 --- a/test/cpp/interop/stress_interop_client.cc +++ b/test/cpp/interop/stress_interop_client.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc index 05d5f2e339f..702354dc87d 100644 --- a/test/cpp/interop/stress_test.cc +++ b/test/cpp/interop/stress_test.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/tools/jenkins/grpc_jenkins_slave/Dockerfile b/tools/jenkins/grpc_jenkins_slave/Dockerfile index f3bf6bc4f0d..b1ac024dfb3 100644 --- a/tools/jenkins/grpc_jenkins_slave/Dockerfile +++ b/tools/jenkins/grpc_jenkins_slave/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile b/tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile index 1a86c5a5d7d..348a333d3e6 100644 --- a/tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile +++ b/tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/tools/jenkins/run_jenkins.sh b/tools/jenkins/run_jenkins.sh index 9b6ba719481..84b4ea51ed4 100755 --- a/tools/jenkins/run_jenkins.sh +++ b/tools/jenkins/run_jenkins.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -92,4 +92,3 @@ if [ "$TESTS_FAILED" != "" ] then exit 1 fi - diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index 80b0088579c..e0fcbb602d4 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py index 0b01bc4becd..e33433daf2a 100755 --- a/tools/run_tests/jobset.py +++ b/tools/run_tests/jobset.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -450,4 +450,3 @@ def run(cmdlines, js.set_remaining(remaining) js.finish() return js.get_num_failures(), js.resultset - diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh index 23f2122905a..ffe9c12af1a 100755 --- a/tools/run_tests/run_python.sh +++ b/tools/run_tests/run_python.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without From 4518bf7f108b80445365f8d70da777a648fbe0f5 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 12 Jan 2016 14:32:40 -0800 Subject: [PATCH 27/28] Allow transitive dependencies plugin to process non-existent libs without crashing --- tools/buildgen/plugins/transitive_dependencies.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/buildgen/plugins/transitive_dependencies.py b/tools/buildgen/plugins/transitive_dependencies.py index 1fc76a3cd51..01e7f61ea9d 100644 --- a/tools/buildgen/plugins/transitive_dependencies.py +++ b/tools/buildgen/plugins/transitive_dependencies.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -36,10 +36,13 @@ of the list of dependencies. """ def get_lib(libs, name): - return next(lib for lib in libs if lib['name']==name) + try: + return next(lib for lib in libs if lib['name']==name) + except StopIteration: + return None def transitive_deps(lib, libs): - if 'deps' in lib: + if lib is not None and 'deps' in lib: # Recursively call transitive_deps on each dependency, and take the union return set.union(set(lib['deps']), *[set(transitive_deps(get_lib(libs, dep), libs)) From fa58786f5f75f29775ce4f125c78ea1c24494d77 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 12 Jan 2016 15:31:40 -0800 Subject: [PATCH 28/28] Added --fix flag to check_copyright.py --- tools/distrib/check_copyright.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/tools/distrib/check_copyright.py b/tools/distrib/check_copyright.py index 5158c11417a..5e948e2deeb 100755 --- a/tools/distrib/check_copyright.py +++ b/tools/distrib/check_copyright.py @@ -54,6 +54,9 @@ argp.add_argument('-a', '--ancient', default=0, action='store_const', const=1) +argp.add_argument('-f', '--fix', + default=False, + action='store_true'); args = argp.parse_args() # open the license text @@ -90,7 +93,7 @@ KNOWN_BAD = set([ ]) -RE_YEAR = r'Copyright (?:[0-9]+\-)?([0-9]+), Google Inc\.' +RE_YEAR = r'Copyright (?P[0-9]+\-)?(?P[0-9]+), Google Inc\.' RE_LICENSE = dict( (k, r'\n'.join( LICENSE_PREFIX[k] + @@ -103,6 +106,9 @@ def load(name): with open(name) as f: return '\n'.join(line.rstrip() for line in f.read().splitlines()) +def save(name, text): + with open(name, 'w') as f: + f.write(text) assert(re.search(RE_LICENSE['LICENSE'], load('LICENSE'))) assert(re.search(RE_LICENSE['Makefile'], load('Makefile'))) @@ -133,11 +139,23 @@ for filename in subprocess.check_output('git ls-tree -r --name-only -r HEAD', text = load(filename) m = re.search(re_license, text) if m: + gdict = m.groupdict() last_modified = int(subprocess.check_output('git log -1 --format="%ad" --date=short -- ' + filename, shell=True)[0:4]) - latest_claimed = int(m.group(1)) + latest_claimed = int(gdict['last_year']) if last_modified > latest_claimed: print '%s modified %d but copyright only extends to %d' % (filename, last_modified, latest_claimed) ok = False + if args.fix: + span_start, span_end = m.span(2) + if not gdict['first_year']: + # prepend the old year to the current one. + text = '{}-{}{}'.format(text[:span_end], last_modified, text[span_end:]) + else: # already a year range + # simply update the last year + text = '{}{}{}'.format(text[:span_start], last_modified, text[span_end:]) + save(filename, text) + print 'Fixed!' + ok = True elif 'DO NOT EDIT' not in text and 'AssemblyInfo.cs' not in filename and filename != 'src/boringssl/err_data.c': log(1, 'copyright missing', filename) ok = False