diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-05-24 10:43:16 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-05-24 10:43:16 -0700 |
commit | 10372259a9eeb97a02113b1e97b3e6bbfff67731 (patch) | |
tree | d25dd22f1a880477198bb12221300e44af2c3884 | |
parent | c9b3e5811e3d20c94f3397b0b092e641b6ab101e (diff) | |
parent | 19def88839b15a89b4c0e79de16bd01139a0bb14 (diff) |
Merge github.com:grpc/grpc into explain-the-things
262 files changed, 8469 insertions, 6775 deletions
diff --git a/.travis.yml b/.travis.yml index c1086c1765..de40453b06 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,22 +17,23 @@ env: - CPPFLAGS=-I/tmp/prebuilt/include - NUGET="mono nuget.exe" matrix: - - CONFIG=opt TEST=sanity - - CONFIG=gcov TEST="c c++" - - CONFIG=opt TEST="c c++" - - CONFIG=opt TEST=node - - CONFIG=opt TEST=ruby - - CONFIG=opt TEST=python - - CONFIG=opt TEST=csharp - - USE_GCC=4.4 CONFIG=opt TEST=build + - CONFIG=opt TEST=sanity JOBS=1 + - CONFIG=gcov TEST=c JOBS=16 + - CONFIG=gcov TEST=c++ JOBS=16 + - CONFIG=opt TEST="c c++" JOBS=16 + - CONFIG=opt TEST=node JOBS=16 + - CONFIG=opt TEST=ruby JOBS=16 + - CONFIG=opt TEST=python JOBS=1 + - CONFIG=opt TEST=csharp JOBS=16 + - USE_GCC=4.4 CONFIG=opt TEST=build JOBS=16 script: - rvm use $RUBY_VERSION - gem install bundler - ./tools/run_tests/prepare_travis.sh - if [ ! -z "$USE_GCC" ] ; then export CC=gcc-$USE_GCC ; export CXX=g++-$USE_GCC ; fi - - ./tools/run_tests/run_tests.py -l $TEST -t -j 16 -c $CONFIG -s 4.0 + - ./tools/run_tests/run_tests.py -l $TEST -t -j $JOBS -c $CONFIG -s 4.0 after_success: - - if [ "$CONFIG" = "gcov" ] ; then coveralls --exclude third_party --exclude gens -b. --gcov-options '\-p' ; fi + - if [ "$CONFIG" = "gcov" ] ; then coveralls --exclude third_party --exclude gens --exclude test --exclude src/compiler -b. --gcov-options '\-p' ; fi notifications: email: false webhooks: @@ -354,7 +354,6 @@ cc_library( "include/grpc/byte_buffer.h", "include/grpc/byte_buffer_reader.h", "include/grpc/grpc.h", - "include/grpc/grpc_http.h", "include/grpc/status.h", ], includes = [ @@ -561,7 +560,6 @@ cc_library( "include/grpc/byte_buffer.h", "include/grpc/byte_buffer_reader.h", "include/grpc/grpc.h", - "include/grpc/grpc_http.h", "include/grpc/status.h", ], includes = [ @@ -308,7 +308,7 @@ E = @echo Q = @ endif -VERSION = 0.8.0.0 +VERSION = 0.9.0.0 CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) @@ -672,6 +672,8 @@ async_streaming_ping_pong_test: $(BINDIR)/$(CONFIG)/async_streaming_ping_pong_te async_unary_ping_pong_test: $(BINDIR)/$(CONFIG)/async_unary_ping_pong_test channel_arguments_test: $(BINDIR)/$(CONFIG)/channel_arguments_test cli_call_test: $(BINDIR)/$(CONFIG)/cli_call_test +client_crash_test: $(BINDIR)/$(CONFIG)/client_crash_test +client_crash_test_server: $(BINDIR)/$(CONFIG)/client_crash_test_server credentials_test: $(BINDIR)/$(CONFIG)/credentials_test cxx_time_test: $(BINDIR)/$(CONFIG)/cxx_time_test end2end_test: $(BINDIR)/$(CONFIG)/end2end_test @@ -692,6 +694,8 @@ pubsub_subscriber_test: $(BINDIR)/$(CONFIG)/pubsub_subscriber_test qps_driver: $(BINDIR)/$(CONFIG)/qps_driver qps_test: $(BINDIR)/$(CONFIG)/qps_test qps_worker: $(BINDIR)/$(CONFIG)/qps_worker +server_crash_test: $(BINDIR)/$(CONFIG)/server_crash_test +server_crash_test_client: $(BINDIR)/$(CONFIG)/server_crash_test_client status_test: $(BINDIR)/$(CONFIG)/status_test sync_streaming_ping_pong_test: $(BINDIR)/$(CONFIG)/sync_streaming_ping_pong_test sync_unary_ping_pong_test: $(BINDIR)/$(CONFIG)/sync_unary_ping_pong_test @@ -722,6 +726,7 @@ chttp2_fake_security_request_response_with_payload_and_call_creds_test: $(BINDIR chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test: $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test chttp2_fake_security_request_with_large_metadata_test: $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_with_large_metadata_test chttp2_fake_security_request_with_payload_test: $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_with_payload_test +chttp2_fake_security_server_finishes_request_test: $(BINDIR)/$(CONFIG)/chttp2_fake_security_server_finishes_request_test chttp2_fake_security_simple_delayed_request_test: $(BINDIR)/$(CONFIG)/chttp2_fake_security_simple_delayed_request_test chttp2_fake_security_simple_request_test: $(BINDIR)/$(CONFIG)/chttp2_fake_security_simple_request_test chttp2_fake_security_simple_request_with_high_initial_sequence_number_test: $(BINDIR)/$(CONFIG)/chttp2_fake_security_simple_request_with_high_initial_sequence_number_test @@ -750,6 +755,7 @@ chttp2_fullstack_request_response_with_payload_and_call_creds_test: $(BINDIR)/$( chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test chttp2_fullstack_request_with_large_metadata_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_large_metadata_test chttp2_fullstack_request_with_payload_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_payload_test +chttp2_fullstack_server_finishes_request_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_server_finishes_request_test chttp2_fullstack_simple_delayed_request_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_delayed_request_test chttp2_fullstack_simple_request_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_request_test chttp2_fullstack_simple_request_with_high_initial_sequence_number_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_request_with_high_initial_sequence_number_test @@ -778,6 +784,7 @@ chttp2_fullstack_uds_posix_request_response_with_payload_and_call_creds_test: $( chttp2_fullstack_uds_posix_request_response_with_trailing_metadata_and_payload_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_trailing_metadata_and_payload_test chttp2_fullstack_uds_posix_request_with_large_metadata_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_large_metadata_test chttp2_fullstack_uds_posix_request_with_payload_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_payload_test +chttp2_fullstack_uds_posix_server_finishes_request_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_server_finishes_request_test chttp2_fullstack_uds_posix_simple_delayed_request_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_delayed_request_test chttp2_fullstack_uds_posix_simple_request_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_request_test chttp2_fullstack_uds_posix_simple_request_with_high_initial_sequence_number_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_request_with_high_initial_sequence_number_test @@ -806,6 +813,7 @@ chttp2_simple_ssl_fullstack_request_response_with_payload_and_call_creds_test: $ chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test: $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test chttp2_simple_ssl_fullstack_request_with_large_metadata_test: $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_with_large_metadata_test chttp2_simple_ssl_fullstack_request_with_payload_test: $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_with_payload_test +chttp2_simple_ssl_fullstack_server_finishes_request_test: $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_server_finishes_request_test chttp2_simple_ssl_fullstack_simple_delayed_request_test: $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_delayed_request_test chttp2_simple_ssl_fullstack_simple_request_test: $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_request_test chttp2_simple_ssl_fullstack_simple_request_with_high_initial_sequence_number_test: $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_request_with_high_initial_sequence_number_test @@ -834,6 +842,7 @@ chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_and_call_c chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test: $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test chttp2_simple_ssl_with_oauth2_fullstack_request_with_large_metadata_test: $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_with_large_metadata_test chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_test: $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_test +chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test: $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test: $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test: $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test chttp2_simple_ssl_with_oauth2_fullstack_simple_request_with_high_initial_sequence_number_test: $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_request_with_high_initial_sequence_number_test @@ -862,6 +871,7 @@ chttp2_socket_pair_request_response_with_payload_and_call_creds_test: $(BINDIR)/ chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test chttp2_socket_pair_request_with_large_metadata_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_large_metadata_test chttp2_socket_pair_request_with_payload_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_payload_test +chttp2_socket_pair_server_finishes_request_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_server_finishes_request_test chttp2_socket_pair_simple_delayed_request_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_delayed_request_test chttp2_socket_pair_simple_request_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_request_test chttp2_socket_pair_simple_request_with_high_initial_sequence_number_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_request_with_high_initial_sequence_number_test @@ -890,9 +900,39 @@ chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_and_call_cre chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_test chttp2_socket_pair_one_byte_at_a_time_request_with_payload_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_payload_test +chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test chttp2_socket_pair_one_byte_at_a_time_simple_request_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_test chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_test +chttp2_socket_pair_with_grpc_trace_bad_hostname_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_bad_hostname_test +chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test +chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test +chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test +chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test +chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test +chttp2_socket_pair_with_grpc_trace_census_simple_request_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_census_simple_request_test +chttp2_socket_pair_with_grpc_trace_disappearing_server_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_disappearing_server_test +chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test +chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test +chttp2_socket_pair_with_grpc_trace_empty_batch_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_empty_batch_test +chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test +chttp2_socket_pair_with_grpc_trace_invoke_large_request_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_invoke_large_request_test +chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test +chttp2_socket_pair_with_grpc_trace_max_message_length_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_message_length_test +chttp2_socket_pair_with_grpc_trace_no_op_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_no_op_test +chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test +chttp2_socket_pair_with_grpc_trace_registered_call_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_registered_call_test +chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test +chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test +chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test +chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test +chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test +chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test +chttp2_socket_pair_with_grpc_trace_request_with_payload_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_payload_test +chttp2_socket_pair_with_grpc_trace_server_finishes_request_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_server_finishes_request_test +chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test +chttp2_socket_pair_with_grpc_trace_simple_request_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_test +chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test chttp2_fullstack_bad_hostname_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_bad_hostname_unsecure_test chttp2_fullstack_cancel_after_accept_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_after_accept_unsecure_test chttp2_fullstack_cancel_after_accept_and_writes_closed_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_after_accept_and_writes_closed_unsecure_test @@ -917,6 +957,7 @@ chttp2_fullstack_request_response_with_payload_unsecure_test: $(BINDIR)/$(CONFIG chttp2_fullstack_request_response_with_trailing_metadata_and_payload_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_trailing_metadata_and_payload_unsecure_test chttp2_fullstack_request_with_large_metadata_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_large_metadata_unsecure_test chttp2_fullstack_request_with_payload_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_payload_unsecure_test +chttp2_fullstack_server_finishes_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_server_finishes_request_unsecure_test chttp2_fullstack_simple_delayed_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_delayed_request_unsecure_test chttp2_fullstack_simple_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_request_unsecure_test chttp2_fullstack_simple_request_with_high_initial_sequence_number_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_request_with_high_initial_sequence_number_unsecure_test @@ -944,6 +985,7 @@ chttp2_fullstack_uds_posix_request_response_with_payload_unsecure_test: $(BINDIR chttp2_fullstack_uds_posix_request_response_with_trailing_metadata_and_payload_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_trailing_metadata_and_payload_unsecure_test chttp2_fullstack_uds_posix_request_with_large_metadata_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_large_metadata_unsecure_test chttp2_fullstack_uds_posix_request_with_payload_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_payload_unsecure_test +chttp2_fullstack_uds_posix_server_finishes_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_server_finishes_request_unsecure_test chttp2_fullstack_uds_posix_simple_delayed_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_delayed_request_unsecure_test chttp2_fullstack_uds_posix_simple_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_request_unsecure_test chttp2_fullstack_uds_posix_simple_request_with_high_initial_sequence_number_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_request_with_high_initial_sequence_number_unsecure_test @@ -971,6 +1013,7 @@ chttp2_socket_pair_request_response_with_payload_unsecure_test: $(BINDIR)/$(CONF chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_unsecure_test chttp2_socket_pair_request_with_large_metadata_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_large_metadata_unsecure_test chttp2_socket_pair_request_with_payload_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_payload_unsecure_test +chttp2_socket_pair_server_finishes_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_server_finishes_request_unsecure_test chttp2_socket_pair_simple_delayed_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_delayed_request_unsecure_test chttp2_socket_pair_simple_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_request_unsecure_test chttp2_socket_pair_simple_request_with_high_initial_sequence_number_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_request_with_high_initial_sequence_number_unsecure_test @@ -998,9 +1041,38 @@ chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_unsecure_tes chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_unsecure_test chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_unsecure_test chttp2_socket_pair_one_byte_at_a_time_request_with_payload_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_payload_unsecure_test +chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_unsecure_test chttp2_socket_pair_one_byte_at_a_time_simple_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_unsecure_test chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_unsecure_test +chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test +chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test +chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test +chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test +chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test +chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test +chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test +chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test +chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test +chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test +chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test +chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test +chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test +chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test +chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test +chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test +chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test +chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test +chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test +chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test +chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test +chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test +chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test +chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test +chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test +chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test +chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test +chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test: $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test run_dep_checks: $(OPENSSL_ALPN_CHECK_CMD) || true @@ -1055,11 +1127,7 @@ third_party/protobuf/configure: $(LIBDIR)/$(CONFIG)/protobuf/libprotobuf.a: third_party/protobuf/configure $(E) "[MAKE] Building protobuf" -ifeq ($(HAVE_CXX11),true) - $(Q)(cd third_party/protobuf ; CC="$(CC)" CXX="$(CXX)" LDFLAGS="$(LDFLAGS_$(CONFIG)) -g" CXXFLAGS="-DLANG_CXX11 -std=c++11" CPPFLAGS="$(PIC_CPPFLAGS) $(CPPFLAGS_$(CONFIG)) -g" ./configure --disable-shared --enable-static) -else - $(Q)(cd third_party/protobuf ; CC="$(CC)" CXX="$(CXX)" LDFLAGS="$(LDFLAGS_$(CONFIG)) -g" CXXFLAGS="-std=c++0x" CPPFLAGS="$(PIC_CPPFLAGS) $(CPPFLAGS_$(CONFIG)) -g" ./configure --disable-shared --enable-static) -endif + $(Q)(cd third_party/protobuf ; CC="$(CC)" CXX="$(CXX)" LDFLAGS="$(LDFLAGS_$(CONFIG)) -g" CPPFLAGS="$(PIC_CPPFLAGS) $(CPPFLAGS_$(CONFIG)) -g" ./configure --disable-shared --enable-static) $(Q)$(MAKE) -C third_party/protobuf clean $(Q)$(MAKE) -C third_party/protobuf $(Q)mkdir -p $(LIBDIR)/$(CONFIG)/protobuf @@ -1087,15 +1155,15 @@ plugins: $(PROTOC_PLUGINS) privatelibs: privatelibs_c privatelibs_cxx -privatelibs_c: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack_uds_posix.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a $(LIBDIR)/$(CONFIG)/libend2end_test_bad_hostname.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_invoke.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_before_invoke.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a $(LIBDIR)/$(CONFIG)/libend2end_test_census_simple_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_disappearing_server.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a $(LIBDIR)/$(CONFIG)/libend2end_test_empty_batch.a $(LIBDIR)/$(CONFIG)/libend2end_test_graceful_server_shutdown.a $(LIBDIR)/$(CONFIG)/libend2end_test_invoke_large_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_concurrent_streams.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_message_length.a $(LIBDIR)/$(CONFIG)/libend2end_test_no_op.a $(LIBDIR)/$(CONFIG)/libend2end_test_ping_pong_streaming.a $(LIBDIR)/$(CONFIG)/libend2end_test_registered_call.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_payload_and_call_creds.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_large_metadata.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_delayed_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request_with_high_initial_sequence_number.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a +privatelibs_c: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack_uds_posix.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_bad_hostname.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_invoke.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_before_invoke.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a $(LIBDIR)/$(CONFIG)/libend2end_test_census_simple_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_disappearing_server.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a $(LIBDIR)/$(CONFIG)/libend2end_test_empty_batch.a $(LIBDIR)/$(CONFIG)/libend2end_test_graceful_server_shutdown.a $(LIBDIR)/$(CONFIG)/libend2end_test_invoke_large_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_concurrent_streams.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_message_length.a $(LIBDIR)/$(CONFIG)/libend2end_test_no_op.a $(LIBDIR)/$(CONFIG)/libend2end_test_ping_pong_streaming.a $(LIBDIR)/$(CONFIG)/libend2end_test_registered_call.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_payload_and_call_creds.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_large_metadata.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_delayed_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request_with_high_initial_sequence_number.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a buildtests: buildtests_c buildtests_cxx -buildtests_c: privatelibs_c $(BINDIR)/$(CONFIG)/alarm_heap_test $(BINDIR)/$(CONFIG)/alarm_list_test $(BINDIR)/$(CONFIG)/alarm_test $(BINDIR)/$(CONFIG)/alpn_test $(BINDIR)/$(CONFIG)/bin_encoder_test $(BINDIR)/$(CONFIG)/census_hash_table_test $(BINDIR)/$(CONFIG)/census_statistics_multiple_writers_circular_buffer_test $(BINDIR)/$(CONFIG)/census_statistics_multiple_writers_test $(BINDIR)/$(CONFIG)/census_statistics_performance_test $(BINDIR)/$(CONFIG)/census_statistics_quick_test $(BINDIR)/$(CONFIG)/census_statistics_small_log_test $(BINDIR)/$(CONFIG)/census_stub_test $(BINDIR)/$(CONFIG)/census_window_stats_test $(BINDIR)/$(CONFIG)/chttp2_status_conversion_test $(BINDIR)/$(CONFIG)/chttp2_stream_encoder_test $(BINDIR)/$(CONFIG)/chttp2_stream_map_test $(BINDIR)/$(CONFIG)/dualstack_socket_test $(BINDIR)/$(CONFIG)/fd_posix_test $(BINDIR)/$(CONFIG)/fling_client $(BINDIR)/$(CONFIG)/fling_server $(BINDIR)/$(CONFIG)/fling_stream_test $(BINDIR)/$(CONFIG)/fling_test $(BINDIR)/$(CONFIG)/gpr_cancellable_test $(BINDIR)/$(CONFIG)/gpr_cmdline_test $(BINDIR)/$(CONFIG)/gpr_env_test $(BINDIR)/$(CONFIG)/gpr_file_test $(BINDIR)/$(CONFIG)/gpr_histogram_test $(BINDIR)/$(CONFIG)/gpr_host_port_test $(BINDIR)/$(CONFIG)/gpr_log_test $(BINDIR)/$(CONFIG)/gpr_slice_buffer_test $(BINDIR)/$(CONFIG)/gpr_slice_test $(BINDIR)/$(CONFIG)/gpr_string_test $(BINDIR)/$(CONFIG)/gpr_sync_test $(BINDIR)/$(CONFIG)/gpr_thd_test $(BINDIR)/$(CONFIG)/gpr_time_test $(BINDIR)/$(CONFIG)/gpr_tls_test $(BINDIR)/$(CONFIG)/gpr_useful_test $(BINDIR)/$(CONFIG)/grpc_base64_test $(BINDIR)/$(CONFIG)/grpc_byte_buffer_reader_test $(BINDIR)/$(CONFIG)/grpc_channel_stack_test $(BINDIR)/$(CONFIG)/grpc_completion_queue_test $(BINDIR)/$(CONFIG)/grpc_credentials_test $(BINDIR)/$(CONFIG)/grpc_json_token_test $(BINDIR)/$(CONFIG)/grpc_stream_op_test $(BINDIR)/$(CONFIG)/hpack_parser_test $(BINDIR)/$(CONFIG)/hpack_table_test $(BINDIR)/$(CONFIG)/httpcli_format_request_test $(BINDIR)/$(CONFIG)/httpcli_parser_test $(BINDIR)/$(CONFIG)/httpcli_test $(BINDIR)/$(CONFIG)/json_rewrite $(BINDIR)/$(CONFIG)/json_rewrite_test $(BINDIR)/$(CONFIG)/json_test $(BINDIR)/$(CONFIG)/lame_client_test $(BINDIR)/$(CONFIG)/message_compress_test $(BINDIR)/$(CONFIG)/multi_init_test $(BINDIR)/$(CONFIG)/murmur_hash_test $(BINDIR)/$(CONFIG)/no_server_test $(BINDIR)/$(CONFIG)/poll_kick_posix_test $(BINDIR)/$(CONFIG)/resolve_address_test $(BINDIR)/$(CONFIG)/secure_endpoint_test $(BINDIR)/$(CONFIG)/sockaddr_utils_test $(BINDIR)/$(CONFIG)/tcp_client_posix_test $(BINDIR)/$(CONFIG)/tcp_posix_test $(BINDIR)/$(CONFIG)/tcp_server_posix_test $(BINDIR)/$(CONFIG)/time_averaged_stats_test $(BINDIR)/$(CONFIG)/time_test $(BINDIR)/$(CONFIG)/timeout_encoding_test $(BINDIR)/$(CONFIG)/timers_test $(BINDIR)/$(CONFIG)/transport_metadata_test $(BINDIR)/$(CONFIG)/transport_security_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_bad_hostname_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_cancel_after_accept_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_cancel_after_accept_and_writes_closed_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_census_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_disappearing_server_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_empty_batch_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_invoke_large_request_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_max_message_length_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_no_op_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_registered_call_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_response_with_binary_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_response_with_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_response_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_response_with_payload_and_call_creds_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_with_large_metadata_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_simple_delayed_request_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_simple_request_with_high_initial_sequence_number_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_bad_hostname_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_after_accept_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_after_accept_and_writes_closed_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_census_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_disappearing_server_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_empty_batch_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_invoke_large_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_max_message_length_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_no_op_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_registered_call_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_binary_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_payload_and_call_creds_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_large_metadata_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_delayed_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_request_with_high_initial_sequence_number_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_bad_hostname_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_after_accept_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_after_accept_and_writes_closed_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_census_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_disappearing_server_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_early_server_shutdown_finishes_inflight_calls_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_early_server_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_empty_batch_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_invoke_large_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_max_message_length_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_no_op_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_registered_call_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_binary_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_payload_and_call_creds_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_trailing_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_large_metadata_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_delayed_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_request_with_high_initial_sequence_number_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_bad_hostname_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_accept_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_census_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_disappearing_server_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_empty_batch_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_invoke_large_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_max_message_length_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_no_op_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_registered_call_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_payload_and_call_creds_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_with_large_metadata_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_delayed_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_request_with_high_initial_sequence_number_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_bad_hostname_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_empty_batch_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_max_message_length_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_no_op_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_registered_call_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_and_call_creds_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_with_large_metadata_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_request_with_high_initial_sequence_number_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_bad_hostname_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_and_writes_closed_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_census_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_disappearing_server_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_empty_batch_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_invoke_large_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_max_message_length_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_no_op_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_registered_call_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_payload_and_call_creds_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_large_metadata_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_delayed_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_request_with_high_initial_sequence_number_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_bad_hostname_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_empty_batch_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_max_message_length_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_no_op_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_registered_call_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_and_call_creds_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_bad_hostname_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_after_accept_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_after_accept_and_writes_closed_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_after_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_before_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_in_a_vacuum_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_census_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_disappearing_server_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_tags_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_empty_batch_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_graceful_server_shutdown_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_invoke_large_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_max_concurrent_streams_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_max_message_length_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_no_op_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_ping_pong_streaming_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_registered_call_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_binary_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_trailing_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_large_metadata_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_delayed_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_request_with_high_initial_sequence_number_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_bad_hostname_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_after_accept_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_after_accept_and_writes_closed_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_after_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_before_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_in_a_vacuum_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_census_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_disappearing_server_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_early_server_shutdown_finishes_inflight_calls_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_early_server_shutdown_finishes_tags_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_empty_batch_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_graceful_server_shutdown_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_invoke_large_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_max_concurrent_streams_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_max_message_length_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_no_op_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_ping_pong_streaming_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_registered_call_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_binary_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_trailing_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_large_metadata_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_delayed_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_request_with_high_initial_sequence_number_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_bad_hostname_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_and_writes_closed_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_after_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_before_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_in_a_vacuum_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_census_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_disappearing_server_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_tags_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_empty_batch_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_graceful_server_shutdown_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_invoke_large_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_max_concurrent_streams_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_max_message_length_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_no_op_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_ping_pong_streaming_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_registered_call_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_binary_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_large_metadata_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_delayed_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_request_with_high_initial_sequence_number_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_bad_hostname_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_census_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_disappearing_server_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_empty_batch_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_max_message_length_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_no_op_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_registered_call_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_unsecure_test +buildtests_c: privatelibs_c $(BINDIR)/$(CONFIG)/alarm_heap_test $(BINDIR)/$(CONFIG)/alarm_list_test $(BINDIR)/$(CONFIG)/alarm_test $(BINDIR)/$(CONFIG)/alpn_test $(BINDIR)/$(CONFIG)/bin_encoder_test $(BINDIR)/$(CONFIG)/census_hash_table_test $(BINDIR)/$(CONFIG)/census_statistics_multiple_writers_circular_buffer_test $(BINDIR)/$(CONFIG)/census_statistics_multiple_writers_test $(BINDIR)/$(CONFIG)/census_statistics_performance_test $(BINDIR)/$(CONFIG)/census_statistics_quick_test $(BINDIR)/$(CONFIG)/census_statistics_small_log_test $(BINDIR)/$(CONFIG)/census_stub_test $(BINDIR)/$(CONFIG)/census_window_stats_test $(BINDIR)/$(CONFIG)/chttp2_status_conversion_test $(BINDIR)/$(CONFIG)/chttp2_stream_encoder_test $(BINDIR)/$(CONFIG)/chttp2_stream_map_test $(BINDIR)/$(CONFIG)/dualstack_socket_test $(BINDIR)/$(CONFIG)/fd_posix_test $(BINDIR)/$(CONFIG)/fling_client $(BINDIR)/$(CONFIG)/fling_server $(BINDIR)/$(CONFIG)/fling_stream_test $(BINDIR)/$(CONFIG)/fling_test $(BINDIR)/$(CONFIG)/gpr_cancellable_test $(BINDIR)/$(CONFIG)/gpr_cmdline_test $(BINDIR)/$(CONFIG)/gpr_env_test $(BINDIR)/$(CONFIG)/gpr_file_test $(BINDIR)/$(CONFIG)/gpr_histogram_test $(BINDIR)/$(CONFIG)/gpr_host_port_test $(BINDIR)/$(CONFIG)/gpr_log_test $(BINDIR)/$(CONFIG)/gpr_slice_buffer_test $(BINDIR)/$(CONFIG)/gpr_slice_test $(BINDIR)/$(CONFIG)/gpr_string_test $(BINDIR)/$(CONFIG)/gpr_sync_test $(BINDIR)/$(CONFIG)/gpr_thd_test $(BINDIR)/$(CONFIG)/gpr_time_test $(BINDIR)/$(CONFIG)/gpr_tls_test $(BINDIR)/$(CONFIG)/gpr_useful_test $(BINDIR)/$(CONFIG)/grpc_base64_test $(BINDIR)/$(CONFIG)/grpc_byte_buffer_reader_test $(BINDIR)/$(CONFIG)/grpc_channel_stack_test $(BINDIR)/$(CONFIG)/grpc_completion_queue_test $(BINDIR)/$(CONFIG)/grpc_credentials_test $(BINDIR)/$(CONFIG)/grpc_json_token_test $(BINDIR)/$(CONFIG)/grpc_stream_op_test $(BINDIR)/$(CONFIG)/hpack_parser_test $(BINDIR)/$(CONFIG)/hpack_table_test $(BINDIR)/$(CONFIG)/httpcli_format_request_test $(BINDIR)/$(CONFIG)/httpcli_parser_test $(BINDIR)/$(CONFIG)/httpcli_test $(BINDIR)/$(CONFIG)/json_rewrite $(BINDIR)/$(CONFIG)/json_rewrite_test $(BINDIR)/$(CONFIG)/json_test $(BINDIR)/$(CONFIG)/lame_client_test $(BINDIR)/$(CONFIG)/message_compress_test $(BINDIR)/$(CONFIG)/multi_init_test $(BINDIR)/$(CONFIG)/murmur_hash_test $(BINDIR)/$(CONFIG)/no_server_test $(BINDIR)/$(CONFIG)/poll_kick_posix_test $(BINDIR)/$(CONFIG)/resolve_address_test $(BINDIR)/$(CONFIG)/secure_endpoint_test $(BINDIR)/$(CONFIG)/sockaddr_utils_test $(BINDIR)/$(CONFIG)/tcp_client_posix_test $(BINDIR)/$(CONFIG)/tcp_posix_test $(BINDIR)/$(CONFIG)/tcp_server_posix_test $(BINDIR)/$(CONFIG)/time_averaged_stats_test $(BINDIR)/$(CONFIG)/time_test $(BINDIR)/$(CONFIG)/timeout_encoding_test $(BINDIR)/$(CONFIG)/timers_test $(BINDIR)/$(CONFIG)/transport_metadata_test $(BINDIR)/$(CONFIG)/transport_security_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_bad_hostname_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_cancel_after_accept_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_cancel_after_accept_and_writes_closed_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_census_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_disappearing_server_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_empty_batch_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_invoke_large_request_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_max_message_length_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_no_op_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_registered_call_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_response_with_binary_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_response_with_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_response_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_response_with_payload_and_call_creds_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_with_large_metadata_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_server_finishes_request_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_simple_delayed_request_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_fake_security_simple_request_with_high_initial_sequence_number_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_bad_hostname_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_after_accept_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_after_accept_and_writes_closed_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_census_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_disappearing_server_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_empty_batch_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_invoke_large_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_max_message_length_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_no_op_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_registered_call_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_binary_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_payload_and_call_creds_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_large_metadata_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_server_finishes_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_delayed_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_request_with_high_initial_sequence_number_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_bad_hostname_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_after_accept_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_after_accept_and_writes_closed_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_census_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_disappearing_server_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_early_server_shutdown_finishes_inflight_calls_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_early_server_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_empty_batch_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_invoke_large_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_max_message_length_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_no_op_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_registered_call_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_binary_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_payload_and_call_creds_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_trailing_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_large_metadata_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_server_finishes_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_delayed_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_request_with_high_initial_sequence_number_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_bad_hostname_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_accept_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_census_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_disappearing_server_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_empty_batch_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_invoke_large_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_max_message_length_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_no_op_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_registered_call_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_payload_and_call_creds_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_with_large_metadata_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_server_finishes_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_delayed_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_request_with_high_initial_sequence_number_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_bad_hostname_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_empty_batch_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_max_message_length_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_no_op_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_registered_call_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_and_call_creds_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_with_large_metadata_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_request_with_high_initial_sequence_number_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_bad_hostname_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_and_writes_closed_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_census_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_disappearing_server_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_empty_batch_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_invoke_large_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_max_message_length_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_no_op_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_registered_call_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_payload_and_call_creds_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_large_metadata_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_server_finishes_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_delayed_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_request_with_high_initial_sequence_number_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_bad_hostname_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_empty_batch_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_max_message_length_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_no_op_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_registered_call_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_and_call_creds_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_bad_hostname_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_census_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_disappearing_server_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_empty_batch_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_invoke_large_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_message_length_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_no_op_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_registered_call_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_payload_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_server_finishes_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_bad_hostname_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_after_accept_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_after_accept_and_writes_closed_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_after_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_before_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_cancel_in_a_vacuum_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_census_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_disappearing_server_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_tags_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_empty_batch_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_graceful_server_shutdown_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_invoke_large_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_max_concurrent_streams_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_max_message_length_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_no_op_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_ping_pong_streaming_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_registered_call_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_binary_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_response_with_trailing_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_large_metadata_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_server_finishes_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_delayed_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_request_with_high_initial_sequence_number_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_bad_hostname_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_after_accept_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_after_accept_and_writes_closed_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_after_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_before_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_cancel_in_a_vacuum_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_census_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_disappearing_server_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_early_server_shutdown_finishes_inflight_calls_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_early_server_shutdown_finishes_tags_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_empty_batch_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_graceful_server_shutdown_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_invoke_large_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_max_concurrent_streams_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_max_message_length_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_no_op_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_ping_pong_streaming_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_registered_call_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_binary_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_response_with_trailing_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_large_metadata_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_server_finishes_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_delayed_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_request_with_high_initial_sequence_number_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_bad_hostname_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_and_writes_closed_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_after_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_before_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_cancel_in_a_vacuum_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_census_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_disappearing_server_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_tags_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_empty_batch_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_graceful_server_shutdown_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_invoke_large_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_max_concurrent_streams_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_max_message_length_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_no_op_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_ping_pong_streaming_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_registered_call_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_binary_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_large_metadata_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_server_finishes_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_delayed_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_request_with_high_initial_sequence_number_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_bad_hostname_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_census_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_disappearing_server_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_empty_batch_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_max_message_length_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_no_op_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_registered_call_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test -buildtests_cxx: privatelibs_cxx $(BINDIR)/$(CONFIG)/async_end2end_test $(BINDIR)/$(CONFIG)/async_streaming_ping_pong_test $(BINDIR)/$(CONFIG)/async_unary_ping_pong_test $(BINDIR)/$(CONFIG)/channel_arguments_test $(BINDIR)/$(CONFIG)/cli_call_test $(BINDIR)/$(CONFIG)/credentials_test $(BINDIR)/$(CONFIG)/cxx_time_test $(BINDIR)/$(CONFIG)/end2end_test $(BINDIR)/$(CONFIG)/generic_end2end_test $(BINDIR)/$(CONFIG)/grpc_cli $(BINDIR)/$(CONFIG)/interop_client $(BINDIR)/$(CONFIG)/interop_server $(BINDIR)/$(CONFIG)/interop_test $(BINDIR)/$(CONFIG)/mock_test $(BINDIR)/$(CONFIG)/status_test $(BINDIR)/$(CONFIG)/sync_streaming_ping_pong_test $(BINDIR)/$(CONFIG)/sync_unary_ping_pong_test $(BINDIR)/$(CONFIG)/thread_pool_test $(BINDIR)/$(CONFIG)/thread_stress_test +buildtests_cxx: privatelibs_cxx $(BINDIR)/$(CONFIG)/async_end2end_test $(BINDIR)/$(CONFIG)/async_streaming_ping_pong_test $(BINDIR)/$(CONFIG)/async_unary_ping_pong_test $(BINDIR)/$(CONFIG)/channel_arguments_test $(BINDIR)/$(CONFIG)/cli_call_test $(BINDIR)/$(CONFIG)/client_crash_test $(BINDIR)/$(CONFIG)/client_crash_test_server $(BINDIR)/$(CONFIG)/credentials_test $(BINDIR)/$(CONFIG)/cxx_time_test $(BINDIR)/$(CONFIG)/end2end_test $(BINDIR)/$(CONFIG)/generic_end2end_test $(BINDIR)/$(CONFIG)/grpc_cli $(BINDIR)/$(CONFIG)/interop_client $(BINDIR)/$(CONFIG)/interop_server $(BINDIR)/$(CONFIG)/interop_test $(BINDIR)/$(CONFIG)/mock_test $(BINDIR)/$(CONFIG)/server_crash_test $(BINDIR)/$(CONFIG)/server_crash_test_client $(BINDIR)/$(CONFIG)/status_test $(BINDIR)/$(CONFIG)/sync_streaming_ping_pong_test $(BINDIR)/$(CONFIG)/sync_unary_ping_pong_test $(BINDIR)/$(CONFIG)/thread_pool_test $(BINDIR)/$(CONFIG)/thread_stress_test test: test_c test_cxx @@ -1282,6 +1350,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_with_large_metadata_test || ( echo test chttp2_fake_security_request_with_large_metadata_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fake_security_request_with_payload_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_fake_security_request_with_payload_test || ( echo test chttp2_fake_security_request_with_payload_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_fake_security_server_finishes_request_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_fake_security_server_finishes_request_test || ( echo test chttp2_fake_security_server_finishes_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fake_security_simple_delayed_request_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_fake_security_simple_delayed_request_test || ( echo test chttp2_fake_security_simple_delayed_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fake_security_simple_request_test" @@ -1338,6 +1408,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_large_metadata_test || ( echo test chttp2_fullstack_request_with_large_metadata_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_request_with_payload_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_payload_test || ( echo test chttp2_fullstack_request_with_payload_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_fullstack_server_finishes_request_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_server_finishes_request_test || ( echo test chttp2_fullstack_server_finishes_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_simple_delayed_request_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_delayed_request_test || ( echo test chttp2_fullstack_simple_delayed_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_simple_request_test" @@ -1394,6 +1466,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_large_metadata_test || ( echo test chttp2_fullstack_uds_posix_request_with_large_metadata_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_uds_posix_request_with_payload_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_payload_test || ( echo test chttp2_fullstack_uds_posix_request_with_payload_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_fullstack_uds_posix_server_finishes_request_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_server_finishes_request_test || ( echo test chttp2_fullstack_uds_posix_server_finishes_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_uds_posix_simple_delayed_request_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_delayed_request_test || ( echo test chttp2_fullstack_uds_posix_simple_delayed_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_uds_posix_simple_request_test" @@ -1450,6 +1524,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_with_large_metadata_test || ( echo test chttp2_simple_ssl_fullstack_request_with_large_metadata_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_simple_ssl_fullstack_request_with_payload_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_request_with_payload_test || ( echo test chttp2_simple_ssl_fullstack_request_with_payload_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_simple_ssl_fullstack_server_finishes_request_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_server_finishes_request_test || ( echo test chttp2_simple_ssl_fullstack_server_finishes_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_simple_ssl_fullstack_simple_delayed_request_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_delayed_request_test || ( echo test chttp2_simple_ssl_fullstack_simple_delayed_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_simple_ssl_fullstack_simple_request_test" @@ -1506,6 +1582,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_with_large_metadata_test || ( echo test chttp2_simple_ssl_with_oauth2_fullstack_request_with_large_metadata_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_test || ( echo test chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test || ( echo test chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test || ( echo test chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test" @@ -1562,6 +1640,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_large_metadata_test || ( echo test chttp2_socket_pair_request_with_large_metadata_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_request_with_payload_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_payload_test || ( echo test chttp2_socket_pair_request_with_payload_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_server_finishes_request_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_server_finishes_request_test || ( echo test chttp2_socket_pair_server_finishes_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_simple_delayed_request_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_delayed_request_test || ( echo test chttp2_socket_pair_simple_delayed_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_simple_request_test" @@ -1618,12 +1698,72 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_test || ( echo test chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_one_byte_at_a_time_request_with_payload_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_payload_test || ( echo test chttp2_socket_pair_one_byte_at_a_time_request_with_payload_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test || ( echo test chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test || ( echo test chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_one_byte_at_a_time_simple_request_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_test || ( echo test chttp2_socket_pair_one_byte_at_a_time_simple_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_test || ( echo test chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_bad_hostname_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_bad_hostname_test || ( echo test chttp2_socket_pair_with_grpc_trace_bad_hostname_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test || ( echo test chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test || ( echo test chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test || ( echo test chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test || ( echo test chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test || ( echo test chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_census_simple_request_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_census_simple_request_test || ( echo test chttp2_socket_pair_with_grpc_trace_census_simple_request_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_disappearing_server_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_disappearing_server_test || ( echo test chttp2_socket_pair_with_grpc_trace_disappearing_server_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test || ( echo test chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test || ( echo test chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_empty_batch_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_empty_batch_test || ( echo test chttp2_socket_pair_with_grpc_trace_empty_batch_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test || ( echo test chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_invoke_large_request_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_invoke_large_request_test || ( echo test chttp2_socket_pair_with_grpc_trace_invoke_large_request_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test || ( echo test chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_max_message_length_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_message_length_test || ( echo test chttp2_socket_pair_with_grpc_trace_max_message_length_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_no_op_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_no_op_test || ( echo test chttp2_socket_pair_with_grpc_trace_no_op_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test || ( echo test chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_registered_call_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_registered_call_test || ( echo test chttp2_socket_pair_with_grpc_trace_registered_call_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test || ( echo test chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test || ( echo test chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test || ( echo test chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test || ( echo test chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test || ( echo test chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test || ( echo test chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_request_with_payload_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_payload_test || ( echo test chttp2_socket_pair_with_grpc_trace_request_with_payload_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_server_finishes_request_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_server_finishes_request_test || ( echo test chttp2_socket_pair_with_grpc_trace_server_finishes_request_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test || ( echo test chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_simple_request_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_test || ( echo test chttp2_socket_pair_with_grpc_trace_simple_request_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test || ( echo test chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_bad_hostname_unsecure_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_bad_hostname_unsecure_test || ( echo test chttp2_fullstack_bad_hostname_unsecure_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_cancel_after_accept_unsecure_test" @@ -1672,6 +1812,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_large_metadata_unsecure_test || ( echo test chttp2_fullstack_request_with_large_metadata_unsecure_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_request_with_payload_unsecure_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_payload_unsecure_test || ( echo test chttp2_fullstack_request_with_payload_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_fullstack_server_finishes_request_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_server_finishes_request_unsecure_test || ( echo test chttp2_fullstack_server_finishes_request_unsecure_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_simple_delayed_request_unsecure_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_delayed_request_unsecure_test || ( echo test chttp2_fullstack_simple_delayed_request_unsecure_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_simple_request_unsecure_test" @@ -1726,6 +1868,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_large_metadata_unsecure_test || ( echo test chttp2_fullstack_uds_posix_request_with_large_metadata_unsecure_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_uds_posix_request_with_payload_unsecure_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_payload_unsecure_test || ( echo test chttp2_fullstack_uds_posix_request_with_payload_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_fullstack_uds_posix_server_finishes_request_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_server_finishes_request_unsecure_test || ( echo test chttp2_fullstack_uds_posix_server_finishes_request_unsecure_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_uds_posix_simple_delayed_request_unsecure_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_delayed_request_unsecure_test || ( echo test chttp2_fullstack_uds_posix_simple_delayed_request_unsecure_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_uds_posix_simple_request_unsecure_test" @@ -1780,6 +1924,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_large_metadata_unsecure_test || ( echo test chttp2_socket_pair_request_with_large_metadata_unsecure_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_request_with_payload_unsecure_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_payload_unsecure_test || ( echo test chttp2_socket_pair_request_with_payload_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_server_finishes_request_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_server_finishes_request_unsecure_test || ( echo test chttp2_socket_pair_server_finishes_request_unsecure_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_simple_delayed_request_unsecure_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_delayed_request_unsecure_test || ( echo test chttp2_socket_pair_simple_delayed_request_unsecure_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_simple_request_unsecure_test" @@ -1834,21 +1980,85 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_unsecure_test || ( echo test chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_unsecure_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_one_byte_at_a_time_request_with_payload_unsecure_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_payload_unsecure_test || ( echo test chttp2_socket_pair_one_byte_at_a_time_request_with_payload_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test || ( echo test chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_unsecure_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_unsecure_test || ( echo test chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_unsecure_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_one_byte_at_a_time_simple_request_unsecure_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_unsecure_test || ( echo test chttp2_socket_pair_one_byte_at_a_time_simple_request_unsecure_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_unsecure_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_unsecure_test || ( echo test chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test" + $(Q) $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test || ( echo test chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test failed ; exit 1 ) test_cxx: buildtests_cxx $(E) "[RUN] Testing async_end2end_test" $(Q) $(BINDIR)/$(CONFIG)/async_end2end_test || ( echo test async_end2end_test failed ; exit 1 ) + $(E) "[RUN] Testing async_streaming_ping_pong_test" + $(Q) $(BINDIR)/$(CONFIG)/async_streaming_ping_pong_test || ( echo test async_streaming_ping_pong_test failed ; exit 1 ) + $(E) "[RUN] Testing async_unary_ping_pong_test" + $(Q) $(BINDIR)/$(CONFIG)/async_unary_ping_pong_test || ( echo test async_unary_ping_pong_test failed ; exit 1 ) $(E) "[RUN] Testing channel_arguments_test" $(Q) $(BINDIR)/$(CONFIG)/channel_arguments_test || ( echo test channel_arguments_test failed ; exit 1 ) $(E) "[RUN] Testing cli_call_test" $(Q) $(BINDIR)/$(CONFIG)/cli_call_test || ( echo test cli_call_test failed ; exit 1 ) + $(E) "[RUN] Testing client_crash_test" + $(Q) $(BINDIR)/$(CONFIG)/client_crash_test || ( echo test client_crash_test failed ; exit 1 ) $(E) "[RUN] Testing credentials_test" $(Q) $(BINDIR)/$(CONFIG)/credentials_test || ( echo test credentials_test failed ; exit 1 ) $(E) "[RUN] Testing cxx_time_test" @@ -1861,8 +2071,14 @@ test_cxx: buildtests_cxx $(Q) $(BINDIR)/$(CONFIG)/interop_test || ( echo test interop_test failed ; exit 1 ) $(E) "[RUN] Testing mock_test" $(Q) $(BINDIR)/$(CONFIG)/mock_test || ( echo test mock_test failed ; exit 1 ) + $(E) "[RUN] Testing server_crash_test" + $(Q) $(BINDIR)/$(CONFIG)/server_crash_test || ( echo test server_crash_test failed ; exit 1 ) $(E) "[RUN] Testing status_test" $(Q) $(BINDIR)/$(CONFIG)/status_test || ( echo test status_test failed ; exit 1 ) + $(E) "[RUN] Testing sync_streaming_ping_pong_test" + $(Q) $(BINDIR)/$(CONFIG)/sync_streaming_ping_pong_test || ( echo test sync_streaming_ping_pong_test failed ; exit 1 ) + $(E) "[RUN] Testing sync_unary_ping_pong_test" + $(Q) $(BINDIR)/$(CONFIG)/sync_unary_ping_pong_test || ( echo test sync_unary_ping_pong_test failed ; exit 1 ) $(E) "[RUN] Testing thread_pool_test" $(Q) $(BINDIR)/$(CONFIG)/thread_pool_test || ( echo test thread_pool_test failed ; exit 1 ) $(E) "[RUN] Testing thread_stress_test" @@ -2571,7 +2787,6 @@ PUBLIC_HEADERS_C += \ include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ include/grpc/grpc.h \ - include/grpc/grpc_http.h \ include/grpc/status.h \ LIBGRPC_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_SRC)))) @@ -2819,7 +3034,6 @@ PUBLIC_HEADERS_C += \ include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ include/grpc/grpc.h \ - include/grpc/grpc_http.h \ include/grpc/status.h \ LIBGRPC_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_UNSECURE_SRC)))) @@ -3045,6 +3259,8 @@ LIBGRPC++_TEST_UTIL_SRC = \ $(GENDIR)/test/cpp/util/echo_duplicate.pb.cc $(GENDIR)/test/cpp/util/echo_duplicate.grpc.pb.cc \ test/cpp/util/cli_call.cc \ test/cpp/util/create_test_channel.cc \ + test/cpp/util/fake_credentials.cc \ + test/cpp/util/subprocess.cc \ LIBGRPC++_TEST_UTIL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_TEST_UTIL_SRC)))) @@ -3090,6 +3306,8 @@ 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/fake_credentials.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 LIBGRPC++_UNSECURE_SRC = \ @@ -3820,6 +4038,29 @@ ifneq ($(NO_DEPS),true) endif +LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_WITH_GRPC_TRACE_SRC = \ + test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c \ + + +LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_WITH_GRPC_TRACE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_WITH_GRPC_TRACE_SRC)))) + +$(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a: $(ZLIB_DEP) $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_WITH_GRPC_TRACE_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a + $(Q) $(AR) rcs $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_WITH_GRPC_TRACE_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a +endif + + + + +ifneq ($(NO_DEPS),true) +-include $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_WITH_GRPC_TRACE_OBJS:.o=.dep) +endif + + LIBEND2END_TEST_BAD_HOSTNAME_SRC = \ test/core/end2end/tests/bad_hostname.c \ @@ -4409,6 +4650,29 @@ ifneq ($(NO_DEPS),true) endif +LIBEND2END_TEST_SERVER_FINISHES_REQUEST_SRC = \ + test/core/end2end/tests/server_finishes_request.c \ + + +LIBEND2END_TEST_SERVER_FINISHES_REQUEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_SERVER_FINISHES_REQUEST_SRC)))) + +$(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.a: $(ZLIB_DEP) $(LIBEND2END_TEST_SERVER_FINISHES_REQUEST_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.a + $(Q) $(AR) rcs $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.a $(LIBEND2END_TEST_SERVER_FINISHES_REQUEST_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.a +endif + + + + +ifneq ($(NO_DEPS),true) +-include $(LIBEND2END_TEST_SERVER_FINISHES_REQUEST_OBJS:.o=.dep) +endif + + LIBEND2END_TEST_SIMPLE_DELAYED_REQUEST_SRC = \ test/core/end2end/tests/simple_delayed_request.c \ @@ -6954,6 +7218,86 @@ endif endif +CLIENT_CRASH_TEST_SRC = \ + test/cpp/end2end/client_crash_test.cc \ + +CLIENT_CRASH_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CLIENT_CRASH_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/client_crash_test: openssl_dep_error + +else + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/client_crash_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/client_crash_test: $(PROTOBUF_DEP) $(CLIENT_CRASH_TEST_OBJS) $(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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(CLIENT_CRASH_TEST_OBJS) $(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 $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/client_crash_test + +endif + +endif + +$(OBJDIR)/$(CONFIG)/test/cpp/end2end/client_crash_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 +deps_client_crash_test: $(CLIENT_CRASH_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(CLIENT_CRASH_TEST_OBJS:.o=.dep) +endif +endif + + +CLIENT_CRASH_TEST_SERVER_SRC = \ + test/cpp/end2end/client_crash_test_server.cc \ + +CLIENT_CRASH_TEST_SERVER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CLIENT_CRASH_TEST_SERVER_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/client_crash_test_server: openssl_dep_error + +else + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/client_crash_test_server: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/client_crash_test_server: $(PROTOBUF_DEP) $(CLIENT_CRASH_TEST_SERVER_OBJS) $(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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(CLIENT_CRASH_TEST_SERVER_OBJS) $(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 $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/client_crash_test_server + +endif + +endif + +$(OBJDIR)/$(CONFIG)/test/cpp/end2end/client_crash_test_server.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 +deps_client_crash_test_server: $(CLIENT_CRASH_TEST_SERVER_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(CLIENT_CRASH_TEST_SERVER_OBJS:.o=.dep) +endif +endif + + CREDENTIALS_TEST_SRC = \ test/cpp/client/credentials_test.cc \ @@ -7672,6 +8016,86 @@ endif endif +SERVER_CRASH_TEST_SRC = \ + test/cpp/end2end/server_crash_test.cc \ + +SERVER_CRASH_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(SERVER_CRASH_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/server_crash_test: openssl_dep_error + +else + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/server_crash_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/server_crash_test: $(PROTOBUF_DEP) $(SERVER_CRASH_TEST_OBJS) $(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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(SERVER_CRASH_TEST_OBJS) $(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 $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/server_crash_test + +endif + +endif + +$(OBJDIR)/$(CONFIG)/test/cpp/end2end/server_crash_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 +deps_server_crash_test: $(SERVER_CRASH_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(SERVER_CRASH_TEST_OBJS:.o=.dep) +endif +endif + + +SERVER_CRASH_TEST_CLIENT_SRC = \ + test/cpp/end2end/server_crash_test_client.cc \ + +SERVER_CRASH_TEST_CLIENT_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(SERVER_CRASH_TEST_CLIENT_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/server_crash_test_client: openssl_dep_error + +else + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/server_crash_test_client: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/server_crash_test_client: $(PROTOBUF_DEP) $(SERVER_CRASH_TEST_CLIENT_OBJS) $(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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(SERVER_CRASH_TEST_CLIENT_OBJS) $(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 $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/server_crash_test_client + +endif + +endif + +$(OBJDIR)/$(CONFIG)/test/cpp/end2end/server_crash_test_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 +deps_server_crash_test_client: $(SERVER_CRASH_TEST_CLIENT_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(SERVER_CRASH_TEST_CLIENT_OBJS:.o=.dep) +endif +endif + + STATUS_TEST_SRC = \ test/cpp/util/status_test.cc \ @@ -8326,6 +8750,24 @@ ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL with ALPN. +$(BINDIR)/$(CONFIG)/chttp2_fake_security_server_finishes_request_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_fake_security_server_finishes_request_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_fake_security_server_finishes_request_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + $(BINDIR)/$(CONFIG)/chttp2_fake_security_simple_delayed_request_test: openssl_dep_error else @@ -8830,6 +9272,24 @@ ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL with ALPN. +$(BINDIR)/$(CONFIG)/chttp2_fullstack_server_finishes_request_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_fullstack_server_finishes_request_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_fullstack_server_finishes_request_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_delayed_request_test: openssl_dep_error else @@ -9334,6 +9794,24 @@ ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL with ALPN. +$(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_server_finishes_request_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_server_finishes_request_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack_uds_posix.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack_uds_posix.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_server_finishes_request_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_delayed_request_test: openssl_dep_error else @@ -9838,6 +10316,24 @@ ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL with ALPN. +$(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_server_finishes_request_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_server_finishes_request_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_server_finishes_request_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_delayed_request_test: openssl_dep_error else @@ -10342,6 +10838,24 @@ ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL with ALPN. +$(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + $(BINDIR)/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test: openssl_dep_error else @@ -10846,6 +11360,24 @@ ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL with ALPN. +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_server_finishes_request_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_server_finishes_request_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_server_finishes_request_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_delayed_request_test: openssl_dep_error else @@ -11350,6 +11882,24 @@ ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL with ALPN. +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test: openssl_dep_error else @@ -11400,6 +11950,528 @@ endif +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_bad_hostname_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_bad_hostname_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_bad_hostname.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_bad_hostname.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_bad_hostname_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_invoke.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_invoke.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_before_invoke.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_before_invoke.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_census_simple_request_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_census_simple_request_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_census_simple_request.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_census_simple_request.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_census_simple_request_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_disappearing_server_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_disappearing_server_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_disappearing_server.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_disappearing_server.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_disappearing_server_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_empty_batch_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_empty_batch_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_empty_batch.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_empty_batch.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_empty_batch_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_graceful_server_shutdown.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_graceful_server_shutdown.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_invoke_large_request_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_invoke_large_request_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_invoke_large_request.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_invoke_large_request.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_invoke_large_request_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_concurrent_streams.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_concurrent_streams.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_message_length_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_message_length_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_message_length.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_message_length.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_message_length_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_no_op_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_no_op_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_no_op.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_no_op.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_no_op_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_ping_pong_streaming.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_ping_pong_streaming.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_registered_call_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_registered_call_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_registered_call.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_registered_call.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_registered_call_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_payload.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_payload.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_payload_and_call_creds.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_payload_and_call_creds.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_large_metadata.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_large_metadata.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_payload_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_payload_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_payload.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_payload.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_payload_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_server_finishes_request_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_server_finishes_request_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_server_finishes_request_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_delayed_request.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_delayed_request.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_test + +endif + + + + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test: openssl_dep_error + +else + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request_with_high_initial_sequence_number.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request_with_high_initial_sequence_number.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 $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test + +endif + + + + $(BINDIR)/$(CONFIG)/chttp2_fullstack_bad_hostname_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_test_bad_hostname.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` @@ -11592,6 +12664,14 @@ $(BINDIR)/$(CONFIG)/chttp2_fullstack_request_with_payload_unsecure_test: $(LIBD +$(BINDIR)/$(CONFIG)/chttp2_fullstack_server_finishes_request_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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)/chttp2_fullstack_server_finishes_request_unsecure_test + + + + $(BINDIR)/$(CONFIG)/chttp2_fullstack_simple_delayed_request_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_delayed_request.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` @@ -11808,6 +12888,14 @@ $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_request_with_payload_unsecure_tes +$(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_server_finishes_request_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack_uds_posix.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack_uds_posix.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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)/chttp2_fullstack_uds_posix_server_finishes_request_unsecure_test + + + + $(BINDIR)/$(CONFIG)/chttp2_fullstack_uds_posix_simple_delayed_request_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack_uds_posix.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_delayed_request.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` @@ -12024,6 +13112,14 @@ $(BINDIR)/$(CONFIG)/chttp2_socket_pair_request_with_payload_unsecure_test: $(LI +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_server_finishes_request_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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)/chttp2_socket_pair_server_finishes_request_unsecure_test + + + + $(BINDIR)/$(CONFIG)/chttp2_socket_pair_simple_delayed_request_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_delayed_request.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` @@ -12240,6 +13336,14 @@ $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_with_payload_u +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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)/chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test + + + + $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_delayed_request.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` @@ -12264,6 +13368,230 @@ $(BINDIR)/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_with_hi +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_bad_hostname.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_bad_hostname.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)/chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept.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)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.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)/chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_invoke.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_invoke.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)/chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_before_invoke.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_before_invoke.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)/chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.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)/chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_census_simple_request.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_census_simple_request.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)/chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_disappearing_server.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_disappearing_server.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)/chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.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)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.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)/chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_empty_batch.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_empty_batch.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)/chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_graceful_server_shutdown.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_graceful_server_shutdown.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)/chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_invoke_large_request.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_invoke_large_request.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)/chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_concurrent_streams.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_concurrent_streams.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)/chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_message_length.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_message_length.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)/chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_no_op.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_no_op.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)/chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_ping_pong_streaming.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_ping_pong_streaming.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)/chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_registered_call.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_registered_call.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)/chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.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)/chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.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)/chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_payload.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_payload.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)/chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.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)/chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_large_metadata.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_large_metadata.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)/chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_payload.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_payload.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)/chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.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)/chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_delayed_request.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_delayed_request.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)/chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request.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)/chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test + + + + +$(BINDIR)/$(CONFIG)/chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test: $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request_with_high_initial_sequence_number.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request_with_high_initial_sequence_number.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)/chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test + + + + @@ -1,4 +1,5 @@ [![Build Status](https://travis-ci.org/grpc/grpc.svg?branch=master)](https://travis-ci.org/grpc/grpc) +[![Coverage Status](https://img.shields.io/coveralls/grpc/grpc.svg)](https://coveralls.io/r/grpc/grpc?branch=master) [gRPC - An RPC library and framework](http://github.com/grpc/grpc) =================================== @@ -37,7 +38,7 @@ Libraries in different languages are in different state of development. We are s * C++ Library: [src/cpp] (src/cpp) : Early adopter ready - Alpha. * Ruby Library: [src/ruby] (src/ruby) : Early adopter ready - Alpha. * NodeJS Library: [src/node] (src/node) : Early adopter ready - Alpha. - * Python Library: [src/python] (src/python) : Usable with limitations - Alpha. + * Python Library: [src/python] (src/python) : Early adopter ready - Alpha. * PHP Library: [src/php] (src/php) : Pre-Alpha. * C# Library: [src/csharp] (src/csharp) : Pre-Alpha. * Objective-C Library: [src/objective-c] (src/objective-c): Pre-Alpha. diff --git a/build.json b/build.json index 882c3cb6ab..b893692205 100644 --- a/build.json +++ b/build.json @@ -6,7 +6,7 @@ "#": "The public version number of the library.", "version": { "major": 0, - "minor": 8, + "minor": 9, "micro": 0, "build": 0 } @@ -88,7 +88,6 @@ "include/grpc/byte_buffer.h", "include/grpc/byte_buffer_reader.h", "include/grpc/grpc.h", - "include/grpc/grpc_http.h", "include/grpc/status.h" ], "headers": [ @@ -543,7 +542,9 @@ "test/cpp/util/echo.proto", "test/cpp/util/echo_duplicate.proto", "test/cpp/util/cli_call.cc", - "test/cpp/util/create_test_channel.cc" + "test/cpp/util/create_test_channel.cc", + "test/cpp/util/fake_credentials.cc", + "test/cpp/util/subprocess.cc" ] }, { @@ -1813,7 +1814,6 @@ { "name": "async_streaming_ping_pong_test", "build": "test", - "run": false, "language": "c++", "src": [ "test/cpp/qps/async_streaming_ping_pong_test.cc" @@ -1831,7 +1831,6 @@ { "name": "async_unary_ping_pong_test", "build": "test", - "run": false, "language": "c++", "src": [ "test/cpp/qps/async_unary_ping_pong_test.cc" @@ -1876,6 +1875,39 @@ ] }, { + "name": "client_crash_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/end2end/client_crash_test.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "client_crash_test_server", + "build": "test", + "run": false, + "language": "c++", + "src": [ + "test/cpp/end2end/client_crash_test_server.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { "name": "credentials_test", "build": "test", "language": "c++", @@ -2190,6 +2222,39 @@ ] }, { + "name": "server_crash_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/end2end/server_crash_test.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "server_crash_test_client", + "build": "test", + "run": false, + "language": "c++", + "src": [ + "test/cpp/end2end/server_crash_test_client.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { "name": "status_test", "build": "test", "language": "c++", @@ -2207,7 +2272,6 @@ { "name": "sync_streaming_ping_pong_test", "build": "test", - "run": false, "language": "c++", "src": [ "test/cpp/qps/sync_streaming_ping_pong_test.cc" @@ -2225,7 +2289,6 @@ { "name": "sync_unary_ping_pong_test", "build": "test", - "run": false, "language": "c++", "src": [ "test/cpp/qps/sync_unary_ping_pong_test.cc" diff --git a/examples/pubsub/main.cc b/examples/pubsub/main.cc index 68620e64c5..b1898f18d9 100644 --- a/examples/pubsub/main.cc +++ b/examples/pubsub/main.cc @@ -71,7 +71,7 @@ int main(int argc, char** argv) { ss << FLAGS_server_host << ":" << FLAGS_server_port; - std::unique_ptr<grpc::Credentials> creds = grpc::GoogleDefaultCredentials(); + std::shared_ptr<grpc::Credentials> creds = grpc::GoogleDefaultCredentials(); std::shared_ptr<grpc::ChannelInterface> channel = grpc::CreateChannel(ss.str(), creds, grpc::ChannelArguments()); diff --git a/gRPC.podspec b/gRPC.podspec index affd0d81db..8429357a9e 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -5,7 +5,7 @@ Pod::Spec.new do |s| s.homepage = 'https://www.grpc.io' s.license = 'New BSD' s.authors = { 'Jorge Canizales' => 'jcanizales@google.com', - 'Michael Lumish' => 'mlumish@google.com' } + 'Michael Lumish' => 'mlumish@google.com' } # s.source = { :git => 'https://github.com/grpc/grpc.git', :tag => 'release-0_5_0' } @@ -67,7 +67,8 @@ Pod::Spec.new do |s| s.subspec 'GRPCClient' do |gs| gs.summary = 'Objective-C wrapper around the core gRPC library.' - gs.authors = { 'Jorge Canizales' => 'jcanizales@google.com' } + gs.authors = { 'Jorge Canizales' => 'jcanizales@google.com', + 'Michael Lumish' => 'mlumish@google.com' } gs.source_files = 'src/objective-c/GRPCClient/*.{h,m}', 'src/objective-c/GRPCClient/private/*.{h,m}' @@ -90,5 +91,6 @@ Pod::Spec.new do |s| ps.dependency 'gRPC/GRPCClient' ps.dependency 'gRPC/RxLibrary' + ps.dependency 'Protobuf', '~> 3.0' end end diff --git a/include/grpc++/client_context.h b/include/grpc++/client_context.h index a58e9872e6..6d9015f278 100644 --- a/include/grpc++/client_context.h +++ b/include/grpc++/client_context.h @@ -51,6 +51,7 @@ namespace grpc { class CallOpBuffer; class ChannelInterface; class CompletionQueue; +class Credentials; class RpcMethod; class Status; template <class R> @@ -102,6 +103,11 @@ class ClientContext { void set_authority(const grpc::string& authority) { authority_ = authority; } + // Set credentials for the rpc. + void set_credentials(const std::shared_ptr<Credentials>& creds) { + creds_ = creds; + } + void TryCancel(); private: @@ -127,11 +133,8 @@ class ClientContext { friend class ::grpc::ClientAsyncResponseReader; grpc_call* call() { return call_; } - void set_call(grpc_call* call, const std::shared_ptr<ChannelInterface>& channel) { - GPR_ASSERT(call_ == nullptr); - call_ = call; - channel_ = channel; - } + void set_call(grpc_call* call, + const std::shared_ptr<ChannelInterface>& channel); grpc_completion_queue* cq() { return cq_; } void set_cq(grpc_completion_queue* cq) { cq_ = cq; } @@ -144,6 +147,7 @@ class ClientContext { grpc_completion_queue* cq_; gpr_timespec deadline_; grpc::string authority_; + std::shared_ptr<Credentials> creds_; std::multimap<grpc::string, grpc::string> send_initial_metadata_; std::multimap<grpc::string, grpc::string> recv_initial_metadata_; std::multimap<grpc::string, grpc::string> trailing_metadata_; diff --git a/include/grpc++/config.h b/include/grpc++/config.h index b6c1705621..55b2a64482 100644 --- a/include/grpc++/config.h +++ b/include/grpc++/config.h @@ -112,6 +112,9 @@ public: template <class T> operator std::unique_ptr<T>() const { return std::unique_ptr<T>(static_cast<T *>(0)); } + template <class T> operator std::shared_ptr<T>() const { + return std::shared_ptr<T>(static_cast<T *>(0)); + } operator bool() const {return false;} private: void operator&() const = delete; diff --git a/include/grpc++/create_channel.h b/include/grpc++/create_channel.h index da375b97db..424a93a64c 100644 --- a/include/grpc++/create_channel.h +++ b/include/grpc++/create_channel.h @@ -45,7 +45,7 @@ class ChannelInterface; // If creds does not hold an object or is invalid, a lame channel is returned. std::shared_ptr<ChannelInterface> CreateChannel( - const grpc::string& target, const std::unique_ptr<Credentials>& creds, + const grpc::string& target, const std::shared_ptr<Credentials>& creds, const ChannelArguments& args); } // namespace grpc diff --git a/include/grpc++/credentials.h b/include/grpc++/credentials.h index 61c4094691..7a40cd199d 100644 --- a/include/grpc++/credentials.h +++ b/include/grpc++/credentials.h @@ -47,17 +47,18 @@ class SecureCredentials; class Credentials : public GrpcLibrary { public: ~Credentials() GRPC_OVERRIDE; + virtual bool ApplyToCall(grpc_call* call) = 0; protected: - friend std::unique_ptr<Credentials> CompositeCredentials( - const std::unique_ptr<Credentials>& creds1, - const std::unique_ptr<Credentials>& creds2); + friend std::shared_ptr<Credentials> CompositeCredentials( + const std::shared_ptr<Credentials>& creds1, + const std::shared_ptr<Credentials>& creds2); virtual SecureCredentials* AsSecureCredentials() = 0; private: friend std::shared_ptr<ChannelInterface> CreateChannel( - const grpc::string& target, const std::unique_ptr<Credentials>& creds, + const grpc::string& target, const std::shared_ptr<Credentials>& creds, const ChannelArguments& args); virtual std::shared_ptr<ChannelInterface> CreateChannel( @@ -80,20 +81,20 @@ struct SslCredentialsOptions { }; // Factories for building different types of Credentials -// The functions may return empty unique_ptr when credentials cannot be created. +// The functions may return empty shared_ptr when credentials cannot be created. // If a Credentials pointer is returned, it can still be invalid when used to // create a channel. A lame channel will be created then and all rpcs will // fail on it. // Builds credentials with reasonable defaults. -std::unique_ptr<Credentials> GoogleDefaultCredentials(); +std::shared_ptr<Credentials> GoogleDefaultCredentials(); // Builds SSL Credentials given SSL specific options -std::unique_ptr<Credentials> SslCredentials( +std::shared_ptr<Credentials> SslCredentials( const SslCredentialsOptions& options); // Builds credentials for use when running in GCE -std::unique_ptr<Credentials> ComputeEngineCredentials(); +std::shared_ptr<Credentials> ComputeEngineCredentials(); // Builds service account credentials. // json_key is the JSON key string containing the client's private key. @@ -101,7 +102,7 @@ std::unique_ptr<Credentials> ComputeEngineCredentials(); // token_lifetime_seconds is the lifetime in seconds of each token acquired // through this service account credentials. It should be positive and should // not exceed grpc_max_auth_token_lifetime or will be cropped to this value. -std::unique_ptr<Credentials> ServiceAccountCredentials( +std::shared_ptr<Credentials> ServiceAccountCredentials( const grpc::string& json_key, const grpc::string& scope, long token_lifetime_seconds); @@ -110,27 +111,27 @@ std::unique_ptr<Credentials> ServiceAccountCredentials( // token_lifetime_seconds is the lifetime in seconds of each Json Web Token // (JWT) created with this credentials. It should not exceed // grpc_max_auth_token_lifetime or will be cropped to this value. -std::unique_ptr<Credentials> JWTCredentials( - const grpc::string& json_key, long token_lifetime_seconds); +std::shared_ptr<Credentials> JWTCredentials(const grpc::string& json_key, + long token_lifetime_seconds); // Builds refresh token credentials. // json_refresh_token is the JSON string containing the refresh token along // with a client_id and client_secret. -std::unique_ptr<Credentials> RefreshTokenCredentials( +std::shared_ptr<Credentials> RefreshTokenCredentials( const grpc::string& json_refresh_token); // Builds IAM credentials. -std::unique_ptr<Credentials> IAMCredentials( +std::shared_ptr<Credentials> IAMCredentials( const grpc::string& authorization_token, const grpc::string& authority_selector); // Combines two credentials objects into a composite credentials -std::unique_ptr<Credentials> CompositeCredentials( - const std::unique_ptr<Credentials>& creds1, - const std::unique_ptr<Credentials>& creds2); +std::shared_ptr<Credentials> CompositeCredentials( + const std::shared_ptr<Credentials>& creds1, + const std::shared_ptr<Credentials>& creds2); // Credentials for an unencrypted, unauthenticated channel -std::unique_ptr<Credentials> InsecureCredentials(); +std::shared_ptr<Credentials> InsecureCredentials(); } // namespace grpc diff --git a/include/grpc++/stream.h b/include/grpc++/stream.h index 0efdbdaeca..c836f98c2a 100644 --- a/include/grpc++/stream.h +++ b/include/grpc++/stream.h @@ -114,7 +114,7 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface<R> { CallOpBuffer buf; buf.AddRecvInitialMetadata(context_); call_.PerformOps(&buf); - GPR_ASSERT(cq_.Pluck(&buf)); + cq_.Pluck(&buf); // status ignored } bool Read(R* msg) GRPC_OVERRIDE { @@ -216,7 +216,7 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> { CallOpBuffer buf; buf.AddSendInitialMetadata(&context->send_initial_metadata_); call_.PerformOps(&buf); - GPR_ASSERT(cq_.Pluck(&buf)); + cq_.Pluck(&buf); } // Blocking wait for initial metadata from server. The received metadata @@ -229,7 +229,7 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> { CallOpBuffer buf; buf.AddRecvInitialMetadata(context_); call_.PerformOps(&buf); - GPR_ASSERT(cq_.Pluck(&buf)); + cq_.Pluck(&buf); // status ignored } bool Read(R* msg) GRPC_OVERRIDE { diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 7d769d0bc2..b6ba0908df 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -259,7 +259,10 @@ typedef enum { GRPC_OP_RECV_INITIAL_METADATA, /* Receive a message: 0 or more of these operations can occur for each call */ GRPC_OP_RECV_MESSAGE, - /* Receive status on the client: one and only one must be made on the client + /* Receive status on the client: one and only one must be made on the client. + This operation always succeeds, meaning ops paired with this operation + will also appear to succeed, even though they may not have. In that case + the status will indicate some failure. */ GRPC_OP_RECV_STATUS_ON_CLIENT, /* Receive status on the server: one and only one must be made on the server diff --git a/include/grpc/support/subprocess.h b/include/grpc/support/subprocess.h index c59751da83..c884e5ef5e 100644 --- a/include/grpc/support/subprocess.h +++ b/include/grpc/support/subprocess.h @@ -34,16 +34,24 @@ #ifndef GRPC_SUPPORT_SUBPROCESS_H #define GRPC_SUPPORT_SUBPROCESS_H +#ifdef __cplusplus +extern "C" { +#endif + typedef struct gpr_subprocess gpr_subprocess; /* .exe on windows, empty on unices */ -char *gpr_subprocess_binary_extension(); +const char *gpr_subprocess_binary_extension(); -gpr_subprocess *gpr_subprocess_create(int argc, char **argv); +gpr_subprocess *gpr_subprocess_create(int argc, const char **argv); /* if subprocess has not been joined, kill it */ void gpr_subprocess_destroy(gpr_subprocess *p); /* returns exit status; can be called at most once */ int gpr_subprocess_join(gpr_subprocess *p); void gpr_subprocess_interrupt(gpr_subprocess *p); +#ifdef __cplusplus +} // extern "C" +#endif + #endif diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc index 82dd06bcec..5dd078b303 100644 --- a/src/compiler/csharp_generator.cc +++ b/src/compiler/csharp_generator.cc @@ -51,20 +51,49 @@ using grpc_generator::METHODTYPE_NO_STREAMING; using grpc_generator::METHODTYPE_CLIENT_STREAMING; using grpc_generator::METHODTYPE_SERVER_STREAMING; using grpc_generator::METHODTYPE_BIDI_STREAMING; +using grpc_generator::StringReplace; using std::map; using std::vector; namespace grpc_csharp_generator { namespace { -std::string GetCSharpNamespace(const FileDescriptor* file) { - // TODO(jtattermusch): this should be based on csharp_namespace option +// TODO(jtattermusch): make GetFileNamespace part of libprotoc public API. +// NOTE: Implementation needs to match exactly to GetFileNamespace +// defined in csharp_helpers.h in protoc csharp plugin. +// We cannot reference it directly because google3 protobufs +// don't have a csharp protoc plugin. +std::string GetFileNamespace(const FileDescriptor* file) { + if (file->options().has_csharp_namespace()) { + return file->options().csharp_namespace(); + } return file->package(); } -std::string GetMessageType(const Descriptor* message) { - // TODO(jtattermusch): this has to match with C# protobuf generator - return message->name(); +std::string ToCSharpName(const std::string& name, const FileDescriptor* file) { + std::string result = GetFileNamespace(file); + if (result != "") { + result += '.'; + } + std::string classname; + if (file->package().empty()) { + classname = name; + } else { + // Strip the proto package from full_name since we've replaced it with + // the C# namespace. + classname = name.substr(file->package().size() + 1); + } + result += StringReplace(classname, ".", ".Types.", false); + return "global::" + result; +} + +// TODO(jtattermusch): make GetClassName part of libprotoc public API. +// NOTE: Implementation needs to match exactly to GetClassName +// defined in csharp_helpers.h in protoc csharp plugin. +// We cannot reference it directly because google3 protobufs +// don't have a csharp protoc plugin. +std::string GetClassName(const Descriptor* message) { + return ToCSharpName(message->full_name(), message->file()); } std::string GetServiceClassName(const ServiceDescriptor* service) { @@ -114,22 +143,22 @@ std::string GetMethodRequestParamMaybe(const MethodDescriptor *method) { if (method->client_streaming()) { return ""; } - return GetMessageType(method->input_type()) + " request, "; + return GetClassName(method->input_type()) + " request, "; } std::string GetMethodReturnTypeClient(const MethodDescriptor *method) { switch (GetMethodType(method)) { case METHODTYPE_NO_STREAMING: - return "Task<" + GetMessageType(method->output_type()) + ">"; + return "Task<" + GetClassName(method->output_type()) + ">"; case METHODTYPE_CLIENT_STREAMING: - return "AsyncClientStreamingCall<" + GetMessageType(method->input_type()) - + ", " + GetMessageType(method->output_type()) + ">"; + return "AsyncClientStreamingCall<" + GetClassName(method->input_type()) + + ", " + GetClassName(method->output_type()) + ">"; case METHODTYPE_SERVER_STREAMING: - return "AsyncServerStreamingCall<" + GetMessageType(method->output_type()) + return "AsyncServerStreamingCall<" + GetClassName(method->output_type()) + ">"; case METHODTYPE_BIDI_STREAMING: - return "AsyncDuplexStreamingCall<" + GetMessageType(method->input_type()) - + ", " + GetMessageType(method->output_type()) + ">"; + return "AsyncDuplexStreamingCall<" + GetClassName(method->input_type()) + + ", " + GetClassName(method->output_type()) + ">"; } GOOGLE_LOG(FATAL)<< "Can't get here."; return ""; @@ -139,10 +168,10 @@ std::string GetMethodRequestParamServer(const MethodDescriptor *method) { switch (GetMethodType(method)) { case METHODTYPE_NO_STREAMING: case METHODTYPE_SERVER_STREAMING: - return GetMessageType(method->input_type()) + " request"; + return GetClassName(method->input_type()) + " request"; case METHODTYPE_CLIENT_STREAMING: case METHODTYPE_BIDI_STREAMING: - return "IAsyncStreamReader<" + GetMessageType(method->input_type()) + return "IAsyncStreamReader<" + GetClassName(method->input_type()) + "> requestStream"; } GOOGLE_LOG(FATAL)<< "Can't get here."; @@ -153,7 +182,7 @@ std::string GetMethodReturnTypeServer(const MethodDescriptor *method) { switch (GetMethodType(method)) { case METHODTYPE_NO_STREAMING: case METHODTYPE_CLIENT_STREAMING: - return "Task<" + GetMessageType(method->output_type()) + ">"; + return "Task<" + GetClassName(method->output_type()) + ">"; case METHODTYPE_SERVER_STREAMING: case METHODTYPE_BIDI_STREAMING: return "Task"; @@ -169,7 +198,7 @@ std::string GetMethodResponseStreamMaybe(const MethodDescriptor *method) { return ""; case METHODTYPE_SERVER_STREAMING: case METHODTYPE_BIDI_STREAMING: - return ", IServerStreamWriter<" + GetMessageType(method->output_type()) + return ", IServerStreamWriter<" + GetClassName(method->output_type()) + "> responseStream"; } GOOGLE_LOG(FATAL)<< "Can't get here."; @@ -202,7 +231,7 @@ void GenerateMarshallerFields(Printer* out, const ServiceDescriptor *service) { out->Print( "static readonly Marshaller<$type$> $fieldname$ = Marshallers.Create((arg) => arg.ToByteArray(), $type$.ParseFrom);\n", "fieldname", GetMarshallerFieldName(message), "type", - GetMessageType(message)); + GetClassName(message)); } out->Print("\n"); } @@ -211,8 +240,8 @@ void GenerateStaticMethodField(Printer* out, const MethodDescriptor *method) { out->Print( "static readonly Method<$request$, $response$> $fieldname$ = new Method<$request$, $response$>(\n", "fieldname", GetMethodFieldName(method), "request", - GetMessageType(method->input_type()), "response", - GetMessageType(method->output_type())); + GetClassName(method->input_type()), "response", + GetClassName(method->output_type())); out->Indent(); out->Indent(); out->Print("$methodtype$,\n", "methodtype", @@ -242,8 +271,8 @@ void GenerateClientInterface(Printer* out, const ServiceDescriptor *service) { out->Print( "$response$ $methodname$($request$ request, CancellationToken token = default(CancellationToken));\n", "methodname", method->name(), "request", - GetMessageType(method->input_type()), "response", - GetMessageType(method->output_type())); + GetClassName(method->input_type()), "response", + GetClassName(method->output_type())); } std::string method_name = method->name(); @@ -310,8 +339,8 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) { out->Print( "public $response$ $methodname$($request$ request, CancellationToken token = default(CancellationToken))\n", "methodname", method->name(), "request", - GetMessageType(method->input_type()), "response", - GetMessageType(method->output_type())); + GetClassName(method->input_type()), "response", + GetClassName(method->output_type())); out->Print("{\n"); out->Indent(); out->Print("var call = CreateCall($servicenamefield$, $methodfield$);\n", @@ -466,7 +495,7 @@ grpc::string GetServices(const FileDescriptor *file) { // TODO(jtattermusch): add using for protobuf message classes out.Print("\n"); - out.Print("namespace $namespace$ {\n", "namespace", GetCSharpNamespace(file)); + out.Print("namespace $namespace$ {\n", "namespace", GetFileNamespace(file)); out.Indent(); for (int i = 0; i < file->service_count(); i++) { GenerateService(&out, file->service(i)); diff --git a/src/compiler/generator_helpers.h b/src/compiler/generator_helpers.h index 7ce4ec526c..7bdaff1c9b 100644 --- a/src/compiler/generator_helpers.h +++ b/src/compiler/generator_helpers.h @@ -60,21 +60,26 @@ inline grpc::string StripProto(grpc::string filename) { } inline grpc::string StringReplace(grpc::string str, const grpc::string &from, - const grpc::string &to) { + const grpc::string &to, bool replace_all) { size_t pos = 0; - for (;;) { + do { pos = str.find(from, pos); if (pos == grpc::string::npos) { break; } str.replace(pos, from.length(), to); pos += to.length(); - } + } while(replace_all); return str; } +inline grpc::string StringReplace(grpc::string str, const grpc::string &from, + const grpc::string &to) { + return StringReplace(str, from, to, true); +} + inline std::vector<grpc::string> tokenize(const grpc::string &input, const grpc::string &delimiters) { std::vector<grpc::string> tokens; @@ -103,6 +108,14 @@ inline grpc::string CapitalizeFirstLetter(grpc::string s) { return s; } +inline grpc::string LowercaseFirstLetter(grpc::string s) { + if (s.empty()) { + return s; + } + s[0] = ::tolower(s[0]); + return s; +} + inline grpc::string LowerUnderscoreToUpperCamel(grpc::string str) { std::vector<grpc::string> tokens = tokenize(str, "_"); grpc::string result = ""; diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc index c68c9c37c2..8f35302bee 100644 --- a/src/compiler/objective_c_generator.cc +++ b/src/compiler/objective_c_generator.cc @@ -40,195 +40,200 @@ #include <sstream> +using ::grpc::protobuf::io::Printer; +using ::grpc::protobuf::MethodDescriptor; +using ::grpc::protobuf::ServiceDescriptor; +using ::std::map; +using ::grpc::string; + namespace grpc_objective_c_generator { namespace { -void PrintSimpleBlockSignature(grpc::protobuf::io::Printer *printer, - const grpc::protobuf::MethodDescriptor *method, - std::map<grpc::string, grpc::string> *vars) { - (*vars)["method_name"] = method->name(); - (*vars)["request_type"] = PrefixedName(method->input_type()->name()); - (*vars)["response_type"] = PrefixedName(method->output_type()->name()); +void PrintProtoRpcDeclarationAsPragma(Printer *printer, + const MethodDescriptor *method, + map<string, string> vars) { + vars["client_stream"] = method->client_streaming() ? "stream " : ""; + vars["server_stream"] = method->server_streaming() ? "stream " : ""; - if (method->server_streaming()) { - printer->Print("// When the response stream finishes, the handler is " - "called with nil for both arguments.\n\n"); - } else { - printer->Print("// The handler is only called once.\n\n"); - } - printer->Print(*vars, "- (id<GRXLiveSource>)$method_name$WithRequest:" - "($request_type$)request completionHandler:(void(^)" - "($response_type$ *, NSError *))handler"); + printer->Print(vars, + "#pragma mark $method_name$($client_stream$$request_type$)" + " returns ($server_stream$$response_type$)\n\n"); } -void PrintSimpleDelegateSignature(grpc::protobuf::io::Printer *printer, - const grpc::protobuf::MethodDescriptor *method, - std::map<grpc::string, grpc::string> *vars) { - (*vars)["method_name"] = method->name(); - (*vars)["request_type"] = PrefixedName(method->input_type()->name()); +void PrintMethodSignature(Printer *printer, + const MethodDescriptor *method, + const map<string, string>& vars) { + // TODO(jcanizales): Print method comments. - printer->Print(*vars, "- (id<GRXLiveSource>)$method_name$WithRequest:" - "($request_type$)request delegate:(id<GRXSink>)delegate"); -} + printer->Print(vars, "- ($return_type$)$method_name$With"); + if (method->client_streaming()) { + printer->Print("RequestsWriter:(id<GRXWriter>)request"); + } else { + printer->Print(vars, "Request:($prefix$$request_type$ *)request"); + } -void PrintAdvancedSignature(grpc::protobuf::io::Printer *printer, - const grpc::protobuf::MethodDescriptor *method, - std::map<grpc::string, grpc::string> *vars) { - (*vars)["method_name"] = method->name(); - printer->Print(*vars, "- (GRXSource *)$method_name$WithRequest:" - "(id<GRXSource>)request"); + // TODO(jcanizales): Put this on a new line and align colons. + // TODO(jcanizales): eventHandler for server streaming? + printer->Print(" handler:(void(^)("); + if (method->server_streaming()) { + printer->Print("BOOL done, "); + } + printer->Print(vars, + "$prefix$$response_type$ *response, NSError *error))handler"); } -void PrintSourceMethodSimpleBlock(grpc::protobuf::io::Printer *printer, - const grpc::protobuf::MethodDescriptor *method, - std::map<grpc::string, grpc::string> *vars) { - PrintSimpleBlockSignature(printer, method, vars); - - (*vars)["method_name"] = method->name(); - printer->Print(" {\n"); - printer->Indent(); - printer->Print(*vars, "return [[self $method_name$WithRequest:request] " - "connectHandler:^(id value, NSError *error) {\n"); - printer->Indent(); - printer->Print("handler(value, error);\n"); - printer->Outdent(); - printer->Print("}];\n"); - printer->Outdent(); - printer->Print("}\n"); +void PrintSimpleSignature(Printer *printer, + const MethodDescriptor *method, + map<string, string> vars) { + vars["method_name"] = + grpc_generator::LowercaseFirstLetter(vars["method_name"]); + vars["return_type"] = "void"; + PrintMethodSignature(printer, method, vars); } -void PrintSourceMethodSimpleDelegate(grpc::protobuf::io::Printer *printer, - const grpc::protobuf::MethodDescriptor *method, - std::map<grpc::string, grpc::string> *vars) { - PrintSimpleDelegateSignature(printer, method, vars); - - (*vars)["method_name"] = method->name(); - printer->Print(" {\n"); - printer->Indent(); - printer->Print(*vars, "return [[self $method_name$WithRequest:request]" - "connectToSink:delegate];\n"); - printer->Outdent(); - printer->Print("}\n"); +void PrintAdvancedSignature(Printer *printer, + const MethodDescriptor *method, + map<string, string> vars) { + vars["method_name"] = "RPCTo" + vars["method_name"]; + vars["return_type"] = "ProtoRPC *"; + PrintMethodSignature(printer, method, vars); } -void PrintSourceMethodAdvanced(grpc::protobuf::io::Printer *printer, - const grpc::protobuf::MethodDescriptor *method, - std::map<grpc::string, grpc::string> *vars) { +void PrintMethodDeclarations(Printer *printer, + const MethodDescriptor *method, + map<string, string> vars) { + vars["method_name"] = method->name(); + vars["request_type"] = method->input_type()->name(); + vars["response_type"] = method->output_type()->name(); + + PrintProtoRpcDeclarationAsPragma(printer, method, vars); + + PrintSimpleSignature(printer, method, vars); + printer->Print(";\n\n"); PrintAdvancedSignature(printer, method, vars); + printer->Print(";\n\n\n"); +} - (*vars)["method_name"] = method->name(); - printer->Print(" {\n"); - printer->Indent(); - printer->Print(*vars, "return [self $method_name$WithRequest:request " - "client:[self newClient]];\n"); - printer->Outdent(); +void PrintSimpleImplementation(Printer *printer, + const MethodDescriptor *method, + map<string, string> vars) { + printer->Print("{\n"); + printer->Print(vars, " [[self RPCTo$method_name$With"); + if (method->client_streaming()) { + printer->Print("RequestsWriter:request"); + } else { + printer->Print("Request:request"); + } + printer->Print(" handler:handler] start];\n"); printer->Print("}\n"); } -void PrintSourceMethodHandler(grpc::protobuf::io::Printer *printer, - const grpc::protobuf::MethodDescriptor *method, - std::map<grpc::string, grpc::string> *vars) { - (*vars)["method_name"] = method->name(); - (*vars)["response_type"] = PrefixedName(method->output_type()->name()); - (*vars)["caps_name"] = grpc_generator::CapitalizeFirstLetter(method->name()); - - printer->Print(*vars, "- (GRXSource *)$method_name$WithRequest:" - "(id<GRXSource>)request client:(PBgRPCClient *)client {\n"); - printer->Indent(); - printer->Print(*vars, - "return [self responseWithMethod:$@\"$caps_name\"\n"); - printer->Print(*vars, - " class:[$response_type$ class]\n"); - printer->Print(" request:request\n"); - printer->Print(" client:client];\n"); - printer->Outdent(); +void PrintAdvancedImplementation(Printer *printer, + const MethodDescriptor *method, + map<string, string> vars) { + printer->Print("{\n"); + printer->Print(vars, " return [self RPCToMethod:@\"$method_name$\"\n"); + + printer->Print(" requestsWriter:"); + if (method->client_streaming()) { + printer->Print("request\n"); + } else { + printer->Print("[GRXWriter writerWithValue:request]\n"); + } + + printer->Print(vars, + " responseClass:[$prefix$$response_type$ class]\n"); + + printer->Print(" responsesWriteable:[GRXWriteable "); + if (method->server_streaming()) { + printer->Print("writeableWithStreamHandler:handler]];\n"); + } else { + printer->Print("writeableWithSingleValueHandler:handler]];\n"); + } + printer->Print("}\n"); } +void PrintMethodImplementations(Printer *printer, + const MethodDescriptor *method, + map<string, string> vars) { + vars["method_name"] = method->name(); + vars["request_type"] = method->input_type()->name(); + vars["response_type"] = method->output_type()->name(); + + PrintProtoRpcDeclarationAsPragma(printer, method, vars); + + // TODO(jcanizales): Print documentation from the method. + PrintSimpleSignature(printer, method, vars); + PrintSimpleImplementation(printer, method, vars); + + printer->Print("// Returns a not-yet-started RPC object.\n"); + PrintAdvancedSignature(printer, method, vars); + PrintAdvancedImplementation(printer, method, vars); } -grpc::string GetHeader(const grpc::protobuf::ServiceDescriptor *service, - const grpc::string message_header) { - grpc::string output; +} // namespace + +string GetHeader(const ServiceDescriptor *service, const string prefix) { + string output; grpc::protobuf::io::StringOutputStream output_stream(&output); - grpc::protobuf::io::Printer printer(&output_stream, '$'); - std::map<grpc::string, grpc::string> vars; - printer.Print("#import \"PBgRPCClient.h\"\n"); - printer.Print("#import \"PBStub.h\"\n"); - vars["message_header"] = message_header; - printer.Print(vars, "#import \"$message_header$\"\n\n"); - printer.Print("@protocol GRXSource\n"); - printer.Print("@class GRXSource\n\n"); - vars["service_name"] = service->name(); - printer.Print("@protocol $service_name$Stub <NSObject>\n\n"); - printer.Print("#pragma mark Simple block handlers\n\n"); - for (int i = 0; i < service->method_count(); i++) { - PrintSimpleBlockSignature(&printer, service->method(i), &vars); - printer.Print(";\n"); - } - printer.Print("\n"); - printer.Print("#pragma mark Simple delegate handlers.\n\n"); - printer.Print("# TODO(jcanizales): Use high-level snippets to remove this duplication."); - for (int i = 0; i < service->method_count(); i++) { - PrintSimpleDelegateSignature(&printer, service->method(i), &vars); - printer.Print(";\n"); - } - printer.Print("\n"); - printer.Print("#pragma mark Advanced handlers.\n\n"); + Printer printer(&output_stream, '$'); + + printer.Print("@protocol GRXWriteable;\n"); + printer.Print("@protocol GRXWriter;\n\n"); + + map<string, string> vars = {{"service_name", service->name()}, + {"prefix", prefix}}; + printer.Print(vars, "@protocol $prefix$$service_name$ <NSObject>\n\n"); + for (int i = 0; i < service->method_count(); i++) { - PrintAdvancedSignature(&printer, service->method(i), &vars); - printer.Print(";\n"); + PrintMethodDeclarations(&printer, service->method(i), vars); } - printer.Print("\n"); printer.Print("@end\n\n"); - printer.Print("// Basic stub that only does marshalling and parsing\n"); - printer.Print(vars, "@interface $service_name$Stub :" - " PBStub<$service_name$Stub>\n"); - printer.Print("- (instancetype)initWithHost:(NSString *)host;\n"); + + printer.Print("// Basic service implementation, over gRPC, that only does" + " marshalling and parsing.\n"); + printer.Print(vars, "@interface $prefix$$service_name$ :" + " ProtoService<$prefix$$service_name$>\n"); + printer.Print("- (instancetype)initWithHost:(NSString *)host" + " NS_DESIGNATED_INITIALIZER;\n"); printer.Print("@end\n"); return output; } -grpc::string GetSource(const grpc::protobuf::ServiceDescriptor *service) { - grpc::string output; +string GetSource(const ServiceDescriptor *service, const string prefix) { + string output; grpc::protobuf::io::StringOutputStream output_stream(&output); - grpc::protobuf::io::Printer printer(&output_stream, '$'); - std::map<grpc::string, grpc::string> vars; - vars["service_name"] = service->name(); - printer.Print(vars, "#import \"$service_name$Stub.pb.h\"\n"); - printer.Print("#import \"PBGeneratedMessage+GRXSource.h\"\n\n"); - vars["full_name"] = service->full_name(); + Printer printer(&output_stream, '$'); + + map<string, string> vars = {{"service_name", service->name()}, + {"package", service->file()->package()}, + {"prefix", prefix}}; + + printer.Print(vars, + "static NSString *const kPackageName = @\"$package$\";\n"); printer.Print(vars, - "static NSString *const kInterface = @\"$full_name$\";\n"); - printer.Print("@implementation $service_name$Stub\n\n"); + "static NSString *const kServiceName = @\"$service_name$\";\n\n"); + + printer.Print(vars, "@implementation $prefix$$service_name$\n\n"); + + printer.Print("// Designated initializer\n"); printer.Print("- (instancetype)initWithHost:(NSString *)host {\n"); - printer.Indent(); - printer.Print("if ((self = [super initWithHost:host " - "interface:kInterface])) {\n"); - printer.Print("}\n"); - printer.Print("return self;\n"); - printer.Outdent(); + printer.Print(" return (self = [super initWithHost:host" + " packageName:kPackageName serviceName:kServiceName]);\n"); printer.Print("}\n\n"); - printer.Print("#pragma mark Simple block handlers.\n"); - for (int i = 0; i < service->method_count(); i++) { - PrintSourceMethodSimpleBlock(&printer, service->method(i), &vars); - } - printer.Print("\n"); - printer.Print("#pragma mark Simple delegate handlers.\n"); - for (int i = 0; i < service->method_count(); i++) { - PrintSourceMethodSimpleDelegate(&printer, service->method(i), &vars); - } - printer.Print("\n"); - printer.Print("#pragma mark Advanced handlers.\n"); - for (int i = 0; i < service->method_count(); i++) { - PrintSourceMethodAdvanced(&printer, service->method(i), &vars); - } - printer.Print("\n"); - printer.Print("#pragma mark Handlers for subclasses " - "(stub wrappers) to override.\n"); + printer.Print("// Override superclass initializer to disallow different" + " package and service names.\n"); + printer.Print("- (instancetype)initWithHost:(NSString *)host\n"); + printer.Print(" packageName:(NSString *)packageName\n"); + printer.Print(" serviceName:(NSString *)serviceName {\n"); + printer.Print(" return [self initWithHost:host];\n"); + printer.Print("}\n\n\n"); + for (int i = 0; i < service->method_count(); i++) { - PrintSourceMethodHandler(&printer, service->method(i), &vars); + PrintMethodImplementations(&printer, service->method(i), vars); } + printer.Print("@end\n"); return output; } diff --git a/src/compiler/objective_c_generator.h b/src/compiler/objective_c_generator.h index 93c730b34e..548e96fcf1 100644 --- a/src/compiler/objective_c_generator.h +++ b/src/compiler/objective_c_generator.h @@ -38,10 +38,15 @@ namespace grpc_objective_c_generator { +// Returns the content to be included in the "global_scope" insertion point of +// the generated header file. grpc::string GetHeader(const grpc::protobuf::ServiceDescriptor *service, - const grpc::string message_header); + const grpc::string prefix); -grpc::string GetSource(const grpc::protobuf::ServiceDescriptor *service); +// Returns the content to be included in the "global_scope" insertion point of +// the generated implementation file. +grpc::string GetSource(const grpc::protobuf::ServiceDescriptor *service, + const grpc::string prefix); } // namespace grpc_objective_c_generator diff --git a/src/compiler/objective_c_generator_helpers.h b/src/compiler/objective_c_generator_helpers.h index 6a7c13991f..d92a2b5e9a 100644 --- a/src/compiler/objective_c_generator_helpers.h +++ b/src/compiler/objective_c_generator_helpers.h @@ -40,18 +40,8 @@ namespace grpc_objective_c_generator { -const grpc::string prefix = "PBG"; - inline grpc::string MessageHeaderName(const grpc::protobuf::FileDescriptor *file) { - return grpc_generator::FileNameInUpperCamel(file) + ".pb.h"; -} - -inline grpc::string StubFileName(grpc::string service_name) { - return prefix + service_name + "Stub"; -} - -inline grpc::string PrefixedName(grpc::string name) { - return prefix + name; + return grpc_generator::FileNameInUpperCamel(file) + ".pbobjc.h"; } } diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index eebce0cd20..3cb170e95c 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -39,54 +39,77 @@ #include "src/compiler/objective_c_generator.h" #include "src/compiler/objective_c_generator_helpers.h" +using ::grpc::string; + class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { public: ObjectiveCGrpcGenerator() {} virtual ~ObjectiveCGrpcGenerator() {} virtual bool Generate(const grpc::protobuf::FileDescriptor *file, - const grpc::string ¶meter, + const string ¶meter, grpc::protobuf::compiler::GeneratorContext *context, - grpc::string *error) const { + string *error) const { if (file->service_count() == 0) { // No services. Do nothing. return true; } - for (int i = 0; i < file->service_count(); i++) { - const grpc::protobuf::ServiceDescriptor *service = file->service(i); - grpc::string file_name = grpc_objective_c_generator::StubFileName( - service->name()); - - // Generate .pb.h - grpc::string header_code = grpc_objective_c_generator::GetHeader( - service, grpc_objective_c_generator::MessageHeaderName(file)); - std::unique_ptr<grpc::protobuf::io::ZeroCopyOutputStream> header_output( - context->Open(file_name + ".pb.h")); - grpc::protobuf::io::CodedOutputStream header_coded_out( - header_output.get()); - header_coded_out.WriteRaw(header_code.data(), header_code.size()); - - // Generate .pb.m - grpc::string source_code = grpc_objective_c_generator::GetSource(service); - std::unique_ptr<grpc::protobuf::io::ZeroCopyOutputStream> source_output( - context->Open(file_name + ".pb.m")); - grpc::protobuf::io::CodedOutputStream source_coded_out( - source_output.get()); - source_coded_out.WriteRaw(source_code.data(), source_code.size()); + string file_name = grpc_generator::FileNameInUpperCamel(file); + string prefix = file->options().objc_class_prefix(); + + { + // Generate .pbrpc.h + + string imports = string("#import \"") + file_name + ".pbobjc.h\"\n" + "#import <gRPC/ProtoService.h>\n"; + + // TODO(jcanizales): Instead forward-declare the input and output types + // and import the files in the .pbrpc.m + string proto_imports; + for (int i = 0; i < file->dependency_count(); i++) { + string header = grpc_objective_c_generator::MessageHeaderName( + file->dependency(i)); + proto_imports += string("#import \"") + header + "\"\n"; + } + + string declarations; + for (int i = 0; i < file->service_count(); i++) { + const grpc::protobuf::ServiceDescriptor *service = file->service(i); + declarations += grpc_objective_c_generator::GetHeader(service, prefix); + } + + Write(context, file_name + ".pbrpc.h", + imports + '\n' + proto_imports + '\n' + declarations); + } + + { + // Generate .pbrpc.m + + string imports = string("#import \"") + file_name + ".pbrpc.h\"\n" + "#import <gRPC/GRXWriteable.h>\n" + "#import <gRPC/GRXWriter+Immediate.h>\n" + "#import <gRPC/ProtoRPC.h>\n"; + + string definitions; + for (int i = 0; i < file->service_count(); i++) { + const grpc::protobuf::ServiceDescriptor *service = file->service(i); + definitions += grpc_objective_c_generator::GetSource(service, prefix); + } + + Write(context, file_name + ".pbrpc.m", imports + '\n' + definitions); } return true; } private: - // Insert the given code into the given file at the given insertion point. - void Insert(grpc::protobuf::compiler::GeneratorContext *context, - const grpc::string &filename, const grpc::string &insertion_point, - const grpc::string &code) const { + // Write the given code into the given file. + void Write(grpc::protobuf::compiler::GeneratorContext *context, + const string &filename, const string &code) const { std::unique_ptr<grpc::protobuf::io::ZeroCopyOutputStream> output( - context->OpenForInsert(filename, insertion_point)); + context->Open(filename)); grpc::protobuf::io::CodedOutputStream coded_out(output.get()); coded_out.WriteRaw(code.data(), code.size()); } diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c index 4d1bcad9e2..ab1af0d4ee 100644 --- a/src/core/iomgr/pollset_posix.c +++ b/src/core/iomgr/pollset_posix.c @@ -258,7 +258,6 @@ static void unary_poll_do_promote(void *args, int success) { grpc_pollset *pollset = up_args->pollset; grpc_fd *fd = up_args->fd; int do_shutdown_cb = 0; - gpr_free(up_args); /* * This is quite tricky. There are a number of cases to keep in mind here: @@ -273,8 +272,12 @@ static void unary_poll_do_promote(void *args, int success) { /* First we need to ensure that nobody is polling concurrently */ while (pollset->counter != 0) { grpc_pollset_kick(pollset); - gpr_cv_wait(&pollset->cv, &pollset->mu, gpr_inf_future); + grpc_iomgr_add_callback(unary_poll_do_promote, up_args); + gpr_mu_unlock(&pollset->mu); + return; } + + gpr_free(up_args); /* At this point the pollset may no longer be a unary poller. In that case * we should just call the right add function and be done. */ /* TODO(klempner): If we're not careful this could cause infinite recursion. diff --git a/src/core/iomgr/tcp_posix.c b/src/core/iomgr/tcp_posix.c index f7dae5f86c..cd6b2ecae6 100644 --- a/src/core/iomgr/tcp_posix.c +++ b/src/core/iomgr/tcp_posix.c @@ -138,8 +138,10 @@ static void slice_state_remove_prefix(grpc_tcp_slice_state *state, native "trim the first N bytes" operation to splice */ /* TODO(klempner): This really shouldn't be modifying the current slice unless we own the slices array. */ - *current_slice = gpr_slice_split_tail(current_slice, prefix_bytes); + gpr_slice tail; + tail = gpr_slice_split_tail(current_slice, prefix_bytes); gpr_slice_unref(*current_slice); + *current_slice = tail; return; } else { gpr_slice_unref(*current_slice); diff --git a/src/core/profiling/basic_timers.c b/src/core/profiling/basic_timers.c index 124a8d6621..ae37f584eb 100644 --- a/src/core/profiling/basic_timers.c +++ b/src/core/profiling/basic_timers.c @@ -55,6 +55,7 @@ typedef enum { typedef struct grpc_timer_entry { grpc_precise_clock tm; int tag; + const char* tagstr; marker_type type; void* id; const char* file; @@ -70,18 +71,19 @@ static void log_report() { int i; for (i = 0; i < count; i++) { grpc_timer_entry* entry = &(log[i]); - printf("GRPC_LAT_PROF " GRPC_PRECISE_CLOCK_FORMAT " %p %c %d %p %s %d\n", + printf("GRPC_LAT_PROF " GRPC_PRECISE_CLOCK_FORMAT + " %p %c %d(%s) %p %s %d\n", GRPC_PRECISE_CLOCK_PRINTF_ARGS(&entry->tm), (void*)(gpr_intptr)gpr_thd_currentid(), entry->type, entry->tag, - entry->id, entry->file, entry->line); + entry->tagstr, entry->id, entry->file, entry->line); } /* Now clear out the log */ count = 0; } -static void grpc_timers_log_add(int tag, marker_type type, void* id, - const char* file, int line) { +static void grpc_timers_log_add(int tag, const char* tagstr, marker_type type, + void* id, const char* file, int line) { grpc_timer_entry* entry; /* TODO (vpai) : Improve concurrency */ @@ -93,6 +95,7 @@ static void grpc_timers_log_add(int tag, marker_type type, void* id, grpc_precise_clock_now(&entry->tm); entry->tag = tag; + entry->tagstr = tagstr; entry->type = type; entry->id = id; entry->file = file; @@ -100,28 +103,31 @@ static void grpc_timers_log_add(int tag, marker_type type, void* id, } /* Latency profiler API implementation. */ -void grpc_timer_add_mark(int tag, void* id, const char* file, int line) { +void grpc_timer_add_mark(int tag, const char* tagstr, void* id, + const char* file, int line) { if (tag < GRPC_PTAG_IGNORE_THRESHOLD) { - grpc_timers_log_add(tag, MARK, id, file, line); + grpc_timers_log_add(tag, tagstr, MARK, id, file, line); } } -void grpc_timer_add_important_mark(int tag, void* id, const char* file, - int line) { +void grpc_timer_add_important_mark(int tag, const char* tagstr, void* id, + const char* file, int line) { if (tag < GRPC_PTAG_IGNORE_THRESHOLD) { - grpc_timers_log_add(tag, IMPORTANT, id, file, line); + grpc_timers_log_add(tag, tagstr, IMPORTANT, id, file, line); } } -void grpc_timer_begin(int tag, void* id, const char* file, int line) { +void grpc_timer_begin(int tag, const char* tagstr, void* id, const char* file, + int line) { if (tag < GRPC_PTAG_IGNORE_THRESHOLD) { - grpc_timers_log_add(tag, BEGIN, id, file, line); + grpc_timers_log_add(tag, tagstr, BEGIN, id, file, line); } } -void grpc_timer_end(int tag, void* id, const char* file, int line) { +void grpc_timer_end(int tag, const char* tagstr, void* id, const char* file, + int line) { if (tag < GRPC_PTAG_IGNORE_THRESHOLD) { - grpc_timers_log_add(tag, END, id, file, line); + grpc_timers_log_add(tag, tagstr, END, id, file, line); } } diff --git a/src/core/profiling/stap_timers.c b/src/core/profiling/stap_timers.c index 064c86e794..99975163f9 100644 --- a/src/core/profiling/stap_timers.c +++ b/src/core/profiling/stap_timers.c @@ -42,20 +42,23 @@ #include "src/core/profiling/stap_probes.h" /* Latency profiler API implementation. */ -void grpc_timer_add_mark(int tag, void* id, const char* file, int line) { +void grpc_timer_add_mark(int tag, const char* tagstr, void* id, + const char* file, int line) { _STAP_ADD_MARK(tag); } -void grpc_timer_add_important_mark(int tag, void* id, const char* file, - int line) { +void grpc_timer_add_important_mark(int tag, const char* tagstr, void* id, + const char* file, int line) { _STAP_ADD_IMPORTANT_MARK(tag); } -void grpc_timer_begin(int tag, void* id, const char* file, int line) { +void grpc_timer_begin(int tag, const char* tagstr, void* id, const char* file, + int line) { _STAP_TIMING_NS_BEGIN(tag); } -void grpc_timer_end(int tag, void* id, const char* file, int line) { +void grpc_timer_end(int tag, const char* tagstr, void* id, const char* file, + int line) { _STAP_TIMING_NS_END(tag); } diff --git a/src/core/profiling/timers.h b/src/core/profiling/timers.h index 4fb465c237..036d02f187 100644 --- a/src/core/profiling/timers.h +++ b/src/core/profiling/timers.h @@ -41,11 +41,14 @@ extern "C" { void grpc_timers_global_init(void); void grpc_timers_global_destroy(void); -void grpc_timer_add_mark(int tag, void *id, const char *file, int line); -void grpc_timer_add_important_mark(int tag, void *id, const char *file, - int line); -void grpc_timer_begin(int tag, void *id, const char *file, int line); -void grpc_timer_end(int tag, void *id, const char *file, int line); +void grpc_timer_add_mark(int tag, const char *tagstr, void *id, + const char *file, int line); +void grpc_timer_add_important_mark(int tag, const char *tagstr, void *id, + const char *file, int line); +void grpc_timer_begin(int tag, const char *tagstr, void *id, const char *file, + int line); +void grpc_timer_end(int tag, const char *tagstr, void *id, const char *file, + int line); enum grpc_profiling_tags { /* Any GRPC_PTAG_* >= than the threshold won't generate any profiling mark. */ @@ -103,25 +106,27 @@ enum grpc_profiling_tags { #endif /* Generic profiling interface. */ -#define GRPC_TIMER_MARK(tag, id) \ - if (tag < GRPC_PTAG_IGNORE_THRESHOLD) { \ - grpc_timer_add_mark(tag, ((void *)(gpr_intptr)(id)), __FILE__, __LINE__); \ +#define GRPC_TIMER_MARK(tag, id) \ + if (tag < GRPC_PTAG_IGNORE_THRESHOLD) { \ + grpc_timer_add_mark(tag, #tag, ((void *)(gpr_intptr)(id)), __FILE__, \ + __LINE__); \ } -#define GRPC_TIMER_IMPORTANT_MARK(tag, id) \ - if (tag < GRPC_PTAG_IGNORE_THRESHOLD) { \ - grpc_timer_add_important_mark(tag, ((void *)(gpr_intptr)(id)), __FILE__, \ - __LINE__); \ +#define GRPC_TIMER_IMPORTANT_MARK(tag, id) \ + if (tag < GRPC_PTAG_IGNORE_THRESHOLD) { \ + grpc_timer_add_important_mark(tag, #tag, ((void *)(gpr_intptr)(id)), \ + __FILE__, __LINE__); \ } -#define GRPC_TIMER_BEGIN(tag, id) \ - if (tag < GRPC_PTAG_IGNORE_THRESHOLD) { \ - grpc_timer_begin(tag, ((void *)(gpr_intptr)(id)), __FILE__, __LINE__); \ +#define GRPC_TIMER_BEGIN(tag, id) \ + if (tag < GRPC_PTAG_IGNORE_THRESHOLD) { \ + grpc_timer_begin(tag, #tag, ((void *)(gpr_intptr)(id)), __FILE__, \ + __LINE__); \ } -#define GRPC_TIMER_END(tag, id) \ - if (tag < GRPC_PTAG_IGNORE_THRESHOLD) { \ - grpc_timer_end(tag, ((void *)(gpr_intptr)(id)), __FILE__, __LINE__); \ +#define GRPC_TIMER_END(tag, id) \ + if (tag < GRPC_PTAG_IGNORE_THRESHOLD) { \ + grpc_timer_end(tag, #tag, ((void *)(gpr_intptr)(id)), __FILE__, __LINE__); \ } #ifdef GRPC_STAP_PROFILER diff --git a/src/core/security/security_connector.c b/src/core/security/security_connector.c index 61cb20f6b9..b17e0e0dfa 100644 --- a/src/core/security/security_connector.c +++ b/src/core/security/security_connector.c @@ -82,7 +82,7 @@ static const char *ssl_cipher_suites(void) { /* -- Common methods. -- */ /* Returns the first property with that name. */ -static const tsi_peer_property *tsi_peer_get_property_by_name( +const tsi_peer_property *tsi_peer_get_property_by_name( const tsi_peer *peer, const char *name) { size_t i; if (peer == NULL) return NULL; diff --git a/src/core/security/security_connector.h b/src/core/security/security_connector.h index 47abe05cff..87b7ca9b8b 100644 --- a/src/core/security/security_connector.h +++ b/src/core/security/security_connector.h @@ -198,4 +198,8 @@ typedef struct { grpc_security_status grpc_ssl_server_security_connector_create( const grpc_ssl_server_config *config, grpc_security_connector **sc); +/* Util. */ +const tsi_peer_property *tsi_peer_get_property_by_name( + const tsi_peer *peer, const char *name); + #endif /* GRPC_INTERNAL_CORE_SECURITY_SECURITY_CONNECTOR_H */ diff --git a/src/core/support/subprocess_posix.c b/src/core/support/subprocess_posix.c index 4580537aa8..b4631fa0ed 100644 --- a/src/core/support/subprocess_posix.c +++ b/src/core/support/subprocess_posix.c @@ -55,9 +55,9 @@ struct gpr_subprocess { int joined; }; -char *gpr_subprocess_binary_extension() { return ""; } +const char *gpr_subprocess_binary_extension() { return ""; } -gpr_subprocess *gpr_subprocess_create(int argc, char **argv) { +gpr_subprocess *gpr_subprocess_create(int argc, const char **argv) { gpr_subprocess *r; int pid; char **exec_args; @@ -92,7 +92,11 @@ void gpr_subprocess_destroy(gpr_subprocess *p) { int gpr_subprocess_join(gpr_subprocess *p) { int status; +retry: if (waitpid(p->pid, &status, 0) == -1) { + if (errno == EINTR) { + goto retry; + } gpr_log(GPR_ERROR, "waitpid failed: %s", strerror(errno)); return -1; } diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 50df36cae9..4d2ba7cd7d 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -401,6 +401,7 @@ static int is_op_live(grpc_call *call, grpc_ioreq_op op) { static void lock(grpc_call *call) { gpr_mu_lock(&call->mu); } static int need_more_data(grpc_call *call) { + if (call->read_state == READ_STATE_STREAM_CLOSED) return 0; return is_op_live(call, GRPC_IOREQ_RECV_INITIAL_METADATA) || (is_op_live(call, GRPC_IOREQ_RECV_MESSAGE) && grpc_bbq_empty(&call->incoming_queue)) || is_op_live(call, GRPC_IOREQ_RECV_TRAILING_METADATA) || @@ -408,8 +409,7 @@ static int need_more_data(grpc_call *call) { is_op_live(call, GRPC_IOREQ_RECV_STATUS_DETAILS) || (is_op_live(call, GRPC_IOREQ_RECV_CLOSE) && grpc_bbq_empty(&call->incoming_queue)) || - (call->write_state == WRITE_STATE_INITIAL && !call->is_client && - call->read_state < READ_STATE_GOT_INITIAL_METADATA); + (call->write_state == WRITE_STATE_INITIAL && !call->is_client); } static void unlock(grpc_call *call) { @@ -536,9 +536,8 @@ static void finish_live_ioreq_op(grpc_call *call, grpc_ioreq_op op, switch ((grpc_ioreq_op)i) { case GRPC_IOREQ_RECV_MESSAGE: case GRPC_IOREQ_SEND_MESSAGE: - if (master->success) { - call->request_set[i] = REQSET_EMPTY; - } else { + call->request_set[i] = REQSET_EMPTY; + if (!master->success) { call->write_state = WRITE_STATE_WRITE_CLOSED; } break; @@ -583,11 +582,29 @@ static void finish_ioreq_op(grpc_call *call, grpc_ioreq_op op, int success) { } } +static void early_out_write_ops(grpc_call *call) { + switch (call->write_state) { + case WRITE_STATE_WRITE_CLOSED: + finish_ioreq_op(call, GRPC_IOREQ_SEND_MESSAGE, 0); + finish_ioreq_op(call, GRPC_IOREQ_SEND_STATUS, 0); + finish_ioreq_op(call, GRPC_IOREQ_SEND_TRAILING_METADATA, 0); + finish_ioreq_op(call, GRPC_IOREQ_SEND_CLOSE, 1); + /* fallthrough */ + case WRITE_STATE_STARTED: + finish_ioreq_op(call, GRPC_IOREQ_SEND_INITIAL_METADATA, 0); + /* fallthrough */ + case WRITE_STATE_INITIAL: + /* do nothing */ + break; + } +} + static void call_on_done_send(void *pc, int success) { grpc_call *call = pc; lock(call); if (call->last_send_contains & (1 << GRPC_IOREQ_SEND_INITIAL_METADATA)) { finish_ioreq_op(call, GRPC_IOREQ_SEND_INITIAL_METADATA, success); + call->write_state = WRITE_STATE_STARTED; } if (call->last_send_contains & (1 << GRPC_IOREQ_SEND_MESSAGE)) { finish_ioreq_op(call, GRPC_IOREQ_SEND_MESSAGE, success); @@ -596,7 +613,13 @@ static void call_on_done_send(void *pc, int success) { finish_ioreq_op(call, GRPC_IOREQ_SEND_TRAILING_METADATA, success); finish_ioreq_op(call, GRPC_IOREQ_SEND_STATUS, success); finish_ioreq_op(call, GRPC_IOREQ_SEND_CLOSE, 1); + call->write_state = WRITE_STATE_WRITE_CLOSED; + } + if (!success) { + call->write_state = WRITE_STATE_WRITE_CLOSED; + early_out_write_ops(call); } + call->send_ops.nops = 0; call->last_send_contains = 0; call->sending = 0; unlock(call); @@ -810,7 +833,6 @@ static int fill_send_ops(grpc_call *call, grpc_transport_op *op) { op->send_ops = &call->send_ops; op->bind_pollset = grpc_cq_pollset(call->cq); call->last_send_contains |= 1 << GRPC_IOREQ_SEND_INITIAL_METADATA; - call->write_state = WRITE_STATE_STARTED; call->send_initial_metadata_count = 0; /* fall through intended */ case WRITE_STATE_STARTED: @@ -826,7 +848,6 @@ static int fill_send_ops(grpc_call *call, grpc_transport_op *op) { op->is_last_send = 1; op->send_ops = &call->send_ops; call->last_send_contains |= 1 << GRPC_IOREQ_SEND_CLOSE; - call->write_state = WRITE_STATE_WRITE_CLOSED; if (!call->is_client) { /* send trailing metadata */ data = call->request_data[GRPC_IOREQ_SEND_TRAILING_METADATA]; @@ -918,23 +939,6 @@ static void finish_read_ops(grpc_call *call) { } } -static void early_out_write_ops(grpc_call *call) { - switch (call->write_state) { - case WRITE_STATE_WRITE_CLOSED: - finish_ioreq_op(call, GRPC_IOREQ_SEND_MESSAGE, 0); - finish_ioreq_op(call, GRPC_IOREQ_SEND_STATUS, 0); - finish_ioreq_op(call, GRPC_IOREQ_SEND_TRAILING_METADATA, 0); - finish_ioreq_op(call, GRPC_IOREQ_SEND_CLOSE, 1); - /* fallthrough */ - case WRITE_STATE_STARTED: - finish_ioreq_op(call, GRPC_IOREQ_SEND_INITIAL_METADATA, 0); - /* fallthrough */ - case WRITE_STATE_INITIAL: - /* do nothing */ - break; - } -} - static grpc_call_error start_ioreq(grpc_call *call, const grpc_ioreq *reqs, size_t nreqs, grpc_ioreq_completion_func completion, @@ -1175,6 +1179,10 @@ static void set_cancelled_value(grpc_status_code status, void *dest) { } static void finish_batch(grpc_call *call, int success, void *tag) { + grpc_cq_end_op(call->cq, tag, call, success); +} + +static void finish_batch_with_close(grpc_call *call, int success, void *tag) { grpc_cq_end_op(call->cq, tag, call, 1); } @@ -1185,6 +1193,7 @@ grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, size_t out; const grpc_op *op; grpc_ioreq *req; + void (*finish_func)(grpc_call *, int, void *) = finish_batch; GRPC_CALL_LOG_BATCH(GPR_INFO, call, ops, nops, tag); @@ -1268,6 +1277,7 @@ grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, op->data.recv_status_on_client.trailing_metadata; req = &reqs[out++]; req->op = GRPC_IOREQ_RECV_CLOSE; + finish_func = finish_batch_with_close; break; case GRPC_OP_RECV_CLOSE_ON_SERVER: req = &reqs[out++]; @@ -1277,13 +1287,14 @@ grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, op->data.recv_close_on_server.cancelled; req = &reqs[out++]; req->op = GRPC_IOREQ_RECV_CLOSE; + finish_func = finish_batch_with_close; break; } } grpc_cq_begin_op(call->cq, call); - return grpc_call_start_ioreq_and_call_back(call, reqs, out, finish_batch, + return grpc_call_start_ioreq_and_call_back(call, reqs, out, finish_func, tag); } diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c index 48910afda3..8c9ca48a05 100644 --- a/src/core/surface/completion_queue.c +++ b/src/core/surface/completion_queue.c @@ -275,14 +275,14 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, gpr_mu_unlock(GRPC_POLLSET_MU(&cc->pollset)); memset(&ret, 0, sizeof(ret)); ret.type = GRPC_QUEUE_TIMEOUT; - GRPC_SURFACE_TRACE_RETURNED_EVENT(cc, &ev->base); + GRPC_SURFACE_TRACE_RETURNED_EVENT(cc, &ret); return ret; } } gpr_mu_unlock(GRPC_POLLSET_MU(&cc->pollset)); ret = ev->base; gpr_free(ev); - GRPC_SURFACE_TRACE_RETURNED_EVENT(cc, &ev->base); + GRPC_SURFACE_TRACE_RETURNED_EVENT(cc, &ret); return ret; } diff --git a/src/core/surface/server.c b/src/core/surface/server.c index 351ed5b758..d75af7291b 100644 --- a/src/core/surface/server.c +++ b/src/core/surface/server.c @@ -427,6 +427,8 @@ static void server_on_recv(void *ptr, int success) { grpc_iomgr_add_callback(kill_zombie, elem); } else if (calld->state == PENDING) { call_list_remove(calld, PENDING_START); + calld->state = ZOMBIED; + grpc_iomgr_add_callback(kill_zombie, elem); } gpr_mu_unlock(&chand->server->mu); break; diff --git a/src/core/transport/chttp2/frame.h b/src/core/transport/chttp2/frame.h index ac76c4cc9c..c9e3e13042 100644 --- a/src/core/transport/chttp2/frame.h +++ b/src/core/transport/chttp2/frame.h @@ -53,12 +53,14 @@ typedef struct { gpr_uint8 send_ping_ack; gpr_uint8 process_ping_reply; gpr_uint8 goaway; + gpr_uint8 rst_stream; gpr_int64 initial_window_update; gpr_uint32 window_update; gpr_uint32 goaway_last_stream_index; gpr_uint32 goaway_error; gpr_slice goaway_text; + gpr_uint32 rst_stream_reason; } grpc_chttp2_parse_state; #define GRPC_CHTTP2_FRAME_DATA 0 diff --git a/src/core/transport/chttp2/frame_rst_stream.c b/src/core/transport/chttp2/frame_rst_stream.c index 368ca86481..3016aac7a2 100644 --- a/src/core/transport/chttp2/frame_rst_stream.c +++ b/src/core/transport/chttp2/frame_rst_stream.c @@ -32,6 +32,9 @@ */ #include "src/core/transport/chttp2/frame_rst_stream.h" + +#include <grpc/support/log.h> + #include "src/core/transport/chttp2/frame.h" gpr_slice grpc_chttp2_rst_stream_create(gpr_uint32 id, gpr_uint32 code) { @@ -54,3 +57,40 @@ gpr_slice grpc_chttp2_rst_stream_create(gpr_uint32 id, gpr_uint32 code) { return slice; } + +grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_begin_frame( + grpc_chttp2_rst_stream_parser *parser, gpr_uint32 length, gpr_uint8 flags) { + if (length != 4) { + gpr_log(GPR_ERROR, "invalid rst_stream: length=%d, flags=%02x", length, flags); + return GRPC_CHTTP2_CONNECTION_ERROR; + } + parser->byte = 0; + return GRPC_CHTTP2_PARSE_OK; +} + +grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_parse( + void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, + int is_last) { + gpr_uint8 *const beg = GPR_SLICE_START_PTR(slice); + gpr_uint8 *const end = GPR_SLICE_END_PTR(slice); + gpr_uint8 *cur = beg; + grpc_chttp2_rst_stream_parser *p = parser; + + while (p->byte != 4 && cur != end) { + p->reason_bytes[p->byte] = *cur; + cur++; + p->byte++; + } + + if (p->byte == 4) { + GPR_ASSERT(is_last); + state->rst_stream = 1; + state->rst_stream_reason = + (((gpr_uint32)p->reason_bytes[0]) << 24) | + (((gpr_uint32)p->reason_bytes[1]) << 16) | + (((gpr_uint32)p->reason_bytes[2]) << 8) | + (((gpr_uint32)p->reason_bytes[3])); + } + + return GRPC_CHTTP2_PARSE_OK; +} diff --git a/src/core/transport/chttp2/frame_rst_stream.h b/src/core/transport/chttp2/frame_rst_stream.h index 2d3ee18637..07a3c98d03 100644 --- a/src/core/transport/chttp2/frame_rst_stream.h +++ b/src/core/transport/chttp2/frame_rst_stream.h @@ -35,7 +35,18 @@ #define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H #include <grpc/support/slice.h> +#include "src/core/transport/chttp2/frame.h" + +typedef struct { + gpr_uint8 byte; + gpr_uint8 reason_bytes[4]; +} grpc_chttp2_rst_stream_parser; gpr_slice grpc_chttp2_rst_stream_create(gpr_uint32 stream_id, gpr_uint32 code); +grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_begin_frame( + grpc_chttp2_rst_stream_parser *parser, gpr_uint32 length, gpr_uint8 flags); +grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_parse( + void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); + #endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H */ diff --git a/src/core/transport/chttp2/hpack_parser.c b/src/core/transport/chttp2/hpack_parser.c index 3fd8f67226..a489543868 100644 --- a/src/core/transport/chttp2/hpack_parser.c +++ b/src/core/transport/chttp2/hpack_parser.c @@ -654,7 +654,7 @@ static int parse_stream_weight(grpc_chttp2_hpack_parser *p, return 1; } - return parse_begin(p, cur + 1, end); + return p->after_prioritization(p, cur + 1, end); } static int parse_stream_dep3(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, @@ -1349,7 +1349,7 @@ void grpc_chttp2_hpack_parser_init(grpc_chttp2_hpack_parser *p, } void grpc_chttp2_hpack_parser_set_has_priority(grpc_chttp2_hpack_parser *p) { - GPR_ASSERT(p->state == parse_begin); + p->after_prioritization = p->state; p->state = parse_stream_dep0; } diff --git a/src/core/transport/chttp2/hpack_parser.h b/src/core/transport/chttp2/hpack_parser.h index bb4c1a1f49..bfc06b3980 100644 --- a/src/core/transport/chttp2/hpack_parser.h +++ b/src/core/transport/chttp2/hpack_parser.h @@ -62,6 +62,8 @@ struct grpc_chttp2_hpack_parser { grpc_chttp2_hpack_parser_state state; /* future states dependent on the opening op code */ const grpc_chttp2_hpack_parser_state *next_state; + /* what to do after skipping prioritization data */ + grpc_chttp2_hpack_parser_state after_prioritization; /* the value we're currently parsing */ union { gpr_uint32 *value; diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index a6f9f782a1..9dc5f23389 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -154,7 +154,13 @@ typedef enum { WRITE_STATE_OPEN, WRITE_STATE_QUEUED_CLOSE, WRITE_STATE_SENT_CLOSE -} WRITE_STATE; +} write_state; + +typedef enum { + DONT_SEND_CLOSED = 0, + SEND_CLOSED, + SEND_CLOSED_WITH_RST_STREAM +} send_closed; typedef struct { stream *head; @@ -267,6 +273,7 @@ struct transport { grpc_chttp2_window_update_parser window_update; grpc_chttp2_settings_parser settings; grpc_chttp2_ping_parser ping; + grpc_chttp2_rst_stream_parser rst_stream; } simple_parsers; /* goaway */ @@ -312,8 +319,8 @@ struct stream { /* when the application requests writes be closed, the write_closed is 'queued'; when the close is flow controlled into the send path, we are 'sending' it; when the write has been performed it is 'sent' */ - WRITE_STATE write_state; - gpr_uint8 send_closed; + write_state write_state; + send_closed send_closed; gpr_uint8 read_closed; gpr_uint8 cancelled; @@ -937,7 +944,11 @@ static int prepare_write(transport *t) { if (s->write_state == WRITE_STATE_QUEUED_CLOSE && s->outgoing_sopb->nops == 0) { - s->send_closed = 1; + if (!t->is_client && !s->read_closed) { + s->send_closed = SEND_CLOSED_WITH_RST_STREAM; + } else { + s->send_closed = SEND_CLOSED; + } } if (s->writing_sopb.nops > 0 || s->send_closed) { stream_list_join(t, s, WRITING); @@ -982,9 +993,12 @@ static void finalize_outbuf(transport *t) { while ((s = stream_list_remove_head(t, WRITING))) { grpc_chttp2_encode(s->writing_sopb.ops, s->writing_sopb.nops, - s->send_closed, s->id, &t->hpack_compressor, &t->outbuf); + s->send_closed != DONT_SEND_CLOSED, s->id, &t->hpack_compressor, &t->outbuf); s->writing_sopb.nops = 0; - if (s->send_closed) { + if (s->send_closed == SEND_CLOSED_WITH_RST_STREAM) { + gpr_slice_buffer_add(&t->outbuf, grpc_chttp2_rst_stream_create(s->id, GRPC_CHTTP2_NO_ERROR)); + } + if (s->send_closed != DONT_SEND_CLOSED) { stream_list_join(t, s, WRITTEN_CLOSED); } } @@ -999,9 +1013,10 @@ static void finish_write_common(transport *t, int success) { } while ((s = stream_list_remove_head(t, WRITTEN_CLOSED))) { s->write_state = WRITE_STATE_SENT_CLOSE; - if (1||!s->cancelled) { - maybe_finish_read(t, s); + if (!t->is_client) { + s->read_closed = 1; } + maybe_finish_read(t, s); } t->outbuf.count = 0; t->outbuf.length = 0; @@ -1127,6 +1142,7 @@ static void perform_op_locked(transport *t, stream *s, grpc_transport_op *op) { if (op->recv_ops) { GPR_ASSERT(s->incoming_sopb == NULL); + GPR_ASSERT(s->published_state != GRPC_STREAM_CLOSED); s->recv_done_closure.cb = op->on_done_recv; s->recv_done_closure.user_data = op->recv_user_data; s->incoming_sopb = op->recv_ops; @@ -1214,12 +1230,14 @@ static void cancel_stream_inner(transport *t, stream *s, gpr_uint32 id, if (s) { /* clear out any unreported input & output: nobody cares anymore */ had_outgoing = s->outgoing_sopb && s->outgoing_sopb->nops != 0; - schedule_nuke_sopb(t, &s->parser.incoming_sopb); - if (s->outgoing_sopb) { - schedule_nuke_sopb(t, s->outgoing_sopb); - s->outgoing_sopb = NULL; - stream_list_remove(t, s, WRITABLE); - schedule_cb(t, s->send_done_closure, 0); + if (error_code != GRPC_CHTTP2_NO_ERROR) { + schedule_nuke_sopb(t, &s->parser.incoming_sopb); + if (s->outgoing_sopb) { + schedule_nuke_sopb(t, s->outgoing_sopb); + s->outgoing_sopb = NULL; + stream_list_remove(t, s, WRITABLE); + schedule_cb(t, s->send_done_closure, 0); + } } if (s->cancelled) { send_rst = 0; @@ -1228,31 +1246,34 @@ static void cancel_stream_inner(transport *t, stream *s, gpr_uint32 id, s->cancelled = 1; stream_list_join(t, s, CANCELLED); - gpr_ltoa(local_status, buffer); - add_incoming_metadata( - t, s, - grpc_mdelem_from_strings(t->metadata_context, "grpc-status", buffer)); - if (!optional_message) { - switch (local_status) { - case GRPC_STATUS_CANCELLED: - add_incoming_metadata( - t, s, grpc_mdelem_from_strings(t->metadata_context, - "grpc-message", "Cancelled")); - break; - default: - break; - } - } else { + if (error_code != GRPC_CHTTP2_NO_ERROR) { + /* synthesize a status if we don't believe we'll get one */ + gpr_ltoa(local_status, buffer); add_incoming_metadata( t, s, - grpc_mdelem_from_metadata_strings( - t->metadata_context, - grpc_mdstr_from_string(t->metadata_context, "grpc-message"), - grpc_mdstr_ref(optional_message))); + grpc_mdelem_from_strings(t->metadata_context, "grpc-status", buffer)); + if (!optional_message) { + switch (local_status) { + case GRPC_STATUS_CANCELLED: + add_incoming_metadata( + t, s, grpc_mdelem_from_strings(t->metadata_context, + "grpc-message", "Cancelled")); + break; + default: + break; + } + } else { + add_incoming_metadata( + t, s, + grpc_mdelem_from_metadata_strings( + t->metadata_context, + grpc_mdstr_from_string(t->metadata_context, "grpc-message"), + grpc_mdstr_ref(optional_message))); + } + add_metadata_batch(t, s); } - add_metadata_batch(t, s); - maybe_finish_read(t, s); } + maybe_finish_read(t, s); } if (!id) send_rst = 0; if (send_rst) { @@ -1527,6 +1548,19 @@ static int init_ping_parser(transport *t) { return ok; } +static int init_rst_stream_parser(transport *t) { + int ok = GRPC_CHTTP2_PARSE_OK == + grpc_chttp2_rst_stream_parser_begin_frame(&t->simple_parsers.rst_stream, + t->incoming_frame_size, + t->incoming_frame_flags); + if (!ok) { + drop_connection(t); + } + t->parser = grpc_chttp2_rst_stream_parser_parse; + t->parser_data = &t->simple_parsers.rst_stream; + return ok; +} + static int init_goaway_parser(transport *t) { int ok = GRPC_CHTTP2_PARSE_OK == @@ -1581,12 +1615,7 @@ static int init_frame_parser(transport *t) { gpr_log(GPR_ERROR, "Unexpected CONTINUATION frame"); return 0; case GRPC_CHTTP2_FRAME_RST_STREAM: - /* TODO(ctiller): actually parse the reason */ - cancel_stream_id( - t, t->incoming_stream_id, - grpc_chttp2_http2_error_to_grpc_status(GRPC_CHTTP2_CANCEL), - GRPC_CHTTP2_CANCEL, 0); - return init_skip_frame(t, 0); + return init_rst_stream_parser(t); case GRPC_CHTTP2_FRAME_SETTINGS: return init_settings_frame_parser(t); case GRPC_CHTTP2_FRAME_WINDOW_UPDATE: @@ -1650,6 +1679,12 @@ static int parse_frame_slice(transport *t, gpr_slice slice, int is_last) { if (st.goaway) { add_goaway(t, st.goaway_error, st.goaway_text); } + if (st.rst_stream) { + cancel_stream_id( + t, t->incoming_stream_id, + grpc_chttp2_http2_error_to_grpc_status(st.rst_stream_reason), + st.rst_stream_reason, 0); + } if (st.process_ping_reply) { for (i = 0; i < t->ping_count; i++) { if (0 == diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc index f38a694734..72cdd49d19 100644 --- a/src/cpp/client/client_context.cc +++ b/src/cpp/client/client_context.cc @@ -34,6 +34,7 @@ #include <grpc++/client_context.h> #include <grpc/grpc.h> +#include <grpc++/credentials.h> #include <grpc++/time.h> namespace grpc { @@ -63,6 +64,17 @@ void ClientContext::AddMetadata(const grpc::string& meta_key, send_initial_metadata_.insert(std::make_pair(meta_key, meta_value)); } +void ClientContext::set_call(grpc_call* call, + const std::shared_ptr<ChannelInterface>& channel) { + GPR_ASSERT(call_ == nullptr); + call_ = call; + channel_ = channel; + if (creds_ && !creds_->ApplyToCall(call_)) { + grpc_call_cancel_with_status(call, GRPC_STATUS_CANCELLED, + "Failed to set credentials to rpc."); + } +} + void ClientContext::TryCancel() { if (call_) { grpc_call_cancel(call_); diff --git a/src/cpp/client/create_channel.cc b/src/cpp/client/create_channel.cc index 301430572a..510af2bb00 100644 --- a/src/cpp/client/create_channel.cc +++ b/src/cpp/client/create_channel.cc @@ -41,7 +41,7 @@ namespace grpc { class ChannelArguments; std::shared_ptr<ChannelInterface> CreateChannel( - const grpc::string& target, const std::unique_ptr<Credentials>& creds, + const grpc::string& target, const std::shared_ptr<Credentials>& creds, const ChannelArguments& args) { return creds ? creds->CreateChannel(target, args) : std::shared_ptr<ChannelInterface>( diff --git a/src/cpp/client/insecure_credentials.cc b/src/cpp/client/insecure_credentials.cc index 8945b038de..5ad8784567 100644 --- a/src/cpp/client/insecure_credentials.cc +++ b/src/cpp/client/insecure_credentials.cc @@ -52,12 +52,15 @@ class InsecureCredentialsImpl GRPC_FINAL : public Credentials { target, grpc_channel_create(target.c_str(), &channel_args))); } + // InsecureCredentials should not be applied to a call. + bool ApplyToCall(grpc_call* call) GRPC_OVERRIDE { return false; } + SecureCredentials* AsSecureCredentials() GRPC_OVERRIDE { return nullptr; } }; } // namespace -std::unique_ptr<Credentials> InsecureCredentials() { - return std::unique_ptr<Credentials>(new InsecureCredentialsImpl()); +std::shared_ptr<Credentials> InsecureCredentials() { + return std::shared_ptr<Credentials>(new InsecureCredentialsImpl()); } } // namespace grpc diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc index 48bf7430b2..b5134b3140 100644 --- a/src/cpp/client/secure_credentials.cc +++ b/src/cpp/client/secure_credentials.cc @@ -49,20 +49,24 @@ std::shared_ptr<grpc::ChannelInterface> SecureCredentials::CreateChannel( grpc_secure_channel_create(c_creds_, target.c_str(), &channel_args))); } +bool SecureCredentials::ApplyToCall(grpc_call* call) { + return grpc_call_set_credentials(call, c_creds_) == GRPC_CALL_OK; +} + namespace { -std::unique_ptr<Credentials> WrapCredentials(grpc_credentials* creds) { +std::shared_ptr<Credentials> WrapCredentials(grpc_credentials* creds) { return creds == nullptr ? nullptr - : std::unique_ptr<Credentials>(new SecureCredentials(creds)); + : std::shared_ptr<Credentials>(new SecureCredentials(creds)); } } // namespace -std::unique_ptr<Credentials> GoogleDefaultCredentials() { +std::shared_ptr<Credentials> GoogleDefaultCredentials() { return WrapCredentials(grpc_google_default_credentials_create()); } // Builds SSL Credentials given SSL specific options -std::unique_ptr<Credentials> SslCredentials( +std::shared_ptr<Credentials> SslCredentials( const SslCredentialsOptions& options) { grpc_ssl_pem_key_cert_pair pem_key_cert_pair = { options.pem_private_key.c_str(), options.pem_cert_chain.c_str()}; @@ -74,12 +78,12 @@ std::unique_ptr<Credentials> SslCredentials( } // Builds credentials for use when running in GCE -std::unique_ptr<Credentials> ComputeEngineCredentials() { +std::shared_ptr<Credentials> ComputeEngineCredentials() { return WrapCredentials(grpc_compute_engine_credentials_create()); } // Builds service account credentials. -std::unique_ptr<Credentials> ServiceAccountCredentials( +std::shared_ptr<Credentials> ServiceAccountCredentials( const grpc::string& json_key, const grpc::string& scope, long token_lifetime_seconds) { if (token_lifetime_seconds <= 0) { @@ -94,8 +98,8 @@ std::unique_ptr<Credentials> ServiceAccountCredentials( } // Builds JWT credentials. -std::unique_ptr<Credentials> JWTCredentials( - const grpc::string& json_key, long token_lifetime_seconds) { +std::shared_ptr<Credentials> JWTCredentials(const grpc::string& json_key, + long token_lifetime_seconds) { if (token_lifetime_seconds <= 0) { gpr_log(GPR_ERROR, "Trying to create JWTCredentials with non-positive lifetime"); @@ -107,14 +111,14 @@ std::unique_ptr<Credentials> JWTCredentials( } // Builds refresh token credentials. -std::unique_ptr<Credentials> RefreshTokenCredentials( +std::shared_ptr<Credentials> RefreshTokenCredentials( const grpc::string& json_refresh_token) { return WrapCredentials( grpc_refresh_token_credentials_create(json_refresh_token.c_str())); } // Builds IAM credentials. -std::unique_ptr<Credentials> IAMCredentials( +std::shared_ptr<Credentials> IAMCredentials( const grpc::string& authorization_token, const grpc::string& authority_selector) { return WrapCredentials(grpc_iam_credentials_create( @@ -122,10 +126,10 @@ std::unique_ptr<Credentials> IAMCredentials( } // Combines two credentials objects into a composite credentials. -std::unique_ptr<Credentials> CompositeCredentials( - const std::unique_ptr<Credentials>& creds1, - const std::unique_ptr<Credentials>& creds2) { - // Note that we are not saving unique_ptrs to the two credentials +std::shared_ptr<Credentials> CompositeCredentials( + const std::shared_ptr<Credentials>& creds1, + const std::shared_ptr<Credentials>& creds2) { + // Note that we are not saving shared_ptrs to the two credentials // passed in here. This is OK because the underlying C objects (i.e., // creds1 and creds2) into grpc_composite_credentials_create will see their // refcounts incremented. diff --git a/src/cpp/client/secure_credentials.h b/src/cpp/client/secure_credentials.h index 77d575813e..ddf69911b5 100644 --- a/src/cpp/client/secure_credentials.h +++ b/src/cpp/client/secure_credentials.h @@ -46,6 +46,7 @@ class SecureCredentials GRPC_FINAL : public Credentials { explicit SecureCredentials(grpc_credentials* c_creds) : c_creds_(c_creds) {} ~SecureCredentials() GRPC_OVERRIDE { grpc_credentials_release(c_creds_); } grpc_credentials* GetRawCreds() { return c_creds_; } + bool ApplyToCall(grpc_call* call) GRPC_OVERRIDE; std::shared_ptr<grpc::ChannelInterface> CreateChannel( const string& target, const grpc::ChannelArguments& args) GRPC_OVERRIDE; diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index 62f4020d7e..e66b4ed2d8 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -149,7 +149,7 @@ class Server::SyncRequest GRPC_FINAL : public CompletionQueueTag { } buf.AddServerSendStatus(&ctx_.trailing_metadata_, status); call_.PerformOps(&buf); - GPR_ASSERT(cq_.Pluck(&buf)); + cq_.Pluck(&buf); /* status ignored */ void* ignored_tag; bool ignored_ok; cq_.Shutdown(); diff --git a/src/csharp/Grpc.Auth/Grpc.Auth.csproj b/src/csharp/Grpc.Auth/Grpc.Auth.csproj index f7724ea643..e6abbbfdf0 100644 --- a/src/csharp/Grpc.Auth/Grpc.Auth.csproj +++ b/src/csharp/Grpc.Auth/Grpc.Auth.csproj @@ -10,6 +10,7 @@ <RootNamespace>Grpc.Auth</RootNamespace> <AssemblyName>Grpc.Auth</AssemblyName> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <DocumentationFile>bin\$(Configuration)\Grpc.Auth.Xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> diff --git a/src/csharp/Grpc.Auth/Grpc.Auth.nuspec b/src/csharp/Grpc.Auth/Grpc.Auth.nuspec index 28ec93d3c5..85aee35566 100644 --- a/src/csharp/Grpc.Auth/Grpc.Auth.nuspec +++ b/src/csharp/Grpc.Auth/Grpc.Auth.nuspec @@ -22,5 +22,8 @@ </metadata> <files> <file src="bin/Release/Grpc.Auth.dll" target="lib/net45" /> + <file src="bin/Release/Grpc.Auth.pdb" target="lib/net45" /> + <file src="bin/Release/Grpc.Auth.xml" target="lib/net45" /> + <file src="**\*.cs" target="src" /> </files> </package> diff --git a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj index eac8d16fb1..62cb443272 100644 --- a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj +++ b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj @@ -34,6 +34,9 @@ <HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath> </Reference> <Reference Include="System" /> + <Reference Include="System.Interactive.Async"> + <HintPath>..\packages\Ix-Async.1.2.3\lib\net45\System.Interactive.Async.dll</HintPath> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="Properties\AssemblyInfo.cs" /> @@ -57,7 +60,5 @@ <ItemGroup> <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> </ItemGroup> - <ItemGroup> - <Folder Include="Internal\" /> - </ItemGroup> + <ItemGroup /> </Project>
\ No newline at end of file diff --git a/src/csharp/Grpc.Core.Tests/packages.config b/src/csharp/Grpc.Core.Tests/packages.config index c714ef3a23..28af8d78c6 100644 --- a/src/csharp/Grpc.Core.Tests/packages.config +++ b/src/csharp/Grpc.Core.Tests/packages.config @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <packages> + <package id="Ix-Async" version="1.2.3" targetFramework="net45" /> <package id="NUnit" version="2.6.4" targetFramework="net45" /> </packages>
\ No newline at end of file diff --git a/src/csharp/Grpc.Core/AsyncClientStreamingCall.cs b/src/csharp/Grpc.Core/AsyncClientStreamingCall.cs index b95776f66d..d66b0d4974 100644 --- a/src/csharp/Grpc.Core/AsyncClientStreamingCall.cs +++ b/src/csharp/Grpc.Core/AsyncClientStreamingCall.cs @@ -40,33 +40,17 @@ namespace Grpc.Core /// <summary> /// Return type for client streaming calls. /// </summary> - public sealed class AsyncClientStreamingCall<TRequest, TResponse> - where TRequest : class - where TResponse : class + public sealed class AsyncClientStreamingCall<TRequest, TResponse> : IDisposable { readonly IClientStreamWriter<TRequest> requestStream; readonly Task<TResponse> result; + readonly Action disposeAction; - public AsyncClientStreamingCall(IClientStreamWriter<TRequest> requestStream, Task<TResponse> result) + public AsyncClientStreamingCall(IClientStreamWriter<TRequest> requestStream, Task<TResponse> result, Action disposeAction) { this.requestStream = requestStream; this.result = result; - } - - /// <summary> - /// Writes a request to RequestStream. - /// </summary> - public Task Write(TRequest message) - { - return requestStream.Write(message); - } - - /// <summary> - /// Closes the RequestStream. - /// </summary> - public Task Close() - { - return requestStream.Close(); + this.disposeAction = disposeAction; } /// <summary> @@ -99,5 +83,16 @@ namespace Grpc.Core { return result.GetAwaiter(); } + + /// <summary> + /// Provides means to provide after the call. + /// If the call has already finished normally (request stream has been completed and call result has been received), doesn't do anything. + /// Otherwise, requests cancellation of the call which should terminate all pending async operations associated with the call. + /// As a result, all resources being used by the call should be released eventually. + /// </summary> + public void Dispose() + { + disposeAction.Invoke(); + } } } diff --git a/src/csharp/Grpc.Core/AsyncDuplexStreamingCall.cs b/src/csharp/Grpc.Core/AsyncDuplexStreamingCall.cs index ee05437416..4c0d5936ac 100644 --- a/src/csharp/Grpc.Core/AsyncDuplexStreamingCall.cs +++ b/src/csharp/Grpc.Core/AsyncDuplexStreamingCall.cs @@ -40,42 +40,17 @@ namespace Grpc.Core /// <summary> /// Return type for bidirectional streaming calls. /// </summary> - public sealed class AsyncDuplexStreamingCall<TRequest, TResponse> - where TRequest : class - where TResponse : class + public sealed class AsyncDuplexStreamingCall<TRequest, TResponse> : IDisposable { readonly IClientStreamWriter<TRequest> requestStream; readonly IAsyncStreamReader<TResponse> responseStream; + readonly Action disposeAction; - public AsyncDuplexStreamingCall(IClientStreamWriter<TRequest> requestStream, IAsyncStreamReader<TResponse> responseStream) + public AsyncDuplexStreamingCall(IClientStreamWriter<TRequest> requestStream, IAsyncStreamReader<TResponse> responseStream, Action disposeAction) { this.requestStream = requestStream; this.responseStream = responseStream; - } - - /// <summary> - /// Writes a request to RequestStream. - /// </summary> - public Task Write(TRequest message) - { - return requestStream.Write(message); - } - - /// <summary> - /// Closes the RequestStream. - /// </summary> - public Task Close() - { - return requestStream.Close(); - } - - /// <summary> - /// Reads a response from ResponseStream. - /// </summary> - /// <returns></returns> - public Task<TResponse> ReadNext() - { - return responseStream.ReadNext(); + this.disposeAction = disposeAction; } /// <summary> @@ -99,5 +74,16 @@ namespace Grpc.Core return requestStream; } } + + /// <summary> + /// Provides means to cleanup after the call. + /// If the call has already finished normally (request stream has been completed and response stream has been fully read), doesn't do anything. + /// Otherwise, requests cancellation of the call which should terminate all pending async operations associated with the call. + /// As a result, all resources being used by the call should be released eventually. + /// </summary> + public void Dispose() + { + disposeAction.Invoke(); + } } } diff --git a/src/csharp/Grpc.Core/AsyncServerStreamingCall.cs b/src/csharp/Grpc.Core/AsyncServerStreamingCall.cs index 73b9614985..7a479b9a23 100644 --- a/src/csharp/Grpc.Core/AsyncServerStreamingCall.cs +++ b/src/csharp/Grpc.Core/AsyncServerStreamingCall.cs @@ -40,23 +40,15 @@ namespace Grpc.Core /// <summary> /// Return type for server streaming calls. /// </summary> - public sealed class AsyncServerStreamingCall<TResponse> - where TResponse : class + public sealed class AsyncServerStreamingCall<TResponse> : IDisposable { readonly IAsyncStreamReader<TResponse> responseStream; + readonly Action disposeAction; - public AsyncServerStreamingCall(IAsyncStreamReader<TResponse> responseStream) + public AsyncServerStreamingCall(IAsyncStreamReader<TResponse> responseStream, Action disposeAction) { this.responseStream = responseStream; - } - - /// <summary> - /// Reads the next response from ResponseStream - /// </summary> - /// <returns></returns> - public Task<TResponse> ReadNext() - { - return responseStream.ReadNext(); + this.disposeAction = disposeAction; } /// <summary> @@ -69,5 +61,16 @@ namespace Grpc.Core return responseStream; } } + + /// <summary> + /// Provides means to cleanup after the call. + /// If the call has already finished normally (response stream has been fully read), doesn't do anything. + /// Otherwise, requests cancellation of the call which should terminate all pending async operations associated with the call. + /// As a result, all resources being used by the call should be released eventually. + /// </summary> + public void Dispose() + { + disposeAction.Invoke(); + } } } diff --git a/src/csharp/Grpc.Core/Call.cs b/src/csharp/Grpc.Core/Call.cs index d1ee59ff0a..37b452f020 100644 --- a/src/csharp/Grpc.Core/Call.cs +++ b/src/csharp/Grpc.Core/Call.cs @@ -41,8 +41,6 @@ namespace Grpc.Core /// Abstraction of a call to be invoked on a client. /// </summary> public class Call<TRequest, TResponse> - where TRequest : class - where TResponse : class { readonly string name; readonly Marshaller<TRequest> requestMarshaller; diff --git a/src/csharp/Grpc.Core/Calls.cs b/src/csharp/Grpc.Core/Calls.cs index ba42a2d4f8..9f8baac684 100644 --- a/src/csharp/Grpc.Core/Calls.cs +++ b/src/csharp/Grpc.Core/Calls.cs @@ -73,7 +73,7 @@ namespace Grpc.Core asyncCall.StartServerStreamingCall(req, call.Headers); RegisterCancellationCallback(asyncCall, token); var responseStream = new ClientResponseStream<TRequest, TResponse>(asyncCall); - return new AsyncServerStreamingCall<TResponse>(responseStream); + return new AsyncServerStreamingCall<TResponse>(responseStream, asyncCall.Cancel); } public static AsyncClientStreamingCall<TRequest, TResponse> AsyncClientStreamingCall<TRequest, TResponse>(Call<TRequest, TResponse> call, CancellationToken token) @@ -85,7 +85,7 @@ namespace Grpc.Core var resultTask = asyncCall.ClientStreamingCallAsync(call.Headers); RegisterCancellationCallback(asyncCall, token); var requestStream = new ClientRequestStream<TRequest, TResponse>(asyncCall); - return new AsyncClientStreamingCall<TRequest, TResponse>(requestStream, resultTask); + return new AsyncClientStreamingCall<TRequest, TResponse>(requestStream, resultTask, asyncCall.Cancel); } public static AsyncDuplexStreamingCall<TRequest, TResponse> AsyncDuplexStreamingCall<TRequest, TResponse>(Call<TRequest, TResponse> call, CancellationToken token) @@ -98,7 +98,7 @@ namespace Grpc.Core RegisterCancellationCallback(asyncCall, token); var requestStream = new ClientRequestStream<TRequest, TResponse>(asyncCall); var responseStream = new ClientResponseStream<TRequest, TResponse>(asyncCall); - return new AsyncDuplexStreamingCall<TRequest, TResponse>(requestStream, responseStream); + return new AsyncDuplexStreamingCall<TRequest, TResponse>(requestStream, responseStream, asyncCall.Cancel); } private static void RegisterCancellationCallback<TRequest, TResponse>(AsyncCall<TRequest, TResponse> asyncCall, CancellationToken token) diff --git a/src/csharp/Grpc.Core/Grpc.Core.csproj b/src/csharp/Grpc.Core/Grpc.Core.csproj index f5f2cf5f22..fe2d446a35 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.csproj +++ b/src/csharp/Grpc.Core/Grpc.Core.csproj @@ -13,6 +13,7 @@ <AssemblyName>Grpc.Core</AssemblyName> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <NuGetPackageImportStamp>8bb563fb</NuGetPackageImportStamp> + <DocumentationFile>bin\$(Configuration)\Grpc.Core.Xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -37,6 +38,9 @@ <Reference Include="System.Collections.Immutable"> <HintPath>..\packages\Microsoft.Bcl.Immutable.1.0.34\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath> </Reference> + <Reference Include="System.Interactive.Async"> + <HintPath>..\packages\Ix-Async.1.2.3\lib\net45\System.Interactive.Async.dll</HintPath> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="AsyncDuplexStreamingCall.cs" /> diff --git a/src/csharp/Grpc.Core/Grpc.Core.nuspec b/src/csharp/Grpc.Core/Grpc.Core.nuspec index e54908cb8b..69e8497bb7 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.nuspec +++ b/src/csharp/Grpc.Core/Grpc.Core.nuspec @@ -16,10 +16,14 @@ <tags>gRPC RPC Protocol HTTP/2</tags> <dependencies> <dependency id="Microsoft.Bcl.Immutable" version="1.0.34" /> - <dependency id="grpc.native.csharp_ext" version="0.8.0.0" /> + <dependency id="Ix-Async" version="1.2.3" /> + <dependency id="grpc.native.csharp_ext" version="0.9.0.0" /> </dependencies> </metadata> <files> <file src="bin/Release/Grpc.Core.dll" target="lib/net45" /> + <file src="bin/Release/Grpc.Core.pdb" target="lib/net45" /> + <file src="bin/Release/Grpc.Core.xml" target="lib/net45" /> + <file src="**\*.cs" target="src" /> </files> </package> diff --git a/src/csharp/Grpc.Core/IAsyncStreamReader.cs b/src/csharp/Grpc.Core/IAsyncStreamReader.cs index 699741cd05..371fbf27ce 100644 --- a/src/csharp/Grpc.Core/IAsyncStreamReader.cs +++ b/src/csharp/Grpc.Core/IAsyncStreamReader.cs @@ -43,13 +43,8 @@ namespace Grpc.Core /// A stream of messages to be read. /// </summary> /// <typeparam name="T"></typeparam> - public interface IAsyncStreamReader<T> - where T : class + public interface IAsyncStreamReader<TResponse> : IAsyncEnumerator<TResponse> { - /// <summary> - /// Reads a single message. Returns null if the last message was already read. - /// A following read can only be started when the previous one finishes. - /// </summary> - Task<T> ReadNext(); + // TODO(jtattermusch): consider just using IAsyncEnumerator instead of this interface. } } diff --git a/src/csharp/Grpc.Core/IAsyncStreamWriter.cs b/src/csharp/Grpc.Core/IAsyncStreamWriter.cs index 4bd8bfb8df..2000210252 100644 --- a/src/csharp/Grpc.Core/IAsyncStreamWriter.cs +++ b/src/csharp/Grpc.Core/IAsyncStreamWriter.cs @@ -44,12 +44,11 @@ namespace Grpc.Core /// </summary> /// <typeparam name="T"></typeparam> public interface IAsyncStreamWriter<T> - where T : class { /// <summary> - /// Writes a single message. Only one write can be pending at a time. + /// Writes a single asynchronously. Only one write can be pending at a time. /// </summary> /// <param name="message">the message to be written. Cannot be null.</param> - Task Write(T message); + Task WriteAsync(T message); } } diff --git a/src/csharp/Grpc.Core/IClientStreamWriter.cs b/src/csharp/Grpc.Core/IClientStreamWriter.cs index 0847a928e6..a3028bc374 100644 --- a/src/csharp/Grpc.Core/IClientStreamWriter.cs +++ b/src/csharp/Grpc.Core/IClientStreamWriter.cs @@ -44,11 +44,10 @@ namespace Grpc.Core /// </summary> /// <typeparam name="T"></typeparam> public interface IClientStreamWriter<T> : IAsyncStreamWriter<T> - where T : class { /// <summary> - /// Closes the stream. Can only be called once there is no pending write. No writes should follow calling this. + /// Completes/closes the stream. Can only be called once there is no pending write. No writes should follow calling this. /// </summary> - Task Close(); + Task CompleteAsync(); } } diff --git a/src/csharp/Grpc.Core/IServerStreamWriter.cs b/src/csharp/Grpc.Core/IServerStreamWriter.cs index 199a585a3f..9f3af59109 100644 --- a/src/csharp/Grpc.Core/IServerStreamWriter.cs +++ b/src/csharp/Grpc.Core/IServerStreamWriter.cs @@ -43,7 +43,7 @@ namespace Grpc.Core /// A writable stream of messages that is used in server-side handlers. /// </summary> public interface IServerStreamWriter<T> : IAsyncStreamWriter<T> - where T : class { + // TODO(jtattermusch): consider just using IAsyncStreamWriter instead of this interface. } } diff --git a/src/csharp/Grpc.Core/Internal/ClientRequestStream.cs b/src/csharp/Grpc.Core/Internal/ClientRequestStream.cs index 1697058732..58f493463b 100644 --- a/src/csharp/Grpc.Core/Internal/ClientRequestStream.cs +++ b/src/csharp/Grpc.Core/Internal/ClientRequestStream.cs @@ -38,8 +38,6 @@ namespace Grpc.Core.Internal /// Writes requests asynchronously to an underlying AsyncCall object. /// </summary> internal class ClientRequestStream<TRequest, TResponse> : IClientStreamWriter<TRequest> - where TRequest : class - where TResponse : class { readonly AsyncCall<TRequest, TResponse> call; @@ -48,14 +46,14 @@ namespace Grpc.Core.Internal this.call = call; } - public Task Write(TRequest message) + public Task WriteAsync(TRequest message) { var taskSource = new AsyncCompletionTaskSource<object>(); call.StartSendMessage(message, taskSource.CompletionDelegate); return taskSource.Task; } - public Task Close() + public Task CompleteAsync() { var taskSource = new AsyncCompletionTaskSource<object>(); call.StartSendCloseFromClient(taskSource.CompletionDelegate); diff --git a/src/csharp/Grpc.Core/Internal/ClientResponseStream.cs b/src/csharp/Grpc.Core/Internal/ClientResponseStream.cs index b2378cade6..6c44521038 100644 --- a/src/csharp/Grpc.Core/Internal/ClientResponseStream.cs +++ b/src/csharp/Grpc.Core/Internal/ClientResponseStream.cs @@ -33,6 +33,7 @@ using System; using System.Collections.Generic; +using System.Threading; using System.Threading.Tasks; namespace Grpc.Core.Internal @@ -42,17 +43,41 @@ namespace Grpc.Core.Internal where TResponse : class { readonly AsyncCall<TRequest, TResponse> call; + TResponse current; public ClientResponseStream(AsyncCall<TRequest, TResponse> call) { this.call = call; } - public Task<TResponse> ReadNext() + public TResponse Current { + get + { + if (current == null) + { + throw new InvalidOperationException("No current element is available."); + } + return current; + } + } + + public async Task<bool> MoveNext(CancellationToken token) + { + if (token != CancellationToken.None) + { + throw new InvalidOperationException("Cancellation of individual reads is not supported."); + } var taskSource = new AsyncCompletionTaskSource<TResponse>(); call.StartReadMessage(taskSource.CompletionDelegate); - return taskSource.Task; + var result = await taskSource.Task; + this.current = result; + return result != null; + } + + public void Dispose() + { + // TODO(jtattermusch): implement the semantics of stream disposal. } } } diff --git a/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs b/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs index 95d8e97869..f494d9e0ff 100644 --- a/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs +++ b/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs @@ -32,6 +32,7 @@ #endregion using System; +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Grpc.Core.Internal; @@ -71,12 +72,13 @@ namespace Grpc.Core.Internal Status status = Status.DefaultSuccess; try { - var request = await requestStream.ReadNext(); + Preconditions.CheckArgument(await requestStream.MoveNext()); + var request = requestStream.Current; // TODO(jtattermusch): we need to read the full stream so that native callhandle gets deallocated. - Preconditions.CheckArgument(await requestStream.ReadNext() == null); + Preconditions.CheckArgument(!await requestStream.MoveNext()); var context = new ServerCallContext(); // TODO(jtattermusch): initialize the context var result = await handler(context, request); - await responseStream.Write(result); + await responseStream.WriteAsync(result); } catch (Exception e) { @@ -85,7 +87,7 @@ namespace Grpc.Core.Internal } try { - await responseStream.WriteStatus(status); + await responseStream.WriteStatusAsync(status); } catch (OperationCanceledException) { @@ -122,9 +124,10 @@ namespace Grpc.Core.Internal Status status = Status.DefaultSuccess; try { - var request = await requestStream.ReadNext(); + Preconditions.CheckArgument(await requestStream.MoveNext()); + var request = requestStream.Current; // TODO(jtattermusch): we need to read the full stream so that native callhandle gets deallocated. - Preconditions.CheckArgument(await requestStream.ReadNext() == null); + Preconditions.CheckArgument(!await requestStream.MoveNext()); var context = new ServerCallContext(); // TODO(jtattermusch): initialize the context await handler(context, request, responseStream); @@ -137,7 +140,7 @@ namespace Grpc.Core.Internal try { - await responseStream.WriteStatus(status); + await responseStream.WriteStatusAsync(status); } catch (OperationCanceledException) { @@ -178,7 +181,7 @@ namespace Grpc.Core.Internal var result = await handler(context, requestStream); try { - await responseStream.Write(result); + await responseStream.WriteAsync(result); } catch (OperationCanceledException) { @@ -193,7 +196,7 @@ namespace Grpc.Core.Internal try { - await responseStream.WriteStatus(status); + await responseStream.WriteStatusAsync(status); } catch (OperationCanceledException) { @@ -240,7 +243,7 @@ namespace Grpc.Core.Internal } try { - await responseStream.WriteStatus(status); + await responseStream.WriteStatusAsync(status); } catch (OperationCanceledException) { @@ -263,7 +266,7 @@ namespace Grpc.Core.Internal var requestStream = new ServerRequestStream<byte[], byte[]>(asyncCall); var responseStream = new ServerResponseStream<byte[], byte[]>(asyncCall); - await responseStream.WriteStatus(new Status(StatusCode.Unimplemented, "No such method.")); + await responseStream.WriteStatusAsync(new Status(StatusCode.Unimplemented, "No such method.")); // TODO(jtattermusch): if we don't read what client has sent, the server call never gets disposed. await requestStream.ToList(); await finishedTask; diff --git a/src/csharp/Grpc.Core/Internal/ServerRequestStream.cs b/src/csharp/Grpc.Core/Internal/ServerRequestStream.cs index d9ee0c815b..3fccb88abb 100644 --- a/src/csharp/Grpc.Core/Internal/ServerRequestStream.cs +++ b/src/csharp/Grpc.Core/Internal/ServerRequestStream.cs @@ -33,6 +33,7 @@ using System; using System.Collections.Generic; +using System.Threading; using System.Threading.Tasks; namespace Grpc.Core.Internal @@ -42,17 +43,41 @@ namespace Grpc.Core.Internal where TResponse : class { readonly AsyncCallServer<TRequest, TResponse> call; + TRequest current; public ServerRequestStream(AsyncCallServer<TRequest, TResponse> call) { this.call = call; } - public Task<TRequest> ReadNext() + public TRequest Current { + get + { + if (current == null) + { + throw new InvalidOperationException("No current element is available."); + } + return current; + } + } + + public async Task<bool> MoveNext(CancellationToken token) + { + if (token != CancellationToken.None) + { + throw new InvalidOperationException("Cancellation of individual reads is not supported."); + } var taskSource = new AsyncCompletionTaskSource<TRequest>(); call.StartReadMessage(taskSource.CompletionDelegate); - return taskSource.Task; + var result = await taskSource.Task; + this.current = result; + return result != null; + } + + public void Dispose() + { + // TODO(jtattermusch): implement the semantics of stream disposal. } } } diff --git a/src/csharp/Grpc.Core/Internal/ServerResponseStream.cs b/src/csharp/Grpc.Core/Internal/ServerResponseStream.cs index da688d504f..a2d77dd5b7 100644 --- a/src/csharp/Grpc.Core/Internal/ServerResponseStream.cs +++ b/src/csharp/Grpc.Core/Internal/ServerResponseStream.cs @@ -49,14 +49,14 @@ namespace Grpc.Core.Internal this.call = call; } - public Task Write(TResponse message) + public Task WriteAsync(TResponse message) { var taskSource = new AsyncCompletionTaskSource<object>(); call.StartSendMessage(message, taskSource.CompletionDelegate); return taskSource.Task; } - public Task WriteStatus(Status status) + public Task WriteStatusAsync(Status status) { var taskSource = new AsyncCompletionTaskSource<object>(); call.StartSendStatusFromServer(status, taskSource.CompletionDelegate); diff --git a/src/csharp/Grpc.Core/Internal/ServerSafeHandle.cs b/src/csharp/Grpc.Core/Internal/ServerSafeHandle.cs index 731ea2be81..7a1c016ae2 100644 --- a/src/csharp/Grpc.Core/Internal/ServerSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/ServerSafeHandle.cs @@ -39,9 +39,6 @@ using Grpc.Core.Utils; namespace Grpc.Core.Internal { - // TODO: we need to make sure that the delegates are not collected before invoked. - //internal delegate void ServerShutdownCallbackDelegate(bool success); - /// <summary> /// grpc_server from grpc/grpc.h /// </summary> diff --git a/src/csharp/Grpc.Core/ServerCallContext.cs b/src/csharp/Grpc.Core/ServerCallContext.cs index e873b3e88a..bc9a499c51 100644 --- a/src/csharp/Grpc.Core/ServerCallContext.cs +++ b/src/csharp/Grpc.Core/ServerCallContext.cs @@ -42,7 +42,6 @@ namespace Grpc.Core /// </summary> public sealed class ServerCallContext { - // TODO(jtattermusch): add cancellationToken // TODO(jtattermusch): add deadline info diff --git a/src/csharp/Grpc.Core/Utils/AsyncStreamExtensions.cs b/src/csharp/Grpc.Core/Utils/AsyncStreamExtensions.cs index f915155f8a..8a748b45a8 100644 --- a/src/csharp/Grpc.Core/Utils/AsyncStreamExtensions.cs +++ b/src/csharp/Grpc.Core/Utils/AsyncStreamExtensions.cs @@ -49,14 +49,9 @@ namespace Grpc.Core.Utils public static async Task ForEach<T>(this IAsyncStreamReader<T> streamReader, Func<T, Task> asyncAction) where T : class { - while (true) + while (await streamReader.MoveNext()) { - var elem = await streamReader.ReadNext(); - if (elem == null) - { - break; - } - await asyncAction(elem); + await asyncAction(streamReader.Current); } } @@ -67,32 +62,27 @@ namespace Grpc.Core.Utils where T : class { var result = new List<T>(); - while (true) + while (await streamReader.MoveNext()) { - var elem = await streamReader.ReadNext(); - if (elem == null) - { - break; - } - result.Add(elem); + result.Add(streamReader.Current); } return result; } /// <summary> /// Writes all elements from given enumerable to the stream. - /// Closes the stream afterwards unless close = false. + /// Completes the stream afterwards unless close = false. /// </summary> - public static async Task WriteAll<T>(this IClientStreamWriter<T> streamWriter, IEnumerable<T> elements, bool close = true) + public static async Task WriteAll<T>(this IClientStreamWriter<T> streamWriter, IEnumerable<T> elements, bool complete = true) where T : class { foreach (var element in elements) { - await streamWriter.Write(element); + await streamWriter.WriteAsync(element); } - if (close) + if (complete) { - await streamWriter.Close(); + await streamWriter.CompleteAsync(); } } @@ -104,7 +94,7 @@ namespace Grpc.Core.Utils { foreach (var element in elements) { - await streamWriter.Write(element); + await streamWriter.WriteAsync(element); } } } diff --git a/src/csharp/Grpc.Core/packages.config b/src/csharp/Grpc.Core/packages.config index 71967de56e..fb7eaaeeda 100644 --- a/src/csharp/Grpc.Core/packages.config +++ b/src/csharp/Grpc.Core/packages.config @@ -2,5 +2,6 @@ <packages> <package id="grpc.dependencies.openssl.redist" version="1.0.2.2" targetFramework="net45" /> <package id="grpc.dependencies.zlib.redist" version="1.2.8.9" targetFramework="net45" /> + <package id="Ix-Async" version="1.2.3" targetFramework="net45" /> <package id="Microsoft.Bcl.Immutable" version="1.0.34" targetFramework="net45" /> </packages>
\ No newline at end of file diff --git a/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.csproj b/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.csproj index 3f7e6c0768..ba6586ee5e 100644 --- a/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.csproj +++ b/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.csproj @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> @@ -8,7 +8,7 @@ <ProjectGuid>{BF62FE08-373A-43D6-9D73-41CAA38B7011}</ProjectGuid> <OutputType>Exe</OutputType> <RootNamespace>Grpc.Examples.MathServer</RootNamespace> - <AssemblyName>Grpc.Examples.MathServer</AssemblyName> + <AssemblyName>MathServer</AssemblyName> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> diff --git a/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj b/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj index 87ccf07dd8..6e84add42b 100644 --- a/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj +++ b/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj @@ -37,6 +37,10 @@ <Reference Include="Google.ProtocolBuffers"> <HintPath>..\packages\Google.ProtocolBuffers.2.4.1.521\lib\net40\Google.ProtocolBuffers.dll</HintPath> </Reference> + <Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\packages\Ix-Async.1.2.3\lib\net45\System.Interactive.Async.dll</HintPath> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="Properties\AssemblyInfo.cs" /> diff --git a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs index 4997d3aa42..5aa6f4162d 100644 --- a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs +++ b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs @@ -96,7 +96,19 @@ namespace math.Tests Assert.AreEqual(0, response.Remainder); } - // TODO(jtattermusch): test division by zero + [Test] + public void DivByZero() + { + try + { + DivReply response = client.Div(new DivArgs.Builder { Dividend = 0, Divisor = 0 }.Build()); + Assert.Fail(); + } + catch (RpcException e) + { + Assert.AreEqual(StatusCode.Unknown, e.Status.StatusCode); + } + } [Test] public void DivAsync() @@ -114,11 +126,12 @@ namespace math.Tests { Task.Run(async () => { - var call = client.Fib(new FibArgs.Builder { Limit = 6 }.Build()); - - var responses = await call.ResponseStream.ToList(); - CollectionAssert.AreEqual(new List<long> { 1, 1, 2, 3, 5, 8 }, - responses.ConvertAll((n) => n.Num_)); + using (var call = client.Fib(new FibArgs.Builder { Limit = 6 }.Build())) + { + var responses = await call.ResponseStream.ToList(); + CollectionAssert.AreEqual(new List<long> { 1, 1, 2, 3, 5, 8 }, + responses.ConvertAll((n) => n.Num_)); + } }).Wait(); } @@ -128,13 +141,15 @@ namespace math.Tests { Task.Run(async () => { - var call = client.Sum(); - var numbers = new List<long> { 10, 20, 30 }.ConvertAll( - n => Num.CreateBuilder().SetNum_(n).Build()); + using (var call = client.Sum()) + { + var numbers = new List<long> { 10, 20, 30 }.ConvertAll( + n => Num.CreateBuilder().SetNum_(n).Build()); - await call.RequestStream.WriteAll(numbers); - var result = await call.Result; - Assert.AreEqual(60, result.Num_); + await call.RequestStream.WriteAll(numbers); + var result = await call.Result; + Assert.AreEqual(60, result.Num_); + } }).Wait(); } @@ -150,12 +165,14 @@ namespace math.Tests new DivArgs.Builder { Dividend = 7, Divisor = 2 }.Build() }; - var call = client.DivMany(); - await call.RequestStream.WriteAll(divArgsList); - var result = await call.ResponseStream.ToList(); + using (var call = client.DivMany()) + { + await call.RequestStream.WriteAll(divArgsList); + var result = await call.ResponseStream.ToList(); - CollectionAssert.AreEqual(new long[] { 3, 4, 3 }, result.ConvertAll((divReply) => divReply.Quotient)); - CollectionAssert.AreEqual(new long[] { 1, 16, 1 }, result.ConvertAll((divReply) => divReply.Remainder)); + CollectionAssert.AreEqual(new long[] { 3, 4, 3 }, result.ConvertAll((divReply) => divReply.Quotient)); + CollectionAssert.AreEqual(new long[] { 1, 16, 1 }, result.ConvertAll((divReply) => divReply.Remainder)); + } }).Wait(); } } diff --git a/src/csharp/Grpc.Examples.Tests/packages.config b/src/csharp/Grpc.Examples.Tests/packages.config index 4d6ec63b3c..cc6e9af40f 100644 --- a/src/csharp/Grpc.Examples.Tests/packages.config +++ b/src/csharp/Grpc.Examples.Tests/packages.config @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.ProtocolBuffers" version="2.4.1.521" targetFramework="net45" />
+ <package id="Ix-Async" version="1.2.3" targetFramework="net45" />
<package id="NUnit" version="2.6.4" targetFramework="net45" />
</packages>
\ No newline at end of file diff --git a/src/csharp/Grpc.Examples/Grpc.Examples.csproj b/src/csharp/Grpc.Examples/Grpc.Examples.csproj index 2c5019c214..5ce490f403 100644 --- a/src/csharp/Grpc.Examples/Grpc.Examples.csproj +++ b/src/csharp/Grpc.Examples/Grpc.Examples.csproj @@ -35,6 +35,9 @@ <Reference Include="Google.ProtocolBuffers"> <HintPath>..\packages\Google.ProtocolBuffers.2.4.1.521\lib\net40\Google.ProtocolBuffers.dll</HintPath> </Reference> + <Reference Include="System.Interactive.Async"> + <HintPath>..\packages\Ix-Async.1.2.3\lib\net45\System.Interactive.Async.dll</HintPath> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="Properties\AssemblyInfo.cs" /> diff --git a/src/csharp/Grpc.Examples/MathExamples.cs b/src/csharp/Grpc.Examples/MathExamples.cs index ab06a44c0d..d2cfbee18f 100644 --- a/src/csharp/Grpc.Examples/MathExamples.cs +++ b/src/csharp/Grpc.Examples/MathExamples.cs @@ -51,18 +51,13 @@ namespace math Console.WriteLine("DivAsync Result: " + result); } - public static async Task DivAsyncWithCancellationExample(Math.IMathClient stub) - { - Task<DivReply> resultTask = stub.DivAsync(new DivArgs.Builder { Dividend = 4, Divisor = 5 }.Build()); - DivReply result = await resultTask; - Console.WriteLine(result); - } - public static async Task FibExample(Math.IMathClient stub) { - var call = stub.Fib(new FibArgs.Builder { Limit = 5 }.Build()); - List<Num> result = await call.ResponseStream.ToList(); - Console.WriteLine("Fib Result: " + string.Join("|", result)); + using (var call = stub.Fib(new FibArgs.Builder { Limit = 5 }.Build())) + { + List<Num> result = await call.ResponseStream.ToList(); + Console.WriteLine("Fib Result: " + string.Join("|", result)); + } } public static async Task SumExample(Math.IMathClient stub) @@ -74,9 +69,11 @@ namespace math new Num.Builder { Num_ = 3 }.Build() }; - var call = stub.Sum(); - await call.RequestStream.WriteAll(numbers); - Console.WriteLine("Sum Result: " + await call.Result); + using (var call = stub.Sum()) + { + await call.RequestStream.WriteAll(numbers); + Console.WriteLine("Sum Result: " + await call.Result); + } } public static async Task DivManyExample(Math.IMathClient stub) @@ -87,9 +84,11 @@ namespace math new DivArgs.Builder { Dividend = 100, Divisor = 21 }.Build(), new DivArgs.Builder { Dividend = 7, Divisor = 2 }.Build() }; - var call = stub.DivMany(); - await call.RequestStream.WriteAll(divArgsList); - Console.WriteLine("DivMany Result: " + string.Join("|", await call.ResponseStream.ToList())); + using (var call = stub.DivMany()) + { + await call.RequestStream.WriteAll(divArgsList); + Console.WriteLine("DivMany Result: " + string.Join("|", await call.ResponseStream.ToList())); + } } public static async Task DependendRequestsExample(Math.IMathClient stub) @@ -101,9 +100,12 @@ namespace math new Num.Builder { Num_ = 3 }.Build() }; - var sumCall = stub.Sum(); - await sumCall.RequestStream.WriteAll(numbers); - Num sum = await sumCall.Result; + Num sum; + using (var sumCall = stub.Sum()) + { + await sumCall.RequestStream.WriteAll(numbers); + sum = await sumCall.Result; + } DivReply result = await stub.DivAsync(new DivArgs.Builder { Dividend = sum.Num_, Divisor = numbers.Count }.Build()); Console.WriteLine("Avg Result: " + result); diff --git a/src/csharp/Grpc.Examples/MathGrpc.cs b/src/csharp/Grpc.Examples/MathGrpc.cs index 2546fd220d..b9efc44e8c 100644 --- a/src/csharp/Grpc.Examples/MathGrpc.cs +++ b/src/csharp/Grpc.Examples/MathGrpc.cs @@ -12,30 +12,30 @@ namespace math { { static readonly string __ServiceName = "math.Math"; - static readonly Marshaller<DivArgs> __Marshaller_DivArgs = Marshallers.Create((arg) => arg.ToByteArray(), DivArgs.ParseFrom); - static readonly Marshaller<DivReply> __Marshaller_DivReply = Marshallers.Create((arg) => arg.ToByteArray(), DivReply.ParseFrom); - static readonly Marshaller<FibArgs> __Marshaller_FibArgs = Marshallers.Create((arg) => arg.ToByteArray(), FibArgs.ParseFrom); - static readonly Marshaller<Num> __Marshaller_Num = Marshallers.Create((arg) => arg.ToByteArray(), Num.ParseFrom); + static readonly Marshaller<global::math.DivArgs> __Marshaller_DivArgs = Marshallers.Create((arg) => arg.ToByteArray(), global::math.DivArgs.ParseFrom); + static readonly Marshaller<global::math.DivReply> __Marshaller_DivReply = Marshallers.Create((arg) => arg.ToByteArray(), global::math.DivReply.ParseFrom); + static readonly Marshaller<global::math.FibArgs> __Marshaller_FibArgs = Marshallers.Create((arg) => arg.ToByteArray(), global::math.FibArgs.ParseFrom); + static readonly Marshaller<global::math.Num> __Marshaller_Num = Marshallers.Create((arg) => arg.ToByteArray(), global::math.Num.ParseFrom); - static readonly Method<DivArgs, DivReply> __Method_Div = new Method<DivArgs, DivReply>( + static readonly Method<global::math.DivArgs, global::math.DivReply> __Method_Div = new Method<global::math.DivArgs, global::math.DivReply>( MethodType.Unary, "Div", __Marshaller_DivArgs, __Marshaller_DivReply); - static readonly Method<DivArgs, DivReply> __Method_DivMany = new Method<DivArgs, DivReply>( + static readonly Method<global::math.DivArgs, global::math.DivReply> __Method_DivMany = new Method<global::math.DivArgs, global::math.DivReply>( MethodType.DuplexStreaming, "DivMany", __Marshaller_DivArgs, __Marshaller_DivReply); - static readonly Method<FibArgs, Num> __Method_Fib = new Method<FibArgs, Num>( + static readonly Method<global::math.FibArgs, global::math.Num> __Method_Fib = new Method<global::math.FibArgs, global::math.Num>( MethodType.ServerStreaming, "Fib", __Marshaller_FibArgs, __Marshaller_Num); - static readonly Method<Num, Num> __Method_Sum = new Method<Num, Num>( + static readonly Method<global::math.Num, global::math.Num> __Method_Sum = new Method<global::math.Num, global::math.Num>( MethodType.ClientStreaming, "Sum", __Marshaller_Num, @@ -44,20 +44,20 @@ namespace math { // client-side stub interface public interface IMathClient { - DivReply Div(DivArgs request, CancellationToken token = default(CancellationToken)); - Task<DivReply> DivAsync(DivArgs request, CancellationToken token = default(CancellationToken)); - AsyncDuplexStreamingCall<DivArgs, DivReply> DivMany(CancellationToken token = default(CancellationToken)); - AsyncServerStreamingCall<Num> Fib(FibArgs request, CancellationToken token = default(CancellationToken)); - AsyncClientStreamingCall<Num, Num> Sum(CancellationToken token = default(CancellationToken)); + global::math.DivReply Div(global::math.DivArgs request, CancellationToken token = default(CancellationToken)); + Task<global::math.DivReply> DivAsync(global::math.DivArgs request, CancellationToken token = default(CancellationToken)); + AsyncDuplexStreamingCall<global::math.DivArgs, global::math.DivReply> DivMany(CancellationToken token = default(CancellationToken)); + AsyncServerStreamingCall<global::math.Num> Fib(global::math.FibArgs request, CancellationToken token = default(CancellationToken)); + AsyncClientStreamingCall<global::math.Num, global::math.Num> Sum(CancellationToken token = default(CancellationToken)); } // server-side interface public interface IMath { - Task<DivReply> Div(ServerCallContext context, DivArgs request); - Task DivMany(ServerCallContext context, IAsyncStreamReader<DivArgs> requestStream, IServerStreamWriter<DivReply> responseStream); - Task Fib(ServerCallContext context, FibArgs request, IServerStreamWriter<Num> responseStream); - Task<Num> Sum(ServerCallContext context, IAsyncStreamReader<Num> requestStream); + Task<global::math.DivReply> Div(ServerCallContext context, global::math.DivArgs request); + Task DivMany(ServerCallContext context, IAsyncStreamReader<global::math.DivArgs> requestStream, IServerStreamWriter<global::math.DivReply> responseStream); + Task Fib(ServerCallContext context, global::math.FibArgs request, IServerStreamWriter<global::math.Num> responseStream); + Task<global::math.Num> Sum(ServerCallContext context, IAsyncStreamReader<global::math.Num> requestStream); } // client stub @@ -69,27 +69,27 @@ namespace math { public MathClient(Channel channel, StubConfiguration config) : base(channel, config) { } - public DivReply Div(DivArgs request, CancellationToken token = default(CancellationToken)) + public global::math.DivReply Div(global::math.DivArgs request, CancellationToken token = default(CancellationToken)) { var call = CreateCall(__ServiceName, __Method_Div); return Calls.BlockingUnaryCall(call, request, token); } - public Task<DivReply> DivAsync(DivArgs request, CancellationToken token = default(CancellationToken)) + public Task<global::math.DivReply> DivAsync(global::math.DivArgs request, CancellationToken token = default(CancellationToken)) { var call = CreateCall(__ServiceName, __Method_Div); return Calls.AsyncUnaryCall(call, request, token); } - public AsyncDuplexStreamingCall<DivArgs, DivReply> DivMany(CancellationToken token = default(CancellationToken)) + public AsyncDuplexStreamingCall<global::math.DivArgs, global::math.DivReply> DivMany(CancellationToken token = default(CancellationToken)) { var call = CreateCall(__ServiceName, __Method_DivMany); return Calls.AsyncDuplexStreamingCall(call, token); } - public AsyncServerStreamingCall<Num> Fib(FibArgs request, CancellationToken token = default(CancellationToken)) + public AsyncServerStreamingCall<global::math.Num> Fib(global::math.FibArgs request, CancellationToken token = default(CancellationToken)) { var call = CreateCall(__ServiceName, __Method_Fib); return Calls.AsyncServerStreamingCall(call, request, token); } - public AsyncClientStreamingCall<Num, Num> Sum(CancellationToken token = default(CancellationToken)) + public AsyncClientStreamingCall<global::math.Num, global::math.Num> Sum(CancellationToken token = default(CancellationToken)) { var call = CreateCall(__ServiceName, __Method_Sum); return Calls.AsyncClientStreamingCall(call, token); diff --git a/src/csharp/Grpc.Examples/MathServiceImpl.cs b/src/csharp/Grpc.Examples/MathServiceImpl.cs index 3b33b09bbd..e247ac9d73 100644 --- a/src/csharp/Grpc.Examples/MathServiceImpl.cs +++ b/src/csharp/Grpc.Examples/MathServiceImpl.cs @@ -62,7 +62,7 @@ namespace math { foreach (var num in FibInternal(request.Limit)) { - await responseStream.Write(num); + await responseStream.WriteAsync(num); } } } @@ -81,7 +81,7 @@ namespace math { await requestStream.ForEach(async divArgs => { - await responseStream.Write(DivInternal(divArgs)); + await responseStream.WriteAsync(DivInternal(divArgs)); }); } diff --git a/src/csharp/Grpc.Examples/packages.config b/src/csharp/Grpc.Examples/packages.config index 51c17bcd5e..4c8d60fa62 100644 --- a/src/csharp/Grpc.Examples/packages.config +++ b/src/csharp/Grpc.Examples/packages.config @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <packages> <package id="Google.ProtocolBuffers" version="2.4.1.521" targetFramework="net45" /> + <package id="Ix-Async" version="1.2.3" targetFramework="net45" /> <package id="NUnit" version="2.6.4" targetFramework="net45" /> </packages>
\ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj index 1ca3dd24e1..b3a0a2917b 100644 --- a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj +++ b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj @@ -54,6 +54,9 @@ <Reference Include="Google.ProtocolBuffers"> <HintPath>..\packages\Google.ProtocolBuffers.2.4.1.521\lib\net40\Google.ProtocolBuffers.dll</HintPath> </Reference> + <Reference Include="System.Interactive.Async"> + <HintPath>..\packages\Ix-Async.1.2.3\lib\net45\System.Interactive.Async.dll</HintPath> + </Reference> <Reference Include="System.Net" /> <Reference Include="System.Net.Http" /> <Reference Include="System.Net.Http.Extensions"> diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index 02f8a369de..dfaf18cae1 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -213,11 +213,13 @@ namespace Grpc.IntegrationTesting var bodySizes = new List<int> { 27182, 8, 1828, 45904 }.ConvertAll((size) => StreamingInputCallRequest.CreateBuilder().SetPayload(CreateZerosPayload(size)).Build()); - var call = client.StreamingInputCall(); - await call.RequestStream.WriteAll(bodySizes); + using (var call = client.StreamingInputCall()) + { + await call.RequestStream.WriteAll(bodySizes); - var response = await call.Result; - Assert.AreEqual(74922, response.AggregatedPayloadSize); + var response = await call.Result; + Assert.AreEqual(74922, response.AggregatedPayloadSize); + } Console.WriteLine("Passed!"); }).Wait(); } @@ -236,14 +238,15 @@ namespace Grpc.IntegrationTesting (size) => ResponseParameters.CreateBuilder().SetSize(size).Build())) .Build(); - var call = client.StreamingOutputCall(request); - - var responseList = await call.ResponseStream.ToList(); - foreach (var res in responseList) + using (var call = client.StreamingOutputCall(request)) { - Assert.AreEqual(PayloadType.COMPRESSABLE, res.Payload.Type); + var responseList = await call.ResponseStream.ToList(); + foreach (var res in responseList) + { + Assert.AreEqual(PayloadType.COMPRESSABLE, res.Payload.Type); + } + CollectionAssert.AreEqual(bodySizes, responseList.ConvertAll((item) => item.Payload.Body.Length)); } - CollectionAssert.AreEqual(bodySizes, responseList.ConvertAll((item) => item.Payload.Body.Length)); Console.WriteLine("Passed!"); }).Wait(); } @@ -254,51 +257,48 @@ namespace Grpc.IntegrationTesting { Console.WriteLine("running ping_pong"); - var call = client.FullDuplexCall(); - - StreamingOutputCallResponse response; - - await call.RequestStream.Write(StreamingOutputCallRequest.CreateBuilder() - .SetResponseType(PayloadType.COMPRESSABLE) - .AddResponseParameters(ResponseParameters.CreateBuilder().SetSize(31415)) - .SetPayload(CreateZerosPayload(27182)).Build()); - - response = await call.ResponseStream.ReadNext(); - Assert.AreEqual(PayloadType.COMPRESSABLE, response.Payload.Type); - Assert.AreEqual(31415, response.Payload.Body.Length); + using (var call = client.FullDuplexCall()) + { + await call.RequestStream.WriteAsync(StreamingOutputCallRequest.CreateBuilder() + .SetResponseType(PayloadType.COMPRESSABLE) + .AddResponseParameters(ResponseParameters.CreateBuilder().SetSize(31415)) + .SetPayload(CreateZerosPayload(27182)).Build()); - await call.RequestStream.Write(StreamingOutputCallRequest.CreateBuilder() - .SetResponseType(PayloadType.COMPRESSABLE) - .AddResponseParameters(ResponseParameters.CreateBuilder().SetSize(9)) - .SetPayload(CreateZerosPayload(8)).Build()); + Assert.IsTrue(await call.ResponseStream.MoveNext()); + Assert.AreEqual(PayloadType.COMPRESSABLE, call.ResponseStream.Current.Payload.Type); + Assert.AreEqual(31415, call.ResponseStream.Current.Payload.Body.Length); - response = await call.ResponseStream.ReadNext(); - Assert.AreEqual(PayloadType.COMPRESSABLE, response.Payload.Type); - Assert.AreEqual(9, response.Payload.Body.Length); + await call.RequestStream.WriteAsync(StreamingOutputCallRequest.CreateBuilder() + .SetResponseType(PayloadType.COMPRESSABLE) + .AddResponseParameters(ResponseParameters.CreateBuilder().SetSize(9)) + .SetPayload(CreateZerosPayload(8)).Build()); - await call.RequestStream.Write(StreamingOutputCallRequest.CreateBuilder() - .SetResponseType(PayloadType.COMPRESSABLE) - .AddResponseParameters(ResponseParameters.CreateBuilder().SetSize(2653)) - .SetPayload(CreateZerosPayload(1828)).Build()); + Assert.IsTrue(await call.ResponseStream.MoveNext()); + Assert.AreEqual(PayloadType.COMPRESSABLE, call.ResponseStream.Current.Payload.Type); + Assert.AreEqual(9, call.ResponseStream.Current.Payload.Body.Length); - response = await call.ResponseStream.ReadNext(); - Assert.AreEqual(PayloadType.COMPRESSABLE, response.Payload.Type); - Assert.AreEqual(2653, response.Payload.Body.Length); + await call.RequestStream.WriteAsync(StreamingOutputCallRequest.CreateBuilder() + .SetResponseType(PayloadType.COMPRESSABLE) + .AddResponseParameters(ResponseParameters.CreateBuilder().SetSize(2653)) + .SetPayload(CreateZerosPayload(1828)).Build()); - await call.RequestStream.Write(StreamingOutputCallRequest.CreateBuilder() - .SetResponseType(PayloadType.COMPRESSABLE) - .AddResponseParameters(ResponseParameters.CreateBuilder().SetSize(58979)) - .SetPayload(CreateZerosPayload(45904)).Build()); + Assert.IsTrue(await call.ResponseStream.MoveNext()); + Assert.AreEqual(PayloadType.COMPRESSABLE, call.ResponseStream.Current.Payload.Type); + Assert.AreEqual(2653, call.ResponseStream.Current.Payload.Body.Length); - response = await call.ResponseStream.ReadNext(); - Assert.AreEqual(PayloadType.COMPRESSABLE, response.Payload.Type); - Assert.AreEqual(58979, response.Payload.Body.Length); + await call.RequestStream.WriteAsync(StreamingOutputCallRequest.CreateBuilder() + .SetResponseType(PayloadType.COMPRESSABLE) + .AddResponseParameters(ResponseParameters.CreateBuilder().SetSize(58979)) + .SetPayload(CreateZerosPayload(45904)).Build()); - await call.RequestStream.Close(); + Assert.IsTrue(await call.ResponseStream.MoveNext()); + Assert.AreEqual(PayloadType.COMPRESSABLE, call.ResponseStream.Current.Payload.Type); + Assert.AreEqual(58979, call.ResponseStream.Current.Payload.Body.Length); - response = await call.ResponseStream.ReadNext(); - Assert.AreEqual(null, response); + await call.RequestStream.CompleteAsync(); + Assert.IsFalse(await call.ResponseStream.MoveNext()); + } Console.WriteLine("Passed!"); }).Wait(); } @@ -308,12 +308,13 @@ namespace Grpc.IntegrationTesting Task.Run(async () => { Console.WriteLine("running empty_stream"); - var call = client.FullDuplexCall(); - await call.Close(); - - var responseList = await call.ResponseStream.ToList(); - Assert.AreEqual(0, responseList.Count); + using (var call = client.FullDuplexCall()) + { + await call.RequestStream.CompleteAsync(); + var responseList = await call.ResponseStream.ToList(); + Assert.AreEqual(0, responseList.Count); + } Console.WriteLine("Passed!"); }).Wait(); } @@ -365,19 +366,21 @@ namespace Grpc.IntegrationTesting Console.WriteLine("running cancel_after_begin"); var cts = new CancellationTokenSource(); - var call = client.StreamingInputCall(cts.Token); - // TODO(jtattermusch): we need this to ensure call has been initiated once we cancel it. - await Task.Delay(1000); - cts.Cancel(); - - try + using (var call = client.StreamingInputCall(cts.Token)) { - var response = await call.Result; - Assert.Fail(); - } - catch (RpcException e) - { - Assert.AreEqual(StatusCode.Cancelled, e.Status.StatusCode); + // TODO(jtattermusch): we need this to ensure call has been initiated once we cancel it. + await Task.Delay(1000); + cts.Cancel(); + + try + { + var response = await call.Result; + Assert.Fail(); + } + catch (RpcException e) + { + Assert.AreEqual(StatusCode.Cancelled, e.Status.StatusCode); + } } Console.WriteLine("Passed!"); }).Wait(); @@ -390,29 +393,28 @@ namespace Grpc.IntegrationTesting Console.WriteLine("running cancel_after_first_response"); var cts = new CancellationTokenSource(); - var call = client.FullDuplexCall(cts.Token); - - StreamingOutputCallResponse response; - - await call.RequestStream.Write(StreamingOutputCallRequest.CreateBuilder() - .SetResponseType(PayloadType.COMPRESSABLE) - .AddResponseParameters(ResponseParameters.CreateBuilder().SetSize(31415)) - .SetPayload(CreateZerosPayload(27182)).Build()); + using (var call = client.FullDuplexCall(cts.Token)) + { + await call.RequestStream.WriteAsync(StreamingOutputCallRequest.CreateBuilder() + .SetResponseType(PayloadType.COMPRESSABLE) + .AddResponseParameters(ResponseParameters.CreateBuilder().SetSize(31415)) + .SetPayload(CreateZerosPayload(27182)).Build()); - response = await call.ResponseStream.ReadNext(); - Assert.AreEqual(PayloadType.COMPRESSABLE, response.Payload.Type); - Assert.AreEqual(31415, response.Payload.Body.Length); + Assert.IsTrue(await call.ResponseStream.MoveNext()); + Assert.AreEqual(PayloadType.COMPRESSABLE, call.ResponseStream.Current.Payload.Type); + Assert.AreEqual(31415, call.ResponseStream.Current.Payload.Body.Length); - cts.Cancel(); + cts.Cancel(); - try - { - response = await call.ResponseStream.ReadNext(); - Assert.Fail(); - } - catch (RpcException e) - { - Assert.AreEqual(StatusCode.Cancelled, e.Status.StatusCode); + try + { + await call.ResponseStream.MoveNext(); + Assert.Fail(); + } + catch (RpcException e) + { + Assert.AreEqual(StatusCode.Cancelled, e.Status.StatusCode); + } } Console.WriteLine("Passed!"); }).Wait(); diff --git a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs index 679aafb57a..ee077f9f56 100644 --- a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs @@ -12,45 +12,45 @@ namespace grpc.testing { { static readonly string __ServiceName = "grpc.testing.TestService"; - static readonly Marshaller<Empty> __Marshaller_Empty = Marshallers.Create((arg) => arg.ToByteArray(), Empty.ParseFrom); - static readonly Marshaller<SimpleRequest> __Marshaller_SimpleRequest = Marshallers.Create((arg) => arg.ToByteArray(), SimpleRequest.ParseFrom); - static readonly Marshaller<SimpleResponse> __Marshaller_SimpleResponse = Marshallers.Create((arg) => arg.ToByteArray(), SimpleResponse.ParseFrom); - static readonly Marshaller<StreamingOutputCallRequest> __Marshaller_StreamingOutputCallRequest = Marshallers.Create((arg) => arg.ToByteArray(), StreamingOutputCallRequest.ParseFrom); - static readonly Marshaller<StreamingOutputCallResponse> __Marshaller_StreamingOutputCallResponse = Marshallers.Create((arg) => arg.ToByteArray(), StreamingOutputCallResponse.ParseFrom); - static readonly Marshaller<StreamingInputCallRequest> __Marshaller_StreamingInputCallRequest = Marshallers.Create((arg) => arg.ToByteArray(), StreamingInputCallRequest.ParseFrom); - static readonly Marshaller<StreamingInputCallResponse> __Marshaller_StreamingInputCallResponse = Marshallers.Create((arg) => arg.ToByteArray(), StreamingInputCallResponse.ParseFrom); + static readonly Marshaller<global::grpc.testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.Empty.ParseFrom); + static readonly Marshaller<global::grpc.testing.SimpleRequest> __Marshaller_SimpleRequest = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.SimpleRequest.ParseFrom); + static readonly Marshaller<global::grpc.testing.SimpleResponse> __Marshaller_SimpleResponse = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.SimpleResponse.ParseFrom); + static readonly Marshaller<global::grpc.testing.StreamingOutputCallRequest> __Marshaller_StreamingOutputCallRequest = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.StreamingOutputCallRequest.ParseFrom); + static readonly Marshaller<global::grpc.testing.StreamingOutputCallResponse> __Marshaller_StreamingOutputCallResponse = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.StreamingOutputCallResponse.ParseFrom); + static readonly Marshaller<global::grpc.testing.StreamingInputCallRequest> __Marshaller_StreamingInputCallRequest = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.StreamingInputCallRequest.ParseFrom); + static readonly Marshaller<global::grpc.testing.StreamingInputCallResponse> __Marshaller_StreamingInputCallResponse = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.StreamingInputCallResponse.ParseFrom); - static readonly Method<Empty, Empty> __Method_EmptyCall = new Method<Empty, Empty>( + static readonly Method<global::grpc.testing.Empty, global::grpc.testing.Empty> __Method_EmptyCall = new Method<global::grpc.testing.Empty, global::grpc.testing.Empty>( MethodType.Unary, "EmptyCall", __Marshaller_Empty, __Marshaller_Empty); - static readonly Method<SimpleRequest, SimpleResponse> __Method_UnaryCall = new Method<SimpleRequest, SimpleResponse>( + static readonly Method<global::grpc.testing.SimpleRequest, global::grpc.testing.SimpleResponse> __Method_UnaryCall = new Method<global::grpc.testing.SimpleRequest, global::grpc.testing.SimpleResponse>( MethodType.Unary, "UnaryCall", __Marshaller_SimpleRequest, __Marshaller_SimpleResponse); - static readonly Method<StreamingOutputCallRequest, StreamingOutputCallResponse> __Method_StreamingOutputCall = new Method<StreamingOutputCallRequest, StreamingOutputCallResponse>( + static readonly Method<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> __Method_StreamingOutputCall = new Method<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse>( MethodType.ServerStreaming, "StreamingOutputCall", __Marshaller_StreamingOutputCallRequest, __Marshaller_StreamingOutputCallResponse); - static readonly Method<StreamingInputCallRequest, StreamingInputCallResponse> __Method_StreamingInputCall = new Method<StreamingInputCallRequest, StreamingInputCallResponse>( + static readonly Method<global::grpc.testing.StreamingInputCallRequest, global::grpc.testing.StreamingInputCallResponse> __Method_StreamingInputCall = new Method<global::grpc.testing.StreamingInputCallRequest, global::grpc.testing.StreamingInputCallResponse>( MethodType.ClientStreaming, "StreamingInputCall", __Marshaller_StreamingInputCallRequest, __Marshaller_StreamingInputCallResponse); - static readonly Method<StreamingOutputCallRequest, StreamingOutputCallResponse> __Method_FullDuplexCall = new Method<StreamingOutputCallRequest, StreamingOutputCallResponse>( + static readonly Method<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> __Method_FullDuplexCall = new Method<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse>( MethodType.DuplexStreaming, "FullDuplexCall", __Marshaller_StreamingOutputCallRequest, __Marshaller_StreamingOutputCallResponse); - static readonly Method<StreamingOutputCallRequest, StreamingOutputCallResponse> __Method_HalfDuplexCall = new Method<StreamingOutputCallRequest, StreamingOutputCallResponse>( + static readonly Method<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> __Method_HalfDuplexCall = new Method<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse>( MethodType.DuplexStreaming, "HalfDuplexCall", __Marshaller_StreamingOutputCallRequest, @@ -59,25 +59,25 @@ namespace grpc.testing { // client-side stub interface public interface ITestServiceClient { - Empty EmptyCall(Empty request, CancellationToken token = default(CancellationToken)); - Task<Empty> EmptyCallAsync(Empty request, CancellationToken token = default(CancellationToken)); - SimpleResponse UnaryCall(SimpleRequest request, CancellationToken token = default(CancellationToken)); - Task<SimpleResponse> UnaryCallAsync(SimpleRequest request, CancellationToken token = default(CancellationToken)); - AsyncServerStreamingCall<StreamingOutputCallResponse> StreamingOutputCall(StreamingOutputCallRequest request, CancellationToken token = default(CancellationToken)); - AsyncClientStreamingCall<StreamingInputCallRequest, StreamingInputCallResponse> StreamingInputCall(CancellationToken token = default(CancellationToken)); - AsyncDuplexStreamingCall<StreamingOutputCallRequest, StreamingOutputCallResponse> FullDuplexCall(CancellationToken token = default(CancellationToken)); - AsyncDuplexStreamingCall<StreamingOutputCallRequest, StreamingOutputCallResponse> HalfDuplexCall(CancellationToken token = default(CancellationToken)); + global::grpc.testing.Empty EmptyCall(global::grpc.testing.Empty request, CancellationToken token = default(CancellationToken)); + Task<global::grpc.testing.Empty> EmptyCallAsync(global::grpc.testing.Empty request, CancellationToken token = default(CancellationToken)); + global::grpc.testing.SimpleResponse UnaryCall(global::grpc.testing.SimpleRequest request, CancellationToken token = default(CancellationToken)); + Task<global::grpc.testing.SimpleResponse> UnaryCallAsync(global::grpc.testing.SimpleRequest request, CancellationToken token = default(CancellationToken)); + AsyncServerStreamingCall<global::grpc.testing.StreamingOutputCallResponse> StreamingOutputCall(global::grpc.testing.StreamingOutputCallRequest request, CancellationToken token = default(CancellationToken)); + AsyncClientStreamingCall<global::grpc.testing.StreamingInputCallRequest, global::grpc.testing.StreamingInputCallResponse> StreamingInputCall(CancellationToken token = default(CancellationToken)); + AsyncDuplexStreamingCall<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> FullDuplexCall(CancellationToken token = default(CancellationToken)); + AsyncDuplexStreamingCall<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> HalfDuplexCall(CancellationToken token = default(CancellationToken)); } // server-side interface public interface ITestService { - Task<Empty> EmptyCall(ServerCallContext context, Empty request); - Task<SimpleResponse> UnaryCall(ServerCallContext context, SimpleRequest request); - Task StreamingOutputCall(ServerCallContext context, StreamingOutputCallRequest request, IServerStreamWriter<StreamingOutputCallResponse> responseStream); - Task<StreamingInputCallResponse> StreamingInputCall(ServerCallContext context, IAsyncStreamReader<StreamingInputCallRequest> requestStream); - Task FullDuplexCall(ServerCallContext context, IAsyncStreamReader<StreamingOutputCallRequest> requestStream, IServerStreamWriter<StreamingOutputCallResponse> responseStream); - Task HalfDuplexCall(ServerCallContext context, IAsyncStreamReader<StreamingOutputCallRequest> requestStream, IServerStreamWriter<StreamingOutputCallResponse> responseStream); + Task<global::grpc.testing.Empty> EmptyCall(ServerCallContext context, global::grpc.testing.Empty request); + Task<global::grpc.testing.SimpleResponse> UnaryCall(ServerCallContext context, global::grpc.testing.SimpleRequest request); + Task StreamingOutputCall(ServerCallContext context, global::grpc.testing.StreamingOutputCallRequest request, IServerStreamWriter<global::grpc.testing.StreamingOutputCallResponse> responseStream); + Task<global::grpc.testing.StreamingInputCallResponse> StreamingInputCall(ServerCallContext context, IAsyncStreamReader<global::grpc.testing.StreamingInputCallRequest> requestStream); + Task FullDuplexCall(ServerCallContext context, IAsyncStreamReader<global::grpc.testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::grpc.testing.StreamingOutputCallResponse> responseStream); + Task HalfDuplexCall(ServerCallContext context, IAsyncStreamReader<global::grpc.testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::grpc.testing.StreamingOutputCallResponse> responseStream); } // client stub @@ -89,42 +89,42 @@ namespace grpc.testing { public TestServiceClient(Channel channel, StubConfiguration config) : base(channel, config) { } - public Empty EmptyCall(Empty request, CancellationToken token = default(CancellationToken)) + public global::grpc.testing.Empty EmptyCall(global::grpc.testing.Empty request, CancellationToken token = default(CancellationToken)) { var call = CreateCall(__ServiceName, __Method_EmptyCall); return Calls.BlockingUnaryCall(call, request, token); } - public Task<Empty> EmptyCallAsync(Empty request, CancellationToken token = default(CancellationToken)) + public Task<global::grpc.testing.Empty> EmptyCallAsync(global::grpc.testing.Empty request, CancellationToken token = default(CancellationToken)) { var call = CreateCall(__ServiceName, __Method_EmptyCall); return Calls.AsyncUnaryCall(call, request, token); } - public SimpleResponse UnaryCall(SimpleRequest request, CancellationToken token = default(CancellationToken)) + public global::grpc.testing.SimpleResponse UnaryCall(global::grpc.testing.SimpleRequest request, CancellationToken token = default(CancellationToken)) { var call = CreateCall(__ServiceName, __Method_UnaryCall); return Calls.BlockingUnaryCall(call, request, token); } - public Task<SimpleResponse> UnaryCallAsync(SimpleRequest request, CancellationToken token = default(CancellationToken)) + public Task<global::grpc.testing.SimpleResponse> UnaryCallAsync(global::grpc.testing.SimpleRequest request, CancellationToken token = default(CancellationToken)) { var call = CreateCall(__ServiceName, __Method_UnaryCall); return Calls.AsyncUnaryCall(call, request, token); } - public AsyncServerStreamingCall<StreamingOutputCallResponse> StreamingOutputCall(StreamingOutputCallRequest request, CancellationToken token = default(CancellationToken)) + public AsyncServerStreamingCall<global::grpc.testing.StreamingOutputCallResponse> StreamingOutputCall(global::grpc.testing.StreamingOutputCallRequest request, CancellationToken token = default(CancellationToken)) { var call = CreateCall(__ServiceName, __Method_StreamingOutputCall); return Calls.AsyncServerStreamingCall(call, request, token); } - public AsyncClientStreamingCall<StreamingInputCallRequest, StreamingInputCallResponse> StreamingInputCall(CancellationToken token = default(CancellationToken)) + public AsyncClientStreamingCall<global::grpc.testing.StreamingInputCallRequest, global::grpc.testing.StreamingInputCallResponse> StreamingInputCall(CancellationToken token = default(CancellationToken)) { var call = CreateCall(__ServiceName, __Method_StreamingInputCall); return Calls.AsyncClientStreamingCall(call, token); } - public AsyncDuplexStreamingCall<StreamingOutputCallRequest, StreamingOutputCallResponse> FullDuplexCall(CancellationToken token = default(CancellationToken)) + public AsyncDuplexStreamingCall<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> FullDuplexCall(CancellationToken token = default(CancellationToken)) { var call = CreateCall(__ServiceName, __Method_FullDuplexCall); return Calls.AsyncDuplexStreamingCall(call, token); } - public AsyncDuplexStreamingCall<StreamingOutputCallRequest, StreamingOutputCallResponse> HalfDuplexCall(CancellationToken token = default(CancellationToken)) + public AsyncDuplexStreamingCall<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> HalfDuplexCall(CancellationToken token = default(CancellationToken)) { var call = CreateCall(__ServiceName, __Method_HalfDuplexCall); return Calls.AsyncDuplexStreamingCall(call, token); diff --git a/src/csharp/Grpc.IntegrationTesting/TestServiceImpl.cs b/src/csharp/Grpc.IntegrationTesting/TestServiceImpl.cs index d6ba61ef82..6bd997d1f4 100644 --- a/src/csharp/Grpc.IntegrationTesting/TestServiceImpl.cs +++ b/src/csharp/Grpc.IntegrationTesting/TestServiceImpl.cs @@ -64,7 +64,7 @@ namespace grpc.testing { var response = StreamingOutputCallResponse.CreateBuilder() .SetPayload(CreateZerosPayload(responseParam.Size)).Build(); - await responseStream.Write(response); + await responseStream.WriteAsync(response); } } @@ -86,7 +86,7 @@ namespace grpc.testing { var response = StreamingOutputCallResponse.CreateBuilder() .SetPayload(CreateZerosPayload(responseParam.Size)).Build(); - await responseStream.Write(response); + await responseStream.WriteAsync(response); } }); } diff --git a/src/csharp/Grpc.IntegrationTesting/packages.config b/src/csharp/Grpc.IntegrationTesting/packages.config index e33b6e3e46..291b7b8599 100644 --- a/src/csharp/Grpc.IntegrationTesting/packages.config +++ b/src/csharp/Grpc.IntegrationTesting/packages.config @@ -3,6 +3,7 @@ <package id="Google.Apis.Auth" version="1.9.1" targetFramework="net45" /> <package id="Google.Apis.Core" version="1.9.1" targetFramework="net45" /> <package id="Google.ProtocolBuffers" version="2.4.1.521" targetFramework="net45" /> + <package id="Ix-Async" version="1.2.3" targetFramework="net45" /> <package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" /> <package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" /> <package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" /> diff --git a/src/csharp/Grpc.nuspec b/src/csharp/Grpc.nuspec index 1daff491af..e3195e1806 100644 --- a/src/csharp/Grpc.nuspec +++ b/src/csharp/Grpc.nuspec @@ -2,7 +2,7 @@ <package> <metadata> <id>Grpc</id> - <title>gRPC</title> + <title>gRPC C#</title> <summary>C# implementation of gRPC - an RPC library and framework</summary> <description>C# implementation of gRPC - an RPC library and framework. See project site for more info.</description> <version>0.5.0</version> diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat index fab80b0e08..7cb78bddf4 100644 --- a/src/csharp/build_packages.bat +++ b/src/csharp/build_packages.bat @@ -1,12 +1,18 @@ -@rem Builds NuGet packages +@rem Builds gRPC NuGet packages @rem Adjust the location of nuget.exe set NUGET=C:\nuget\nuget.exe +setlocal +cd ..\..\vsprojects\nuget_package @call buildall.bat || goto :error +endlocal -%NUGET% pack Grpc.Core\Grpc.Core.nuspec || goto :error -%NUGET% pack Grpc.Auth\Grpc.Auth.nuspec || goto :error +@call buildall.bat || goto :error + +%NUGET% pack ..\..\vsprojects\nuget_package\grpc.native.csharp_ext.nuspec || goto :error +%NUGET% pack Grpc.Core\Grpc.Core.nuspec -Symbols || goto :error +%NUGET% pack Grpc.Auth\Grpc.Auth.nuspec -Symbols || goto :error %NUGET% pack Grpc.nuspec || goto :error goto :EOF diff --git a/src/node/bin/README.md b/src/node/bin/README.md new file mode 100644 index 0000000000..2f856e428e --- /dev/null +++ b/src/node/bin/README.md @@ -0,0 +1,16 @@ +# Command Line Tools + +# Service Packager + +The command line tool `bin/service_packager`, when called with the following command line: + +```bash +service_packager proto_file -o output_path -n name -v version [-i input_path...] +``` + +Populates `output_path` with a node package consisting of a `package.json` populated with `name` and `version`, an `index.js`, a `LICENSE` file copied from gRPC, and a `service.json`, which is compiled from `proto_file` and the given `input_path`s. `require('output_path')` returns an object that is equivalent to + +```js +{ client: require('grpc').load('service.json'), + auth: require('google-auth-library') } +``` diff --git a/src/node/bin/service_packager b/src/node/bin/service_packager new file mode 100755 index 0000000000..c7f2460997 --- /dev/null +++ b/src/node/bin/service_packager @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require(__dirname+'/../cli/service_packager.js').main(process.argv.slice(2));
\ No newline at end of file diff --git a/src/node/cli/service_packager.js b/src/node/cli/service_packager.js new file mode 100644 index 0000000000..f29180b252 --- /dev/null +++ b/src/node/cli/service_packager.js @@ -0,0 +1,142 @@ +/* + * + * 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. + * + */ + +'use strict'; + +var fs = require('fs'); +var path = require('path'); + +var _ = require('underscore'); +var async = require('async'); +var pbjs = require('protobufjs/cli/pbjs'); +var parseArgs = require('minimist'); +var Mustache = require('mustache'); + +var package_json = require('../package.json'); + +var template_path = path.resolve(__dirname, 'service_packager'); + +var package_tpl_path = path.join(template_path, 'package.json.template'); + +var arg_format = { + string: ['include', 'out', 'name', 'version'], + alias: { + include: 'i', + out: 'o', + name: 'n', + version: 'v' + } +}; + +// TODO(mlumish): autogenerate README.md from proto file + +/** + * Render package.json file from template using provided parameters. + * @param {Object} params Map of parameter names to values + * @param {function(Error, string)} callback Callback to pass rendered template + * text to + */ +function generatePackage(params, callback) { + fs.readFile(package_tpl_path, {encoding: 'utf-8'}, function(err, template) { + if (err) { + callback(err); + } else { + var rendered = Mustache.render(template, params); + callback(null, rendered); + } + }); +} + +/** + * Copy a file + * @param {string} src_path The filepath to copy from + * @param {string} dest_path The filepath to copy to + */ +function copyFile(src_path, dest_path) { + fs.createReadStream(src_path).pipe(fs.createWriteStream(dest_path)); +} + +/** + * Run the script. Copies the index.js and LICENSE files to the output path, + * renders the package.json template to the output path, and generates a + * service.json file from the input proto files using pbjs. The arguments are + * taken directly from the command line, and handled as follows: + * -i (--include) : An include path for pbjs (can be dpulicated) + * -o (--output): The output path + * -n (--name): The name of the package + * -v (--version): The package version + * @param {Array} argv The argument vector + */ +function main(argv) { + var args = parseArgs(argv, arg_format); + var out_path = path.resolve(args.out); + var include_dirs = []; + if (args.include) { + include_dirs = _.map(_.flatten([args.include]), function(p) { + return path.resolve(p); + }); + } + args.grpc_version = package_json.version; + generatePackage(args, function(err, rendered) { + if (err) throw err; + fs.writeFile(path.join(out_path, 'package.json'), rendered, function(err) { + if (err) throw err; + }); + }); + copyFile(path.join(template_path, 'index.js'), + path.join(out_path, 'index.js')); + copyFile(path.join(__dirname, '..', 'LICENSE'), + path.join(out_path, 'LICENSE')); + + var service_stream = fs.createWriteStream(path.join(out_path, + 'service.json')); + var pbjs_args = _.flatten(['node', 'pbjs', + args._[0], + '-legacy', + _.map(include_dirs, function(dir) { + return "-path=" + dir; + })]); + var old_stdout = process.stdout; + process.__defineGetter__('stdout', function() { + return service_stream; + }); + var pbjs_status = pbjs.main(pbjs_args); + process.__defineGetter__('stdout', function() { + return old_stdout; + }); + if (pbjs_status !== pbjs.STATUS_OK) { + throw new Error('pbjs failed with status code ' + pbjs_status); + } +} + +exports.main = main; diff --git a/src/node/cli/service_packager/index.js b/src/node/cli/service_packager/index.js new file mode 100644 index 0000000000..811e08b89a --- /dev/null +++ b/src/node/cli/service_packager/index.js @@ -0,0 +1,36 @@ +/* + * + * 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. + * + */ + +var grpc = require('grpc'); +exports.client = grpc.load(__dirname + '/service.json', 'json'); +exports.auth = require('google-auth-library'); diff --git a/src/node/cli/service_packager/package.json.template b/src/node/cli/service_packager/package.json.template new file mode 100644 index 0000000000..9f9019172e --- /dev/null +++ b/src/node/cli/service_packager/package.json.template @@ -0,0 +1,17 @@ +{ + "name": "{{{name}}}", + "version": "{{{version}}}", + "author": "Google Inc.", + "description": "Client library for {{{name}}} built on gRPC", + "license": "Apache-2.0", + "dependencies": { + "grpc": "{{{grpc_version}}}", + "google-auth-library": "^0.9.2" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js", + "service.json" + ] +} diff --git a/src/node/interop/interop_client.js b/src/node/interop/interop_client.js index 80f811901c..455055d9f3 100644 --- a/src/node/interop/interop_client.js +++ b/src/node/interop/interop_client.js @@ -154,13 +154,15 @@ function serverStreaming(client, done) { arg.response_parameters[resp_index].size); resp_index += 1; }); - call.on('status', function(status) { - assert.strictEqual(status.code, grpc.status.OK); + call.on('end', function() { assert.strictEqual(resp_index, 4); if (done) { done(); } }); + call.on('status', function(status) { + assert.strictEqual(status.code, grpc.status.OK); + }); } /** diff --git a/src/node/package.json b/src/node/package.json index 8d413c3ffa..3f31ba49ff 100644 --- a/src/node/package.json +++ b/src/node/package.json @@ -36,6 +36,7 @@ "jshint": "^2.5.0", "minimist": "^1.1.0", "mocha": "~1.21.0", + "mustache": "^2.0.0", "strftime": "^0.8.2" }, "engines": { @@ -46,6 +47,8 @@ "README.md", "index.js", "binding.gyp", + "bin", + "cli", "examples", "ext", "interop", diff --git a/src/node/src/client.js b/src/node/src/client.js index 46d476b9f4..65339406b2 100644 --- a/src/node/src/client.js +++ b/src/node/src/client.js @@ -81,7 +81,8 @@ function _write(chunk, encoding, callback) { batch[grpc.opType.SEND_MESSAGE] = this.serialize(chunk); this.call.startBatch(batch, function(err, event) { if (err) { - throw err; + // Something has gone wrong. Stop writing by failing to call callback + return; } callback(); }); @@ -120,10 +121,8 @@ function _read(size) { */ function readCallback(err, event) { if (err) { - throw err; - } - if (self.finished) { - self.push(null); + // Something has gone wrong. Stop reading and wait for status + self.finished = true; return; } var data = event.read; @@ -237,10 +236,6 @@ function makeUnaryRequestFunction(method, serialize, deserialize) { client_batch[grpc.opType.RECV_MESSAGE] = true; client_batch[grpc.opType.RECV_STATUS_ON_CLIENT] = true; call.startBatch(client_batch, function(err, response) { - if (err) { - callback(err); - return; - } emitter.emit('status', response.status); if (response.status.code !== grpc.status.OK) { var error = new Error(response.status.details); @@ -248,6 +243,12 @@ function makeUnaryRequestFunction(method, serialize, deserialize) { error.metadata = response.status.metadata; callback(error); return; + } else { + if (err) { + // Got a batch error, but OK status. Something went wrong + callback(err); + return; + } } emitter.emit('metadata', response.metadata); callback(null, deserialize(response.read)); @@ -300,7 +301,8 @@ function makeClientStreamRequestFunction(method, serialize, deserialize) { metadata_batch[grpc.opType.RECV_INITIAL_METADATA] = true; call.startBatch(metadata_batch, function(err, response) { if (err) { - callback(err); + // The call has stopped for some reason. A non-OK status will arrive + // in the other batch. return; } stream.emit('metadata', response.metadata); @@ -309,10 +311,6 @@ function makeClientStreamRequestFunction(method, serialize, deserialize) { client_batch[grpc.opType.RECV_MESSAGE] = true; client_batch[grpc.opType.RECV_STATUS_ON_CLIENT] = true; call.startBatch(client_batch, function(err, response) { - if (err) { - callback(err); - return; - } stream.emit('status', response.status); if (response.status.code !== grpc.status.OK) { var error = new Error(response.status.details); @@ -320,6 +318,12 @@ function makeClientStreamRequestFunction(method, serialize, deserialize) { error.metadata = response.status.metadata; callback(error); return; + } else { + if (err) { + // Got a batch error, but OK status. Something went wrong + callback(err); + return; + } } callback(null, deserialize(response.read)); }); @@ -373,16 +377,15 @@ function makeServerStreamRequestFunction(method, serialize, deserialize) { start_batch[grpc.opType.SEND_CLOSE_FROM_CLIENT] = true; call.startBatch(start_batch, function(err, response) { if (err) { - throw err; + // The call has stopped for some reason. A non-OK status will arrive + // in the other batch. + return; } stream.emit('metadata', response.metadata); }); var status_batch = {}; status_batch[grpc.opType.RECV_STATUS_ON_CLIENT] = true; call.startBatch(status_batch, function(err, response) { - if (err) { - throw err; - } stream.emit('status', response.status); if (response.status.code !== grpc.status.OK) { var error = new Error(response.status.details); @@ -390,6 +393,12 @@ function makeServerStreamRequestFunction(method, serialize, deserialize) { error.metadata = response.status.metadata; stream.emit('error', error); return; + } else { + if (err) { + // Got a batch error, but OK status. Something went wrong + stream.emit('error', err); + return; + } } }); }); @@ -438,16 +447,15 @@ function makeBidiStreamRequestFunction(method, serialize, deserialize) { start_batch[grpc.opType.RECV_INITIAL_METADATA] = true; call.startBatch(start_batch, function(err, response) { if (err) { - throw err; + // The call has stopped for some reason. A non-OK status will arrive + // in the other batch. + return; } stream.emit('metadata', response.metadata); }); var status_batch = {}; status_batch[grpc.opType.RECV_STATUS_ON_CLIENT] = true; call.startBatch(status_batch, function(err, response) { - if (err) { - throw err; - } stream.emit('status', response.status); if (response.status.code !== grpc.status.OK) { var error = new Error(response.status.details); @@ -455,6 +463,12 @@ function makeBidiStreamRequestFunction(method, serialize, deserialize) { error.metadata = response.status.metadata; stream.emit('error', error); return; + } else { + if (err) { + // Got a batch error, but OK status. Something went wrong + stream.emit('error', err); + return; + } } }); }); diff --git a/src/node/src/server.js b/src/node/src/server.js index eef705c44c..079495afd4 100644 --- a/src/node/src/server.js +++ b/src/node/src/server.js @@ -291,7 +291,15 @@ function _read(size) { return; } var data = event.read; - if (self.push(self.deserialize(data)) && data !== null) { + var deserialized; + try { + deserialized = self.deserialize(data); + } catch (e) { + e.code = grpc.status.INVALID_ARGUMENT; + self.emit('error', e); + return; + } + if (self.push(deserialized) && data !== null) { var read_batch = {}; read_batch[grpc.opType.RECV_MESSAGE] = true; self.call.startBatch(read_batch, readCallback); @@ -354,7 +362,13 @@ function handleUnary(call, handler, metadata) { handleError(call, err); return; } - emitter.request = handler.deserialize(result.read); + try { + emitter.request = handler.deserialize(result.read); + } catch (e) { + e.code = grpc.status.INVALID_ARGUMENT; + handleError(call, e); + return; + } if (emitter.cancelled) { return; } @@ -388,7 +402,13 @@ function handleServerStreaming(call, handler, metadata) { stream.emit('error', err); return; } - stream.request = handler.deserialize(result.read); + try { + stream.request = handler.deserialize(result.read); + } catch (e) { + e.code = grpc.status.INVALID_ARGUMENT; + stream.emit('error', e); + return; + } handler.func(stream); }); } @@ -401,6 +421,9 @@ function handleServerStreaming(call, handler, metadata) { */ function handleClientStreaming(call, handler, metadata) { var stream = new ServerReadableStream(call, handler.deserialize); + stream.on('error', function(error) { + handleError(call, error); + }); waitForCancel(call, stream); var metadata_batch = {}; metadata_batch[grpc.opType.SEND_INITIAL_METADATA] = metadata; diff --git a/src/node/test/end_to_end_test.js b/src/node/test/end_to_end_test.js index 60e9861bc8..667852f382 100644 --- a/src/node/test/end_to_end_test.js +++ b/src/node/test/end_to_end_test.js @@ -286,20 +286,24 @@ describe('end-to-end', function() { assert.ifError(err); assert(response['send metadata']); assert.strictEqual(response.read.toString(), requests[0]); - var end_batch = {}; - end_batch[grpc.opType.RECV_CLOSE_ON_SERVER] = true; - end_batch[grpc.opType.SEND_STATUS_FROM_SERVER] = { - 'metadata': {}, - 'code': grpc.status.OK, - 'details': status_text - }; - end_batch[grpc.opType.RECV_MESSAGE] = true; - server_call.startBatch(end_batch, function(err, response) { + var snd_batch = {}; + snd_batch[grpc.opType.RECV_MESSAGE] = true; + server_call.startBatch(snd_batch, function(err, response) { assert.ifError(err); - assert(response['send status']); - assert(!response.cancelled); assert.strictEqual(response.read.toString(), requests[1]); - done(); + var end_batch = {}; + end_batch[grpc.opType.RECV_CLOSE_ON_SERVER] = true; + end_batch[grpc.opType.SEND_STATUS_FROM_SERVER] = { + 'metadata': {}, + 'code': grpc.status.OK, + 'details': status_text + }; + server_call.startBatch(end_batch, function(err, response) { + assert.ifError(err); + assert(response['send status']); + assert(!response.cancelled); + done(); + }); }); }); }); diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js index 9c72c29fab..b390f8b2a5 100644 --- a/src/node/test/surface_test.js +++ b/src/node/test/surface_test.js @@ -47,6 +47,8 @@ var mathService = math_proto.lookup('math.Math'); var capitalize = require('underscore.string/capitalize'); +var _ = require('underscore'); + describe('File loader', function() { it('Should load a proto file by default', function() { assert.doesNotThrow(function() { @@ -178,9 +180,10 @@ describe('Generic client and server', function() { }); }); }); -describe('Trailing metadata', function() { +describe('Other conditions', function() { var client; var server; + var port; before(function() { var test_proto = ProtoBuf.loadProtoFile(__dirname + '/test_service.proto'); var test_service = test_proto.lookup('TestService'); @@ -246,7 +249,7 @@ describe('Trailing metadata', function() { } } }); - var port = server.bind('localhost:0'); + port = server.bind('localhost:0'); var Client = surface_client.makeProtobufClientConstructor(test_service); client = new Client('localhost:' + port); server.listen(); @@ -254,86 +257,167 @@ describe('Trailing metadata', function() { after(function() { server.shutdown(); }); - it('should be present when a unary call succeeds', function(done) { - var call = client.unary({error: false}, function(err, data) { - assert.ifError(err); + describe('Server recieving bad input', function() { + var misbehavingClient; + var badArg = new Buffer([0xFF]); + before(function() { + var test_service_attrs = { + unary: { + path: '/TestService/Unary', + requestStream: false, + responseStream: false, + requestSerialize: _.identity, + responseDeserialize: _.identity + }, + clientStream: { + path: '/TestService/ClientStream', + requestStream: true, + responseStream: false, + requestSerialize: _.identity, + responseDeserialize: _.identity + }, + serverStream: { + path: '/TestService/ServerStream', + requestStream: false, + responseStream: true, + requestSerialize: _.identity, + responseDeserialize: _.identity + }, + bidiStream: { + path: '/TestService/BidiStream', + requestStream: true, + responseStream: true, + requestSerialize: _.identity, + responseDeserialize: _.identity + } + }; + var Client = surface_client.makeClientConstructor(test_service_attrs, + 'TestService'); + misbehavingClient = new Client('localhost:' + port); }); - call.on('status', function(status) { - assert.deepEqual(status.metadata.metadata, ['yes']); - done(); + it('should respond correctly to a unary call', function(done) { + misbehavingClient.unary(badArg, function(err, data) { + assert(err); + assert.strictEqual(err.code, grpc.status.INVALID_ARGUMENT); + done(); + }); }); - }); - it('should be present when a unary call fails', function(done) { - var call = client.unary({error: true}, function(err, data) { - assert(err); + it('should respond correctly to a client stream', function(done) { + var call = misbehavingClient.clientStream(function(err, data) { + assert(err); + assert.strictEqual(err.code, grpc.status.INVALID_ARGUMENT); + done(); + }); + call.write(badArg); + // TODO(mlumish): Remove call.end() + call.end(); }); - call.on('status', function(status) { - assert.deepEqual(status.metadata.metadata, ['yes']); - done(); + it('should respond correctly to a server stream', function(done) { + var call = misbehavingClient.serverStream(badArg); + call.on('data', function(data) { + assert.fail(data, null, 'Unexpected data', '==='); + }); + call.on('error', function(err) { + assert.strictEqual(err.code, grpc.status.INVALID_ARGUMENT); + done(); + }); + }); + it('should respond correctly to a bidi stream', function(done) { + var call = misbehavingClient.bidiStream(); + call.on('data', function(data) { + assert.fail(data, null, 'Unexpected data', '==='); + }); + call.on('error', function(err) { + assert.strictEqual(err.code, grpc.status.INVALID_ARGUMENT); + done(); + }); + call.write(badArg); + // TODO(mlumish): Remove call.end() + call.end(); }); }); - it('should be present when a client stream call succeeds', function(done) { - var call = client.clientStream(function(err, data) { - assert.ifError(err); + describe('Trailing metadata', function() { + it('should be present when a unary call succeeds', function(done) { + var call = client.unary({error: false}, function(err, data) { + assert.ifError(err); + }); + call.on('status', function(status) { + assert.deepEqual(status.metadata.metadata, ['yes']); + done(); + }); }); - call.write({error: false}); - call.write({error: false}); - call.end(); - call.on('status', function(status) { - assert.deepEqual(status.metadata.metadata, ['yes']); - done(); + it('should be present when a unary call fails', function(done) { + var call = client.unary({error: true}, function(err, data) { + assert(err); + }); + call.on('status', function(status) { + assert.deepEqual(status.metadata.metadata, ['yes']); + done(); + }); }); - }); - it('should be present when a client stream call fails', function(done) { - var call = client.clientStream(function(err, data) { - assert(err); + it('should be present when a client stream call succeeds', function(done) { + var call = client.clientStream(function(err, data) { + assert.ifError(err); + }); + call.write({error: false}); + call.write({error: false}); + call.end(); + call.on('status', function(status) { + assert.deepEqual(status.metadata.metadata, ['yes']); + done(); + }); }); - call.write({error: false}); - call.write({error: true}); - call.end(); - call.on('status', function(status) { - assert.deepEqual(status.metadata.metadata, ['yes']); - done(); + it('should be present when a client stream call fails', function(done) { + var call = client.clientStream(function(err, data) { + assert(err); + }); + call.write({error: false}); + call.write({error: true}); + call.end(); + call.on('status', function(status) { + assert.deepEqual(status.metadata.metadata, ['yes']); + done(); + }); }); - }); - it('should be present when a server stream call succeeds', function(done) { - var call = client.serverStream({error: false}); - call.on('data', function(){}); - call.on('status', function(status) { - assert.strictEqual(status.code, grpc.status.OK); - assert.deepEqual(status.metadata.metadata, ['yes']); - done(); + it('should be present when a server stream call succeeds', function(done) { + var call = client.serverStream({error: false}); + call.on('data', function(){}); + call.on('status', function(status) { + assert.strictEqual(status.code, grpc.status.OK); + assert.deepEqual(status.metadata.metadata, ['yes']); + done(); + }); }); - }); - it('should be present when a server stream call fails', function(done) { - var call = client.serverStream({error: true}); - call.on('data', function(){}); - call.on('error', function(error) { - assert.deepEqual(error.metadata.metadata, ['yes']); - done(); + it('should be present when a server stream call fails', function(done) { + var call = client.serverStream({error: true}); + call.on('data', function(){}); + call.on('error', function(error) { + assert.deepEqual(error.metadata.metadata, ['yes']); + done(); + }); }); - }); - it('should be present when a bidi stream succeeds', function(done) { - var call = client.bidiStream(); - call.write({error: false}); - call.write({error: false}); - call.end(); - call.on('data', function(){}); - call.on('status', function(status) { - assert.strictEqual(status.code, grpc.status.OK); - assert.deepEqual(status.metadata.metadata, ['yes']); - done(); + it('should be present when a bidi stream succeeds', function(done) { + var call = client.bidiStream(); + call.write({error: false}); + call.write({error: false}); + call.end(); + call.on('data', function(){}); + call.on('status', function(status) { + assert.strictEqual(status.code, grpc.status.OK); + assert.deepEqual(status.metadata.metadata, ['yes']); + done(); + }); }); - }); - it('should be present when a bidi stream fails', function(done) { - var call = client.bidiStream(); - call.write({error: false}); - call.write({error: true}); - call.end(); - call.on('data', function(){}); - call.on('error', function(error) { - assert.deepEqual(error.metadata.metadata, ['yes']); - done(); + it('should be present when a bidi stream fails', function(done) { + var call = client.bidiStream(); + call.write({error: false}); + call.write({error: true}); + call.end(); + call.on('data', function(){}); + call.on('error', function(error) { + assert.deepEqual(error.metadata.metadata, ['yes']); + done(); + }); }); }); }); diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index 0f458b40cd..a4a0ddb324 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -231,7 +231,7 @@ handler:resumingHandler]] errorHandler:errorHandler]; } -- (void)didReceiveValue:(id)value { +- (void)writeValue:(id)value { // TODO(jcanizales): Throw/assert if value isn't NSData. // Pause the input and only resume it when the C layer notifies us that writes @@ -255,7 +255,7 @@ errorHandler:errorHandler]; } -- (void)didFinishWithError:(NSError *)errorOrNil { +- (void)writesFinishedWithError:(NSError *)errorOrNil { if (errorOrNil) { [self cancel]; } else { @@ -306,7 +306,7 @@ - (void)startWithWriteable:(id<GRXWriteable>)writeable { // The following produces a retain cycle self:_responseWriteable:self, which is only - // broken when didFinishWithError: is sent to the wrapped writeable. + // broken when writesFinishedWithError: is sent to the wrapped writeable. // Care is taken not to retain self strongly in any of the blocks used in // the implementation of GRPCCall, so that the life of the instance is // determined by this retain cycle. diff --git a/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.h b/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.h index 24c2b96729..1ef245fe37 100644 --- a/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.h +++ b/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.h @@ -38,11 +38,11 @@ // This is a thread-safe wrapper over a GRXWriteable instance. It lets one // enqueue calls to a GRXWriteable instance for the main thread, guaranteeing -// that didFinishWithError: is the last message sent to it (no matter what +// that writesFinishedWithError: is the last message sent to it (no matter what // messages are sent to the wrapper, in what order, nor from which thread). It // also guarantees that, if cancelWithError: is called from the main thread // (e.g. by the app cancelling the writes), no further messages are sent to the -// writeable except didFinishWithError:. +// writeable except writesFinishedWithError:. // // TODO(jcanizales): Let the user specify another queue for the writeable // callbacks. @@ -51,23 +51,22 @@ // The GRXWriteable passed is the wrapped writeable. // Both the GRXWriter instance and the GRXWriteable instance are retained until -// didFinishWithError: is sent to the writeable, and released after that. +// writesFinishedWithError: is sent to the writeable, and released after that. // This is used to create a retain cycle that keeps both objects alive until the // writing is explicitly finished. - (instancetype)initWithWriteable:(id<GRXWriteable>)writeable writer:(id<GRXWriter>)writer NS_DESIGNATED_INITIALIZER; -// Enqueues didReceiveValue: to be sent to the writeable in the main thread. -// The passed handler is invoked from the main thread after didReceiveValue: -// returns. +// Enqueues writeValue: to be sent to the writeable in the main thread. +// The passed handler is invoked from the main thread after writeValue: returns. - (void)enqueueMessage:(NSData *)message completionHandler:(void (^)())handler; -// Enqueues didFinishWithError:nil to be sent to the writeable in the main +// Enqueues writesFinishedWithError:nil to be sent to the writeable in the main // thread. After that message is sent to the writeable, all other methods of // this object are effectively noops. - (void)enqueueSuccessfulCompletion; -// If the writeable has not yet received a didFinishWithError: message, this +// If the writeable has not yet received a writesFinishedWithError: message, this // will enqueue one to be sent to it in the main thread, and cancel all other // pending messages to the writeable enqueued by this object (both past and // future). @@ -75,7 +74,7 @@ - (void)cancelWithError:(NSError *)error; // Cancels all pending messages to the writeable enqueued by this object (both -// past and future). Because the writeable won't receive didFinishWithError:, +// past and future). Because the writeable won't receive writesFinishedWithError:, // this also releases the writeable and the writer. - (void)cancelSilently; @end diff --git a/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m b/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m index ac444ef406..7d5ecb56d9 100644 --- a/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m +++ b/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m @@ -43,7 +43,7 @@ @implementation GRPCDelegateWrapper { dispatch_queue_t _writeableQueue; - // This ensures that didFinishWithError: is only sent once to the writeable. + // This ensures that writesFinishedWithError: is only sent once to the writeable. dispatch_once_t _alreadyFinished; } @@ -69,7 +69,7 @@ // the race. id<GRXWriteable> writeable = self.writeable; if (writeable) { - [writeable didReceiveValue:message]; + [writeable writeValue:message]; handler(); } }); @@ -80,7 +80,7 @@ dispatch_once(&_alreadyFinished, ^{ // Cancellation is now impossible. None of the other three blocks can run // concurrently with this one. - [self.writeable didFinishWithError:nil]; + [self.writeable writesFinishedWithError:nil]; // Break the retain cycle with writer, and skip any possible message to the // wrapped writeable enqueued after this one. self.writeable = nil; @@ -100,7 +100,7 @@ self.writeable = nil; dispatch_async(_writeableQueue, ^{ - [writeable didFinishWithError:error]; + [writeable writesFinishedWithError:error]; // Break the retain cycle with writer. self.writer = nil; }); diff --git a/src/objective-c/ProtoRPC/ProtoRPC.m b/src/objective-c/ProtoRPC/ProtoRPC.m index 6520b3af59..96608f2898 100644 --- a/src/objective-c/ProtoRPC/ProtoRPC.m +++ b/src/objective-c/ProtoRPC/ProtoRPC.m @@ -36,7 +36,7 @@ #import <gRPC/GRXWriteable.h> #import <gRPC/GRXWriter.h> #import <gRPC/GRXWriter+Transformations.h> -#import <ProtocolBuffers/ProtocolBuffers.h> +#import <Protobuf/GPBProtocolBuffers.h> @implementation ProtoRPC { id<GRXWriteable> _responseWriteable; @@ -65,15 +65,15 @@ } // A writer that serializes the proto messages to send. id<GRXWriter> bytesWriter = - [[[GRXWriter alloc] initWithWriter:requestsWriter] map:^id(PBGeneratedMessage *proto) { + [[[GRXWriter alloc] initWithWriter:requestsWriter] map:^id(GPBMessage *proto) { return [proto data]; }]; if ((self = [super initWithHost:host method:method requestsWriter:bytesWriter])) { // A writeable that parses the proto messages received. _responseWriteable = [[GRXWriteable alloc] initWithValueHandler:^(NSData *value) { - [responsesWriteable didReceiveValue:[responseClass parseFromData:value]]; + [responsesWriteable writeValue:[responseClass parseFromData:value]]; } completionHandler:^(NSError *errorOrNil) { - [responsesWriteable didFinishWithError:errorOrNil]; + [responsesWriteable writesFinishedWithError:errorOrNil]; }]; } return self; diff --git a/src/objective-c/README.md b/src/objective-c/README.md index 05e9f2b4dc..49d7f43882 100644 --- a/src/objective-c/README.md +++ b/src/objective-c/README.md @@ -1,3 +1,47 @@ -gRPC implementation for Objective-C on iOS +# gRPC for Objective-C -This is a work in progress. +## How to generate a client library from a Protocol Buffers definition + +First install v3 of the Protocol Buffers compiler (_protoc_), by cloning [its Git repository](https://github.com/google/protobuf) and following these [installation instructions](https://github.com/google/protobuf#c-installation---unix) (the ones titled C++; don't miss the note for Mac users). + +Then clone this repository and execute the following commands from the root directory where it was cloned. + +Compile the gRPC plugins for _protoc_: +```sh +make plugins +``` + +Create a symbolic link to the compiled plugin binary somewhere in your `$PATH`: +```sh +ln -s `pwd`/bins/opt/grpc_objective_c_plugin /usr/local/bin/protoc-gen-objcgrpc +``` +(Notice that the name of the created link must begin with "protoc-gen-" for _protoc_ to recognize it as a plugin). + +If you don't want to create the symbolic link, you can alternatively copy the binary (with the appropriate name). Or you might prefer instead to specify the plugin's path as a flag when invoking _protoc_, in which case no system modification nor renaming is necessary. + +Finally, run _protoc_ with the following flags to generate the client library for your `.proto` files: + +```sh +protoc --objc_out=. --objcgrpc_out=. *.proto +``` + +This will generate a pair of `.pbobjc.h`/`.pbobjc.m` files for each `.proto` file, with the messages and enums defined in them. And a pair of `.pbrpc.h`/`.pbrpc.m` files for each `.proto` file with services defined. The latter contains the code to make remote calls to the specified API. + +## How to integrate a generated gRPC library in your project + +### If you use Cocoapods + +This is the recommended approach. + +You need to create a Podspec file for the generated library. This is simply a matter of copying an example like [this one](https://github.com/grpc/grpc/blob/master/src/objective-c/examples/Sample/RemoteTestClient/RemoteTest.podspec) to the directory where the source files were generated. Update the name and other metadata of the Podspec as suitable. + +Once your library has a Podspec, refer to it from your Podfile using `:path` as described [here](https://guides.cocoapods.org/using/the-podfile.html#using-the-files-from-a-folder-local-to-the-machine). + +### If you don't use Cocoapods + +You need to compile the generated `.pbpbjc.*` files (the enums and messages) without ARC support, and the generated `.pbrpc.*` files (the services) with ARC support. The generated code depends on v0.3+ of the Objective-C gRPC runtime library and v3.0+ of the Objective-C Protobuf runtime library. + +These libraries need to be integrated into your project as described in their respective Podspec files: + +* [Podspec](https://github.com/grpc/grpc/blob/master/gRPC.podspec) for the Objective-C gRPC runtime library. This can be tedious to configure manually. +* [Podspec](https://github.com/jcanizales/protobuf/blob/add-podspec/Protobuf.podspec) for the Objective-C Protobuf runtime library. diff --git a/src/objective-c/RxLibrary/GRXBufferedPipe.h b/src/objective-c/RxLibrary/GRXBufferedPipe.h new file mode 100644 index 0000000000..5e876a73bf --- /dev/null +++ b/src/objective-c/RxLibrary/GRXBufferedPipe.h @@ -0,0 +1,59 @@ +/* + * + * 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. + * + */ + +#import <Foundation/Foundation.h> + +#import "GRXWriteable.h" +#import "GRXWriter.h" + +// A buffered pipe is a Writeable that also acts as a Writer (to whichever other writeable is passed +// to -startWithWriteable:). +// Once it is started, whatever values are written into it (via -writeValue:) will be propagated +// immediately, unless flow control prevents it. +// If it is throttled and keeps receiving values, as well as if it receives values before being +// started, it will buffer them and propagate them in order as soon as its state becomes +// GRXWriterStateStarted. +// If it receives an error (via -writesFinishedWithError:), it will drop any buffered values and +// propagate the error immediately. +// +// Beware that a pipe of this type can't prevent receiving more values when it is paused (for +// example if used to write data to a congested network connection). Because in such situations the +// pipe will keep buffering all data written to it, your application could run out of memory and +// crash. If you want to react to flow control signals to prevent that, instead of using this class +// you can implement an object that conforms to GRXWriter. +@interface GRXBufferedPipe : NSObject<GRXWriteable, GRXWriter> + +// Convenience constructor. ++ (instancetype)pipe; + +@end diff --git a/src/objective-c/RxLibrary/GRXBufferedPipe.m b/src/objective-c/RxLibrary/GRXBufferedPipe.m new file mode 100644 index 0000000000..4820c84af0 --- /dev/null +++ b/src/objective-c/RxLibrary/GRXBufferedPipe.m @@ -0,0 +1,146 @@ +/* + * + * 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. + * + */ + +#import "GRXBufferedPipe.h" + +@implementation GRXBufferedPipe { + id<GRXWriteable> _writeable; + NSMutableArray *_queue; + BOOL _inputIsFinished; + NSError *_errorOrNil; +} + +@synthesize state = _state; + ++ (instancetype)pipe { + return [[self alloc] init]; +} + +- (instancetype)init { + if (self = [super init]) { + _queue = [NSMutableArray array]; + _state = GRXWriterStateNotStarted; + } + return self; +} + +- (id)popValue { + id value = _queue[0]; + [_queue removeObjectAtIndex:0]; + return value; +} + +- (void)writeBufferUntilPausedOrStopped { + while (_state == GRXWriterStateStarted && _queue.count > 0) { + [_writeable writeValue:[self popValue]]; + } + if (_inputIsFinished && _queue.count == 0) { + // Our writer finished normally while we were paused or not-started-yet. + [self finishWithError:_errorOrNil]; + } +} + +#pragma mark GRXWriteable implementation + +// Returns whether events can be simply propagated to the other end of the pipe. +- (BOOL)shouldFastForward { + return _state == GRXWriterStateStarted && _queue.count == 0; +} + +- (void)writeValue:(id)value { + if (self.shouldFastForward) { + // Skip the queue. + [_writeable writeValue:value]; + } else { + // Even if we're paused and with enqueued values, we can't excert back-pressure to our writer. + // So just buffer the new value. + // We need a copy, so that it doesn't mutate before it's written at the other end of the pipe. + if ([value respondsToSelector:@selector(copy)]) { + value = [value copy]; + } + [_queue addObject:value]; + } +} + +- (void)writesFinishedWithError:(NSError *)errorOrNil { + _inputIsFinished = YES; + _errorOrNil = errorOrNil; + if (errorOrNil || self.shouldFastForward) { + // No need to write pending values. + [self finishWithError:_errorOrNil]; + } +} + +#pragma mark GRXWriter implementation + +- (void)setState:(GRXWriterState)newState { + // Manual transitions are only allowed from the started or paused states. + if (_state == GRXWriterStateNotStarted || _state == GRXWriterStateFinished) { + return; + } + + switch (newState) { + case GRXWriterStateFinished: + _state = newState; + _queue = nil; + // Per GRXWriter's contract, setting the state to Finished manually means one doesn't wish the + // writeable to be messaged anymore. + _writeable = nil; + return; + case GRXWriterStatePaused: + _state = newState; + return; + case GRXWriterStateStarted: + if (_state == GRXWriterStatePaused) { + _state = newState; + [self writeBufferUntilPausedOrStopped]; + } + return; + case GRXWriterStateNotStarted: + return; + } +} + +- (void)startWithWriteable:(id<GRXWriteable>)writeable { + _state = GRXWriterStateStarted; + _writeable = writeable; + [self writeBufferUntilPausedOrStopped]; +} + +- (void)finishWithError:(NSError *)errorOrNil { + id<GRXWriteable> writeable = _writeable; + self.state = GRXWriterStateFinished; + [writeable writesFinishedWithError:errorOrNil]; +} + +@end diff --git a/src/objective-c/RxLibrary/GRXImmediateWriter.m b/src/objective-c/RxLibrary/GRXImmediateWriter.m index 7468af557f..0b4979872e 100644 --- a/src/objective-c/RxLibrary/GRXImmediateWriter.m +++ b/src/objective-c/RxLibrary/GRXImmediateWriter.m @@ -109,7 +109,7 @@ - (void)writeUntilPausedOrStopped { id value; while (value = [_enumerator nextObject]) { - [_writeable didReceiveValue:value]; + [_writeable writeValue:value]; // If the writeable has a reference to us, it might change our state to paused or finished. if (_state == GRXWriterStatePaused || _state == GRXWriterStateFinished) { return; @@ -130,7 +130,7 @@ _errorOrNil = nil; id<GRXWriteable> writeable = _writeable; _writeable = nil; - [writeable didFinishWithError:errorOrNil]; + [writeable writesFinishedWithError:errorOrNil]; } - (void)setState:(GRXWriterState)newState { diff --git a/src/objective-c/RxLibrary/GRXWriteable.h b/src/objective-c/RxLibrary/GRXWriteable.h index 6f6ea142e0..216de30735 100644 --- a/src/objective-c/RxLibrary/GRXWriteable.h +++ b/src/objective-c/RxLibrary/GRXWriteable.h @@ -38,14 +38,12 @@ @protocol GRXWriteable <NSObject> // Push the next value of the sequence to the receiving object. -// TODO(jcanizales): Name it enumerator:(id<GRXEnumerator>) didProduceValue:(id)? -- (void)didReceiveValue:(id)value; +- (void)writeValue:(id)value; // Signal that the sequence is completed, or that an error ocurred. After this -// message is sent to the instance, neither it nor didReceiveValue: may be +// message is sent to the instance, neither it nor writeValue: may be // called again. -// TODO(jcanizales): enumerator:(id<GRXEnumerator>) didFinishWithError:(NSError*)? -- (void)didFinishWithError:(NSError *)errorOrNil; +- (void)writesFinishedWithError:(NSError *)errorOrNil; @end typedef void (^GRXValueHandler)(id value); diff --git a/src/objective-c/RxLibrary/GRXWriteable.m b/src/objective-c/RxLibrary/GRXWriteable.m index 7000a078d1..63f7c3e7f3 100644 --- a/src/objective-c/RxLibrary/GRXWriteable.m +++ b/src/objective-c/RxLibrary/GRXWriteable.m @@ -76,13 +76,13 @@ return self; } -- (void)didReceiveValue:(id)value { +- (void)writeValue:(id)value { if (_valueHandler) { _valueHandler(value); } } -- (void)didFinishWithError:(NSError *)errorOrNil { +- (void)writesFinishedWithError:(NSError *)errorOrNil { if (_completionHandler) { _completionHandler(errorOrNil); } diff --git a/src/objective-c/RxLibrary/GRXWriter.h b/src/objective-c/RxLibrary/GRXWriter.h index 68c294f007..dcf44e3143 100644 --- a/src/objective-c/RxLibrary/GRXWriter.h +++ b/src/objective-c/RxLibrary/GRXWriter.h @@ -50,7 +50,7 @@ typedef NS_ENUM(NSInteger, GRXWriterState) { // The writer is temporarily paused, and won't send any more values to the // writeable unless its state is set back to Started. The writer might still // transition to the Finished state at any moment, and is allowed to send - // didFinishWithError: to its writeable. + // writesFinishedWithError: to its writeable. // // Not all implementations of writer have to support pausing, and thus // trying to set an writer's state to this value might have no effect. @@ -59,7 +59,7 @@ typedef NS_ENUM(NSInteger, GRXWriterState) { // The writer has released its writeable and won't interact with it anymore. // // One seldomly wants to set an writer's state to this value, as its - // writeable isn't notified with a didFinishWithError: message. Instead, sending + // writeable isn't notified with a writesFinishedWithError: message. Instead, sending // finishWithError: to the writer will make it notify the writeable and then // transition to this state. GRXWriterStateFinished @@ -105,7 +105,7 @@ typedef NS_ENUM(NSInteger, GRXWriterState) { // This method might only be called on writers in the NotStarted state. - (void)startWithWriteable:(id<GRXWriteable>)writeable; -// Send didFinishWithError:errorOrNil immediately to the writeable, and don't send +// Send writesFinishedWithError:errorOrNil immediately to the writeable, and don't send // any more messages to it. // // This method might only be called on writers in the Started or Paused diff --git a/src/objective-c/RxLibrary/GRXWriter.m b/src/objective-c/RxLibrary/GRXWriter.m index b48a44f3a7..cc14383560 100644 --- a/src/objective-c/RxLibrary/GRXWriter.m +++ b/src/objective-c/RxLibrary/GRXWriter.m @@ -62,7 +62,7 @@ - (void)finishOutputWithError:(NSError *)errorOrNil { id<GRXWriteable> writeable = _writeable; _writeable = nil; - [writeable didFinishWithError:errorOrNil]; + [writeable writesFinishedWithError:errorOrNil]; } // This is used to stop the input writer. It nillifies our reference to it @@ -75,11 +75,11 @@ #pragma mark GRXWriteable implementation -- (void)didReceiveValue:(id)value { - [_writeable didReceiveValue:value]; +- (void)writeValue:(id)value { + [_writeable writeValue:value]; } -- (void)didFinishWithError:(NSError *)errorOrNil { +- (void)writesFinishedWithError:(NSError *)errorOrNil { _writer = nil; [self finishOutputWithError:errorOrNil]; } diff --git a/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m b/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m index 8a41c819a6..2cdfea1b67 100644 --- a/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m +++ b/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m @@ -57,7 +57,7 @@ static id (^kIdentity)(id value) = ^id(id value) { } // Override -- (void)didReceiveValue:(id)value { - [super didReceiveValue:_map(value)]; +- (void)writeValue:(id)value { + [super writeValue:_map(value)]; } @end diff --git a/src/objective-c/examples/Sample/Podfile b/src/objective-c/examples/Sample/Podfile index 8b1a90e39b..e8b78647ac 100644 --- a/src/objective-c/examples/Sample/Podfile +++ b/src/objective-c/examples/Sample/Podfile @@ -2,6 +2,7 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' pod 'gRPC', :path => "../../../.." +pod 'Protobuf', :git => 'https://github.com/google/protobuf.git' pod 'Route_guide', :path => "RouteGuideClient" pod 'RemoteTest', :path => "RemoteTestClient" diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Empty.pb.h b/src/objective-c/examples/Sample/RemoteTestClient/Empty.pb.h deleted file mode 100644 index bf9fa3e36f..0000000000 --- a/src/objective-c/examples/Sample/RemoteTestClient/Empty.pb.h +++ /dev/null @@ -1,103 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! - -#import <ProtocolBuffers/ProtocolBuffers.h> - -// @@protoc_insertion_point(imports) - -@class ObjectiveCFileOptions; -@class ObjectiveCFileOptionsBuilder; -@class PBDescriptorProto; -@class PBDescriptorProtoBuilder; -@class PBDescriptorProtoExtensionRange; -@class PBDescriptorProtoExtensionRangeBuilder; -@class PBEnumDescriptorProto; -@class PBEnumDescriptorProtoBuilder; -@class PBEnumOptions; -@class PBEnumOptionsBuilder; -@class PBEnumValueDescriptorProto; -@class PBEnumValueDescriptorProtoBuilder; -@class PBEnumValueOptions; -@class PBEnumValueOptionsBuilder; -@class PBFieldDescriptorProto; -@class PBFieldDescriptorProtoBuilder; -@class PBFieldOptions; -@class PBFieldOptionsBuilder; -@class PBFileDescriptorProto; -@class PBFileDescriptorProtoBuilder; -@class PBFileDescriptorSet; -@class PBFileDescriptorSetBuilder; -@class PBFileOptions; -@class PBFileOptionsBuilder; -@class PBMessageOptions; -@class PBMessageOptionsBuilder; -@class PBMethodDescriptorProto; -@class PBMethodDescriptorProtoBuilder; -@class PBMethodOptions; -@class PBMethodOptionsBuilder; -@class PBOneofDescriptorProto; -@class PBOneofDescriptorProtoBuilder; -@class PBServiceDescriptorProto; -@class PBServiceDescriptorProtoBuilder; -@class PBServiceOptions; -@class PBServiceOptionsBuilder; -@class PBSourceCodeInfo; -@class PBSourceCodeInfoBuilder; -@class PBSourceCodeInfoLocation; -@class PBSourceCodeInfoLocationBuilder; -@class PBUninterpretedOption; -@class PBUninterpretedOptionBuilder; -@class PBUninterpretedOptionNamePart; -@class PBUninterpretedOptionNamePartBuilder; -@class RMTEmpty; -@class RMTEmptyBuilder; - - - -@interface RMTEmptyRoot : NSObject { -} -+ (PBExtensionRegistry*) extensionRegistry; -+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry; -@end - -@interface RMTEmpty : PBGeneratedMessage<GeneratedMessageProtocol> { -@private -} - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (RMTEmptyBuilder*) builder; -+ (RMTEmptyBuilder*) builder; -+ (RMTEmptyBuilder*) builderWithPrototype:(RMTEmpty*) prototype; -- (RMTEmptyBuilder*) toBuilder; - -+ (RMTEmpty*) parseFromData:(NSData*) data; -+ (RMTEmpty*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTEmpty*) parseFromInputStream:(NSInputStream*) input; -+ (RMTEmpty*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTEmpty*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (RMTEmpty*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface RMTEmptyBuilder : PBGeneratedMessageBuilder { -@private - RMTEmpty* resultEmpty; -} - -- (RMTEmpty*) defaultInstance; - -- (RMTEmptyBuilder*) clear; -- (RMTEmptyBuilder*) clone; - -- (RMTEmpty*) build; -- (RMTEmpty*) buildPartial; - -- (RMTEmptyBuilder*) mergeFrom:(RMTEmpty*) other; -- (RMTEmptyBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (RMTEmptyBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - - -// @@protoc_insertion_point(global_scope) diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Empty.pb.m b/src/objective-c/examples/Sample/RemoteTestClient/Empty.pb.m deleted file mode 100644 index 8e39cb70d1..0000000000 --- a/src/objective-c/examples/Sample/RemoteTestClient/Empty.pb.m +++ /dev/null @@ -1,179 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! - -#import "Empty.pb.h" -// @@protoc_insertion_point(imports) - -@implementation RMTEmptyRoot -static PBExtensionRegistry* extensionRegistry = nil; -+ (PBExtensionRegistry*) extensionRegistry { - return extensionRegistry; -} - -+ (void) initialize { - if (self == [RMTEmptyRoot class]) { - PBMutableExtensionRegistry* registry = [PBMutableExtensionRegistry registry]; - [self registerAllExtensions:registry]; - [ObjectivecDescriptorRoot registerAllExtensions:registry]; - extensionRegistry = registry; - } -} -+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry { -} -@end - -@interface RMTEmpty () -@end - -@implementation RMTEmpty - -- (instancetype) init { - if ((self = [super init])) { - } - return self; -} -static RMTEmpty* defaultRMTEmptyInstance = nil; -+ (void) initialize { - if (self == [RMTEmpty class]) { - defaultRMTEmptyInstance = [[RMTEmpty alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultRMTEmptyInstance; -} -- (instancetype) defaultInstance { - return defaultRMTEmptyInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (RMTEmpty*) parseFromData:(NSData*) data { - return (RMTEmpty*)[[[RMTEmpty builder] mergeFromData:data] build]; -} -+ (RMTEmpty*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTEmpty*)[[[RMTEmpty builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (RMTEmpty*) parseFromInputStream:(NSInputStream*) input { - return (RMTEmpty*)[[[RMTEmpty builder] mergeFromInputStream:input] build]; -} -+ (RMTEmpty*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTEmpty*)[[[RMTEmpty builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTEmpty*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (RMTEmpty*)[[[RMTEmpty builder] mergeFromCodedInputStream:input] build]; -} -+ (RMTEmpty*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTEmpty*)[[[RMTEmpty builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTEmptyBuilder*) builder { - return [[RMTEmptyBuilder alloc] init]; -} -+ (RMTEmptyBuilder*) builderWithPrototype:(RMTEmpty*) prototype { - return [[RMTEmpty builder] mergeFrom:prototype]; -} -- (RMTEmptyBuilder*) builder { - return [RMTEmpty builder]; -} -- (RMTEmptyBuilder*) toBuilder { - return [RMTEmpty builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[RMTEmpty class]]) { - return NO; - } - RMTEmpty *otherMessage = other; - return - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface RMTEmptyBuilder() -@property (strong) RMTEmpty* resultEmpty; -@end - -@implementation RMTEmptyBuilder -@synthesize resultEmpty; -- (instancetype) init { - if ((self = [super init])) { - self.resultEmpty = [[RMTEmpty alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultEmpty; -} -- (RMTEmptyBuilder*) clear { - self.resultEmpty = [[RMTEmpty alloc] init]; - return self; -} -- (RMTEmptyBuilder*) clone { - return [RMTEmpty builderWithPrototype:resultEmpty]; -} -- (RMTEmpty*) defaultInstance { - return [RMTEmpty defaultInstance]; -} -- (RMTEmpty*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (RMTEmpty*) buildPartial { - RMTEmpty* returnMe = resultEmpty; - self.resultEmpty = nil; - return returnMe; -} -- (RMTEmptyBuilder*) mergeFrom:(RMTEmpty*) other { - if (other == [RMTEmpty defaultInstance]) { - return self; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (RMTEmptyBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (RMTEmptyBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - } - } -} -@end - - -// @@protoc_insertion_point(global_scope) diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Empty.pbobjc.h b/src/objective-c/examples/Sample/RemoteTestClient/Empty.pbobjc.h new file mode 100644 index 0000000000..809d0dde6e --- /dev/null +++ b/src/objective-c/examples/Sample/RemoteTestClient/Empty.pbobjc.h @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: empty.proto + +#import "GPBProtocolBuffers.h" + +#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000 +#error This file was generated by a different version of protoc-gen-objc which is incompatible with your Protocol Buffer sources. +#endif + +CF_EXTERN_C_BEGIN + +@class RMTEmpty; + + +#pragma mark - RMTEmptyRoot + +@interface RMTEmptyRoot : GPBRootObject +@end + +#pragma mark - RMTEmpty + +// An empty message that you can re-use to avoid defining duplicated empty +// messages in your project. A typical example is to use it as argument or the +// return value of a service API. For instance: +// +// service Foo { +// rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { }; +// }; +@interface RMTEmpty : GPBMessage + +@end + +CF_EXTERN_C_END diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Empty.pbobjc.m b/src/objective-c/examples/Sample/RemoteTestClient/Empty.pbobjc.m new file mode 100644 index 0000000000..46d481af66 --- /dev/null +++ b/src/objective-c/examples/Sample/RemoteTestClient/Empty.pbobjc.m @@ -0,0 +1,59 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: empty.proto + +#import "GPBProtocolBuffers_RuntimeSupport.h" + +#import "Empty.pbobjc.h" + +#pragma mark - RMTEmptyRoot + +@implementation RMTEmptyRoot + +@end + +static GPBFileDescriptor *RMTEmptyRoot_FileDescriptor(void) { + // This is called by +initialize so there is no need to worry + // about thread safety of the singleton. + static GPBFileDescriptor *descriptor = NULL; + if (!descriptor) { + descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"grpc.testing" + syntax:GPBFileSyntaxProto3]; + } + return descriptor; +} + +#pragma mark - RMTEmpty + +@implementation RMTEmpty + + +typedef struct RMTEmpty_Storage { + uint32_t _has_storage_[0]; +} RMTEmpty_Storage; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + }; + descriptor = [GPBDescriptor allocDescriptorForClass:[RMTEmpty class] + rootClass:[RMTEmptyRoot class] + file:RMTEmptyRoot_FileDescriptor() + fields:fields + fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) + oneofs:NULL + oneofCount:0 + enums:NULL + enumCount:0 + ranges:NULL + rangeCount:0 + storageSize:sizeof(RMTEmpty_Storage) + wireFormat:NO]; + } + return descriptor; +} + +@end + diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Messages.pb.h b/src/objective-c/examples/Sample/RemoteTestClient/Messages.pb.h deleted file mode 100644 index 0a08e67702..0000000000 --- a/src/objective-c/examples/Sample/RemoteTestClient/Messages.pb.h +++ /dev/null @@ -1,578 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! - -#import <ProtocolBuffers/ProtocolBuffers.h> - -// @@protoc_insertion_point(imports) - -@class ObjectiveCFileOptions; -@class ObjectiveCFileOptionsBuilder; -@class PBDescriptorProto; -@class PBDescriptorProtoBuilder; -@class PBDescriptorProtoExtensionRange; -@class PBDescriptorProtoExtensionRangeBuilder; -@class PBEnumDescriptorProto; -@class PBEnumDescriptorProtoBuilder; -@class PBEnumOptions; -@class PBEnumOptionsBuilder; -@class PBEnumValueDescriptorProto; -@class PBEnumValueDescriptorProtoBuilder; -@class PBEnumValueOptions; -@class PBEnumValueOptionsBuilder; -@class PBFieldDescriptorProto; -@class PBFieldDescriptorProtoBuilder; -@class PBFieldOptions; -@class PBFieldOptionsBuilder; -@class PBFileDescriptorProto; -@class PBFileDescriptorProtoBuilder; -@class PBFileDescriptorSet; -@class PBFileDescriptorSetBuilder; -@class PBFileOptions; -@class PBFileOptionsBuilder; -@class PBMessageOptions; -@class PBMessageOptionsBuilder; -@class PBMethodDescriptorProto; -@class PBMethodDescriptorProtoBuilder; -@class PBMethodOptions; -@class PBMethodOptionsBuilder; -@class PBOneofDescriptorProto; -@class PBOneofDescriptorProtoBuilder; -@class PBServiceDescriptorProto; -@class PBServiceDescriptorProtoBuilder; -@class PBServiceOptions; -@class PBServiceOptionsBuilder; -@class PBSourceCodeInfo; -@class PBSourceCodeInfoBuilder; -@class PBSourceCodeInfoLocation; -@class PBSourceCodeInfoLocationBuilder; -@class PBUninterpretedOption; -@class PBUninterpretedOptionBuilder; -@class PBUninterpretedOptionNamePart; -@class PBUninterpretedOptionNamePartBuilder; -@class RMTPayload; -@class RMTPayloadBuilder; -@class RMTResponseParameters; -@class RMTResponseParametersBuilder; -@class RMTSimpleRequest; -@class RMTSimpleRequestBuilder; -@class RMTSimpleResponse; -@class RMTSimpleResponseBuilder; -@class RMTStreamingInputCallRequest; -@class RMTStreamingInputCallRequestBuilder; -@class RMTStreamingInputCallResponse; -@class RMTStreamingInputCallResponseBuilder; -@class RMTStreamingOutputCallRequest; -@class RMTStreamingOutputCallRequestBuilder; -@class RMTStreamingOutputCallResponse; -@class RMTStreamingOutputCallResponseBuilder; - - -typedef NS_ENUM(SInt32, RMTPayloadType) { - RMTPayloadTypeCompressable = 0, - RMTPayloadTypeUncompressable = 1, - RMTPayloadTypeRandom = 2, -}; - -BOOL RMTPayloadTypeIsValidValue(RMTPayloadType value); -NSString *NSStringFromRMTPayloadType(RMTPayloadType value); - - -@interface RMTMessagesRoot : NSObject { -} -+ (PBExtensionRegistry*) extensionRegistry; -+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry; -@end - -@interface RMTPayload : PBGeneratedMessage<GeneratedMessageProtocol> { -@private - BOOL hasBody_:1; - BOOL hasType_:1; - NSData* body; - RMTPayloadType type; -} -- (BOOL) hasType; -- (BOOL) hasBody; -@property (readonly) RMTPayloadType type; -@property (readonly, strong) NSData* body; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (RMTPayloadBuilder*) builder; -+ (RMTPayloadBuilder*) builder; -+ (RMTPayloadBuilder*) builderWithPrototype:(RMTPayload*) prototype; -- (RMTPayloadBuilder*) toBuilder; - -+ (RMTPayload*) parseFromData:(NSData*) data; -+ (RMTPayload*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTPayload*) parseFromInputStream:(NSInputStream*) input; -+ (RMTPayload*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTPayload*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (RMTPayload*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface RMTPayloadBuilder : PBGeneratedMessageBuilder { -@private - RMTPayload* resultPayload; -} - -- (RMTPayload*) defaultInstance; - -- (RMTPayloadBuilder*) clear; -- (RMTPayloadBuilder*) clone; - -- (RMTPayload*) build; -- (RMTPayload*) buildPartial; - -- (RMTPayloadBuilder*) mergeFrom:(RMTPayload*) other; -- (RMTPayloadBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (RMTPayloadBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasType; -- (RMTPayloadType) type; -- (RMTPayloadBuilder*) setType:(RMTPayloadType) value; -- (RMTPayloadBuilder*) clearType; - -- (BOOL) hasBody; -- (NSData*) body; -- (RMTPayloadBuilder*) setBody:(NSData*) value; -- (RMTPayloadBuilder*) clearBody; -@end - -@interface RMTSimpleRequest : PBGeneratedMessage<GeneratedMessageProtocol> { -@private - BOOL hasFillUsername_:1; - BOOL hasFillOauthScope_:1; - BOOL hasResponseSize_:1; - BOOL hasPayload_:1; - BOOL hasResponseType_:1; - BOOL fillUsername_:1; - BOOL fillOauthScope_:1; - SInt32 responseSize; - RMTPayload* payload; - RMTPayloadType responseType; -} -- (BOOL) hasResponseType; -- (BOOL) hasResponseSize; -- (BOOL) hasPayload; -- (BOOL) hasFillUsername; -- (BOOL) hasFillOauthScope; -@property (readonly) RMTPayloadType responseType; -@property (readonly) SInt32 responseSize; -@property (readonly, strong) RMTPayload* payload; -- (BOOL) fillUsername; -- (BOOL) fillOauthScope; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (RMTSimpleRequestBuilder*) builder; -+ (RMTSimpleRequestBuilder*) builder; -+ (RMTSimpleRequestBuilder*) builderWithPrototype:(RMTSimpleRequest*) prototype; -- (RMTSimpleRequestBuilder*) toBuilder; - -+ (RMTSimpleRequest*) parseFromData:(NSData*) data; -+ (RMTSimpleRequest*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTSimpleRequest*) parseFromInputStream:(NSInputStream*) input; -+ (RMTSimpleRequest*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTSimpleRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (RMTSimpleRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface RMTSimpleRequestBuilder : PBGeneratedMessageBuilder { -@private - RMTSimpleRequest* resultSimpleRequest; -} - -- (RMTSimpleRequest*) defaultInstance; - -- (RMTSimpleRequestBuilder*) clear; -- (RMTSimpleRequestBuilder*) clone; - -- (RMTSimpleRequest*) build; -- (RMTSimpleRequest*) buildPartial; - -- (RMTSimpleRequestBuilder*) mergeFrom:(RMTSimpleRequest*) other; -- (RMTSimpleRequestBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (RMTSimpleRequestBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasResponseType; -- (RMTPayloadType) responseType; -- (RMTSimpleRequestBuilder*) setResponseType:(RMTPayloadType) value; -- (RMTSimpleRequestBuilder*) clearResponseType; - -- (BOOL) hasResponseSize; -- (SInt32) responseSize; -- (RMTSimpleRequestBuilder*) setResponseSize:(SInt32) value; -- (RMTSimpleRequestBuilder*) clearResponseSize; - -- (BOOL) hasPayload; -- (RMTPayload*) payload; -- (RMTSimpleRequestBuilder*) setPayload:(RMTPayload*) value; -- (RMTSimpleRequestBuilder*) setPayloadBuilder:(RMTPayloadBuilder*) builderForValue; -- (RMTSimpleRequestBuilder*) mergePayload:(RMTPayload*) value; -- (RMTSimpleRequestBuilder*) clearPayload; - -- (BOOL) hasFillUsername; -- (BOOL) fillUsername; -- (RMTSimpleRequestBuilder*) setFillUsername:(BOOL) value; -- (RMTSimpleRequestBuilder*) clearFillUsername; - -- (BOOL) hasFillOauthScope; -- (BOOL) fillOauthScope; -- (RMTSimpleRequestBuilder*) setFillOauthScope:(BOOL) value; -- (RMTSimpleRequestBuilder*) clearFillOauthScope; -@end - -@interface RMTSimpleResponse : PBGeneratedMessage<GeneratedMessageProtocol> { -@private - BOOL hasUsername_:1; - BOOL hasOauthScope_:1; - BOOL hasPayload_:1; - NSString* username; - NSString* oauthScope; - RMTPayload* payload; -} -- (BOOL) hasPayload; -- (BOOL) hasUsername; -- (BOOL) hasOauthScope; -@property (readonly, strong) RMTPayload* payload; -@property (readonly, strong) NSString* username; -@property (readonly, strong) NSString* oauthScope; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (RMTSimpleResponseBuilder*) builder; -+ (RMTSimpleResponseBuilder*) builder; -+ (RMTSimpleResponseBuilder*) builderWithPrototype:(RMTSimpleResponse*) prototype; -- (RMTSimpleResponseBuilder*) toBuilder; - -+ (RMTSimpleResponse*) parseFromData:(NSData*) data; -+ (RMTSimpleResponse*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTSimpleResponse*) parseFromInputStream:(NSInputStream*) input; -+ (RMTSimpleResponse*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTSimpleResponse*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (RMTSimpleResponse*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface RMTSimpleResponseBuilder : PBGeneratedMessageBuilder { -@private - RMTSimpleResponse* resultSimpleResponse; -} - -- (RMTSimpleResponse*) defaultInstance; - -- (RMTSimpleResponseBuilder*) clear; -- (RMTSimpleResponseBuilder*) clone; - -- (RMTSimpleResponse*) build; -- (RMTSimpleResponse*) buildPartial; - -- (RMTSimpleResponseBuilder*) mergeFrom:(RMTSimpleResponse*) other; -- (RMTSimpleResponseBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (RMTSimpleResponseBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasPayload; -- (RMTPayload*) payload; -- (RMTSimpleResponseBuilder*) setPayload:(RMTPayload*) value; -- (RMTSimpleResponseBuilder*) setPayloadBuilder:(RMTPayloadBuilder*) builderForValue; -- (RMTSimpleResponseBuilder*) mergePayload:(RMTPayload*) value; -- (RMTSimpleResponseBuilder*) clearPayload; - -- (BOOL) hasUsername; -- (NSString*) username; -- (RMTSimpleResponseBuilder*) setUsername:(NSString*) value; -- (RMTSimpleResponseBuilder*) clearUsername; - -- (BOOL) hasOauthScope; -- (NSString*) oauthScope; -- (RMTSimpleResponseBuilder*) setOauthScope:(NSString*) value; -- (RMTSimpleResponseBuilder*) clearOauthScope; -@end - -@interface RMTStreamingInputCallRequest : PBGeneratedMessage<GeneratedMessageProtocol> { -@private - BOOL hasPayload_:1; - RMTPayload* payload; -} -- (BOOL) hasPayload; -@property (readonly, strong) RMTPayload* payload; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (RMTStreamingInputCallRequestBuilder*) builder; -+ (RMTStreamingInputCallRequestBuilder*) builder; -+ (RMTStreamingInputCallRequestBuilder*) builderWithPrototype:(RMTStreamingInputCallRequest*) prototype; -- (RMTStreamingInputCallRequestBuilder*) toBuilder; - -+ (RMTStreamingInputCallRequest*) parseFromData:(NSData*) data; -+ (RMTStreamingInputCallRequest*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTStreamingInputCallRequest*) parseFromInputStream:(NSInputStream*) input; -+ (RMTStreamingInputCallRequest*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTStreamingInputCallRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (RMTStreamingInputCallRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface RMTStreamingInputCallRequestBuilder : PBGeneratedMessageBuilder { -@private - RMTStreamingInputCallRequest* resultStreamingInputCallRequest; -} - -- (RMTStreamingInputCallRequest*) defaultInstance; - -- (RMTStreamingInputCallRequestBuilder*) clear; -- (RMTStreamingInputCallRequestBuilder*) clone; - -- (RMTStreamingInputCallRequest*) build; -- (RMTStreamingInputCallRequest*) buildPartial; - -- (RMTStreamingInputCallRequestBuilder*) mergeFrom:(RMTStreamingInputCallRequest*) other; -- (RMTStreamingInputCallRequestBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (RMTStreamingInputCallRequestBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasPayload; -- (RMTPayload*) payload; -- (RMTStreamingInputCallRequestBuilder*) setPayload:(RMTPayload*) value; -- (RMTStreamingInputCallRequestBuilder*) setPayloadBuilder:(RMTPayloadBuilder*) builderForValue; -- (RMTStreamingInputCallRequestBuilder*) mergePayload:(RMTPayload*) value; -- (RMTStreamingInputCallRequestBuilder*) clearPayload; -@end - -@interface RMTStreamingInputCallResponse : PBGeneratedMessage<GeneratedMessageProtocol> { -@private - BOOL hasAggregatedPayloadSize_:1; - SInt32 aggregatedPayloadSize; -} -- (BOOL) hasAggregatedPayloadSize; -@property (readonly) SInt32 aggregatedPayloadSize; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (RMTStreamingInputCallResponseBuilder*) builder; -+ (RMTStreamingInputCallResponseBuilder*) builder; -+ (RMTStreamingInputCallResponseBuilder*) builderWithPrototype:(RMTStreamingInputCallResponse*) prototype; -- (RMTStreamingInputCallResponseBuilder*) toBuilder; - -+ (RMTStreamingInputCallResponse*) parseFromData:(NSData*) data; -+ (RMTStreamingInputCallResponse*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTStreamingInputCallResponse*) parseFromInputStream:(NSInputStream*) input; -+ (RMTStreamingInputCallResponse*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTStreamingInputCallResponse*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (RMTStreamingInputCallResponse*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface RMTStreamingInputCallResponseBuilder : PBGeneratedMessageBuilder { -@private - RMTStreamingInputCallResponse* resultStreamingInputCallResponse; -} - -- (RMTStreamingInputCallResponse*) defaultInstance; - -- (RMTStreamingInputCallResponseBuilder*) clear; -- (RMTStreamingInputCallResponseBuilder*) clone; - -- (RMTStreamingInputCallResponse*) build; -- (RMTStreamingInputCallResponse*) buildPartial; - -- (RMTStreamingInputCallResponseBuilder*) mergeFrom:(RMTStreamingInputCallResponse*) other; -- (RMTStreamingInputCallResponseBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (RMTStreamingInputCallResponseBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasAggregatedPayloadSize; -- (SInt32) aggregatedPayloadSize; -- (RMTStreamingInputCallResponseBuilder*) setAggregatedPayloadSize:(SInt32) value; -- (RMTStreamingInputCallResponseBuilder*) clearAggregatedPayloadSize; -@end - -@interface RMTResponseParameters : PBGeneratedMessage<GeneratedMessageProtocol> { -@private - BOOL hasSize_:1; - BOOL hasIntervalUs_:1; - SInt32 size; - SInt32 intervalUs; -} -- (BOOL) hasSize; -- (BOOL) hasIntervalUs; -@property (readonly) SInt32 size; -@property (readonly) SInt32 intervalUs; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (RMTResponseParametersBuilder*) builder; -+ (RMTResponseParametersBuilder*) builder; -+ (RMTResponseParametersBuilder*) builderWithPrototype:(RMTResponseParameters*) prototype; -- (RMTResponseParametersBuilder*) toBuilder; - -+ (RMTResponseParameters*) parseFromData:(NSData*) data; -+ (RMTResponseParameters*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTResponseParameters*) parseFromInputStream:(NSInputStream*) input; -+ (RMTResponseParameters*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTResponseParameters*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (RMTResponseParameters*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface RMTResponseParametersBuilder : PBGeneratedMessageBuilder { -@private - RMTResponseParameters* resultResponseParameters; -} - -- (RMTResponseParameters*) defaultInstance; - -- (RMTResponseParametersBuilder*) clear; -- (RMTResponseParametersBuilder*) clone; - -- (RMTResponseParameters*) build; -- (RMTResponseParameters*) buildPartial; - -- (RMTResponseParametersBuilder*) mergeFrom:(RMTResponseParameters*) other; -- (RMTResponseParametersBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (RMTResponseParametersBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasSize; -- (SInt32) size; -- (RMTResponseParametersBuilder*) setSize:(SInt32) value; -- (RMTResponseParametersBuilder*) clearSize; - -- (BOOL) hasIntervalUs; -- (SInt32) intervalUs; -- (RMTResponseParametersBuilder*) setIntervalUs:(SInt32) value; -- (RMTResponseParametersBuilder*) clearIntervalUs; -@end - -@interface RMTStreamingOutputCallRequest : PBGeneratedMessage<GeneratedMessageProtocol> { -@private - BOOL hasPayload_:1; - BOOL hasResponseType_:1; - RMTPayload* payload; - RMTPayloadType responseType; - NSMutableArray * responseParametersArray; -} -- (BOOL) hasResponseType; -- (BOOL) hasPayload; -@property (readonly) RMTPayloadType responseType; -@property (readonly, strong) NSArray * responseParameters; -@property (readonly, strong) RMTPayload* payload; -- (RMTResponseParameters*)responseParametersAtIndex:(NSUInteger)index; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (RMTStreamingOutputCallRequestBuilder*) builder; -+ (RMTStreamingOutputCallRequestBuilder*) builder; -+ (RMTStreamingOutputCallRequestBuilder*) builderWithPrototype:(RMTStreamingOutputCallRequest*) prototype; -- (RMTStreamingOutputCallRequestBuilder*) toBuilder; - -+ (RMTStreamingOutputCallRequest*) parseFromData:(NSData*) data; -+ (RMTStreamingOutputCallRequest*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTStreamingOutputCallRequest*) parseFromInputStream:(NSInputStream*) input; -+ (RMTStreamingOutputCallRequest*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTStreamingOutputCallRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (RMTStreamingOutputCallRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface RMTStreamingOutputCallRequestBuilder : PBGeneratedMessageBuilder { -@private - RMTStreamingOutputCallRequest* resultStreamingOutputCallRequest; -} - -- (RMTStreamingOutputCallRequest*) defaultInstance; - -- (RMTStreamingOutputCallRequestBuilder*) clear; -- (RMTStreamingOutputCallRequestBuilder*) clone; - -- (RMTStreamingOutputCallRequest*) build; -- (RMTStreamingOutputCallRequest*) buildPartial; - -- (RMTStreamingOutputCallRequestBuilder*) mergeFrom:(RMTStreamingOutputCallRequest*) other; -- (RMTStreamingOutputCallRequestBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (RMTStreamingOutputCallRequestBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasResponseType; -- (RMTPayloadType) responseType; -- (RMTStreamingOutputCallRequestBuilder*) setResponseType:(RMTPayloadType) value; -- (RMTStreamingOutputCallRequestBuilder*) clearResponseType; - -- (NSMutableArray *)responseParameters; -- (RMTResponseParameters*)responseParametersAtIndex:(NSUInteger)index; -- (RMTStreamingOutputCallRequestBuilder *)addResponseParameters:(RMTResponseParameters*)value; -- (RMTStreamingOutputCallRequestBuilder *)setResponseParametersArray:(NSArray *)array; -- (RMTStreamingOutputCallRequestBuilder *)clearResponseParameters; - -- (BOOL) hasPayload; -- (RMTPayload*) payload; -- (RMTStreamingOutputCallRequestBuilder*) setPayload:(RMTPayload*) value; -- (RMTStreamingOutputCallRequestBuilder*) setPayloadBuilder:(RMTPayloadBuilder*) builderForValue; -- (RMTStreamingOutputCallRequestBuilder*) mergePayload:(RMTPayload*) value; -- (RMTStreamingOutputCallRequestBuilder*) clearPayload; -@end - -@interface RMTStreamingOutputCallResponse : PBGeneratedMessage<GeneratedMessageProtocol> { -@private - BOOL hasPayload_:1; - RMTPayload* payload; -} -- (BOOL) hasPayload; -@property (readonly, strong) RMTPayload* payload; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (RMTStreamingOutputCallResponseBuilder*) builder; -+ (RMTStreamingOutputCallResponseBuilder*) builder; -+ (RMTStreamingOutputCallResponseBuilder*) builderWithPrototype:(RMTStreamingOutputCallResponse*) prototype; -- (RMTStreamingOutputCallResponseBuilder*) toBuilder; - -+ (RMTStreamingOutputCallResponse*) parseFromData:(NSData*) data; -+ (RMTStreamingOutputCallResponse*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTStreamingOutputCallResponse*) parseFromInputStream:(NSInputStream*) input; -+ (RMTStreamingOutputCallResponse*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RMTStreamingOutputCallResponse*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (RMTStreamingOutputCallResponse*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface RMTStreamingOutputCallResponseBuilder : PBGeneratedMessageBuilder { -@private - RMTStreamingOutputCallResponse* resultStreamingOutputCallResponse; -} - -- (RMTStreamingOutputCallResponse*) defaultInstance; - -- (RMTStreamingOutputCallResponseBuilder*) clear; -- (RMTStreamingOutputCallResponseBuilder*) clone; - -- (RMTStreamingOutputCallResponse*) build; -- (RMTStreamingOutputCallResponse*) buildPartial; - -- (RMTStreamingOutputCallResponseBuilder*) mergeFrom:(RMTStreamingOutputCallResponse*) other; -- (RMTStreamingOutputCallResponseBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (RMTStreamingOutputCallResponseBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasPayload; -- (RMTPayload*) payload; -- (RMTStreamingOutputCallResponseBuilder*) setPayload:(RMTPayload*) value; -- (RMTStreamingOutputCallResponseBuilder*) setPayloadBuilder:(RMTPayloadBuilder*) builderForValue; -- (RMTStreamingOutputCallResponseBuilder*) mergePayload:(RMTPayload*) value; -- (RMTStreamingOutputCallResponseBuilder*) clearPayload; -@end - - -// @@protoc_insertion_point(global_scope) diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Messages.pb.m b/src/objective-c/examples/Sample/RemoteTestClient/Messages.pb.m deleted file mode 100644 index fbad1a9c09..0000000000 --- a/src/objective-c/examples/Sample/RemoteTestClient/Messages.pb.m +++ /dev/null @@ -1,2256 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! - -#import "Messages.pb.h" -// @@protoc_insertion_point(imports) - -@implementation RMTMessagesRoot -static PBExtensionRegistry* extensionRegistry = nil; -+ (PBExtensionRegistry*) extensionRegistry { - return extensionRegistry; -} - -+ (void) initialize { - if (self == [RMTMessagesRoot class]) { - PBMutableExtensionRegistry* registry = [PBMutableExtensionRegistry registry]; - [self registerAllExtensions:registry]; - [ObjectivecDescriptorRoot registerAllExtensions:registry]; - extensionRegistry = registry; - } -} -+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry { -} -@end - -BOOL RMTPayloadTypeIsValidValue(RMTPayloadType value) { - switch (value) { - case RMTPayloadTypeCompressable: - case RMTPayloadTypeUncompressable: - case RMTPayloadTypeRandom: - return YES; - default: - return NO; - } -} -NSString *NSStringFromRMTPayloadType(RMTPayloadType value) { - switch (value) { - case RMTPayloadTypeCompressable: - return @"RMTPayloadTypeCompressable"; - case RMTPayloadTypeUncompressable: - return @"RMTPayloadTypeUncompressable"; - case RMTPayloadTypeRandom: - return @"RMTPayloadTypeRandom"; - default: - return nil; - } -} - -@interface RMTPayload () -@property RMTPayloadType type; -@property (strong) NSData* body; -@end - -@implementation RMTPayload - -- (BOOL) hasType { - return !!hasType_; -} -- (void) setHasType:(BOOL) _value_ { - hasType_ = !!_value_; -} -@synthesize type; -- (BOOL) hasBody { - return !!hasBody_; -} -- (void) setHasBody:(BOOL) _value_ { - hasBody_ = !!_value_; -} -@synthesize body; -- (instancetype) init { - if ((self = [super init])) { - self.type = RMTPayloadTypeCompressable; - self.body = [NSData data]; - } - return self; -} -static RMTPayload* defaultRMTPayloadInstance = nil; -+ (void) initialize { - if (self == [RMTPayload class]) { - defaultRMTPayloadInstance = [[RMTPayload alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultRMTPayloadInstance; -} -- (instancetype) defaultInstance { - return defaultRMTPayloadInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasType) { - [output writeEnum:1 value:self.type]; - } - if (self.hasBody) { - [output writeData:2 value:self.body]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasType) { - size_ += computeEnumSize(1, self.type); - } - if (self.hasBody) { - size_ += computeDataSize(2, self.body); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (RMTPayload*) parseFromData:(NSData*) data { - return (RMTPayload*)[[[RMTPayload builder] mergeFromData:data] build]; -} -+ (RMTPayload*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTPayload*)[[[RMTPayload builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (RMTPayload*) parseFromInputStream:(NSInputStream*) input { - return (RMTPayload*)[[[RMTPayload builder] mergeFromInputStream:input] build]; -} -+ (RMTPayload*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTPayload*)[[[RMTPayload builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTPayload*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (RMTPayload*)[[[RMTPayload builder] mergeFromCodedInputStream:input] build]; -} -+ (RMTPayload*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTPayload*)[[[RMTPayload builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTPayloadBuilder*) builder { - return [[RMTPayloadBuilder alloc] init]; -} -+ (RMTPayloadBuilder*) builderWithPrototype:(RMTPayload*) prototype { - return [[RMTPayload builder] mergeFrom:prototype]; -} -- (RMTPayloadBuilder*) builder { - return [RMTPayload builder]; -} -- (RMTPayloadBuilder*) toBuilder { - return [RMTPayload builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasType) { - [output appendFormat:@"%@%@: %@\n", indent, @"type", NSStringFromRMTPayloadType(self.type)]; - } - if (self.hasBody) { - [output appendFormat:@"%@%@: %@\n", indent, @"body", self.body]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[RMTPayload class]]) { - return NO; - } - RMTPayload *otherMessage = other; - return - self.hasType == otherMessage.hasType && - (!self.hasType || self.type == otherMessage.type) && - self.hasBody == otherMessage.hasBody && - (!self.hasBody || [self.body isEqual:otherMessage.body]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasType) { - hashCode = hashCode * 31 + self.type; - } - if (self.hasBody) { - hashCode = hashCode * 31 + [self.body hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface RMTPayloadBuilder() -@property (strong) RMTPayload* resultPayload; -@end - -@implementation RMTPayloadBuilder -@synthesize resultPayload; -- (instancetype) init { - if ((self = [super init])) { - self.resultPayload = [[RMTPayload alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultPayload; -} -- (RMTPayloadBuilder*) clear { - self.resultPayload = [[RMTPayload alloc] init]; - return self; -} -- (RMTPayloadBuilder*) clone { - return [RMTPayload builderWithPrototype:resultPayload]; -} -- (RMTPayload*) defaultInstance { - return [RMTPayload defaultInstance]; -} -- (RMTPayload*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (RMTPayload*) buildPartial { - RMTPayload* returnMe = resultPayload; - self.resultPayload = nil; - return returnMe; -} -- (RMTPayloadBuilder*) mergeFrom:(RMTPayload*) other { - if (other == [RMTPayload defaultInstance]) { - return self; - } - if (other.hasType) { - [self setType:other.type]; - } - if (other.hasBody) { - [self setBody:other.body]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (RMTPayloadBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (RMTPayloadBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - RMTPayloadType value = (RMTPayloadType)[input readEnum]; - if (RMTPayloadTypeIsValidValue(value)) { - [self setType:value]; - } else { - [unknownFields mergeVarintField:1 value:value]; - } - break; - } - case 18: { - [self setBody:[input readData]]; - break; - } - } - } -} -- (BOOL) hasType { - return resultPayload.hasType; -} -- (RMTPayloadType) type { - return resultPayload.type; -} -- (RMTPayloadBuilder*) setType:(RMTPayloadType) value { - resultPayload.hasType = YES; - resultPayload.type = value; - return self; -} -- (RMTPayloadBuilder*) clearType { - resultPayload.hasType = NO; - resultPayload.type = RMTPayloadTypeCompressable; - return self; -} -- (BOOL) hasBody { - return resultPayload.hasBody; -} -- (NSData*) body { - return resultPayload.body; -} -- (RMTPayloadBuilder*) setBody:(NSData*) value { - resultPayload.hasBody = YES; - resultPayload.body = value; - return self; -} -- (RMTPayloadBuilder*) clearBody { - resultPayload.hasBody = NO; - resultPayload.body = [NSData data]; - return self; -} -@end - -@interface RMTSimpleRequest () -@property RMTPayloadType responseType; -@property SInt32 responseSize; -@property (strong) RMTPayload* payload; -@property BOOL fillUsername; -@property BOOL fillOauthScope; -@end - -@implementation RMTSimpleRequest - -- (BOOL) hasResponseType { - return !!hasResponseType_; -} -- (void) setHasResponseType:(BOOL) _value_ { - hasResponseType_ = !!_value_; -} -@synthesize responseType; -- (BOOL) hasResponseSize { - return !!hasResponseSize_; -} -- (void) setHasResponseSize:(BOOL) _value_ { - hasResponseSize_ = !!_value_; -} -@synthesize responseSize; -- (BOOL) hasPayload { - return !!hasPayload_; -} -- (void) setHasPayload:(BOOL) _value_ { - hasPayload_ = !!_value_; -} -@synthesize payload; -- (BOOL) hasFillUsername { - return !!hasFillUsername_; -} -- (void) setHasFillUsername:(BOOL) _value_ { - hasFillUsername_ = !!_value_; -} -- (BOOL) fillUsername { - return !!fillUsername_; -} -- (void) setFillUsername:(BOOL) _value_ { - fillUsername_ = !!_value_; -} -- (BOOL) hasFillOauthScope { - return !!hasFillOauthScope_; -} -- (void) setHasFillOauthScope:(BOOL) _value_ { - hasFillOauthScope_ = !!_value_; -} -- (BOOL) fillOauthScope { - return !!fillOauthScope_; -} -- (void) setFillOauthScope:(BOOL) _value_ { - fillOauthScope_ = !!_value_; -} -- (instancetype) init { - if ((self = [super init])) { - self.responseType = RMTPayloadTypeCompressable; - self.responseSize = 0; - self.payload = [RMTPayload defaultInstance]; - self.fillUsername = NO; - self.fillOauthScope = NO; - } - return self; -} -static RMTSimpleRequest* defaultRMTSimpleRequestInstance = nil; -+ (void) initialize { - if (self == [RMTSimpleRequest class]) { - defaultRMTSimpleRequestInstance = [[RMTSimpleRequest alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultRMTSimpleRequestInstance; -} -- (instancetype) defaultInstance { - return defaultRMTSimpleRequestInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasResponseType) { - [output writeEnum:1 value:self.responseType]; - } - if (self.hasResponseSize) { - [output writeInt32:2 value:self.responseSize]; - } - if (self.hasPayload) { - [output writeMessage:3 value:self.payload]; - } - if (self.hasFillUsername) { - [output writeBool:4 value:self.fillUsername]; - } - if (self.hasFillOauthScope) { - [output writeBool:5 value:self.fillOauthScope]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasResponseType) { - size_ += computeEnumSize(1, self.responseType); - } - if (self.hasResponseSize) { - size_ += computeInt32Size(2, self.responseSize); - } - if (self.hasPayload) { - size_ += computeMessageSize(3, self.payload); - } - if (self.hasFillUsername) { - size_ += computeBoolSize(4, self.fillUsername); - } - if (self.hasFillOauthScope) { - size_ += computeBoolSize(5, self.fillOauthScope); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (RMTSimpleRequest*) parseFromData:(NSData*) data { - return (RMTSimpleRequest*)[[[RMTSimpleRequest builder] mergeFromData:data] build]; -} -+ (RMTSimpleRequest*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTSimpleRequest*)[[[RMTSimpleRequest builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (RMTSimpleRequest*) parseFromInputStream:(NSInputStream*) input { - return (RMTSimpleRequest*)[[[RMTSimpleRequest builder] mergeFromInputStream:input] build]; -} -+ (RMTSimpleRequest*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTSimpleRequest*)[[[RMTSimpleRequest builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTSimpleRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (RMTSimpleRequest*)[[[RMTSimpleRequest builder] mergeFromCodedInputStream:input] build]; -} -+ (RMTSimpleRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTSimpleRequest*)[[[RMTSimpleRequest builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTSimpleRequestBuilder*) builder { - return [[RMTSimpleRequestBuilder alloc] init]; -} -+ (RMTSimpleRequestBuilder*) builderWithPrototype:(RMTSimpleRequest*) prototype { - return [[RMTSimpleRequest builder] mergeFrom:prototype]; -} -- (RMTSimpleRequestBuilder*) builder { - return [RMTSimpleRequest builder]; -} -- (RMTSimpleRequestBuilder*) toBuilder { - return [RMTSimpleRequest builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasResponseType) { - [output appendFormat:@"%@%@: %@\n", indent, @"responseType", NSStringFromRMTPayloadType(self.responseType)]; - } - if (self.hasResponseSize) { - [output appendFormat:@"%@%@: %@\n", indent, @"responseSize", [NSNumber numberWithInteger:self.responseSize]]; - } - if (self.hasPayload) { - [output appendFormat:@"%@%@ {\n", indent, @"payload"]; - [self.payload writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasFillUsername) { - [output appendFormat:@"%@%@: %@\n", indent, @"fillUsername", [NSNumber numberWithBool:self.fillUsername]]; - } - if (self.hasFillOauthScope) { - [output appendFormat:@"%@%@: %@\n", indent, @"fillOauthScope", [NSNumber numberWithBool:self.fillOauthScope]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[RMTSimpleRequest class]]) { - return NO; - } - RMTSimpleRequest *otherMessage = other; - return - self.hasResponseType == otherMessage.hasResponseType && - (!self.hasResponseType || self.responseType == otherMessage.responseType) && - self.hasResponseSize == otherMessage.hasResponseSize && - (!self.hasResponseSize || self.responseSize == otherMessage.responseSize) && - self.hasPayload == otherMessage.hasPayload && - (!self.hasPayload || [self.payload isEqual:otherMessage.payload]) && - self.hasFillUsername == otherMessage.hasFillUsername && - (!self.hasFillUsername || self.fillUsername == otherMessage.fillUsername) && - self.hasFillOauthScope == otherMessage.hasFillOauthScope && - (!self.hasFillOauthScope || self.fillOauthScope == otherMessage.fillOauthScope) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasResponseType) { - hashCode = hashCode * 31 + self.responseType; - } - if (self.hasResponseSize) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.responseSize] hash]; - } - if (self.hasPayload) { - hashCode = hashCode * 31 + [self.payload hash]; - } - if (self.hasFillUsername) { - hashCode = hashCode * 31 + [[NSNumber numberWithBool:self.fillUsername] hash]; - } - if (self.hasFillOauthScope) { - hashCode = hashCode * 31 + [[NSNumber numberWithBool:self.fillOauthScope] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface RMTSimpleRequestBuilder() -@property (strong) RMTSimpleRequest* resultSimpleRequest; -@end - -@implementation RMTSimpleRequestBuilder -@synthesize resultSimpleRequest; -- (instancetype) init { - if ((self = [super init])) { - self.resultSimpleRequest = [[RMTSimpleRequest alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultSimpleRequest; -} -- (RMTSimpleRequestBuilder*) clear { - self.resultSimpleRequest = [[RMTSimpleRequest alloc] init]; - return self; -} -- (RMTSimpleRequestBuilder*) clone { - return [RMTSimpleRequest builderWithPrototype:resultSimpleRequest]; -} -- (RMTSimpleRequest*) defaultInstance { - return [RMTSimpleRequest defaultInstance]; -} -- (RMTSimpleRequest*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (RMTSimpleRequest*) buildPartial { - RMTSimpleRequest* returnMe = resultSimpleRequest; - self.resultSimpleRequest = nil; - return returnMe; -} -- (RMTSimpleRequestBuilder*) mergeFrom:(RMTSimpleRequest*) other { - if (other == [RMTSimpleRequest defaultInstance]) { - return self; - } - if (other.hasResponseType) { - [self setResponseType:other.responseType]; - } - if (other.hasResponseSize) { - [self setResponseSize:other.responseSize]; - } - if (other.hasPayload) { - [self mergePayload:other.payload]; - } - if (other.hasFillUsername) { - [self setFillUsername:other.fillUsername]; - } - if (other.hasFillOauthScope) { - [self setFillOauthScope:other.fillOauthScope]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (RMTSimpleRequestBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (RMTSimpleRequestBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - RMTPayloadType value = (RMTPayloadType)[input readEnum]; - if (RMTPayloadTypeIsValidValue(value)) { - [self setResponseType:value]; - } else { - [unknownFields mergeVarintField:1 value:value]; - } - break; - } - case 16: { - [self setResponseSize:[input readInt32]]; - break; - } - case 26: { - RMTPayloadBuilder* subBuilder = [RMTPayload builder]; - if (self.hasPayload) { - [subBuilder mergeFrom:self.payload]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setPayload:[subBuilder buildPartial]]; - break; - } - case 32: { - [self setFillUsername:[input readBool]]; - break; - } - case 40: { - [self setFillOauthScope:[input readBool]]; - break; - } - } - } -} -- (BOOL) hasResponseType { - return resultSimpleRequest.hasResponseType; -} -- (RMTPayloadType) responseType { - return resultSimpleRequest.responseType; -} -- (RMTSimpleRequestBuilder*) setResponseType:(RMTPayloadType) value { - resultSimpleRequest.hasResponseType = YES; - resultSimpleRequest.responseType = value; - return self; -} -- (RMTSimpleRequestBuilder*) clearResponseType { - resultSimpleRequest.hasResponseType = NO; - resultSimpleRequest.responseType = RMTPayloadTypeCompressable; - return self; -} -- (BOOL) hasResponseSize { - return resultSimpleRequest.hasResponseSize; -} -- (SInt32) responseSize { - return resultSimpleRequest.responseSize; -} -- (RMTSimpleRequestBuilder*) setResponseSize:(SInt32) value { - resultSimpleRequest.hasResponseSize = YES; - resultSimpleRequest.responseSize = value; - return self; -} -- (RMTSimpleRequestBuilder*) clearResponseSize { - resultSimpleRequest.hasResponseSize = NO; - resultSimpleRequest.responseSize = 0; - return self; -} -- (BOOL) hasPayload { - return resultSimpleRequest.hasPayload; -} -- (RMTPayload*) payload { - return resultSimpleRequest.payload; -} -- (RMTSimpleRequestBuilder*) setPayload:(RMTPayload*) value { - resultSimpleRequest.hasPayload = YES; - resultSimpleRequest.payload = value; - return self; -} -- (RMTSimpleRequestBuilder*) setPayloadBuilder:(RMTPayloadBuilder*) builderForValue { - return [self setPayload:[builderForValue build]]; -} -- (RMTSimpleRequestBuilder*) mergePayload:(RMTPayload*) value { - if (resultSimpleRequest.hasPayload && - resultSimpleRequest.payload != [RMTPayload defaultInstance]) { - resultSimpleRequest.payload = - [[[RMTPayload builderWithPrototype:resultSimpleRequest.payload] mergeFrom:value] buildPartial]; - } else { - resultSimpleRequest.payload = value; - } - resultSimpleRequest.hasPayload = YES; - return self; -} -- (RMTSimpleRequestBuilder*) clearPayload { - resultSimpleRequest.hasPayload = NO; - resultSimpleRequest.payload = [RMTPayload defaultInstance]; - return self; -} -- (BOOL) hasFillUsername { - return resultSimpleRequest.hasFillUsername; -} -- (BOOL) fillUsername { - return resultSimpleRequest.fillUsername; -} -- (RMTSimpleRequestBuilder*) setFillUsername:(BOOL) value { - resultSimpleRequest.hasFillUsername = YES; - resultSimpleRequest.fillUsername = value; - return self; -} -- (RMTSimpleRequestBuilder*) clearFillUsername { - resultSimpleRequest.hasFillUsername = NO; - resultSimpleRequest.fillUsername = NO; - return self; -} -- (BOOL) hasFillOauthScope { - return resultSimpleRequest.hasFillOauthScope; -} -- (BOOL) fillOauthScope { - return resultSimpleRequest.fillOauthScope; -} -- (RMTSimpleRequestBuilder*) setFillOauthScope:(BOOL) value { - resultSimpleRequest.hasFillOauthScope = YES; - resultSimpleRequest.fillOauthScope = value; - return self; -} -- (RMTSimpleRequestBuilder*) clearFillOauthScope { - resultSimpleRequest.hasFillOauthScope = NO; - resultSimpleRequest.fillOauthScope = NO; - return self; -} -@end - -@interface RMTSimpleResponse () -@property (strong) RMTPayload* payload; -@property (strong) NSString* username; -@property (strong) NSString* oauthScope; -@end - -@implementation RMTSimpleResponse - -- (BOOL) hasPayload { - return !!hasPayload_; -} -- (void) setHasPayload:(BOOL) _value_ { - hasPayload_ = !!_value_; -} -@synthesize payload; -- (BOOL) hasUsername { - return !!hasUsername_; -} -- (void) setHasUsername:(BOOL) _value_ { - hasUsername_ = !!_value_; -} -@synthesize username; -- (BOOL) hasOauthScope { - return !!hasOauthScope_; -} -- (void) setHasOauthScope:(BOOL) _value_ { - hasOauthScope_ = !!_value_; -} -@synthesize oauthScope; -- (instancetype) init { - if ((self = [super init])) { - self.payload = [RMTPayload defaultInstance]; - self.username = @""; - self.oauthScope = @""; - } - return self; -} -static RMTSimpleResponse* defaultRMTSimpleResponseInstance = nil; -+ (void) initialize { - if (self == [RMTSimpleResponse class]) { - defaultRMTSimpleResponseInstance = [[RMTSimpleResponse alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultRMTSimpleResponseInstance; -} -- (instancetype) defaultInstance { - return defaultRMTSimpleResponseInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasPayload) { - [output writeMessage:1 value:self.payload]; - } - if (self.hasUsername) { - [output writeString:2 value:self.username]; - } - if (self.hasOauthScope) { - [output writeString:3 value:self.oauthScope]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasPayload) { - size_ += computeMessageSize(1, self.payload); - } - if (self.hasUsername) { - size_ += computeStringSize(2, self.username); - } - if (self.hasOauthScope) { - size_ += computeStringSize(3, self.oauthScope); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (RMTSimpleResponse*) parseFromData:(NSData*) data { - return (RMTSimpleResponse*)[[[RMTSimpleResponse builder] mergeFromData:data] build]; -} -+ (RMTSimpleResponse*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTSimpleResponse*)[[[RMTSimpleResponse builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (RMTSimpleResponse*) parseFromInputStream:(NSInputStream*) input { - return (RMTSimpleResponse*)[[[RMTSimpleResponse builder] mergeFromInputStream:input] build]; -} -+ (RMTSimpleResponse*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTSimpleResponse*)[[[RMTSimpleResponse builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTSimpleResponse*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (RMTSimpleResponse*)[[[RMTSimpleResponse builder] mergeFromCodedInputStream:input] build]; -} -+ (RMTSimpleResponse*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTSimpleResponse*)[[[RMTSimpleResponse builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTSimpleResponseBuilder*) builder { - return [[RMTSimpleResponseBuilder alloc] init]; -} -+ (RMTSimpleResponseBuilder*) builderWithPrototype:(RMTSimpleResponse*) prototype { - return [[RMTSimpleResponse builder] mergeFrom:prototype]; -} -- (RMTSimpleResponseBuilder*) builder { - return [RMTSimpleResponse builder]; -} -- (RMTSimpleResponseBuilder*) toBuilder { - return [RMTSimpleResponse builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasPayload) { - [output appendFormat:@"%@%@ {\n", indent, @"payload"]; - [self.payload writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasUsername) { - [output appendFormat:@"%@%@: %@\n", indent, @"username", self.username]; - } - if (self.hasOauthScope) { - [output appendFormat:@"%@%@: %@\n", indent, @"oauthScope", self.oauthScope]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[RMTSimpleResponse class]]) { - return NO; - } - RMTSimpleResponse *otherMessage = other; - return - self.hasPayload == otherMessage.hasPayload && - (!self.hasPayload || [self.payload isEqual:otherMessage.payload]) && - self.hasUsername == otherMessage.hasUsername && - (!self.hasUsername || [self.username isEqual:otherMessage.username]) && - self.hasOauthScope == otherMessage.hasOauthScope && - (!self.hasOauthScope || [self.oauthScope isEqual:otherMessage.oauthScope]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasPayload) { - hashCode = hashCode * 31 + [self.payload hash]; - } - if (self.hasUsername) { - hashCode = hashCode * 31 + [self.username hash]; - } - if (self.hasOauthScope) { - hashCode = hashCode * 31 + [self.oauthScope hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface RMTSimpleResponseBuilder() -@property (strong) RMTSimpleResponse* resultSimpleResponse; -@end - -@implementation RMTSimpleResponseBuilder -@synthesize resultSimpleResponse; -- (instancetype) init { - if ((self = [super init])) { - self.resultSimpleResponse = [[RMTSimpleResponse alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultSimpleResponse; -} -- (RMTSimpleResponseBuilder*) clear { - self.resultSimpleResponse = [[RMTSimpleResponse alloc] init]; - return self; -} -- (RMTSimpleResponseBuilder*) clone { - return [RMTSimpleResponse builderWithPrototype:resultSimpleResponse]; -} -- (RMTSimpleResponse*) defaultInstance { - return [RMTSimpleResponse defaultInstance]; -} -- (RMTSimpleResponse*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (RMTSimpleResponse*) buildPartial { - RMTSimpleResponse* returnMe = resultSimpleResponse; - self.resultSimpleResponse = nil; - return returnMe; -} -- (RMTSimpleResponseBuilder*) mergeFrom:(RMTSimpleResponse*) other { - if (other == [RMTSimpleResponse defaultInstance]) { - return self; - } - if (other.hasPayload) { - [self mergePayload:other.payload]; - } - if (other.hasUsername) { - [self setUsername:other.username]; - } - if (other.hasOauthScope) { - [self setOauthScope:other.oauthScope]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (RMTSimpleResponseBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (RMTSimpleResponseBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - RMTPayloadBuilder* subBuilder = [RMTPayload builder]; - if (self.hasPayload) { - [subBuilder mergeFrom:self.payload]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setPayload:[subBuilder buildPartial]]; - break; - } - case 18: { - [self setUsername:[input readString]]; - break; - } - case 26: { - [self setOauthScope:[input readString]]; - break; - } - } - } -} -- (BOOL) hasPayload { - return resultSimpleResponse.hasPayload; -} -- (RMTPayload*) payload { - return resultSimpleResponse.payload; -} -- (RMTSimpleResponseBuilder*) setPayload:(RMTPayload*) value { - resultSimpleResponse.hasPayload = YES; - resultSimpleResponse.payload = value; - return self; -} -- (RMTSimpleResponseBuilder*) setPayloadBuilder:(RMTPayloadBuilder*) builderForValue { - return [self setPayload:[builderForValue build]]; -} -- (RMTSimpleResponseBuilder*) mergePayload:(RMTPayload*) value { - if (resultSimpleResponse.hasPayload && - resultSimpleResponse.payload != [RMTPayload defaultInstance]) { - resultSimpleResponse.payload = - [[[RMTPayload builderWithPrototype:resultSimpleResponse.payload] mergeFrom:value] buildPartial]; - } else { - resultSimpleResponse.payload = value; - } - resultSimpleResponse.hasPayload = YES; - return self; -} -- (RMTSimpleResponseBuilder*) clearPayload { - resultSimpleResponse.hasPayload = NO; - resultSimpleResponse.payload = [RMTPayload defaultInstance]; - return self; -} -- (BOOL) hasUsername { - return resultSimpleResponse.hasUsername; -} -- (NSString*) username { - return resultSimpleResponse.username; -} -- (RMTSimpleResponseBuilder*) setUsername:(NSString*) value { - resultSimpleResponse.hasUsername = YES; - resultSimpleResponse.username = value; - return self; -} -- (RMTSimpleResponseBuilder*) clearUsername { - resultSimpleResponse.hasUsername = NO; - resultSimpleResponse.username = @""; - return self; -} -- (BOOL) hasOauthScope { - return resultSimpleResponse.hasOauthScope; -} -- (NSString*) oauthScope { - return resultSimpleResponse.oauthScope; -} -- (RMTSimpleResponseBuilder*) setOauthScope:(NSString*) value { - resultSimpleResponse.hasOauthScope = YES; - resultSimpleResponse.oauthScope = value; - return self; -} -- (RMTSimpleResponseBuilder*) clearOauthScope { - resultSimpleResponse.hasOauthScope = NO; - resultSimpleResponse.oauthScope = @""; - return self; -} -@end - -@interface RMTStreamingInputCallRequest () -@property (strong) RMTPayload* payload; -@end - -@implementation RMTStreamingInputCallRequest - -- (BOOL) hasPayload { - return !!hasPayload_; -} -- (void) setHasPayload:(BOOL) _value_ { - hasPayload_ = !!_value_; -} -@synthesize payload; -- (instancetype) init { - if ((self = [super init])) { - self.payload = [RMTPayload defaultInstance]; - } - return self; -} -static RMTStreamingInputCallRequest* defaultRMTStreamingInputCallRequestInstance = nil; -+ (void) initialize { - if (self == [RMTStreamingInputCallRequest class]) { - defaultRMTStreamingInputCallRequestInstance = [[RMTStreamingInputCallRequest alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultRMTStreamingInputCallRequestInstance; -} -- (instancetype) defaultInstance { - return defaultRMTStreamingInputCallRequestInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasPayload) { - [output writeMessage:1 value:self.payload]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasPayload) { - size_ += computeMessageSize(1, self.payload); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (RMTStreamingInputCallRequest*) parseFromData:(NSData*) data { - return (RMTStreamingInputCallRequest*)[[[RMTStreamingInputCallRequest builder] mergeFromData:data] build]; -} -+ (RMTStreamingInputCallRequest*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTStreamingInputCallRequest*)[[[RMTStreamingInputCallRequest builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (RMTStreamingInputCallRequest*) parseFromInputStream:(NSInputStream*) input { - return (RMTStreamingInputCallRequest*)[[[RMTStreamingInputCallRequest builder] mergeFromInputStream:input] build]; -} -+ (RMTStreamingInputCallRequest*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTStreamingInputCallRequest*)[[[RMTStreamingInputCallRequest builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTStreamingInputCallRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (RMTStreamingInputCallRequest*)[[[RMTStreamingInputCallRequest builder] mergeFromCodedInputStream:input] build]; -} -+ (RMTStreamingInputCallRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTStreamingInputCallRequest*)[[[RMTStreamingInputCallRequest builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTStreamingInputCallRequestBuilder*) builder { - return [[RMTStreamingInputCallRequestBuilder alloc] init]; -} -+ (RMTStreamingInputCallRequestBuilder*) builderWithPrototype:(RMTStreamingInputCallRequest*) prototype { - return [[RMTStreamingInputCallRequest builder] mergeFrom:prototype]; -} -- (RMTStreamingInputCallRequestBuilder*) builder { - return [RMTStreamingInputCallRequest builder]; -} -- (RMTStreamingInputCallRequestBuilder*) toBuilder { - return [RMTStreamingInputCallRequest builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasPayload) { - [output appendFormat:@"%@%@ {\n", indent, @"payload"]; - [self.payload writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[RMTStreamingInputCallRequest class]]) { - return NO; - } - RMTStreamingInputCallRequest *otherMessage = other; - return - self.hasPayload == otherMessage.hasPayload && - (!self.hasPayload || [self.payload isEqual:otherMessage.payload]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasPayload) { - hashCode = hashCode * 31 + [self.payload hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface RMTStreamingInputCallRequestBuilder() -@property (strong) RMTStreamingInputCallRequest* resultStreamingInputCallRequest; -@end - -@implementation RMTStreamingInputCallRequestBuilder -@synthesize resultStreamingInputCallRequest; -- (instancetype) init { - if ((self = [super init])) { - self.resultStreamingInputCallRequest = [[RMTStreamingInputCallRequest alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultStreamingInputCallRequest; -} -- (RMTStreamingInputCallRequestBuilder*) clear { - self.resultStreamingInputCallRequest = [[RMTStreamingInputCallRequest alloc] init]; - return self; -} -- (RMTStreamingInputCallRequestBuilder*) clone { - return [RMTStreamingInputCallRequest builderWithPrototype:resultStreamingInputCallRequest]; -} -- (RMTStreamingInputCallRequest*) defaultInstance { - return [RMTStreamingInputCallRequest defaultInstance]; -} -- (RMTStreamingInputCallRequest*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (RMTStreamingInputCallRequest*) buildPartial { - RMTStreamingInputCallRequest* returnMe = resultStreamingInputCallRequest; - self.resultStreamingInputCallRequest = nil; - return returnMe; -} -- (RMTStreamingInputCallRequestBuilder*) mergeFrom:(RMTStreamingInputCallRequest*) other { - if (other == [RMTStreamingInputCallRequest defaultInstance]) { - return self; - } - if (other.hasPayload) { - [self mergePayload:other.payload]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (RMTStreamingInputCallRequestBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (RMTStreamingInputCallRequestBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - RMTPayloadBuilder* subBuilder = [RMTPayload builder]; - if (self.hasPayload) { - [subBuilder mergeFrom:self.payload]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setPayload:[subBuilder buildPartial]]; - break; - } - } - } -} -- (BOOL) hasPayload { - return resultStreamingInputCallRequest.hasPayload; -} -- (RMTPayload*) payload { - return resultStreamingInputCallRequest.payload; -} -- (RMTStreamingInputCallRequestBuilder*) setPayload:(RMTPayload*) value { - resultStreamingInputCallRequest.hasPayload = YES; - resultStreamingInputCallRequest.payload = value; - return self; -} -- (RMTStreamingInputCallRequestBuilder*) setPayloadBuilder:(RMTPayloadBuilder*) builderForValue { - return [self setPayload:[builderForValue build]]; -} -- (RMTStreamingInputCallRequestBuilder*) mergePayload:(RMTPayload*) value { - if (resultStreamingInputCallRequest.hasPayload && - resultStreamingInputCallRequest.payload != [RMTPayload defaultInstance]) { - resultStreamingInputCallRequest.payload = - [[[RMTPayload builderWithPrototype:resultStreamingInputCallRequest.payload] mergeFrom:value] buildPartial]; - } else { - resultStreamingInputCallRequest.payload = value; - } - resultStreamingInputCallRequest.hasPayload = YES; - return self; -} -- (RMTStreamingInputCallRequestBuilder*) clearPayload { - resultStreamingInputCallRequest.hasPayload = NO; - resultStreamingInputCallRequest.payload = [RMTPayload defaultInstance]; - return self; -} -@end - -@interface RMTStreamingInputCallResponse () -@property SInt32 aggregatedPayloadSize; -@end - -@implementation RMTStreamingInputCallResponse - -- (BOOL) hasAggregatedPayloadSize { - return !!hasAggregatedPayloadSize_; -} -- (void) setHasAggregatedPayloadSize:(BOOL) _value_ { - hasAggregatedPayloadSize_ = !!_value_; -} -@synthesize aggregatedPayloadSize; -- (instancetype) init { - if ((self = [super init])) { - self.aggregatedPayloadSize = 0; - } - return self; -} -static RMTStreamingInputCallResponse* defaultRMTStreamingInputCallResponseInstance = nil; -+ (void) initialize { - if (self == [RMTStreamingInputCallResponse class]) { - defaultRMTStreamingInputCallResponseInstance = [[RMTStreamingInputCallResponse alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultRMTStreamingInputCallResponseInstance; -} -- (instancetype) defaultInstance { - return defaultRMTStreamingInputCallResponseInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasAggregatedPayloadSize) { - [output writeInt32:1 value:self.aggregatedPayloadSize]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasAggregatedPayloadSize) { - size_ += computeInt32Size(1, self.aggregatedPayloadSize); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (RMTStreamingInputCallResponse*) parseFromData:(NSData*) data { - return (RMTStreamingInputCallResponse*)[[[RMTStreamingInputCallResponse builder] mergeFromData:data] build]; -} -+ (RMTStreamingInputCallResponse*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTStreamingInputCallResponse*)[[[RMTStreamingInputCallResponse builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (RMTStreamingInputCallResponse*) parseFromInputStream:(NSInputStream*) input { - return (RMTStreamingInputCallResponse*)[[[RMTStreamingInputCallResponse builder] mergeFromInputStream:input] build]; -} -+ (RMTStreamingInputCallResponse*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTStreamingInputCallResponse*)[[[RMTStreamingInputCallResponse builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTStreamingInputCallResponse*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (RMTStreamingInputCallResponse*)[[[RMTStreamingInputCallResponse builder] mergeFromCodedInputStream:input] build]; -} -+ (RMTStreamingInputCallResponse*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTStreamingInputCallResponse*)[[[RMTStreamingInputCallResponse builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTStreamingInputCallResponseBuilder*) builder { - return [[RMTStreamingInputCallResponseBuilder alloc] init]; -} -+ (RMTStreamingInputCallResponseBuilder*) builderWithPrototype:(RMTStreamingInputCallResponse*) prototype { - return [[RMTStreamingInputCallResponse builder] mergeFrom:prototype]; -} -- (RMTStreamingInputCallResponseBuilder*) builder { - return [RMTStreamingInputCallResponse builder]; -} -- (RMTStreamingInputCallResponseBuilder*) toBuilder { - return [RMTStreamingInputCallResponse builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasAggregatedPayloadSize) { - [output appendFormat:@"%@%@: %@\n", indent, @"aggregatedPayloadSize", [NSNumber numberWithInteger:self.aggregatedPayloadSize]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[RMTStreamingInputCallResponse class]]) { - return NO; - } - RMTStreamingInputCallResponse *otherMessage = other; - return - self.hasAggregatedPayloadSize == otherMessage.hasAggregatedPayloadSize && - (!self.hasAggregatedPayloadSize || self.aggregatedPayloadSize == otherMessage.aggregatedPayloadSize) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasAggregatedPayloadSize) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.aggregatedPayloadSize] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface RMTStreamingInputCallResponseBuilder() -@property (strong) RMTStreamingInputCallResponse* resultStreamingInputCallResponse; -@end - -@implementation RMTStreamingInputCallResponseBuilder -@synthesize resultStreamingInputCallResponse; -- (instancetype) init { - if ((self = [super init])) { - self.resultStreamingInputCallResponse = [[RMTStreamingInputCallResponse alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultStreamingInputCallResponse; -} -- (RMTStreamingInputCallResponseBuilder*) clear { - self.resultStreamingInputCallResponse = [[RMTStreamingInputCallResponse alloc] init]; - return self; -} -- (RMTStreamingInputCallResponseBuilder*) clone { - return [RMTStreamingInputCallResponse builderWithPrototype:resultStreamingInputCallResponse]; -} -- (RMTStreamingInputCallResponse*) defaultInstance { - return [RMTStreamingInputCallResponse defaultInstance]; -} -- (RMTStreamingInputCallResponse*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (RMTStreamingInputCallResponse*) buildPartial { - RMTStreamingInputCallResponse* returnMe = resultStreamingInputCallResponse; - self.resultStreamingInputCallResponse = nil; - return returnMe; -} -- (RMTStreamingInputCallResponseBuilder*) mergeFrom:(RMTStreamingInputCallResponse*) other { - if (other == [RMTStreamingInputCallResponse defaultInstance]) { - return self; - } - if (other.hasAggregatedPayloadSize) { - [self setAggregatedPayloadSize:other.aggregatedPayloadSize]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (RMTStreamingInputCallResponseBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (RMTStreamingInputCallResponseBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - [self setAggregatedPayloadSize:[input readInt32]]; - break; - } - } - } -} -- (BOOL) hasAggregatedPayloadSize { - return resultStreamingInputCallResponse.hasAggregatedPayloadSize; -} -- (SInt32) aggregatedPayloadSize { - return resultStreamingInputCallResponse.aggregatedPayloadSize; -} -- (RMTStreamingInputCallResponseBuilder*) setAggregatedPayloadSize:(SInt32) value { - resultStreamingInputCallResponse.hasAggregatedPayloadSize = YES; - resultStreamingInputCallResponse.aggregatedPayloadSize = value; - return self; -} -- (RMTStreamingInputCallResponseBuilder*) clearAggregatedPayloadSize { - resultStreamingInputCallResponse.hasAggregatedPayloadSize = NO; - resultStreamingInputCallResponse.aggregatedPayloadSize = 0; - return self; -} -@end - -@interface RMTResponseParameters () -@property SInt32 size; -@property SInt32 intervalUs; -@end - -@implementation RMTResponseParameters - -- (BOOL) hasSize { - return !!hasSize_; -} -- (void) setHasSize:(BOOL) _value_ { - hasSize_ = !!_value_; -} -@synthesize size; -- (BOOL) hasIntervalUs { - return !!hasIntervalUs_; -} -- (void) setHasIntervalUs:(BOOL) _value_ { - hasIntervalUs_ = !!_value_; -} -@synthesize intervalUs; -- (instancetype) init { - if ((self = [super init])) { - self.size = 0; - self.intervalUs = 0; - } - return self; -} -static RMTResponseParameters* defaultRMTResponseParametersInstance = nil; -+ (void) initialize { - if (self == [RMTResponseParameters class]) { - defaultRMTResponseParametersInstance = [[RMTResponseParameters alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultRMTResponseParametersInstance; -} -- (instancetype) defaultInstance { - return defaultRMTResponseParametersInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasSize) { - [output writeInt32:1 value:self.size]; - } - if (self.hasIntervalUs) { - [output writeInt32:2 value:self.intervalUs]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasSize) { - size_ += computeInt32Size(1, self.size); - } - if (self.hasIntervalUs) { - size_ += computeInt32Size(2, self.intervalUs); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (RMTResponseParameters*) parseFromData:(NSData*) data { - return (RMTResponseParameters*)[[[RMTResponseParameters builder] mergeFromData:data] build]; -} -+ (RMTResponseParameters*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTResponseParameters*)[[[RMTResponseParameters builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (RMTResponseParameters*) parseFromInputStream:(NSInputStream*) input { - return (RMTResponseParameters*)[[[RMTResponseParameters builder] mergeFromInputStream:input] build]; -} -+ (RMTResponseParameters*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTResponseParameters*)[[[RMTResponseParameters builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTResponseParameters*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (RMTResponseParameters*)[[[RMTResponseParameters builder] mergeFromCodedInputStream:input] build]; -} -+ (RMTResponseParameters*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTResponseParameters*)[[[RMTResponseParameters builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTResponseParametersBuilder*) builder { - return [[RMTResponseParametersBuilder alloc] init]; -} -+ (RMTResponseParametersBuilder*) builderWithPrototype:(RMTResponseParameters*) prototype { - return [[RMTResponseParameters builder] mergeFrom:prototype]; -} -- (RMTResponseParametersBuilder*) builder { - return [RMTResponseParameters builder]; -} -- (RMTResponseParametersBuilder*) toBuilder { - return [RMTResponseParameters builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasSize) { - [output appendFormat:@"%@%@: %@\n", indent, @"size", [NSNumber numberWithInteger:self.size]]; - } - if (self.hasIntervalUs) { - [output appendFormat:@"%@%@: %@\n", indent, @"intervalUs", [NSNumber numberWithInteger:self.intervalUs]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[RMTResponseParameters class]]) { - return NO; - } - RMTResponseParameters *otherMessage = other; - return - self.hasSize == otherMessage.hasSize && - (!self.hasSize || self.size == otherMessage.size) && - self.hasIntervalUs == otherMessage.hasIntervalUs && - (!self.hasIntervalUs || self.intervalUs == otherMessage.intervalUs) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasSize) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.size] hash]; - } - if (self.hasIntervalUs) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.intervalUs] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface RMTResponseParametersBuilder() -@property (strong) RMTResponseParameters* resultResponseParameters; -@end - -@implementation RMTResponseParametersBuilder -@synthesize resultResponseParameters; -- (instancetype) init { - if ((self = [super init])) { - self.resultResponseParameters = [[RMTResponseParameters alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultResponseParameters; -} -- (RMTResponseParametersBuilder*) clear { - self.resultResponseParameters = [[RMTResponseParameters alloc] init]; - return self; -} -- (RMTResponseParametersBuilder*) clone { - return [RMTResponseParameters builderWithPrototype:resultResponseParameters]; -} -- (RMTResponseParameters*) defaultInstance { - return [RMTResponseParameters defaultInstance]; -} -- (RMTResponseParameters*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (RMTResponseParameters*) buildPartial { - RMTResponseParameters* returnMe = resultResponseParameters; - self.resultResponseParameters = nil; - return returnMe; -} -- (RMTResponseParametersBuilder*) mergeFrom:(RMTResponseParameters*) other { - if (other == [RMTResponseParameters defaultInstance]) { - return self; - } - if (other.hasSize) { - [self setSize:other.size]; - } - if (other.hasIntervalUs) { - [self setIntervalUs:other.intervalUs]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (RMTResponseParametersBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (RMTResponseParametersBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - [self setSize:[input readInt32]]; - break; - } - case 16: { - [self setIntervalUs:[input readInt32]]; - break; - } - } - } -} -- (BOOL) hasSize { - return resultResponseParameters.hasSize; -} -- (SInt32) size { - return resultResponseParameters.size; -} -- (RMTResponseParametersBuilder*) setSize:(SInt32) value { - resultResponseParameters.hasSize = YES; - resultResponseParameters.size = value; - return self; -} -- (RMTResponseParametersBuilder*) clearSize { - resultResponseParameters.hasSize = NO; - resultResponseParameters.size = 0; - return self; -} -- (BOOL) hasIntervalUs { - return resultResponseParameters.hasIntervalUs; -} -- (SInt32) intervalUs { - return resultResponseParameters.intervalUs; -} -- (RMTResponseParametersBuilder*) setIntervalUs:(SInt32) value { - resultResponseParameters.hasIntervalUs = YES; - resultResponseParameters.intervalUs = value; - return self; -} -- (RMTResponseParametersBuilder*) clearIntervalUs { - resultResponseParameters.hasIntervalUs = NO; - resultResponseParameters.intervalUs = 0; - return self; -} -@end - -@interface RMTStreamingOutputCallRequest () -@property RMTPayloadType responseType; -@property (strong) NSMutableArray * responseParametersArray; -@property (strong) RMTPayload* payload; -@end - -@implementation RMTStreamingOutputCallRequest - -- (BOOL) hasResponseType { - return !!hasResponseType_; -} -- (void) setHasResponseType:(BOOL) _value_ { - hasResponseType_ = !!_value_; -} -@synthesize responseType; -@synthesize responseParametersArray; -@dynamic responseParameters; -- (BOOL) hasPayload { - return !!hasPayload_; -} -- (void) setHasPayload:(BOOL) _value_ { - hasPayload_ = !!_value_; -} -@synthesize payload; -- (instancetype) init { - if ((self = [super init])) { - self.responseType = RMTPayloadTypeCompressable; - self.payload = [RMTPayload defaultInstance]; - } - return self; -} -static RMTStreamingOutputCallRequest* defaultRMTStreamingOutputCallRequestInstance = nil; -+ (void) initialize { - if (self == [RMTStreamingOutputCallRequest class]) { - defaultRMTStreamingOutputCallRequestInstance = [[RMTStreamingOutputCallRequest alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultRMTStreamingOutputCallRequestInstance; -} -- (instancetype) defaultInstance { - return defaultRMTStreamingOutputCallRequestInstance; -} -- (NSArray *)responseParameters { - return responseParametersArray; -} -- (RMTResponseParameters*)responseParametersAtIndex:(NSUInteger)index { - return [responseParametersArray objectAtIndex:index]; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasResponseType) { - [output writeEnum:1 value:self.responseType]; - } - [self.responseParametersArray enumerateObjectsUsingBlock:^(RMTResponseParameters *element, NSUInteger idx, BOOL *stop) { - [output writeMessage:2 value:element]; - }]; - if (self.hasPayload) { - [output writeMessage:3 value:self.payload]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasResponseType) { - size_ += computeEnumSize(1, self.responseType); - } - [self.responseParametersArray enumerateObjectsUsingBlock:^(RMTResponseParameters *element, NSUInteger idx, BOOL *stop) { - size_ += computeMessageSize(2, element); - }]; - if (self.hasPayload) { - size_ += computeMessageSize(3, self.payload); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (RMTStreamingOutputCallRequest*) parseFromData:(NSData*) data { - return (RMTStreamingOutputCallRequest*)[[[RMTStreamingOutputCallRequest builder] mergeFromData:data] build]; -} -+ (RMTStreamingOutputCallRequest*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTStreamingOutputCallRequest*)[[[RMTStreamingOutputCallRequest builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (RMTStreamingOutputCallRequest*) parseFromInputStream:(NSInputStream*) input { - return (RMTStreamingOutputCallRequest*)[[[RMTStreamingOutputCallRequest builder] mergeFromInputStream:input] build]; -} -+ (RMTStreamingOutputCallRequest*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTStreamingOutputCallRequest*)[[[RMTStreamingOutputCallRequest builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTStreamingOutputCallRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (RMTStreamingOutputCallRequest*)[[[RMTStreamingOutputCallRequest builder] mergeFromCodedInputStream:input] build]; -} -+ (RMTStreamingOutputCallRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTStreamingOutputCallRequest*)[[[RMTStreamingOutputCallRequest builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTStreamingOutputCallRequestBuilder*) builder { - return [[RMTStreamingOutputCallRequestBuilder alloc] init]; -} -+ (RMTStreamingOutputCallRequestBuilder*) builderWithPrototype:(RMTStreamingOutputCallRequest*) prototype { - return [[RMTStreamingOutputCallRequest builder] mergeFrom:prototype]; -} -- (RMTStreamingOutputCallRequestBuilder*) builder { - return [RMTStreamingOutputCallRequest builder]; -} -- (RMTStreamingOutputCallRequestBuilder*) toBuilder { - return [RMTStreamingOutputCallRequest builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasResponseType) { - [output appendFormat:@"%@%@: %@\n", indent, @"responseType", NSStringFromRMTPayloadType(self.responseType)]; - } - [self.responseParametersArray enumerateObjectsUsingBlock:^(RMTResponseParameters *element, NSUInteger idx, BOOL *stop) { - [output appendFormat:@"%@%@ {\n", indent, @"responseParameters"]; - [element writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - }]; - if (self.hasPayload) { - [output appendFormat:@"%@%@ {\n", indent, @"payload"]; - [self.payload writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[RMTStreamingOutputCallRequest class]]) { - return NO; - } - RMTStreamingOutputCallRequest *otherMessage = other; - return - self.hasResponseType == otherMessage.hasResponseType && - (!self.hasResponseType || self.responseType == otherMessage.responseType) && - [self.responseParametersArray isEqualToArray:otherMessage.responseParametersArray] && - self.hasPayload == otherMessage.hasPayload && - (!self.hasPayload || [self.payload isEqual:otherMessage.payload]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasResponseType) { - hashCode = hashCode * 31 + self.responseType; - } - [self.responseParametersArray enumerateObjectsUsingBlock:^(RMTResponseParameters *element, NSUInteger idx, BOOL *stop) { - hashCode = hashCode * 31 + [element hash]; - }]; - if (self.hasPayload) { - hashCode = hashCode * 31 + [self.payload hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface RMTStreamingOutputCallRequestBuilder() -@property (strong) RMTStreamingOutputCallRequest* resultStreamingOutputCallRequest; -@end - -@implementation RMTStreamingOutputCallRequestBuilder -@synthesize resultStreamingOutputCallRequest; -- (instancetype) init { - if ((self = [super init])) { - self.resultStreamingOutputCallRequest = [[RMTStreamingOutputCallRequest alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultStreamingOutputCallRequest; -} -- (RMTStreamingOutputCallRequestBuilder*) clear { - self.resultStreamingOutputCallRequest = [[RMTStreamingOutputCallRequest alloc] init]; - return self; -} -- (RMTStreamingOutputCallRequestBuilder*) clone { - return [RMTStreamingOutputCallRequest builderWithPrototype:resultStreamingOutputCallRequest]; -} -- (RMTStreamingOutputCallRequest*) defaultInstance { - return [RMTStreamingOutputCallRequest defaultInstance]; -} -- (RMTStreamingOutputCallRequest*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (RMTStreamingOutputCallRequest*) buildPartial { - RMTStreamingOutputCallRequest* returnMe = resultStreamingOutputCallRequest; - self.resultStreamingOutputCallRequest = nil; - return returnMe; -} -- (RMTStreamingOutputCallRequestBuilder*) mergeFrom:(RMTStreamingOutputCallRequest*) other { - if (other == [RMTStreamingOutputCallRequest defaultInstance]) { - return self; - } - if (other.hasResponseType) { - [self setResponseType:other.responseType]; - } - if (other.responseParametersArray.count > 0) { - if (resultStreamingOutputCallRequest.responseParametersArray == nil) { - resultStreamingOutputCallRequest.responseParametersArray = [[NSMutableArray alloc] initWithArray:other.responseParametersArray]; - } else { - [resultStreamingOutputCallRequest.responseParametersArray addObjectsFromArray:other.responseParametersArray]; - } - } - if (other.hasPayload) { - [self mergePayload:other.payload]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (RMTStreamingOutputCallRequestBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (RMTStreamingOutputCallRequestBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - RMTPayloadType value = (RMTPayloadType)[input readEnum]; - if (RMTPayloadTypeIsValidValue(value)) { - [self setResponseType:value]; - } else { - [unknownFields mergeVarintField:1 value:value]; - } - break; - } - case 18: { - RMTResponseParametersBuilder* subBuilder = [RMTResponseParameters builder]; - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self addResponseParameters:[subBuilder buildPartial]]; - break; - } - case 26: { - RMTPayloadBuilder* subBuilder = [RMTPayload builder]; - if (self.hasPayload) { - [subBuilder mergeFrom:self.payload]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setPayload:[subBuilder buildPartial]]; - break; - } - } - } -} -- (BOOL) hasResponseType { - return resultStreamingOutputCallRequest.hasResponseType; -} -- (RMTPayloadType) responseType { - return resultStreamingOutputCallRequest.responseType; -} -- (RMTStreamingOutputCallRequestBuilder*) setResponseType:(RMTPayloadType) value { - resultStreamingOutputCallRequest.hasResponseType = YES; - resultStreamingOutputCallRequest.responseType = value; - return self; -} -- (RMTStreamingOutputCallRequestBuilder*) clearResponseType { - resultStreamingOutputCallRequest.hasResponseType = NO; - resultStreamingOutputCallRequest.responseType = RMTPayloadTypeCompressable; - return self; -} -- (NSMutableArray *)responseParameters { - return resultStreamingOutputCallRequest.responseParametersArray; -} -- (RMTResponseParameters*)responseParametersAtIndex:(NSUInteger)index { - return [resultStreamingOutputCallRequest responseParametersAtIndex:index]; -} -- (RMTStreamingOutputCallRequestBuilder *)addResponseParameters:(RMTResponseParameters*)value { - if (resultStreamingOutputCallRequest.responseParametersArray == nil) { - resultStreamingOutputCallRequest.responseParametersArray = [[NSMutableArray alloc]init]; - } - [resultStreamingOutputCallRequest.responseParametersArray addObject:value]; - return self; -} -- (RMTStreamingOutputCallRequestBuilder *)setResponseParametersArray:(NSArray *)array { - resultStreamingOutputCallRequest.responseParametersArray = [[NSMutableArray alloc]initWithArray:array]; - return self; -} -- (RMTStreamingOutputCallRequestBuilder *)clearResponseParameters { - resultStreamingOutputCallRequest.responseParametersArray = nil; - return self; -} -- (BOOL) hasPayload { - return resultStreamingOutputCallRequest.hasPayload; -} -- (RMTPayload*) payload { - return resultStreamingOutputCallRequest.payload; -} -- (RMTStreamingOutputCallRequestBuilder*) setPayload:(RMTPayload*) value { - resultStreamingOutputCallRequest.hasPayload = YES; - resultStreamingOutputCallRequest.payload = value; - return self; -} -- (RMTStreamingOutputCallRequestBuilder*) setPayloadBuilder:(RMTPayloadBuilder*) builderForValue { - return [self setPayload:[builderForValue build]]; -} -- (RMTStreamingOutputCallRequestBuilder*) mergePayload:(RMTPayload*) value { - if (resultStreamingOutputCallRequest.hasPayload && - resultStreamingOutputCallRequest.payload != [RMTPayload defaultInstance]) { - resultStreamingOutputCallRequest.payload = - [[[RMTPayload builderWithPrototype:resultStreamingOutputCallRequest.payload] mergeFrom:value] buildPartial]; - } else { - resultStreamingOutputCallRequest.payload = value; - } - resultStreamingOutputCallRequest.hasPayload = YES; - return self; -} -- (RMTStreamingOutputCallRequestBuilder*) clearPayload { - resultStreamingOutputCallRequest.hasPayload = NO; - resultStreamingOutputCallRequest.payload = [RMTPayload defaultInstance]; - return self; -} -@end - -@interface RMTStreamingOutputCallResponse () -@property (strong) RMTPayload* payload; -@end - -@implementation RMTStreamingOutputCallResponse - -- (BOOL) hasPayload { - return !!hasPayload_; -} -- (void) setHasPayload:(BOOL) _value_ { - hasPayload_ = !!_value_; -} -@synthesize payload; -- (instancetype) init { - if ((self = [super init])) { - self.payload = [RMTPayload defaultInstance]; - } - return self; -} -static RMTStreamingOutputCallResponse* defaultRMTStreamingOutputCallResponseInstance = nil; -+ (void) initialize { - if (self == [RMTStreamingOutputCallResponse class]) { - defaultRMTStreamingOutputCallResponseInstance = [[RMTStreamingOutputCallResponse alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultRMTStreamingOutputCallResponseInstance; -} -- (instancetype) defaultInstance { - return defaultRMTStreamingOutputCallResponseInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasPayload) { - [output writeMessage:1 value:self.payload]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasPayload) { - size_ += computeMessageSize(1, self.payload); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (RMTStreamingOutputCallResponse*) parseFromData:(NSData*) data { - return (RMTStreamingOutputCallResponse*)[[[RMTStreamingOutputCallResponse builder] mergeFromData:data] build]; -} -+ (RMTStreamingOutputCallResponse*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTStreamingOutputCallResponse*)[[[RMTStreamingOutputCallResponse builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (RMTStreamingOutputCallResponse*) parseFromInputStream:(NSInputStream*) input { - return (RMTStreamingOutputCallResponse*)[[[RMTStreamingOutputCallResponse builder] mergeFromInputStream:input] build]; -} -+ (RMTStreamingOutputCallResponse*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTStreamingOutputCallResponse*)[[[RMTStreamingOutputCallResponse builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTStreamingOutputCallResponse*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (RMTStreamingOutputCallResponse*)[[[RMTStreamingOutputCallResponse builder] mergeFromCodedInputStream:input] build]; -} -+ (RMTStreamingOutputCallResponse*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RMTStreamingOutputCallResponse*)[[[RMTStreamingOutputCallResponse builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RMTStreamingOutputCallResponseBuilder*) builder { - return [[RMTStreamingOutputCallResponseBuilder alloc] init]; -} -+ (RMTStreamingOutputCallResponseBuilder*) builderWithPrototype:(RMTStreamingOutputCallResponse*) prototype { - return [[RMTStreamingOutputCallResponse builder] mergeFrom:prototype]; -} -- (RMTStreamingOutputCallResponseBuilder*) builder { - return [RMTStreamingOutputCallResponse builder]; -} -- (RMTStreamingOutputCallResponseBuilder*) toBuilder { - return [RMTStreamingOutputCallResponse builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasPayload) { - [output appendFormat:@"%@%@ {\n", indent, @"payload"]; - [self.payload writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[RMTStreamingOutputCallResponse class]]) { - return NO; - } - RMTStreamingOutputCallResponse *otherMessage = other; - return - self.hasPayload == otherMessage.hasPayload && - (!self.hasPayload || [self.payload isEqual:otherMessage.payload]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasPayload) { - hashCode = hashCode * 31 + [self.payload hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface RMTStreamingOutputCallResponseBuilder() -@property (strong) RMTStreamingOutputCallResponse* resultStreamingOutputCallResponse; -@end - -@implementation RMTStreamingOutputCallResponseBuilder -@synthesize resultStreamingOutputCallResponse; -- (instancetype) init { - if ((self = [super init])) { - self.resultStreamingOutputCallResponse = [[RMTStreamingOutputCallResponse alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultStreamingOutputCallResponse; -} -- (RMTStreamingOutputCallResponseBuilder*) clear { - self.resultStreamingOutputCallResponse = [[RMTStreamingOutputCallResponse alloc] init]; - return self; -} -- (RMTStreamingOutputCallResponseBuilder*) clone { - return [RMTStreamingOutputCallResponse builderWithPrototype:resultStreamingOutputCallResponse]; -} -- (RMTStreamingOutputCallResponse*) defaultInstance { - return [RMTStreamingOutputCallResponse defaultInstance]; -} -- (RMTStreamingOutputCallResponse*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (RMTStreamingOutputCallResponse*) buildPartial { - RMTStreamingOutputCallResponse* returnMe = resultStreamingOutputCallResponse; - self.resultStreamingOutputCallResponse = nil; - return returnMe; -} -- (RMTStreamingOutputCallResponseBuilder*) mergeFrom:(RMTStreamingOutputCallResponse*) other { - if (other == [RMTStreamingOutputCallResponse defaultInstance]) { - return self; - } - if (other.hasPayload) { - [self mergePayload:other.payload]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (RMTStreamingOutputCallResponseBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (RMTStreamingOutputCallResponseBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - RMTPayloadBuilder* subBuilder = [RMTPayload builder]; - if (self.hasPayload) { - [subBuilder mergeFrom:self.payload]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setPayload:[subBuilder buildPartial]]; - break; - } - } - } -} -- (BOOL) hasPayload { - return resultStreamingOutputCallResponse.hasPayload; -} -- (RMTPayload*) payload { - return resultStreamingOutputCallResponse.payload; -} -- (RMTStreamingOutputCallResponseBuilder*) setPayload:(RMTPayload*) value { - resultStreamingOutputCallResponse.hasPayload = YES; - resultStreamingOutputCallResponse.payload = value; - return self; -} -- (RMTStreamingOutputCallResponseBuilder*) setPayloadBuilder:(RMTPayloadBuilder*) builderForValue { - return [self setPayload:[builderForValue build]]; -} -- (RMTStreamingOutputCallResponseBuilder*) mergePayload:(RMTPayload*) value { - if (resultStreamingOutputCallResponse.hasPayload && - resultStreamingOutputCallResponse.payload != [RMTPayload defaultInstance]) { - resultStreamingOutputCallResponse.payload = - [[[RMTPayload builderWithPrototype:resultStreamingOutputCallResponse.payload] mergeFrom:value] buildPartial]; - } else { - resultStreamingOutputCallResponse.payload = value; - } - resultStreamingOutputCallResponse.hasPayload = YES; - return self; -} -- (RMTStreamingOutputCallResponseBuilder*) clearPayload { - resultStreamingOutputCallResponse.hasPayload = NO; - resultStreamingOutputCallResponse.payload = [RMTPayload defaultInstance]; - return self; -} -@end - - -// @@protoc_insertion_point(global_scope) diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Messages.pbobjc.h b/src/objective-c/examples/Sample/RemoteTestClient/Messages.pbobjc.h new file mode 100644 index 0000000000..5f32314175 --- /dev/null +++ b/src/objective-c/examples/Sample/RemoteTestClient/Messages.pbobjc.h @@ -0,0 +1,221 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: messages.proto + +#import "GPBProtocolBuffers.h" + +#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000 +#error This file was generated by a different version of protoc-gen-objc which is incompatible with your Protocol Buffer sources. +#endif + +CF_EXTERN_C_BEGIN + +@class RMTPayload; +@class RMTResponseParameters; +@class RMTSimpleRequest; +@class RMTSimpleResponse; +@class RMTStreamingInputCallRequest; +@class RMTStreamingInputCallResponse; +@class RMTStreamingOutputCallRequest; +@class RMTStreamingOutputCallResponse; + +#pragma mark - Enum RMTPayloadType + +// The type of payload that should be returned. +typedef GPB_ENUM(RMTPayloadType) { + RMTPayloadType_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, + // Compressable text format. + RMTPayloadType_Compressable = 0, + + // Uncompressable binary format. + RMTPayloadType_Uncompressable = 1, + + // Randomly chosen from all other formats defined in this enum. + RMTPayloadType_Random = 2, +}; + +GPBEnumDescriptor *RMTPayloadType_EnumDescriptor(void); + +BOOL RMTPayloadType_IsValidValue(int32_t value); + + +#pragma mark - RMTMessagesRoot + +@interface RMTMessagesRoot : GPBRootObject +@end + +#pragma mark - RMTPayload + +typedef GPB_ENUM(RMTPayload_FieldNumber) { + RMTPayload_FieldNumber_Type = 1, + RMTPayload_FieldNumber_Body = 2, +}; + +// A block of data, to simply increase gRPC message size. +@interface RMTPayload : GPBMessage + +// The type of data in body. +@property(nonatomic, readwrite) RMTPayloadType type; + +// Primary contents of payload. +@property(nonatomic, readwrite, copy) NSData *body; + +@end + +int32_t RMTPayload_Type_RawValue(RMTPayload *message); +void SetRMTPayload_Type_RawValue(RMTPayload *message, int32_t value); + +#pragma mark - RMTSimpleRequest + +typedef GPB_ENUM(RMTSimpleRequest_FieldNumber) { + RMTSimpleRequest_FieldNumber_ResponseType = 1, + RMTSimpleRequest_FieldNumber_ResponseSize = 2, + RMTSimpleRequest_FieldNumber_Payload = 3, + RMTSimpleRequest_FieldNumber_FillUsername = 4, + RMTSimpleRequest_FieldNumber_FillOauthScope = 5, +}; + +// Unary request. +@interface RMTSimpleRequest : GPBMessage + +// Desired payload type in the response from the server. +// If response_type is RANDOM, server randomly chooses one from other formats. +@property(nonatomic, readwrite) RMTPayloadType responseType; + +// Desired payload size in the response from the server. +// If response_type is COMPRESSABLE, this denotes the size before compression. +@property(nonatomic, readwrite) int32_t responseSize; + +// Optional input payload sent along with the request. +@property(nonatomic, readwrite) BOOL hasPayload; +@property(nonatomic, readwrite, strong) RMTPayload *payload; + +// Whether SimpleResponse should include username. +@property(nonatomic, readwrite) BOOL fillUsername; + +// Whether SimpleResponse should include OAuth scope. +@property(nonatomic, readwrite) BOOL fillOauthScope; + +@end + +int32_t RMTSimpleRequest_ResponseType_RawValue(RMTSimpleRequest *message); +void SetRMTSimpleRequest_ResponseType_RawValue(RMTSimpleRequest *message, int32_t value); + +#pragma mark - RMTSimpleResponse + +typedef GPB_ENUM(RMTSimpleResponse_FieldNumber) { + RMTSimpleResponse_FieldNumber_Payload = 1, + RMTSimpleResponse_FieldNumber_Username = 2, + RMTSimpleResponse_FieldNumber_OauthScope = 3, +}; + +// Unary response, as configured by the request. +@interface RMTSimpleResponse : GPBMessage + +// Payload to increase message size. +@property(nonatomic, readwrite) BOOL hasPayload; +@property(nonatomic, readwrite, strong) RMTPayload *payload; + +// The user the request came from, for verifying authentication was +// successful when the client expected it. +@property(nonatomic, readwrite, copy) NSString *username; + +// OAuth scope. +@property(nonatomic, readwrite, copy) NSString *oauthScope; + +@end + +#pragma mark - RMTStreamingInputCallRequest + +typedef GPB_ENUM(RMTStreamingInputCallRequest_FieldNumber) { + RMTStreamingInputCallRequest_FieldNumber_Payload = 1, +}; + +// Client-streaming request. +@interface RMTStreamingInputCallRequest : GPBMessage + +// Optional input payload sent along with the request. +@property(nonatomic, readwrite) BOOL hasPayload; +@property(nonatomic, readwrite, strong) RMTPayload *payload; + +@end + +#pragma mark - RMTStreamingInputCallResponse + +typedef GPB_ENUM(RMTStreamingInputCallResponse_FieldNumber) { + RMTStreamingInputCallResponse_FieldNumber_AggregatedPayloadSize = 1, +}; + +// Client-streaming response. +@interface RMTStreamingInputCallResponse : GPBMessage + +// Aggregated size of payloads received from the client. +@property(nonatomic, readwrite) int32_t aggregatedPayloadSize; + +@end + +#pragma mark - RMTResponseParameters + +typedef GPB_ENUM(RMTResponseParameters_FieldNumber) { + RMTResponseParameters_FieldNumber_Size = 1, + RMTResponseParameters_FieldNumber_IntervalUs = 2, +}; + +// Configuration for a particular response. +@interface RMTResponseParameters : GPBMessage + +// Desired payload sizes in responses from the server. +// If response_type is COMPRESSABLE, this denotes the size before compression. +@property(nonatomic, readwrite) int32_t size; + +// Desired interval between consecutive responses in the response stream in +// microseconds. +@property(nonatomic, readwrite) int32_t intervalUs; + +@end + +#pragma mark - RMTStreamingOutputCallRequest + +typedef GPB_ENUM(RMTStreamingOutputCallRequest_FieldNumber) { + RMTStreamingOutputCallRequest_FieldNumber_ResponseType = 1, + RMTStreamingOutputCallRequest_FieldNumber_ResponseParametersArray = 2, + RMTStreamingOutputCallRequest_FieldNumber_Payload = 3, +}; + +// Server-streaming request. +@interface RMTStreamingOutputCallRequest : GPBMessage + +// Desired payload type in the response from the server. +// If response_type is RANDOM, the payload from each response in the stream +// might be of different types. This is to simulate a mixed type of payload +// stream. +@property(nonatomic, readwrite) RMTPayloadType responseType; + +// Configuration for each expected response message. +// |responseParametersArray| contains |RMTResponseParameters| +@property(nonatomic, readwrite, strong) NSMutableArray *responseParametersArray; + +// Optional input payload sent along with the request. +@property(nonatomic, readwrite) BOOL hasPayload; +@property(nonatomic, readwrite, strong) RMTPayload *payload; + +@end + +int32_t RMTStreamingOutputCallRequest_ResponseType_RawValue(RMTStreamingOutputCallRequest *message); +void SetRMTStreamingOutputCallRequest_ResponseType_RawValue(RMTStreamingOutputCallRequest *message, int32_t value); + +#pragma mark - RMTStreamingOutputCallResponse + +typedef GPB_ENUM(RMTStreamingOutputCallResponse_FieldNumber) { + RMTStreamingOutputCallResponse_FieldNumber_Payload = 1, +}; + +// Server-streaming response, as configured by the request and parameters. +@interface RMTStreamingOutputCallResponse : GPBMessage + +// Payload to increase response size. +@property(nonatomic, readwrite) BOOL hasPayload; +@property(nonatomic, readwrite, strong) RMTPayload *payload; + +@end + +CF_EXTERN_C_END diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Messages.pbobjc.m b/src/objective-c/examples/Sample/RemoteTestClient/Messages.pbobjc.m new file mode 100644 index 0000000000..98eb1dc87c --- /dev/null +++ b/src/objective-c/examples/Sample/RemoteTestClient/Messages.pbobjc.m @@ -0,0 +1,603 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: messages.proto + +#import "GPBProtocolBuffers_RuntimeSupport.h" + +#import "Messages.pbobjc.h" + +#pragma mark - RMTMessagesRoot + +@implementation RMTMessagesRoot + +@end + +static GPBFileDescriptor *RMTMessagesRoot_FileDescriptor(void) { + // This is called by +initialize so there is no need to worry + // about thread safety of the singleton. + static GPBFileDescriptor *descriptor = NULL; + if (!descriptor) { + descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"grpc.testing" + syntax:GPBFileSyntaxProto3]; + } + return descriptor; +} + +#pragma mark - Enum RMTPayloadType + +GPBEnumDescriptor *RMTPayloadType_EnumDescriptor(void) { + static GPBEnumDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageEnumValueDescription values[] = { + { .name = "Compressable", .number = RMTPayloadType_Compressable }, + { .name = "Uncompressable", .number = RMTPayloadType_Uncompressable }, + { .name = "Random", .number = RMTPayloadType_Random }, + }; + descriptor = [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(RMTPayloadType) + values:values + valueCount:sizeof(values) / sizeof(GPBMessageEnumValueDescription) + enumVerifier:RMTPayloadType_IsValidValue]; + } + return descriptor; +} + +BOOL RMTPayloadType_IsValidValue(int32_t value__) { + switch (value__) { + case RMTPayloadType_Compressable: + case RMTPayloadType_Uncompressable: + case RMTPayloadType_Random: + return YES; + default: + return NO; + } +} + +#pragma mark - RMTPayload + +@implementation RMTPayload + +@dynamic type; +@dynamic body; + +typedef struct RMTPayload_Storage { + uint32_t _has_storage_[1]; + RMTPayloadType type; + NSData *body; +} RMTPayload_Storage; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "type", + .number = RMTPayload_FieldNumber_Type, + .hasIndex = 0, + .flags = GPBFieldOptional | GPBFieldHasEnumDescriptor, + .type = GPBTypeEnum, + .offset = offsetof(RMTPayload_Storage, type), + .defaultValue.valueEnum = RMTPayloadType_Compressable, + .typeSpecific.enumDescFunc = RMTPayloadType_EnumDescriptor, + .fieldOptions = NULL, + }, + { + .name = "body", + .number = RMTPayload_FieldNumber_Body, + .hasIndex = 1, + .flags = GPBFieldOptional, + .type = GPBTypeData, + .offset = offsetof(RMTPayload_Storage, body), + .defaultValue.valueData = nil, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + }; + descriptor = [GPBDescriptor allocDescriptorForClass:[RMTPayload class] + rootClass:[RMTMessagesRoot class] + file:RMTMessagesRoot_FileDescriptor() + fields:fields + fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) + oneofs:NULL + oneofCount:0 + enums:NULL + enumCount:0 + ranges:NULL + rangeCount:0 + storageSize:sizeof(RMTPayload_Storage) + wireFormat:NO]; + } + return descriptor; +} + +@end + +int32_t RMTPayload_Type_RawValue(RMTPayload *message) { + GPBDescriptor *descriptor = [RMTPayload descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:RMTPayload_FieldNumber_Type]; + return GPBGetInt32IvarWithField(message, field); +} + +void SetRMTPayload_Type_RawValue(RMTPayload *message, int32_t value) { + GPBDescriptor *descriptor = [RMTPayload descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:RMTPayload_FieldNumber_Type]; + GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); +} + +#pragma mark - RMTSimpleRequest + +@implementation RMTSimpleRequest + +@dynamic responseType; +@dynamic responseSize; +@dynamic hasPayload, payload; +@dynamic fillUsername; +@dynamic fillOauthScope; + +typedef struct RMTSimpleRequest_Storage { + uint32_t _has_storage_[1]; + BOOL fillUsername; + BOOL fillOauthScope; + RMTPayloadType responseType; + int32_t responseSize; + RMTPayload *payload; +} RMTSimpleRequest_Storage; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "responseType", + .number = RMTSimpleRequest_FieldNumber_ResponseType, + .hasIndex = 0, + .flags = GPBFieldOptional | GPBFieldHasEnumDescriptor, + .type = GPBTypeEnum, + .offset = offsetof(RMTSimpleRequest_Storage, responseType), + .defaultValue.valueEnum = RMTPayloadType_Compressable, + .typeSpecific.enumDescFunc = RMTPayloadType_EnumDescriptor, + .fieldOptions = NULL, + }, + { + .name = "responseSize", + .number = RMTSimpleRequest_FieldNumber_ResponseSize, + .hasIndex = 1, + .flags = GPBFieldOptional, + .type = GPBTypeInt32, + .offset = offsetof(RMTSimpleRequest_Storage, responseSize), + .defaultValue.valueInt32 = 0, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + { + .name = "payload", + .number = RMTSimpleRequest_FieldNumber_Payload, + .hasIndex = 2, + .flags = GPBFieldOptional, + .type = GPBTypeMessage, + .offset = offsetof(RMTSimpleRequest_Storage, payload), + .defaultValue.valueMessage = nil, + .typeSpecific.className = GPBStringifySymbol(RMTPayload), + .fieldOptions = NULL, + }, + { + .name = "fillUsername", + .number = RMTSimpleRequest_FieldNumber_FillUsername, + .hasIndex = 3, + .flags = GPBFieldOptional, + .type = GPBTypeBool, + .offset = offsetof(RMTSimpleRequest_Storage, fillUsername), + .defaultValue.valueBool = NO, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + { + .name = "fillOauthScope", + .number = RMTSimpleRequest_FieldNumber_FillOauthScope, + .hasIndex = 4, + .flags = GPBFieldOptional, + .type = GPBTypeBool, + .offset = offsetof(RMTSimpleRequest_Storage, fillOauthScope), + .defaultValue.valueBool = NO, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + }; + descriptor = [GPBDescriptor allocDescriptorForClass:[RMTSimpleRequest class] + rootClass:[RMTMessagesRoot class] + file:RMTMessagesRoot_FileDescriptor() + fields:fields + fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) + oneofs:NULL + oneofCount:0 + enums:NULL + enumCount:0 + ranges:NULL + rangeCount:0 + storageSize:sizeof(RMTSimpleRequest_Storage) + wireFormat:NO]; + } + return descriptor; +} + +@end + +int32_t RMTSimpleRequest_ResponseType_RawValue(RMTSimpleRequest *message) { + GPBDescriptor *descriptor = [RMTSimpleRequest descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:RMTSimpleRequest_FieldNumber_ResponseType]; + return GPBGetInt32IvarWithField(message, field); +} + +void SetRMTSimpleRequest_ResponseType_RawValue(RMTSimpleRequest *message, int32_t value) { + GPBDescriptor *descriptor = [RMTSimpleRequest descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:RMTSimpleRequest_FieldNumber_ResponseType]; + GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); +} + +#pragma mark - RMTSimpleResponse + +@implementation RMTSimpleResponse + +@dynamic hasPayload, payload; +@dynamic username; +@dynamic oauthScope; + +typedef struct RMTSimpleResponse_Storage { + uint32_t _has_storage_[1]; + RMTPayload *payload; + NSString *username; + NSString *oauthScope; +} RMTSimpleResponse_Storage; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "payload", + .number = RMTSimpleResponse_FieldNumber_Payload, + .hasIndex = 0, + .flags = GPBFieldOptional, + .type = GPBTypeMessage, + .offset = offsetof(RMTSimpleResponse_Storage, payload), + .defaultValue.valueMessage = nil, + .typeSpecific.className = GPBStringifySymbol(RMTPayload), + .fieldOptions = NULL, + }, + { + .name = "username", + .number = RMTSimpleResponse_FieldNumber_Username, + .hasIndex = 1, + .flags = GPBFieldOptional, + .type = GPBTypeString, + .offset = offsetof(RMTSimpleResponse_Storage, username), + .defaultValue.valueString = nil, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + { + .name = "oauthScope", + .number = RMTSimpleResponse_FieldNumber_OauthScope, + .hasIndex = 2, + .flags = GPBFieldOptional, + .type = GPBTypeString, + .offset = offsetof(RMTSimpleResponse_Storage, oauthScope), + .defaultValue.valueString = nil, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + }; + descriptor = [GPBDescriptor allocDescriptorForClass:[RMTSimpleResponse class] + rootClass:[RMTMessagesRoot class] + file:RMTMessagesRoot_FileDescriptor() + fields:fields + fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) + oneofs:NULL + oneofCount:0 + enums:NULL + enumCount:0 + ranges:NULL + rangeCount:0 + storageSize:sizeof(RMTSimpleResponse_Storage) + wireFormat:NO]; + } + return descriptor; +} + +@end + +#pragma mark - RMTStreamingInputCallRequest + +@implementation RMTStreamingInputCallRequest + +@dynamic hasPayload, payload; + +typedef struct RMTStreamingInputCallRequest_Storage { + uint32_t _has_storage_[1]; + RMTPayload *payload; +} RMTStreamingInputCallRequest_Storage; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "payload", + .number = RMTStreamingInputCallRequest_FieldNumber_Payload, + .hasIndex = 0, + .flags = GPBFieldOptional, + .type = GPBTypeMessage, + .offset = offsetof(RMTStreamingInputCallRequest_Storage, payload), + .defaultValue.valueMessage = nil, + .typeSpecific.className = GPBStringifySymbol(RMTPayload), + .fieldOptions = NULL, + }, + }; + descriptor = [GPBDescriptor allocDescriptorForClass:[RMTStreamingInputCallRequest class] + rootClass:[RMTMessagesRoot class] + file:RMTMessagesRoot_FileDescriptor() + fields:fields + fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) + oneofs:NULL + oneofCount:0 + enums:NULL + enumCount:0 + ranges:NULL + rangeCount:0 + storageSize:sizeof(RMTStreamingInputCallRequest_Storage) + wireFormat:NO]; + } + return descriptor; +} + +@end + +#pragma mark - RMTStreamingInputCallResponse + +@implementation RMTStreamingInputCallResponse + +@dynamic aggregatedPayloadSize; + +typedef struct RMTStreamingInputCallResponse_Storage { + uint32_t _has_storage_[1]; + int32_t aggregatedPayloadSize; +} RMTStreamingInputCallResponse_Storage; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "aggregatedPayloadSize", + .number = RMTStreamingInputCallResponse_FieldNumber_AggregatedPayloadSize, + .hasIndex = 0, + .flags = GPBFieldOptional, + .type = GPBTypeInt32, + .offset = offsetof(RMTStreamingInputCallResponse_Storage, aggregatedPayloadSize), + .defaultValue.valueInt32 = 0, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + }; + descriptor = [GPBDescriptor allocDescriptorForClass:[RMTStreamingInputCallResponse class] + rootClass:[RMTMessagesRoot class] + file:RMTMessagesRoot_FileDescriptor() + fields:fields + fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) + oneofs:NULL + oneofCount:0 + enums:NULL + enumCount:0 + ranges:NULL + rangeCount:0 + storageSize:sizeof(RMTStreamingInputCallResponse_Storage) + wireFormat:NO]; + } + return descriptor; +} + +@end + +#pragma mark - RMTResponseParameters + +@implementation RMTResponseParameters + +@dynamic size; +@dynamic intervalUs; + +typedef struct RMTResponseParameters_Storage { + uint32_t _has_storage_[1]; + int32_t size; + int32_t intervalUs; +} RMTResponseParameters_Storage; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "size", + .number = RMTResponseParameters_FieldNumber_Size, + .hasIndex = 0, + .flags = GPBFieldOptional, + .type = GPBTypeInt32, + .offset = offsetof(RMTResponseParameters_Storage, size), + .defaultValue.valueInt32 = 0, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + { + .name = "intervalUs", + .number = RMTResponseParameters_FieldNumber_IntervalUs, + .hasIndex = 1, + .flags = GPBFieldOptional, + .type = GPBTypeInt32, + .offset = offsetof(RMTResponseParameters_Storage, intervalUs), + .defaultValue.valueInt32 = 0, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + }; + descriptor = [GPBDescriptor allocDescriptorForClass:[RMTResponseParameters class] + rootClass:[RMTMessagesRoot class] + file:RMTMessagesRoot_FileDescriptor() + fields:fields + fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) + oneofs:NULL + oneofCount:0 + enums:NULL + enumCount:0 + ranges:NULL + rangeCount:0 + storageSize:sizeof(RMTResponseParameters_Storage) + wireFormat:NO]; + } + return descriptor; +} + +@end + +#pragma mark - RMTStreamingOutputCallRequest + +@implementation RMTStreamingOutputCallRequest + +@dynamic responseType; +@dynamic responseParametersArray; +@dynamic hasPayload, payload; + +typedef struct RMTStreamingOutputCallRequest_Storage { + uint32_t _has_storage_[1]; + RMTPayloadType responseType; + NSMutableArray *responseParametersArray; + RMTPayload *payload; +} RMTStreamingOutputCallRequest_Storage; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "responseType", + .number = RMTStreamingOutputCallRequest_FieldNumber_ResponseType, + .hasIndex = 0, + .flags = GPBFieldOptional | GPBFieldHasEnumDescriptor, + .type = GPBTypeEnum, + .offset = offsetof(RMTStreamingOutputCallRequest_Storage, responseType), + .defaultValue.valueEnum = RMTPayloadType_Compressable, + .typeSpecific.enumDescFunc = RMTPayloadType_EnumDescriptor, + .fieldOptions = NULL, + }, + { + .name = "responseParametersArray", + .number = RMTStreamingOutputCallRequest_FieldNumber_ResponseParametersArray, + .hasIndex = GPBNoHasBit, + .flags = GPBFieldRepeated, + .type = GPBTypeMessage, + .offset = offsetof(RMTStreamingOutputCallRequest_Storage, responseParametersArray), + .defaultValue.valueMessage = nil, + .typeSpecific.className = GPBStringifySymbol(RMTResponseParameters), + .fieldOptions = NULL, + }, + { + .name = "payload", + .number = RMTStreamingOutputCallRequest_FieldNumber_Payload, + .hasIndex = 2, + .flags = GPBFieldOptional, + .type = GPBTypeMessage, + .offset = offsetof(RMTStreamingOutputCallRequest_Storage, payload), + .defaultValue.valueMessage = nil, + .typeSpecific.className = GPBStringifySymbol(RMTPayload), + .fieldOptions = NULL, + }, + }; + descriptor = [GPBDescriptor allocDescriptorForClass:[RMTStreamingOutputCallRequest class] + rootClass:[RMTMessagesRoot class] + file:RMTMessagesRoot_FileDescriptor() + fields:fields + fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) + oneofs:NULL + oneofCount:0 + enums:NULL + enumCount:0 + ranges:NULL + rangeCount:0 + storageSize:sizeof(RMTStreamingOutputCallRequest_Storage) + wireFormat:NO]; + } + return descriptor; +} + +@end + +int32_t RMTStreamingOutputCallRequest_ResponseType_RawValue(RMTStreamingOutputCallRequest *message) { + GPBDescriptor *descriptor = [RMTStreamingOutputCallRequest descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:RMTStreamingOutputCallRequest_FieldNumber_ResponseType]; + return GPBGetInt32IvarWithField(message, field); +} + +void SetRMTStreamingOutputCallRequest_ResponseType_RawValue(RMTStreamingOutputCallRequest *message, int32_t value) { + GPBDescriptor *descriptor = [RMTStreamingOutputCallRequest descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:RMTStreamingOutputCallRequest_FieldNumber_ResponseType]; + GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); +} + +#pragma mark - RMTStreamingOutputCallResponse + +@implementation RMTStreamingOutputCallResponse + +@dynamic hasPayload, payload; + +typedef struct RMTStreamingOutputCallResponse_Storage { + uint32_t _has_storage_[1]; + RMTPayload *payload; +} RMTStreamingOutputCallResponse_Storage; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "payload", + .number = RMTStreamingOutputCallResponse_FieldNumber_Payload, + .hasIndex = 0, + .flags = GPBFieldOptional, + .type = GPBTypeMessage, + .offset = offsetof(RMTStreamingOutputCallResponse_Storage, payload), + .defaultValue.valueMessage = nil, + .typeSpecific.className = GPBStringifySymbol(RMTPayload), + .fieldOptions = NULL, + }, + }; + descriptor = [GPBDescriptor allocDescriptorForClass:[RMTStreamingOutputCallResponse class] + rootClass:[RMTMessagesRoot class] + file:RMTMessagesRoot_FileDescriptor() + fields:fields + fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) + oneofs:NULL + oneofCount:0 + enums:NULL + enumCount:0 + ranges:NULL + rangeCount:0 + storageSize:sizeof(RMTStreamingOutputCallResponse_Storage) + wireFormat:NO]; + } + return descriptor; +} + +@end + diff --git a/src/objective-c/examples/Sample/RemoteTestClient/RemoteTest.podspec b/src/objective-c/examples/Sample/RemoteTestClient/RemoteTest.podspec index 7b025ce252..36c2b509e8 100644 --- a/src/objective-c/examples/Sample/RemoteTestClient/RemoteTest.podspec +++ b/src/objective-c/examples/Sample/RemoteTestClient/RemoteTest.podspec @@ -6,13 +6,19 @@ Pod::Spec.new do |s| s.license = 'New BSD' s.authors = { 'Jorge Canizales' => 'jcanizales@google.com' } - s.source_files = '*.pb.{h,m}' - s.public_header_files = '*.pb.h' - - s.platform = :ios s.ios.deployment_target = '6.0' - s.requires_arc = true + s.osx.deployment_target = '10.8' + + s.subspec 'Messages' do |ms| + ms.source_files = '*.pbobjc.{h,m}' + ms.requires_arc = false + ms.dependency 'Protobuf', '~> 3.0' + end - s.dependency 'ProtocolBuffers', '~> 1.9' - s.dependency 'gRPC', '~> 0.0' + s.subspec 'Services' do |ss| + ss.source_files = '*.pbrpc.{h,m}' + ss.requires_arc = true + ss.dependency 'gRPC', '~> 0.0' + ss.dependency 'RemoteTest/Messages' + end end diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.h b/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.h deleted file mode 100644 index b6111b15b8..0000000000 --- a/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.h +++ /dev/null @@ -1,167 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! - -#import <ProtocolBuffers/ProtocolBuffers.h> - -#import "Empty.pb.h" -#import "Messages.pb.h" -#import <gRPC/ProtoService.h> -// @@protoc_insertion_point(imports) - -@class ObjectiveCFileOptions; -@class ObjectiveCFileOptionsBuilder; -@class PBDescriptorProto; -@class PBDescriptorProtoBuilder; -@class PBDescriptorProtoExtensionRange; -@class PBDescriptorProtoExtensionRangeBuilder; -@class PBEnumDescriptorProto; -@class PBEnumDescriptorProtoBuilder; -@class PBEnumOptions; -@class PBEnumOptionsBuilder; -@class PBEnumValueDescriptorProto; -@class PBEnumValueDescriptorProtoBuilder; -@class PBEnumValueOptions; -@class PBEnumValueOptionsBuilder; -@class PBFieldDescriptorProto; -@class PBFieldDescriptorProtoBuilder; -@class PBFieldOptions; -@class PBFieldOptionsBuilder; -@class PBFileDescriptorProto; -@class PBFileDescriptorProtoBuilder; -@class PBFileDescriptorSet; -@class PBFileDescriptorSetBuilder; -@class PBFileOptions; -@class PBFileOptionsBuilder; -@class PBMessageOptions; -@class PBMessageOptionsBuilder; -@class PBMethodDescriptorProto; -@class PBMethodDescriptorProtoBuilder; -@class PBMethodOptions; -@class PBMethodOptionsBuilder; -@class PBOneofDescriptorProto; -@class PBOneofDescriptorProtoBuilder; -@class PBServiceDescriptorProto; -@class PBServiceDescriptorProtoBuilder; -@class PBServiceOptions; -@class PBServiceOptionsBuilder; -@class PBSourceCodeInfo; -@class PBSourceCodeInfoBuilder; -@class PBSourceCodeInfoLocation; -@class PBSourceCodeInfoLocationBuilder; -@class PBUninterpretedOption; -@class PBUninterpretedOptionBuilder; -@class PBUninterpretedOptionNamePart; -@class PBUninterpretedOptionNamePartBuilder; -@class RMTEmpty; -@class RMTEmptyBuilder; -@class RMTPayload; -@class RMTPayloadBuilder; -@class RMTResponseParameters; -@class RMTResponseParametersBuilder; -@class RMTSimpleRequest; -@class RMTSimpleRequestBuilder; -@class RMTSimpleResponse; -@class RMTSimpleResponseBuilder; -@class RMTStreamingInputCallRequest; -@class RMTStreamingInputCallRequestBuilder; -@class RMTStreamingInputCallResponse; -@class RMTStreamingInputCallResponseBuilder; -@class RMTStreamingOutputCallRequest; -@class RMTStreamingOutputCallRequestBuilder; -@class RMTStreamingOutputCallResponse; -@class RMTStreamingOutputCallResponseBuilder; - - - -@interface RMTTestRoot : NSObject { -} -+ (PBExtensionRegistry*) extensionRegistry; -+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry; -@end - - - -@protocol GRXWriteable; -@protocol GRXWriter; - -@protocol RMTTestService <NSObject> - -#pragma mark EmptyCall(grpc.testing.Empty) returns (grpc.testing.Empty) - -// One empty request followed by one empty response. -- (void)emptyCallWithRequest:(RMTEmpty *)request - handler:(void(^)(RMTEmpty *response, NSError *error))handler; - -// Returns a not-yet-started RPC object. -- (ProtoRPC *)RPCToEmptyCallWithRequest:(RMTEmpty *)request - handler:(void(^)(RMTEmpty *response, NSError *error))handler; - - -#pragma mark UnaryCall(SimpleRequest) returns (SimpleResponse) - -// One request followed by one response. -- (void)unaryCallWithRequest:(RMTSimpleRequest *)request - handler:(void(^)(RMTSimpleResponse *response, NSError *error))handler; - -// Returns a not-yet-started RPC object. -- (ProtoRPC *)RPCToUnaryCallWithRequest:(RMTSimpleRequest *)request - handler:(void(^)(RMTSimpleResponse *response, NSError *error))handler; - - -#pragma mark StreamingOutputCall(StreamingOutputCallRequest) returns (stream StreamingOutputCallResponse) - -// One request followed by a sequence of responses (streamed download). -// The server returns the payload with client desired type and sizes. -- (void)streamingOutputCallWithRequest:(RMTStreamingOutputCallRequest *)request - handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler; - -// Returns a not-yet-started RPC object. -- (ProtoRPC *)RPCToStreamingOutputCallWithRequest:(RMTStreamingOutputCallRequest *)request - handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler; - - -#pragma mark StreamingInputCall(stream StreamingInputCallRequest) returns (StreamingInputCallResponse) - -// A sequence of requests followed by one response (streamed upload). -// The server returns the aggregated size of client payload as the result. -- (void)streamingInputCallWithRequestsWriter:(id<GRXWriter>)request - handler:(void(^)(RMTStreamingInputCallResponse *response, NSError *error))handler; - -// Returns a not-yet-started RPC object. -- (ProtoRPC *)RPCToStreamingInputCallWithRequestsWriter:(id<GRXWriter>)request - handler:(void(^)(RMTStreamingInputCallResponse *response, NSError *error))handler; - - -#pragma mark FullDuplexCall(stream StreamingOutputCallRequest) returns (stream StreamingOutputCallResponse) - -// A sequence of requests with each request served by the server immediately. -// As one request could lead to multiple responses, this interface -// demonstrates the idea of full duplexing. -- (void)fullDuplexCallWithRequestsWriter:(id<GRXWriter>)request - handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler; - -// Returns a not-yet-started RPC object. -- (ProtoRPC *)RPCToFullDuplexCallWithRequestsWriter:(id<GRXWriter>)request - handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler; - - -#pragma mark HalfDuplexCall(stream StreamingOutputCallRequest) returns (stream StreamingOutputCallResponse) - -// A sequence of requests followed by a sequence of responses. -// The server buffers all the client requests and then serves them in order. A -// stream of responses are returned to the client when the server starts with -// first request. -- (void)halfDuplexCallWithRequestsWriter:(id<GRXWriter>)request - handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler; - -// Returns a not-yet-started RPC object. -- (ProtoRPC *)RPCToHalfDuplexCallWithRequestsWriter:(id<GRXWriter>)request - handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler; - -@end - -// Basic service implementation, over gRPC, that only does marshalling and parsing. -@interface RMTTestService : ProtoService<RMTTestService> -- (instancetype)initWithHost:(NSString *)host NS_DESIGNATED_INITIALIZER; -@end - -// @@protoc_insertion_point(global_scope) diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.m b/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.m deleted file mode 100644 index 31a3ba3a61..0000000000 --- a/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.m +++ /dev/null @@ -1,163 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! - -#import "Test.pb.h" - -#import <gRPC/GRXWriteable.h> -#import <gRPC/GRXWriter+Immediate.h> -#import <gRPC/ProtoRPC.h> -// @@protoc_insertion_point(imports) - -@implementation RMTTestRoot -static PBExtensionRegistry* extensionRegistry = nil; -+ (PBExtensionRegistry*) extensionRegistry { - return extensionRegistry; -} - -+ (void) initialize { - if (self == [RMTTestRoot class]) { - PBMutableExtensionRegistry* registry = [PBMutableExtensionRegistry registry]; - [self registerAllExtensions:registry]; - [RMTEmptyRoot registerAllExtensions:registry]; - [RMTMessagesRoot registerAllExtensions:registry]; - [ObjectivecDescriptorRoot registerAllExtensions:registry]; - extensionRegistry = registry; - } -} -+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry { -} -@end - - -static NSString *const kPackageName = @"grpc.testing"; -static NSString *const kServiceName = @"TestService"; - -@implementation RMTTestService - -// Designated initializer -- (instancetype)initWithHost:(NSString *)host { - return (self = [super initWithHost:host packageName:kPackageName serviceName:kServiceName]); -} - -- (instancetype)initWithHost:(NSString *)host - packageName:(NSString *)packageName - serviceName:(NSString *)serviceName { - return [self initWithHost:host]; -} - -#pragma mark EmptyCall(grpc.testing.Empty) returns (grpc.testing.Empty) - -// One empty request followed by one empty response. -- (void)emptyCallWithRequest:(RMTEmpty *)request - handler:(void(^)(RMTEmpty *response, NSError *error))handler { - [[self RPCToEmptyCallWithRequest:request handler:handler] start]; -} - -// Returns a not-yet-started RPC object. -- (ProtoRPC *)RPCToEmptyCallWithRequest:(RMTEmpty *)request - handler:(void(^)(RMTEmpty *response, NSError *error))handler { - return [self RPCToMethod:@"EmptyCall" - requestsWriter:[GRXWriter writerWithValue:request] - responseClass:[RMTEmpty class] - responsesWriteable:[GRXWriteable writeableWithSingleValueHandler:handler]]; -} - - -#pragma mark UnaryCall(SimpleRequest) returns (SimpleResponse) - -// One request followed by one response. -- (void)unaryCallWithRequest:(RMTSimpleRequest *)request - handler:(void(^)(RMTSimpleResponse *response, NSError *error))handler { - [[self RPCToUnaryCallWithRequest:request handler:handler] start]; -} - -// Returns a not-yet-started RPC object. -- (ProtoRPC *)RPCToUnaryCallWithRequest:(RMTSimpleRequest *)request - handler:(void(^)(RMTSimpleResponse *response, NSError *error))handler { - return [self RPCToMethod:@"UnaryCall" - requestsWriter:[GRXWriter writerWithValue:request] - responseClass:[RMTSimpleResponse class] - responsesWriteable:[GRXWriteable writeableWithSingleValueHandler:handler]]; -} - - -#pragma mark StreamingOutputCall(StreamingOutputCallRequest) returns (stream StreamingOutputCallResponse) - -// One request followed by a sequence of responses (streamed download). -// The server returns the payload with client desired type and sizes. -- (void)streamingOutputCallWithRequest:(RMTStreamingOutputCallRequest *)request - handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler { - [[self RPCToStreamingOutputCallWithRequest:request handler:handler] start]; -} - -// Returns a not-yet-started RPC object. -- (ProtoRPC *)RPCToStreamingOutputCallWithRequest:(RMTStreamingOutputCallRequest *)request - handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler { - return [self RPCToMethod:@"StreamingOutputCall" - requestsWriter:[GRXWriter writerWithValue:request] - responseClass:[RMTStreamingOutputCallResponse class] - responsesWriteable:[GRXWriteable writeableWithStreamHandler:handler]]; -} - - -#pragma mark StreamingInputCall(stream StreamingInputCallRequest) returns (StreamingInputCallResponse) - -// A sequence of requests followed by one response (streamed upload). -// The server returns the aggregated size of client payload as the result. -- (void)streamingInputCallWithRequestsWriter:(id<GRXWriter>)requestsWriter - handler:(void(^)(RMTStreamingInputCallResponse *response, NSError *error))handler { - [[self RPCToStreamingInputCallWithRequestsWriter:requestsWriter handler:handler] start]; -} - -// Returns a not-yet-started RPC object. -- (ProtoRPC *)RPCToStreamingInputCallWithRequestsWriter:(id<GRXWriter>)requestsWriter - handler:(void(^)(RMTStreamingInputCallResponse *response, NSError *error))handler { - return [self RPCToMethod:@"StreamingInputCall" - requestsWriter:requestsWriter - responseClass:[RMTStreamingInputCallResponse class] - responsesWriteable:[GRXWriteable writeableWithSingleValueHandler:handler]]; -} - - -#pragma mark FullDuplexCall(stream StreamingOutputCallRequest) returns (stream StreamingOutputCallResponse) - -// A sequence of requests with each request served by the server immediately. -// As one request could lead to multiple responses, this interface -// demonstrates the idea of full duplexing. -- (void)fullDuplexCallWithRequestsWriter:(id<GRXWriter>)requestsWriter - handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler { - [[self RPCToFullDuplexCallWithRequestsWriter:requestsWriter handler:handler] start]; -} - -// Returns a not-yet-started RPC object. -- (ProtoRPC *)RPCToFullDuplexCallWithRequestsWriter:(id<GRXWriter>)requestsWriter - handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler { - return [self RPCToMethod:@"FullDuplexCall" - requestsWriter:requestsWriter - responseClass:[RMTStreamingOutputCallResponse class] - responsesWriteable:[GRXWriteable writeableWithStreamHandler:handler]]; -} - - -#pragma mark HalfDuplexCall(stream StreamingOutputCallRequest) returns (stream StreamingOutputCallResponse) - -// A sequence of requests followed by a sequence of responses. -// The server buffers all the client requests and then serves them in order. A -// stream of responses are returned to the client when the server starts with -// first request. -- (void)halfDuplexCallWithRequestsWriter:(id<GRXWriter>)requestsWriter - handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler { - [[self RPCToHalfDuplexCallWithRequestsWriter:requestsWriter handler:handler] start]; -} - -// Returns a not-yet-started RPC object. -- (ProtoRPC *)RPCToHalfDuplexCallWithRequestsWriter:(id<GRXWriter>)requestsWriter - handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler { - return [self RPCToMethod:@"HalfDuplexCall" - requestsWriter:requestsWriter - responseClass:[RMTStreamingOutputCallResponse class] - responsesWriteable:[GRXWriteable writeableWithStreamHandler:handler]]; -} - -@end - -// @@protoc_insertion_point(global_scope) diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Test.pbobjc.h b/src/objective-c/examples/Sample/RemoteTestClient/Test.pbobjc.h new file mode 100644 index 0000000000..aaa0b6ce2d --- /dev/null +++ b/src/objective-c/examples/Sample/RemoteTestClient/Test.pbobjc.h @@ -0,0 +1,12 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: test.proto + +#import "GPBProtocolBuffers.h" + +#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000 +#error This file was generated by a different version of protoc-gen-objc which is incompatible with your Protocol Buffer sources. +#endif + +CF_EXTERN_C_BEGIN + +CF_EXTERN_C_END diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Test.pbobjc.m b/src/objective-c/examples/Sample/RemoteTestClient/Test.pbobjc.m new file mode 100644 index 0000000000..08562b828a --- /dev/null +++ b/src/objective-c/examples/Sample/RemoteTestClient/Test.pbobjc.m @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: test.proto + +// File empty because all messages, extensions and enum have been filtered. + + +// Dummy symbol that will be stripped but will avoid linker warnings about +// no symbols in the .o form compiling this file. +static int RMTTestRoot_dummy __attribute__((unused,used)) = 0; diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Test.pbrpc.h b/src/objective-c/examples/Sample/RemoteTestClient/Test.pbrpc.h new file mode 100644 index 0000000000..f799c4fc92 --- /dev/null +++ b/src/objective-c/examples/Sample/RemoteTestClient/Test.pbrpc.h @@ -0,0 +1,59 @@ +#import "Test.pbobjc.h" +#import <gRPC/ProtoService.h> + +#import "Empty.pbobjc.h" +#import "Messages.pbobjc.h" + +@protocol GRXWriteable; +@protocol GRXWriter; + +@protocol RMTTestService <NSObject> + +#pragma mark EmptyCall(Empty) returns (Empty) + +- (void)emptyCallWithRequest:(RMTEmpty *)request handler:(void(^)(RMTEmpty *response, NSError *error))handler; + +- (ProtoRPC *)RPCToEmptyCallWithRequest:(RMTEmpty *)request handler:(void(^)(RMTEmpty *response, NSError *error))handler; + + +#pragma mark UnaryCall(SimpleRequest) returns (SimpleResponse) + +- (void)unaryCallWithRequest:(RMTSimpleRequest *)request handler:(void(^)(RMTSimpleResponse *response, NSError *error))handler; + +- (ProtoRPC *)RPCToUnaryCallWithRequest:(RMTSimpleRequest *)request handler:(void(^)(RMTSimpleResponse *response, NSError *error))handler; + + +#pragma mark StreamingOutputCall(StreamingOutputCallRequest) returns (stream StreamingOutputCallResponse) + +- (void)streamingOutputCallWithRequest:(RMTStreamingOutputCallRequest *)request handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler; + +- (ProtoRPC *)RPCToStreamingOutputCallWithRequest:(RMTStreamingOutputCallRequest *)request handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler; + + +#pragma mark StreamingInputCall(stream StreamingInputCallRequest) returns (StreamingInputCallResponse) + +- (void)streamingInputCallWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(RMTStreamingInputCallResponse *response, NSError *error))handler; + +- (ProtoRPC *)RPCToStreamingInputCallWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(RMTStreamingInputCallResponse *response, NSError *error))handler; + + +#pragma mark FullDuplexCall(stream StreamingOutputCallRequest) returns (stream StreamingOutputCallResponse) + +- (void)fullDuplexCallWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler; + +- (ProtoRPC *)RPCToFullDuplexCallWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler; + + +#pragma mark HalfDuplexCall(stream StreamingOutputCallRequest) returns (stream StreamingOutputCallResponse) + +- (void)halfDuplexCallWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler; + +- (ProtoRPC *)RPCToHalfDuplexCallWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler; + + +@end + +// Basic service implementation, over gRPC, that only does marshalling and parsing. +@interface RMTTestService : ProtoService<RMTTestService> +- (instancetype)initWithHost:(NSString *)host NS_DESIGNATED_INITIALIZER; +@end diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Test.pbrpc.m b/src/objective-c/examples/Sample/RemoteTestClient/Test.pbrpc.m new file mode 100644 index 0000000000..faba07769e --- /dev/null +++ b/src/objective-c/examples/Sample/RemoteTestClient/Test.pbrpc.m @@ -0,0 +1,96 @@ +#import "Test.pbrpc.h" +#import <gRPC/GRXWriteable.h> +#import <gRPC/GRXWriter+Immediate.h> +#import <gRPC/ProtoRPC.h> + +static NSString *const kPackageName = @"grpc.testing"; +static NSString *const kServiceName = @"TestService"; + +@implementation RMTTestService + +// Designated initializer +- (instancetype)initWithHost:(NSString *)host { + return (self = [super initWithHost:host packageName:kPackageName serviceName:kServiceName]); +} + +// Override superclass initializer to disallow different package and service names. +- (instancetype)initWithHost:(NSString *)host + packageName:(NSString *)packageName + serviceName:(NSString *)serviceName { + return [self initWithHost:host]; +} + + +#pragma mark EmptyCall(Empty) returns (Empty) + +- (void)emptyCallWithRequest:(RMTEmpty *)request handler:(void(^)(RMTEmpty *response, NSError *error))handler{ + [[self RPCToEmptyCallWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (ProtoRPC *)RPCToEmptyCallWithRequest:(RMTEmpty *)request handler:(void(^)(RMTEmpty *response, NSError *error))handler{ + return [self RPCToMethod:@"EmptyCall" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[RMTEmpty class] + responsesWriteable:[GRXWriteable writeableWithSingleValueHandler:handler]]; +} +#pragma mark UnaryCall(SimpleRequest) returns (SimpleResponse) + +- (void)unaryCallWithRequest:(RMTSimpleRequest *)request handler:(void(^)(RMTSimpleResponse *response, NSError *error))handler{ + [[self RPCToUnaryCallWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (ProtoRPC *)RPCToUnaryCallWithRequest:(RMTSimpleRequest *)request handler:(void(^)(RMTSimpleResponse *response, NSError *error))handler{ + return [self RPCToMethod:@"UnaryCall" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[RMTSimpleResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleValueHandler:handler]]; +} +#pragma mark StreamingOutputCall(StreamingOutputCallRequest) returns (stream StreamingOutputCallResponse) + +- (void)streamingOutputCallWithRequest:(RMTStreamingOutputCallRequest *)request handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler{ + [[self RPCToStreamingOutputCallWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (ProtoRPC *)RPCToStreamingOutputCallWithRequest:(RMTStreamingOutputCallRequest *)request handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler{ + return [self RPCToMethod:@"StreamingOutputCall" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[RMTStreamingOutputCallResponse class] + responsesWriteable:[GRXWriteable writeableWithStreamHandler:handler]]; +} +#pragma mark StreamingInputCall(stream StreamingInputCallRequest) returns (StreamingInputCallResponse) + +- (void)streamingInputCallWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(RMTStreamingInputCallResponse *response, NSError *error))handler{ + [[self RPCToStreamingInputCallWithRequestsWriter:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (ProtoRPC *)RPCToStreamingInputCallWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(RMTStreamingInputCallResponse *response, NSError *error))handler{ + return [self RPCToMethod:@"StreamingInputCall" + requestsWriter:request + responseClass:[RMTStreamingInputCallResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleValueHandler:handler]]; +} +#pragma mark FullDuplexCall(stream StreamingOutputCallRequest) returns (stream StreamingOutputCallResponse) + +- (void)fullDuplexCallWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler{ + [[self RPCToFullDuplexCallWithRequestsWriter:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (ProtoRPC *)RPCToFullDuplexCallWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler{ + return [self RPCToMethod:@"FullDuplexCall" + requestsWriter:request + responseClass:[RMTStreamingOutputCallResponse class] + responsesWriteable:[GRXWriteable writeableWithStreamHandler:handler]]; +} +#pragma mark HalfDuplexCall(stream StreamingOutputCallRequest) returns (stream StreamingOutputCallResponse) + +- (void)halfDuplexCallWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler{ + [[self RPCToHalfDuplexCallWithRequestsWriter:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (ProtoRPC *)RPCToHalfDuplexCallWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error))handler{ + return [self RPCToMethod:@"HalfDuplexCall" + requestsWriter:request + responseClass:[RMTStreamingOutputCallResponse class] + responsesWriteable:[GRXWriteable writeableWithStreamHandler:handler]]; +} +@end diff --git a/src/objective-c/examples/Sample/RemoteTestClient/empty.proto b/src/objective-c/examples/Sample/RemoteTestClient/empty.proto index 3b626ab131..a678048289 100644 --- a/src/objective-c/examples/Sample/RemoteTestClient/empty.proto +++ b/src/objective-c/examples/Sample/RemoteTestClient/empty.proto @@ -27,13 +27,11 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -syntax = "proto2"; - -import "google/protobuf/objectivec-descriptor.proto"; +syntax = "proto3"; package grpc.testing; -option (google.protobuf.objectivec_file_options).class_prefix = "RMT"; +option objc_class_prefix = "RMT"; // An empty message that you can re-use to avoid defining duplicated empty // messages in your project. A typical example is to use it as argument or the diff --git a/src/objective-c/examples/Sample/RemoteTestClient/messages.proto b/src/objective-c/examples/Sample/RemoteTestClient/messages.proto index ab8577401f..85d93c2ff9 100644 --- a/src/objective-c/examples/Sample/RemoteTestClient/messages.proto +++ b/src/objective-c/examples/Sample/RemoteTestClient/messages.proto @@ -29,13 +29,11 @@ // Message definitions to be used by integration test service definitions. -syntax = "proto2"; - -import "google/protobuf/objectivec-descriptor.proto"; +syntax = "proto3"; package grpc.testing; -option (google.protobuf.objectivec_file_options).class_prefix = "RMT"; +option objc_class_prefix = "RMT"; // The type of payload that should be returned. enum PayloadType { @@ -52,46 +50,46 @@ enum PayloadType { // A block of data, to simply increase gRPC message size. message Payload { // The type of data in body. - optional PayloadType type = 1; + PayloadType type = 1; // Primary contents of payload. - optional bytes body = 2; + bytes body = 2; } // Unary request. message SimpleRequest { // Desired payload type in the response from the server. // If response_type is RANDOM, server randomly chooses one from other formats. - optional PayloadType response_type = 1; + PayloadType response_type = 1; // Desired payload size in the response from the server. // If response_type is COMPRESSABLE, this denotes the size before compression. - optional int32 response_size = 2; + int32 response_size = 2; // Optional input payload sent along with the request. - optional Payload payload = 3; + Payload payload = 3; // Whether SimpleResponse should include username. - optional bool fill_username = 4; + bool fill_username = 4; // Whether SimpleResponse should include OAuth scope. - optional bool fill_oauth_scope = 5; + bool fill_oauth_scope = 5; } // Unary response, as configured by the request. message SimpleResponse { // Payload to increase message size. - optional Payload payload = 1; + Payload payload = 1; // The user the request came from, for verifying authentication was // successful when the client expected it. - optional string username = 2; + string username = 2; // OAuth scope. - optional string oauth_scope = 3; + string oauth_scope = 3; } // Client-streaming request. message StreamingInputCallRequest { // Optional input payload sent along with the request. - optional Payload payload = 1; + Payload payload = 1; // Not expecting any payload from the response. } @@ -99,18 +97,18 @@ message StreamingInputCallRequest { // Client-streaming response. message StreamingInputCallResponse { // Aggregated size of payloads received from the client. - optional int32 aggregated_payload_size = 1; + int32 aggregated_payload_size = 1; } // Configuration for a particular response. message ResponseParameters { // Desired payload sizes in responses from the server. // If response_type is COMPRESSABLE, this denotes the size before compression. - optional int32 size = 1; + int32 size = 1; // Desired interval between consecutive responses in the response stream in // microseconds. - optional int32 interval_us = 2; + int32 interval_us = 2; } // Server-streaming request. @@ -119,17 +117,17 @@ message StreamingOutputCallRequest { // If response_type is RANDOM, the payload from each response in the stream // might be of different types. This is to simulate a mixed type of payload // stream. - optional PayloadType response_type = 1; + PayloadType response_type = 1; // Configuration for each expected response message. repeated ResponseParameters response_parameters = 2; // Optional input payload sent along with the request. - optional Payload payload = 3; + Payload payload = 3; } // Server-streaming response, as configured by the request and parameters. message StreamingOutputCallResponse { // Payload to increase response size. - optional Payload payload = 1; + Payload payload = 1; } diff --git a/src/objective-c/examples/Sample/RemoteTestClient/test.proto b/src/objective-c/examples/Sample/RemoteTestClient/test.proto index 4b08220599..2f5a5489b3 100644 --- a/src/objective-c/examples/Sample/RemoteTestClient/test.proto +++ b/src/objective-c/examples/Sample/RemoteTestClient/test.proto @@ -29,15 +29,14 @@ // An integration test service that covers all the method signature permutations // of unary/streaming requests/responses. -syntax = "proto2"; +syntax = "proto3"; import "empty.proto"; import "messages.proto"; -import "google/protobuf/objectivec-descriptor.proto"; package grpc.testing; -option (google.protobuf.objectivec_file_options).class_prefix = "RMT"; +option objc_class_prefix = "RMT"; // A simple service to test the various types of RPCs and experiment with // performance with various types of payload. @@ -51,24 +50,24 @@ service TestService { // One request followed by a sequence of responses (streamed download). // The server returns the payload with client desired type and sizes. -// rpc StreamingOutputCall(StreamingOutputCallRequest) -// returns (stream StreamingOutputCallResponse); + rpc StreamingOutputCall(StreamingOutputCallRequest) + returns (stream StreamingOutputCallResponse); // A sequence of requests followed by one response (streamed upload). // The server returns the aggregated size of client payload as the result. -// rpc StreamingInputCall(stream StreamingInputCallRequest) -// returns (StreamingInputCallResponse); + rpc StreamingInputCall(stream StreamingInputCallRequest) + returns (StreamingInputCallResponse); // A sequence of requests with each request served by the server immediately. // As one request could lead to multiple responses, this interface // demonstrates the idea of full duplexing. -// rpc FullDuplexCall(stream StreamingOutputCallRequest) -// returns (stream StreamingOutputCallResponse); + rpc FullDuplexCall(stream StreamingOutputCallRequest) + returns (stream StreamingOutputCallResponse); // A sequence of requests followed by a sequence of responses. // The server buffers all the client requests and then serves them in order. A // stream of responses are returned to the client when the server starts with // first request. -// rpc HalfDuplexCall(stream StreamingOutputCallRequest) -// returns (stream StreamingOutputCallResponse); + rpc HalfDuplexCall(stream StreamingOutputCallRequest) + returns (stream StreamingOutputCallResponse); } diff --git a/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.h b/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.h new file mode 100644 index 0000000000..6efaec7f02 --- /dev/null +++ b/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.h @@ -0,0 +1,134 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: route_guide.proto + +#import "GPBProtocolBuffers.h" + +#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000 +#error This file was generated by a different version of protoc-gen-objc which is incompatible with your Protocol Buffer sources. +#endif + +CF_EXTERN_C_BEGIN + +@class RGDFeature; +@class RGDPoint; +@class RGDRectangle; +@class RGDRouteNote; +@class RGDRouteSummary; + + +#pragma mark - RGDRouteGuideRoot + +@interface RGDRouteGuideRoot : GPBRootObject +@end + +#pragma mark - RGDPoint + +typedef GPB_ENUM(RGDPoint_FieldNumber) { + RGDPoint_FieldNumber_Latitude = 1, + RGDPoint_FieldNumber_Longitude = 2, +}; + +// Points are represented as latitude-longitude pairs in the E7 representation +// (degrees multiplied by 10**7 and rounded to the nearest integer). +// Latitudes should be in the range +/- 90 degrees and longitude should be in +// the range +/- 180 degrees (inclusive). +@interface RGDPoint : GPBMessage + +@property(nonatomic, readwrite) int32_t latitude; + +@property(nonatomic, readwrite) int32_t longitude; + +@end + +#pragma mark - RGDRectangle + +typedef GPB_ENUM(RGDRectangle_FieldNumber) { + RGDRectangle_FieldNumber_Lo = 1, + RGDRectangle_FieldNumber_Hi = 2, +}; + +// A latitude-longitude rectangle, represented as two diagonally opposite +// points "lo" and "hi". +@interface RGDRectangle : GPBMessage + +// One corner of the rectangle. +@property(nonatomic, readwrite) BOOL hasLo; +@property(nonatomic, readwrite, strong) RGDPoint *lo; + +// The other corner of the rectangle. +@property(nonatomic, readwrite) BOOL hasHi; +@property(nonatomic, readwrite, strong) RGDPoint *hi; + +@end + +#pragma mark - RGDFeature + +typedef GPB_ENUM(RGDFeature_FieldNumber) { + RGDFeature_FieldNumber_Name = 1, + RGDFeature_FieldNumber_Location = 2, +}; + +// A feature names something at a given point. +// +// If a feature could not be named, the name is empty. +@interface RGDFeature : GPBMessage + +// The name of the feature. +@property(nonatomic, readwrite, copy) NSString *name; + +// The point where the feature is detected. +@property(nonatomic, readwrite) BOOL hasLocation; +@property(nonatomic, readwrite, strong) RGDPoint *location; + +@end + +#pragma mark - RGDRouteNote + +typedef GPB_ENUM(RGDRouteNote_FieldNumber) { + RGDRouteNote_FieldNumber_Location = 1, + RGDRouteNote_FieldNumber_Message = 2, +}; + +// A RouteNote is a message sent while at a given point. +@interface RGDRouteNote : GPBMessage + +// The location from which the message is sent. +@property(nonatomic, readwrite) BOOL hasLocation; +@property(nonatomic, readwrite, strong) RGDPoint *location; + +// The message to be sent. +@property(nonatomic, readwrite, copy) NSString *message; + +@end + +#pragma mark - RGDRouteSummary + +typedef GPB_ENUM(RGDRouteSummary_FieldNumber) { + RGDRouteSummary_FieldNumber_PointCount = 1, + RGDRouteSummary_FieldNumber_FeatureCount = 2, + RGDRouteSummary_FieldNumber_Distance = 3, + RGDRouteSummary_FieldNumber_ElapsedTime = 4, +}; + +// A RouteSummary is received in response to a RecordRoute rpc. +// +// It contains the number of individual points received, the number of +// detected features, and the total distance covered as the cumulative sum of +// the distance between each point. +@interface RGDRouteSummary : GPBMessage + +// The number of points received. +@property(nonatomic, readwrite) int32_t pointCount; + +// The number of known features passed while traversing the route. +@property(nonatomic, readwrite) int32_t featureCount; + +// The distance covered in metres. +@property(nonatomic, readwrite) int32_t distance; + +// The duration of the traversal in seconds. +@property(nonatomic, readwrite) int32_t elapsedTime; + +@end + +CF_EXTERN_C_END diff --git a/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.m b/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.m new file mode 100644 index 0000000000..16f291a61c --- /dev/null +++ b/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.m @@ -0,0 +1,355 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: route_guide.proto + +#import "GPBProtocolBuffers_RuntimeSupport.h" + +#import "RouteGuide.pbobjc.h" + +#pragma mark - RGDRouteGuideRoot + +@implementation RGDRouteGuideRoot + +@end + +static GPBFileDescriptor *RGDRouteGuideRoot_FileDescriptor(void) { + // This is called by +initialize so there is no need to worry + // about thread safety of the singleton. + static GPBFileDescriptor *descriptor = NULL; + if (!descriptor) { + descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"grpc.example.routeguide" + syntax:GPBFileSyntaxProto3]; + } + return descriptor; +} + +#pragma mark - RGDPoint + +@implementation RGDPoint + +@dynamic latitude; +@dynamic longitude; + +typedef struct RGDPoint_Storage { + uint32_t _has_storage_[1]; + int32_t latitude; + int32_t longitude; +} RGDPoint_Storage; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "latitude", + .number = RGDPoint_FieldNumber_Latitude, + .hasIndex = 0, + .flags = GPBFieldOptional, + .type = GPBTypeInt32, + .offset = offsetof(RGDPoint_Storage, latitude), + .defaultValue.valueInt32 = 0, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + { + .name = "longitude", + .number = RGDPoint_FieldNumber_Longitude, + .hasIndex = 1, + .flags = GPBFieldOptional, + .type = GPBTypeInt32, + .offset = offsetof(RGDPoint_Storage, longitude), + .defaultValue.valueInt32 = 0, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + }; + descriptor = [GPBDescriptor allocDescriptorForClass:[RGDPoint class] + rootClass:[RGDRouteGuideRoot class] + file:RGDRouteGuideRoot_FileDescriptor() + fields:fields + fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) + oneofs:NULL + oneofCount:0 + enums:NULL + enumCount:0 + ranges:NULL + rangeCount:0 + storageSize:sizeof(RGDPoint_Storage) + wireFormat:NO]; + } + return descriptor; +} + +@end + +#pragma mark - RGDRectangle + +@implementation RGDRectangle + +@dynamic hasLo, lo; +@dynamic hasHi, hi; + +typedef struct RGDRectangle_Storage { + uint32_t _has_storage_[1]; + RGDPoint *lo; + RGDPoint *hi; +} RGDRectangle_Storage; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "lo", + .number = RGDRectangle_FieldNumber_Lo, + .hasIndex = 0, + .flags = GPBFieldOptional, + .type = GPBTypeMessage, + .offset = offsetof(RGDRectangle_Storage, lo), + .defaultValue.valueMessage = nil, + .typeSpecific.className = GPBStringifySymbol(RGDPoint), + .fieldOptions = NULL, + }, + { + .name = "hi", + .number = RGDRectangle_FieldNumber_Hi, + .hasIndex = 1, + .flags = GPBFieldOptional, + .type = GPBTypeMessage, + .offset = offsetof(RGDRectangle_Storage, hi), + .defaultValue.valueMessage = nil, + .typeSpecific.className = GPBStringifySymbol(RGDPoint), + .fieldOptions = NULL, + }, + }; + descriptor = [GPBDescriptor allocDescriptorForClass:[RGDRectangle class] + rootClass:[RGDRouteGuideRoot class] + file:RGDRouteGuideRoot_FileDescriptor() + fields:fields + fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) + oneofs:NULL + oneofCount:0 + enums:NULL + enumCount:0 + ranges:NULL + rangeCount:0 + storageSize:sizeof(RGDRectangle_Storage) + wireFormat:NO]; + } + return descriptor; +} + +@end + +#pragma mark - RGDFeature + +@implementation RGDFeature + +@dynamic name; +@dynamic hasLocation, location; + +typedef struct RGDFeature_Storage { + uint32_t _has_storage_[1]; + NSString *name; + RGDPoint *location; +} RGDFeature_Storage; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "name", + .number = RGDFeature_FieldNumber_Name, + .hasIndex = 0, + .flags = GPBFieldOptional, + .type = GPBTypeString, + .offset = offsetof(RGDFeature_Storage, name), + .defaultValue.valueString = nil, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + { + .name = "location", + .number = RGDFeature_FieldNumber_Location, + .hasIndex = 1, + .flags = GPBFieldOptional, + .type = GPBTypeMessage, + .offset = offsetof(RGDFeature_Storage, location), + .defaultValue.valueMessage = nil, + .typeSpecific.className = GPBStringifySymbol(RGDPoint), + .fieldOptions = NULL, + }, + }; + descriptor = [GPBDescriptor allocDescriptorForClass:[RGDFeature class] + rootClass:[RGDRouteGuideRoot class] + file:RGDRouteGuideRoot_FileDescriptor() + fields:fields + fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) + oneofs:NULL + oneofCount:0 + enums:NULL + enumCount:0 + ranges:NULL + rangeCount:0 + storageSize:sizeof(RGDFeature_Storage) + wireFormat:NO]; + } + return descriptor; +} + +@end + +#pragma mark - RGDRouteNote + +@implementation RGDRouteNote + +@dynamic hasLocation, location; +@dynamic message; + +typedef struct RGDRouteNote_Storage { + uint32_t _has_storage_[1]; + RGDPoint *location; + NSString *message; +} RGDRouteNote_Storage; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "location", + .number = RGDRouteNote_FieldNumber_Location, + .hasIndex = 0, + .flags = GPBFieldOptional, + .type = GPBTypeMessage, + .offset = offsetof(RGDRouteNote_Storage, location), + .defaultValue.valueMessage = nil, + .typeSpecific.className = GPBStringifySymbol(RGDPoint), + .fieldOptions = NULL, + }, + { + .name = "message", + .number = RGDRouteNote_FieldNumber_Message, + .hasIndex = 1, + .flags = GPBFieldOptional, + .type = GPBTypeString, + .offset = offsetof(RGDRouteNote_Storage, message), + .defaultValue.valueString = nil, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + }; + descriptor = [GPBDescriptor allocDescriptorForClass:[RGDRouteNote class] + rootClass:[RGDRouteGuideRoot class] + file:RGDRouteGuideRoot_FileDescriptor() + fields:fields + fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) + oneofs:NULL + oneofCount:0 + enums:NULL + enumCount:0 + ranges:NULL + rangeCount:0 + storageSize:sizeof(RGDRouteNote_Storage) + wireFormat:NO]; + } + return descriptor; +} + +@end + +#pragma mark - RGDRouteSummary + +@implementation RGDRouteSummary + +@dynamic pointCount; +@dynamic featureCount; +@dynamic distance; +@dynamic elapsedTime; + +typedef struct RGDRouteSummary_Storage { + uint32_t _has_storage_[1]; + int32_t pointCount; + int32_t featureCount; + int32_t distance; + int32_t elapsedTime; +} RGDRouteSummary_Storage; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "pointCount", + .number = RGDRouteSummary_FieldNumber_PointCount, + .hasIndex = 0, + .flags = GPBFieldOptional, + .type = GPBTypeInt32, + .offset = offsetof(RGDRouteSummary_Storage, pointCount), + .defaultValue.valueInt32 = 0, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + { + .name = "featureCount", + .number = RGDRouteSummary_FieldNumber_FeatureCount, + .hasIndex = 1, + .flags = GPBFieldOptional, + .type = GPBTypeInt32, + .offset = offsetof(RGDRouteSummary_Storage, featureCount), + .defaultValue.valueInt32 = 0, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + { + .name = "distance", + .number = RGDRouteSummary_FieldNumber_Distance, + .hasIndex = 2, + .flags = GPBFieldOptional, + .type = GPBTypeInt32, + .offset = offsetof(RGDRouteSummary_Storage, distance), + .defaultValue.valueInt32 = 0, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + { + .name = "elapsedTime", + .number = RGDRouteSummary_FieldNumber_ElapsedTime, + .hasIndex = 3, + .flags = GPBFieldOptional, + .type = GPBTypeInt32, + .offset = offsetof(RGDRouteSummary_Storage, elapsedTime), + .defaultValue.valueInt32 = 0, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + }; + descriptor = [GPBDescriptor allocDescriptorForClass:[RGDRouteSummary class] + rootClass:[RGDRouteGuideRoot class] + file:RGDRouteGuideRoot_FileDescriptor() + fields:fields + fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) + oneofs:NULL + oneofCount:0 + enums:NULL + enumCount:0 + ranges:NULL + rangeCount:0 + storageSize:sizeof(RGDRouteSummary_Storage) + wireFormat:NO]; + } + return descriptor; +} + +@end + diff --git a/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.h b/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.h new file mode 100644 index 0000000000..9e60865d98 --- /dev/null +++ b/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.h @@ -0,0 +1,43 @@ +#import "RouteGuide.pbobjc.h" +#import <gRPC/ProtoService.h> + + +@protocol GRXWriteable; +@protocol GRXWriter; + +@protocol RGDRouteGuide <NSObject> + +#pragma mark GetFeature(Point) returns (Feature) + +- (void)getFeatureWithRequest:(RGDPoint *)request handler:(void(^)(RGDFeature *response, NSError *error))handler; + +- (ProtoRPC *)RPCToGetFeatureWithRequest:(RGDPoint *)request handler:(void(^)(RGDFeature *response, NSError *error))handler; + + +#pragma mark ListFeatures(Rectangle) returns (stream Feature) + +- (void)listFeaturesWithRequest:(RGDRectangle *)request handler:(void(^)(BOOL done, RGDFeature *response, NSError *error))handler; + +- (ProtoRPC *)RPCToListFeaturesWithRequest:(RGDRectangle *)request handler:(void(^)(BOOL done, RGDFeature *response, NSError *error))handler; + + +#pragma mark RecordRoute(stream Point) returns (RouteSummary) + +- (void)recordRouteWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(RGDRouteSummary *response, NSError *error))handler; + +- (ProtoRPC *)RPCToRecordRouteWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(RGDRouteSummary *response, NSError *error))handler; + + +#pragma mark RouteChat(stream RouteNote) returns (stream RouteNote) + +- (void)routeChatWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RGDRouteNote *response, NSError *error))handler; + +- (ProtoRPC *)RPCToRouteChatWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RGDRouteNote *response, NSError *error))handler; + + +@end + +// Basic service implementation, over gRPC, that only does marshalling and parsing. +@interface RGDRouteGuide : ProtoService<RGDRouteGuide> +- (instancetype)initWithHost:(NSString *)host NS_DESIGNATED_INITIALIZER; +@end diff --git a/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.m b/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.m new file mode 100644 index 0000000000..2ca3dc6768 --- /dev/null +++ b/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.m @@ -0,0 +1,72 @@ +#import "RouteGuide.pbrpc.h" +#import <gRPC/GRXWriteable.h> +#import <gRPC/GRXWriter+Immediate.h> +#import <gRPC/ProtoRPC.h> + +static NSString *const kPackageName = @"grpc.example.routeguide"; +static NSString *const kServiceName = @"RouteGuide"; + +@implementation RGDRouteGuide + +// Designated initializer +- (instancetype)initWithHost:(NSString *)host { + return (self = [super initWithHost:host packageName:kPackageName serviceName:kServiceName]); +} + +// Override superclass initializer to disallow different package and service names. +- (instancetype)initWithHost:(NSString *)host + packageName:(NSString *)packageName + serviceName:(NSString *)serviceName { + return [self initWithHost:host]; +} + + +#pragma mark GetFeature(Point) returns (Feature) + +- (void)getFeatureWithRequest:(RGDPoint *)request handler:(void(^)(RGDFeature *response, NSError *error))handler{ + [[self RPCToGetFeatureWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (ProtoRPC *)RPCToGetFeatureWithRequest:(RGDPoint *)request handler:(void(^)(RGDFeature *response, NSError *error))handler{ + return [self RPCToMethod:@"GetFeature" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[RGDFeature class] + responsesWriteable:[GRXWriteable writeableWithSingleValueHandler:handler]]; +} +#pragma mark ListFeatures(Rectangle) returns (stream Feature) + +- (void)listFeaturesWithRequest:(RGDRectangle *)request handler:(void(^)(BOOL done, RGDFeature *response, NSError *error))handler{ + [[self RPCToListFeaturesWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (ProtoRPC *)RPCToListFeaturesWithRequest:(RGDRectangle *)request handler:(void(^)(BOOL done, RGDFeature *response, NSError *error))handler{ + return [self RPCToMethod:@"ListFeatures" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[RGDFeature class] + responsesWriteable:[GRXWriteable writeableWithStreamHandler:handler]]; +} +#pragma mark RecordRoute(stream Point) returns (RouteSummary) + +- (void)recordRouteWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(RGDRouteSummary *response, NSError *error))handler{ + [[self RPCToRecordRouteWithRequestsWriter:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (ProtoRPC *)RPCToRecordRouteWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(RGDRouteSummary *response, NSError *error))handler{ + return [self RPCToMethod:@"RecordRoute" + requestsWriter:request + responseClass:[RGDRouteSummary class] + responsesWriteable:[GRXWriteable writeableWithSingleValueHandler:handler]]; +} +#pragma mark RouteChat(stream RouteNote) returns (stream RouteNote) + +- (void)routeChatWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RGDRouteNote *response, NSError *error))handler{ + [[self RPCToRouteChatWithRequestsWriter:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (ProtoRPC *)RPCToRouteChatWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RGDRouteNote *response, NSError *error))handler{ + return [self RPCToMethod:@"RouteChat" + requestsWriter:request + responseClass:[RGDRouteNote class] + responsesWriteable:[GRXWriteable writeableWithStreamHandler:handler]]; +} +@end diff --git a/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.pb.h b/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.pb.h deleted file mode 100644 index 194bfc5f2a..0000000000 --- a/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.pb.h +++ /dev/null @@ -1,387 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! - -#import <ProtocolBuffers/ProtocolBuffers.h> - -// @@protoc_insertion_point(imports) - -@class ObjectiveCFileOptions; -@class ObjectiveCFileOptionsBuilder; -@class PBDescriptorProto; -@class PBDescriptorProtoBuilder; -@class PBDescriptorProtoExtensionRange; -@class PBDescriptorProtoExtensionRangeBuilder; -@class PBEnumDescriptorProto; -@class PBEnumDescriptorProtoBuilder; -@class PBEnumOptions; -@class PBEnumOptionsBuilder; -@class PBEnumValueDescriptorProto; -@class PBEnumValueDescriptorProtoBuilder; -@class PBEnumValueOptions; -@class PBEnumValueOptionsBuilder; -@class PBFieldDescriptorProto; -@class PBFieldDescriptorProtoBuilder; -@class PBFieldOptions; -@class PBFieldOptionsBuilder; -@class PBFileDescriptorProto; -@class PBFileDescriptorProtoBuilder; -@class PBFileDescriptorSet; -@class PBFileDescriptorSetBuilder; -@class PBFileOptions; -@class PBFileOptionsBuilder; -@class PBMessageOptions; -@class PBMessageOptionsBuilder; -@class PBMethodDescriptorProto; -@class PBMethodDescriptorProtoBuilder; -@class PBMethodOptions; -@class PBMethodOptionsBuilder; -@class PBOneofDescriptorProto; -@class PBOneofDescriptorProtoBuilder; -@class PBServiceDescriptorProto; -@class PBServiceDescriptorProtoBuilder; -@class PBServiceOptions; -@class PBServiceOptionsBuilder; -@class PBSourceCodeInfo; -@class PBSourceCodeInfoBuilder; -@class PBSourceCodeInfoLocation; -@class PBSourceCodeInfoLocationBuilder; -@class PBUninterpretedOption; -@class PBUninterpretedOptionBuilder; -@class PBUninterpretedOptionNamePart; -@class PBUninterpretedOptionNamePartBuilder; -@class RGDFeature; -@class RGDFeatureBuilder; -@class RGDPoint; -@class RGDPointBuilder; -@class RGDRectangle; -@class RGDRectangleBuilder; -@class RGDRouteNote; -@class RGDRouteNoteBuilder; -@class RGDRouteSummary; -@class RGDRouteSummaryBuilder; - - - -@interface RGDRouteGuideRoot : NSObject { -} -+ (PBExtensionRegistry*) extensionRegistry; -+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry; -@end - -@interface RGDPoint : PBGeneratedMessage<GeneratedMessageProtocol> { -@private - BOOL hasLatitude_:1; - BOOL hasLongitude_:1; - SInt32 latitude; - SInt32 longitude; -} -- (BOOL) hasLatitude; -- (BOOL) hasLongitude; -@property (readonly) SInt32 latitude; -@property (readonly) SInt32 longitude; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (RGDPointBuilder*) builder; -+ (RGDPointBuilder*) builder; -+ (RGDPointBuilder*) builderWithPrototype:(RGDPoint*) prototype; -- (RGDPointBuilder*) toBuilder; - -+ (RGDPoint*) parseFromData:(NSData*) data; -+ (RGDPoint*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RGDPoint*) parseFromInputStream:(NSInputStream*) input; -+ (RGDPoint*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RGDPoint*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (RGDPoint*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface RGDPointBuilder : PBGeneratedMessageBuilder { -@private - RGDPoint* resultPoint; -} - -- (RGDPoint*) defaultInstance; - -- (RGDPointBuilder*) clear; -- (RGDPointBuilder*) clone; - -- (RGDPoint*) build; -- (RGDPoint*) buildPartial; - -- (RGDPointBuilder*) mergeFrom:(RGDPoint*) other; -- (RGDPointBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (RGDPointBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasLatitude; -- (SInt32) latitude; -- (RGDPointBuilder*) setLatitude:(SInt32) value; -- (RGDPointBuilder*) clearLatitude; - -- (BOOL) hasLongitude; -- (SInt32) longitude; -- (RGDPointBuilder*) setLongitude:(SInt32) value; -- (RGDPointBuilder*) clearLongitude; -@end - -@interface RGDRectangle : PBGeneratedMessage<GeneratedMessageProtocol> { -@private - BOOL hasLo_:1; - BOOL hasHi_:1; - RGDPoint* lo; - RGDPoint* hi; -} -- (BOOL) hasLo; -- (BOOL) hasHi; -@property (readonly, strong) RGDPoint* lo; -@property (readonly, strong) RGDPoint* hi; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (RGDRectangleBuilder*) builder; -+ (RGDRectangleBuilder*) builder; -+ (RGDRectangleBuilder*) builderWithPrototype:(RGDRectangle*) prototype; -- (RGDRectangleBuilder*) toBuilder; - -+ (RGDRectangle*) parseFromData:(NSData*) data; -+ (RGDRectangle*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RGDRectangle*) parseFromInputStream:(NSInputStream*) input; -+ (RGDRectangle*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RGDRectangle*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (RGDRectangle*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface RGDRectangleBuilder : PBGeneratedMessageBuilder { -@private - RGDRectangle* resultRectangle; -} - -- (RGDRectangle*) defaultInstance; - -- (RGDRectangleBuilder*) clear; -- (RGDRectangleBuilder*) clone; - -- (RGDRectangle*) build; -- (RGDRectangle*) buildPartial; - -- (RGDRectangleBuilder*) mergeFrom:(RGDRectangle*) other; -- (RGDRectangleBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (RGDRectangleBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasLo; -- (RGDPoint*) lo; -- (RGDRectangleBuilder*) setLo:(RGDPoint*) value; -- (RGDRectangleBuilder*) setLoBuilder:(RGDPointBuilder*) builderForValue; -- (RGDRectangleBuilder*) mergeLo:(RGDPoint*) value; -- (RGDRectangleBuilder*) clearLo; - -- (BOOL) hasHi; -- (RGDPoint*) hi; -- (RGDRectangleBuilder*) setHi:(RGDPoint*) value; -- (RGDRectangleBuilder*) setHiBuilder:(RGDPointBuilder*) builderForValue; -- (RGDRectangleBuilder*) mergeHi:(RGDPoint*) value; -- (RGDRectangleBuilder*) clearHi; -@end - -@interface RGDFeature : PBGeneratedMessage<GeneratedMessageProtocol> { -@private - BOOL hasName_:1; - BOOL hasLocation_:1; - NSString* name; - RGDPoint* location; -} -- (BOOL) hasName; -- (BOOL) hasLocation; -@property (readonly, strong) NSString* name; -@property (readonly, strong) RGDPoint* location; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (RGDFeatureBuilder*) builder; -+ (RGDFeatureBuilder*) builder; -+ (RGDFeatureBuilder*) builderWithPrototype:(RGDFeature*) prototype; -- (RGDFeatureBuilder*) toBuilder; - -+ (RGDFeature*) parseFromData:(NSData*) data; -+ (RGDFeature*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RGDFeature*) parseFromInputStream:(NSInputStream*) input; -+ (RGDFeature*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RGDFeature*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (RGDFeature*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface RGDFeatureBuilder : PBGeneratedMessageBuilder { -@private - RGDFeature* resultFeature; -} - -- (RGDFeature*) defaultInstance; - -- (RGDFeatureBuilder*) clear; -- (RGDFeatureBuilder*) clone; - -- (RGDFeature*) build; -- (RGDFeature*) buildPartial; - -- (RGDFeatureBuilder*) mergeFrom:(RGDFeature*) other; -- (RGDFeatureBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (RGDFeatureBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasName; -- (NSString*) name; -- (RGDFeatureBuilder*) setName:(NSString*) value; -- (RGDFeatureBuilder*) clearName; - -- (BOOL) hasLocation; -- (RGDPoint*) location; -- (RGDFeatureBuilder*) setLocation:(RGDPoint*) value; -- (RGDFeatureBuilder*) setLocationBuilder:(RGDPointBuilder*) builderForValue; -- (RGDFeatureBuilder*) mergeLocation:(RGDPoint*) value; -- (RGDFeatureBuilder*) clearLocation; -@end - -@interface RGDRouteNote : PBGeneratedMessage<GeneratedMessageProtocol> { -@private - BOOL hasMessage_:1; - BOOL hasLocation_:1; - NSString* message; - RGDPoint* location; -} -- (BOOL) hasLocation; -- (BOOL) hasMessage; -@property (readonly, strong) RGDPoint* location; -@property (readonly, strong) NSString* message; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (RGDRouteNoteBuilder*) builder; -+ (RGDRouteNoteBuilder*) builder; -+ (RGDRouteNoteBuilder*) builderWithPrototype:(RGDRouteNote*) prototype; -- (RGDRouteNoteBuilder*) toBuilder; - -+ (RGDRouteNote*) parseFromData:(NSData*) data; -+ (RGDRouteNote*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RGDRouteNote*) parseFromInputStream:(NSInputStream*) input; -+ (RGDRouteNote*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RGDRouteNote*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (RGDRouteNote*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface RGDRouteNoteBuilder : PBGeneratedMessageBuilder { -@private - RGDRouteNote* resultRouteNote; -} - -- (RGDRouteNote*) defaultInstance; - -- (RGDRouteNoteBuilder*) clear; -- (RGDRouteNoteBuilder*) clone; - -- (RGDRouteNote*) build; -- (RGDRouteNote*) buildPartial; - -- (RGDRouteNoteBuilder*) mergeFrom:(RGDRouteNote*) other; -- (RGDRouteNoteBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (RGDRouteNoteBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasLocation; -- (RGDPoint*) location; -- (RGDRouteNoteBuilder*) setLocation:(RGDPoint*) value; -- (RGDRouteNoteBuilder*) setLocationBuilder:(RGDPointBuilder*) builderForValue; -- (RGDRouteNoteBuilder*) mergeLocation:(RGDPoint*) value; -- (RGDRouteNoteBuilder*) clearLocation; - -- (BOOL) hasMessage; -- (NSString*) message; -- (RGDRouteNoteBuilder*) setMessage:(NSString*) value; -- (RGDRouteNoteBuilder*) clearMessage; -@end - -@interface RGDRouteSummary : PBGeneratedMessage<GeneratedMessageProtocol> { -@private - BOOL hasPointCount_:1; - BOOL hasFeatureCount_:1; - BOOL hasDistance_:1; - BOOL hasElapsedTime_:1; - SInt32 pointCount; - SInt32 featureCount; - SInt32 distance; - SInt32 elapsedTime; -} -- (BOOL) hasPointCount; -- (BOOL) hasFeatureCount; -- (BOOL) hasDistance; -- (BOOL) hasElapsedTime; -@property (readonly) SInt32 pointCount; -@property (readonly) SInt32 featureCount; -@property (readonly) SInt32 distance; -@property (readonly) SInt32 elapsedTime; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (RGDRouteSummaryBuilder*) builder; -+ (RGDRouteSummaryBuilder*) builder; -+ (RGDRouteSummaryBuilder*) builderWithPrototype:(RGDRouteSummary*) prototype; -- (RGDRouteSummaryBuilder*) toBuilder; - -+ (RGDRouteSummary*) parseFromData:(NSData*) data; -+ (RGDRouteSummary*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RGDRouteSummary*) parseFromInputStream:(NSInputStream*) input; -+ (RGDRouteSummary*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (RGDRouteSummary*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (RGDRouteSummary*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface RGDRouteSummaryBuilder : PBGeneratedMessageBuilder { -@private - RGDRouteSummary* resultRouteSummary; -} - -- (RGDRouteSummary*) defaultInstance; - -- (RGDRouteSummaryBuilder*) clear; -- (RGDRouteSummaryBuilder*) clone; - -- (RGDRouteSummary*) build; -- (RGDRouteSummary*) buildPartial; - -- (RGDRouteSummaryBuilder*) mergeFrom:(RGDRouteSummary*) other; -- (RGDRouteSummaryBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (RGDRouteSummaryBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasPointCount; -- (SInt32) pointCount; -- (RGDRouteSummaryBuilder*) setPointCount:(SInt32) value; -- (RGDRouteSummaryBuilder*) clearPointCount; - -- (BOOL) hasFeatureCount; -- (SInt32) featureCount; -- (RGDRouteSummaryBuilder*) setFeatureCount:(SInt32) value; -- (RGDRouteSummaryBuilder*) clearFeatureCount; - -- (BOOL) hasDistance; -- (SInt32) distance; -- (RGDRouteSummaryBuilder*) setDistance:(SInt32) value; -- (RGDRouteSummaryBuilder*) clearDistance; - -- (BOOL) hasElapsedTime; -- (SInt32) elapsedTime; -- (RGDRouteSummaryBuilder*) setElapsedTime:(SInt32) value; -- (RGDRouteSummaryBuilder*) clearElapsedTime; -@end - - -// @@protoc_insertion_point(global_scope) diff --git a/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.pb.m b/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.pb.m deleted file mode 100644 index 63cdd00206..0000000000 --- a/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.pb.m +++ /dev/null @@ -1,1435 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! - -#import "Route_guide.pb.h" -// @@protoc_insertion_point(imports) - -@implementation RGDRouteGuideRoot -static PBExtensionRegistry* extensionRegistry = nil; -+ (PBExtensionRegistry*) extensionRegistry { - return extensionRegistry; -} - -+ (void) initialize { - if (self == [RGDRouteGuideRoot class]) { - PBMutableExtensionRegistry* registry = [PBMutableExtensionRegistry registry]; - [self registerAllExtensions:registry]; - [ObjectivecDescriptorRoot registerAllExtensions:registry]; - extensionRegistry = registry; - } -} -+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry { -} -@end - -@interface RGDPoint () -@property SInt32 latitude; -@property SInt32 longitude; -@end - -@implementation RGDPoint - -- (BOOL) hasLatitude { - return !!hasLatitude_; -} -- (void) setHasLatitude:(BOOL) _value_ { - hasLatitude_ = !!_value_; -} -@synthesize latitude; -- (BOOL) hasLongitude { - return !!hasLongitude_; -} -- (void) setHasLongitude:(BOOL) _value_ { - hasLongitude_ = !!_value_; -} -@synthesize longitude; -- (instancetype) init { - if ((self = [super init])) { - self.latitude = 0; - self.longitude = 0; - } - return self; -} -static RGDPoint* defaultRGDPointInstance = nil; -+ (void) initialize { - if (self == [RGDPoint class]) { - defaultRGDPointInstance = [[RGDPoint alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultRGDPointInstance; -} -- (instancetype) defaultInstance { - return defaultRGDPointInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasLatitude) { - [output writeInt32:1 value:self.latitude]; - } - if (self.hasLongitude) { - [output writeInt32:2 value:self.longitude]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasLatitude) { - size_ += computeInt32Size(1, self.latitude); - } - if (self.hasLongitude) { - size_ += computeInt32Size(2, self.longitude); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (RGDPoint*) parseFromData:(NSData*) data { - return (RGDPoint*)[[[RGDPoint builder] mergeFromData:data] build]; -} -+ (RGDPoint*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RGDPoint*)[[[RGDPoint builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (RGDPoint*) parseFromInputStream:(NSInputStream*) input { - return (RGDPoint*)[[[RGDPoint builder] mergeFromInputStream:input] build]; -} -+ (RGDPoint*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RGDPoint*)[[[RGDPoint builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RGDPoint*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (RGDPoint*)[[[RGDPoint builder] mergeFromCodedInputStream:input] build]; -} -+ (RGDPoint*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RGDPoint*)[[[RGDPoint builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RGDPointBuilder*) builder { - return [[RGDPointBuilder alloc] init]; -} -+ (RGDPointBuilder*) builderWithPrototype:(RGDPoint*) prototype { - return [[RGDPoint builder] mergeFrom:prototype]; -} -- (RGDPointBuilder*) builder { - return [RGDPoint builder]; -} -- (RGDPointBuilder*) toBuilder { - return [RGDPoint builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasLatitude) { - [output appendFormat:@"%@%@: %@\n", indent, @"latitude", [NSNumber numberWithInteger:self.latitude]]; - } - if (self.hasLongitude) { - [output appendFormat:@"%@%@: %@\n", indent, @"longitude", [NSNumber numberWithInteger:self.longitude]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[RGDPoint class]]) { - return NO; - } - RGDPoint *otherMessage = other; - return - self.hasLatitude == otherMessage.hasLatitude && - (!self.hasLatitude || self.latitude == otherMessage.latitude) && - self.hasLongitude == otherMessage.hasLongitude && - (!self.hasLongitude || self.longitude == otherMessage.longitude) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasLatitude) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.latitude] hash]; - } - if (self.hasLongitude) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.longitude] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface RGDPointBuilder() -@property (strong) RGDPoint* resultPoint; -@end - -@implementation RGDPointBuilder -@synthesize resultPoint; -- (instancetype) init { - if ((self = [super init])) { - self.resultPoint = [[RGDPoint alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultPoint; -} -- (RGDPointBuilder*) clear { - self.resultPoint = [[RGDPoint alloc] init]; - return self; -} -- (RGDPointBuilder*) clone { - return [RGDPoint builderWithPrototype:resultPoint]; -} -- (RGDPoint*) defaultInstance { - return [RGDPoint defaultInstance]; -} -- (RGDPoint*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (RGDPoint*) buildPartial { - RGDPoint* returnMe = resultPoint; - self.resultPoint = nil; - return returnMe; -} -- (RGDPointBuilder*) mergeFrom:(RGDPoint*) other { - if (other == [RGDPoint defaultInstance]) { - return self; - } - if (other.hasLatitude) { - [self setLatitude:other.latitude]; - } - if (other.hasLongitude) { - [self setLongitude:other.longitude]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (RGDPointBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (RGDPointBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - [self setLatitude:[input readInt32]]; - break; - } - case 16: { - [self setLongitude:[input readInt32]]; - break; - } - } - } -} -- (BOOL) hasLatitude { - return resultPoint.hasLatitude; -} -- (SInt32) latitude { - return resultPoint.latitude; -} -- (RGDPointBuilder*) setLatitude:(SInt32) value { - resultPoint.hasLatitude = YES; - resultPoint.latitude = value; - return self; -} -- (RGDPointBuilder*) clearLatitude { - resultPoint.hasLatitude = NO; - resultPoint.latitude = 0; - return self; -} -- (BOOL) hasLongitude { - return resultPoint.hasLongitude; -} -- (SInt32) longitude { - return resultPoint.longitude; -} -- (RGDPointBuilder*) setLongitude:(SInt32) value { - resultPoint.hasLongitude = YES; - resultPoint.longitude = value; - return self; -} -- (RGDPointBuilder*) clearLongitude { - resultPoint.hasLongitude = NO; - resultPoint.longitude = 0; - return self; -} -@end - -@interface RGDRectangle () -@property (strong) RGDPoint* lo; -@property (strong) RGDPoint* hi; -@end - -@implementation RGDRectangle - -- (BOOL) hasLo { - return !!hasLo_; -} -- (void) setHasLo:(BOOL) _value_ { - hasLo_ = !!_value_; -} -@synthesize lo; -- (BOOL) hasHi { - return !!hasHi_; -} -- (void) setHasHi:(BOOL) _value_ { - hasHi_ = !!_value_; -} -@synthesize hi; -- (instancetype) init { - if ((self = [super init])) { - self.lo = [RGDPoint defaultInstance]; - self.hi = [RGDPoint defaultInstance]; - } - return self; -} -static RGDRectangle* defaultRGDRectangleInstance = nil; -+ (void) initialize { - if (self == [RGDRectangle class]) { - defaultRGDRectangleInstance = [[RGDRectangle alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultRGDRectangleInstance; -} -- (instancetype) defaultInstance { - return defaultRGDRectangleInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasLo) { - [output writeMessage:1 value:self.lo]; - } - if (self.hasHi) { - [output writeMessage:2 value:self.hi]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasLo) { - size_ += computeMessageSize(1, self.lo); - } - if (self.hasHi) { - size_ += computeMessageSize(2, self.hi); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (RGDRectangle*) parseFromData:(NSData*) data { - return (RGDRectangle*)[[[RGDRectangle builder] mergeFromData:data] build]; -} -+ (RGDRectangle*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RGDRectangle*)[[[RGDRectangle builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (RGDRectangle*) parseFromInputStream:(NSInputStream*) input { - return (RGDRectangle*)[[[RGDRectangle builder] mergeFromInputStream:input] build]; -} -+ (RGDRectangle*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RGDRectangle*)[[[RGDRectangle builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RGDRectangle*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (RGDRectangle*)[[[RGDRectangle builder] mergeFromCodedInputStream:input] build]; -} -+ (RGDRectangle*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RGDRectangle*)[[[RGDRectangle builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RGDRectangleBuilder*) builder { - return [[RGDRectangleBuilder alloc] init]; -} -+ (RGDRectangleBuilder*) builderWithPrototype:(RGDRectangle*) prototype { - return [[RGDRectangle builder] mergeFrom:prototype]; -} -- (RGDRectangleBuilder*) builder { - return [RGDRectangle builder]; -} -- (RGDRectangleBuilder*) toBuilder { - return [RGDRectangle builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasLo) { - [output appendFormat:@"%@%@ {\n", indent, @"lo"]; - [self.lo writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasHi) { - [output appendFormat:@"%@%@ {\n", indent, @"hi"]; - [self.hi writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[RGDRectangle class]]) { - return NO; - } - RGDRectangle *otherMessage = other; - return - self.hasLo == otherMessage.hasLo && - (!self.hasLo || [self.lo isEqual:otherMessage.lo]) && - self.hasHi == otherMessage.hasHi && - (!self.hasHi || [self.hi isEqual:otherMessage.hi]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasLo) { - hashCode = hashCode * 31 + [self.lo hash]; - } - if (self.hasHi) { - hashCode = hashCode * 31 + [self.hi hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface RGDRectangleBuilder() -@property (strong) RGDRectangle* resultRectangle; -@end - -@implementation RGDRectangleBuilder -@synthesize resultRectangle; -- (instancetype) init { - if ((self = [super init])) { - self.resultRectangle = [[RGDRectangle alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultRectangle; -} -- (RGDRectangleBuilder*) clear { - self.resultRectangle = [[RGDRectangle alloc] init]; - return self; -} -- (RGDRectangleBuilder*) clone { - return [RGDRectangle builderWithPrototype:resultRectangle]; -} -- (RGDRectangle*) defaultInstance { - return [RGDRectangle defaultInstance]; -} -- (RGDRectangle*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (RGDRectangle*) buildPartial { - RGDRectangle* returnMe = resultRectangle; - self.resultRectangle = nil; - return returnMe; -} -- (RGDRectangleBuilder*) mergeFrom:(RGDRectangle*) other { - if (other == [RGDRectangle defaultInstance]) { - return self; - } - if (other.hasLo) { - [self mergeLo:other.lo]; - } - if (other.hasHi) { - [self mergeHi:other.hi]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (RGDRectangleBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (RGDRectangleBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - RGDPointBuilder* subBuilder = [RGDPoint builder]; - if (self.hasLo) { - [subBuilder mergeFrom:self.lo]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setLo:[subBuilder buildPartial]]; - break; - } - case 18: { - RGDPointBuilder* subBuilder = [RGDPoint builder]; - if (self.hasHi) { - [subBuilder mergeFrom:self.hi]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setHi:[subBuilder buildPartial]]; - break; - } - } - } -} -- (BOOL) hasLo { - return resultRectangle.hasLo; -} -- (RGDPoint*) lo { - return resultRectangle.lo; -} -- (RGDRectangleBuilder*) setLo:(RGDPoint*) value { - resultRectangle.hasLo = YES; - resultRectangle.lo = value; - return self; -} -- (RGDRectangleBuilder*) setLoBuilder:(RGDPointBuilder*) builderForValue { - return [self setLo:[builderForValue build]]; -} -- (RGDRectangleBuilder*) mergeLo:(RGDPoint*) value { - if (resultRectangle.hasLo && - resultRectangle.lo != [RGDPoint defaultInstance]) { - resultRectangle.lo = - [[[RGDPoint builderWithPrototype:resultRectangle.lo] mergeFrom:value] buildPartial]; - } else { - resultRectangle.lo = value; - } - resultRectangle.hasLo = YES; - return self; -} -- (RGDRectangleBuilder*) clearLo { - resultRectangle.hasLo = NO; - resultRectangle.lo = [RGDPoint defaultInstance]; - return self; -} -- (BOOL) hasHi { - return resultRectangle.hasHi; -} -- (RGDPoint*) hi { - return resultRectangle.hi; -} -- (RGDRectangleBuilder*) setHi:(RGDPoint*) value { - resultRectangle.hasHi = YES; - resultRectangle.hi = value; - return self; -} -- (RGDRectangleBuilder*) setHiBuilder:(RGDPointBuilder*) builderForValue { - return [self setHi:[builderForValue build]]; -} -- (RGDRectangleBuilder*) mergeHi:(RGDPoint*) value { - if (resultRectangle.hasHi && - resultRectangle.hi != [RGDPoint defaultInstance]) { - resultRectangle.hi = - [[[RGDPoint builderWithPrototype:resultRectangle.hi] mergeFrom:value] buildPartial]; - } else { - resultRectangle.hi = value; - } - resultRectangle.hasHi = YES; - return self; -} -- (RGDRectangleBuilder*) clearHi { - resultRectangle.hasHi = NO; - resultRectangle.hi = [RGDPoint defaultInstance]; - return self; -} -@end - -@interface RGDFeature () -@property (strong) NSString* name; -@property (strong) RGDPoint* location; -@end - -@implementation RGDFeature - -- (BOOL) hasName { - return !!hasName_; -} -- (void) setHasName:(BOOL) _value_ { - hasName_ = !!_value_; -} -@synthesize name; -- (BOOL) hasLocation { - return !!hasLocation_; -} -- (void) setHasLocation:(BOOL) _value_ { - hasLocation_ = !!_value_; -} -@synthesize location; -- (instancetype) init { - if ((self = [super init])) { - self.name = @""; - self.location = [RGDPoint defaultInstance]; - } - return self; -} -static RGDFeature* defaultRGDFeatureInstance = nil; -+ (void) initialize { - if (self == [RGDFeature class]) { - defaultRGDFeatureInstance = [[RGDFeature alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultRGDFeatureInstance; -} -- (instancetype) defaultInstance { - return defaultRGDFeatureInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasName) { - [output writeString:1 value:self.name]; - } - if (self.hasLocation) { - [output writeMessage:2 value:self.location]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasName) { - size_ += computeStringSize(1, self.name); - } - if (self.hasLocation) { - size_ += computeMessageSize(2, self.location); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (RGDFeature*) parseFromData:(NSData*) data { - return (RGDFeature*)[[[RGDFeature builder] mergeFromData:data] build]; -} -+ (RGDFeature*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RGDFeature*)[[[RGDFeature builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (RGDFeature*) parseFromInputStream:(NSInputStream*) input { - return (RGDFeature*)[[[RGDFeature builder] mergeFromInputStream:input] build]; -} -+ (RGDFeature*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RGDFeature*)[[[RGDFeature builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RGDFeature*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (RGDFeature*)[[[RGDFeature builder] mergeFromCodedInputStream:input] build]; -} -+ (RGDFeature*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RGDFeature*)[[[RGDFeature builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RGDFeatureBuilder*) builder { - return [[RGDFeatureBuilder alloc] init]; -} -+ (RGDFeatureBuilder*) builderWithPrototype:(RGDFeature*) prototype { - return [[RGDFeature builder] mergeFrom:prototype]; -} -- (RGDFeatureBuilder*) builder { - return [RGDFeature builder]; -} -- (RGDFeatureBuilder*) toBuilder { - return [RGDFeature builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasName) { - [output appendFormat:@"%@%@: %@\n", indent, @"name", self.name]; - } - if (self.hasLocation) { - [output appendFormat:@"%@%@ {\n", indent, @"location"]; - [self.location writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[RGDFeature class]]) { - return NO; - } - RGDFeature *otherMessage = other; - return - self.hasName == otherMessage.hasName && - (!self.hasName || [self.name isEqual:otherMessage.name]) && - self.hasLocation == otherMessage.hasLocation && - (!self.hasLocation || [self.location isEqual:otherMessage.location]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasName) { - hashCode = hashCode * 31 + [self.name hash]; - } - if (self.hasLocation) { - hashCode = hashCode * 31 + [self.location hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface RGDFeatureBuilder() -@property (strong) RGDFeature* resultFeature; -@end - -@implementation RGDFeatureBuilder -@synthesize resultFeature; -- (instancetype) init { - if ((self = [super init])) { - self.resultFeature = [[RGDFeature alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultFeature; -} -- (RGDFeatureBuilder*) clear { - self.resultFeature = [[RGDFeature alloc] init]; - return self; -} -- (RGDFeatureBuilder*) clone { - return [RGDFeature builderWithPrototype:resultFeature]; -} -- (RGDFeature*) defaultInstance { - return [RGDFeature defaultInstance]; -} -- (RGDFeature*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (RGDFeature*) buildPartial { - RGDFeature* returnMe = resultFeature; - self.resultFeature = nil; - return returnMe; -} -- (RGDFeatureBuilder*) mergeFrom:(RGDFeature*) other { - if (other == [RGDFeature defaultInstance]) { - return self; - } - if (other.hasName) { - [self setName:other.name]; - } - if (other.hasLocation) { - [self mergeLocation:other.location]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (RGDFeatureBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (RGDFeatureBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - [self setName:[input readString]]; - break; - } - case 18: { - RGDPointBuilder* subBuilder = [RGDPoint builder]; - if (self.hasLocation) { - [subBuilder mergeFrom:self.location]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setLocation:[subBuilder buildPartial]]; - break; - } - } - } -} -- (BOOL) hasName { - return resultFeature.hasName; -} -- (NSString*) name { - return resultFeature.name; -} -- (RGDFeatureBuilder*) setName:(NSString*) value { - resultFeature.hasName = YES; - resultFeature.name = value; - return self; -} -- (RGDFeatureBuilder*) clearName { - resultFeature.hasName = NO; - resultFeature.name = @""; - return self; -} -- (BOOL) hasLocation { - return resultFeature.hasLocation; -} -- (RGDPoint*) location { - return resultFeature.location; -} -- (RGDFeatureBuilder*) setLocation:(RGDPoint*) value { - resultFeature.hasLocation = YES; - resultFeature.location = value; - return self; -} -- (RGDFeatureBuilder*) setLocationBuilder:(RGDPointBuilder*) builderForValue { - return [self setLocation:[builderForValue build]]; -} -- (RGDFeatureBuilder*) mergeLocation:(RGDPoint*) value { - if (resultFeature.hasLocation && - resultFeature.location != [RGDPoint defaultInstance]) { - resultFeature.location = - [[[RGDPoint builderWithPrototype:resultFeature.location] mergeFrom:value] buildPartial]; - } else { - resultFeature.location = value; - } - resultFeature.hasLocation = YES; - return self; -} -- (RGDFeatureBuilder*) clearLocation { - resultFeature.hasLocation = NO; - resultFeature.location = [RGDPoint defaultInstance]; - return self; -} -@end - -@interface RGDRouteNote () -@property (strong) RGDPoint* location; -@property (strong) NSString* message; -@end - -@implementation RGDRouteNote - -- (BOOL) hasLocation { - return !!hasLocation_; -} -- (void) setHasLocation:(BOOL) _value_ { - hasLocation_ = !!_value_; -} -@synthesize location; -- (BOOL) hasMessage { - return !!hasMessage_; -} -- (void) setHasMessage:(BOOL) _value_ { - hasMessage_ = !!_value_; -} -@synthesize message; -- (instancetype) init { - if ((self = [super init])) { - self.location = [RGDPoint defaultInstance]; - self.message = @""; - } - return self; -} -static RGDRouteNote* defaultRGDRouteNoteInstance = nil; -+ (void) initialize { - if (self == [RGDRouteNote class]) { - defaultRGDRouteNoteInstance = [[RGDRouteNote alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultRGDRouteNoteInstance; -} -- (instancetype) defaultInstance { - return defaultRGDRouteNoteInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasLocation) { - [output writeMessage:1 value:self.location]; - } - if (self.hasMessage) { - [output writeString:2 value:self.message]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasLocation) { - size_ += computeMessageSize(1, self.location); - } - if (self.hasMessage) { - size_ += computeStringSize(2, self.message); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (RGDRouteNote*) parseFromData:(NSData*) data { - return (RGDRouteNote*)[[[RGDRouteNote builder] mergeFromData:data] build]; -} -+ (RGDRouteNote*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RGDRouteNote*)[[[RGDRouteNote builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (RGDRouteNote*) parseFromInputStream:(NSInputStream*) input { - return (RGDRouteNote*)[[[RGDRouteNote builder] mergeFromInputStream:input] build]; -} -+ (RGDRouteNote*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RGDRouteNote*)[[[RGDRouteNote builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RGDRouteNote*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (RGDRouteNote*)[[[RGDRouteNote builder] mergeFromCodedInputStream:input] build]; -} -+ (RGDRouteNote*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RGDRouteNote*)[[[RGDRouteNote builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RGDRouteNoteBuilder*) builder { - return [[RGDRouteNoteBuilder alloc] init]; -} -+ (RGDRouteNoteBuilder*) builderWithPrototype:(RGDRouteNote*) prototype { - return [[RGDRouteNote builder] mergeFrom:prototype]; -} -- (RGDRouteNoteBuilder*) builder { - return [RGDRouteNote builder]; -} -- (RGDRouteNoteBuilder*) toBuilder { - return [RGDRouteNote builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasLocation) { - [output appendFormat:@"%@%@ {\n", indent, @"location"]; - [self.location writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasMessage) { - [output appendFormat:@"%@%@: %@\n", indent, @"message", self.message]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[RGDRouteNote class]]) { - return NO; - } - RGDRouteNote *otherMessage = other; - return - self.hasLocation == otherMessage.hasLocation && - (!self.hasLocation || [self.location isEqual:otherMessage.location]) && - self.hasMessage == otherMessage.hasMessage && - (!self.hasMessage || [self.message isEqual:otherMessage.message]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasLocation) { - hashCode = hashCode * 31 + [self.location hash]; - } - if (self.hasMessage) { - hashCode = hashCode * 31 + [self.message hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface RGDRouteNoteBuilder() -@property (strong) RGDRouteNote* resultRouteNote; -@end - -@implementation RGDRouteNoteBuilder -@synthesize resultRouteNote; -- (instancetype) init { - if ((self = [super init])) { - self.resultRouteNote = [[RGDRouteNote alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultRouteNote; -} -- (RGDRouteNoteBuilder*) clear { - self.resultRouteNote = [[RGDRouteNote alloc] init]; - return self; -} -- (RGDRouteNoteBuilder*) clone { - return [RGDRouteNote builderWithPrototype:resultRouteNote]; -} -- (RGDRouteNote*) defaultInstance { - return [RGDRouteNote defaultInstance]; -} -- (RGDRouteNote*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (RGDRouteNote*) buildPartial { - RGDRouteNote* returnMe = resultRouteNote; - self.resultRouteNote = nil; - return returnMe; -} -- (RGDRouteNoteBuilder*) mergeFrom:(RGDRouteNote*) other { - if (other == [RGDRouteNote defaultInstance]) { - return self; - } - if (other.hasLocation) { - [self mergeLocation:other.location]; - } - if (other.hasMessage) { - [self setMessage:other.message]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (RGDRouteNoteBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (RGDRouteNoteBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - RGDPointBuilder* subBuilder = [RGDPoint builder]; - if (self.hasLocation) { - [subBuilder mergeFrom:self.location]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setLocation:[subBuilder buildPartial]]; - break; - } - case 18: { - [self setMessage:[input readString]]; - break; - } - } - } -} -- (BOOL) hasLocation { - return resultRouteNote.hasLocation; -} -- (RGDPoint*) location { - return resultRouteNote.location; -} -- (RGDRouteNoteBuilder*) setLocation:(RGDPoint*) value { - resultRouteNote.hasLocation = YES; - resultRouteNote.location = value; - return self; -} -- (RGDRouteNoteBuilder*) setLocationBuilder:(RGDPointBuilder*) builderForValue { - return [self setLocation:[builderForValue build]]; -} -- (RGDRouteNoteBuilder*) mergeLocation:(RGDPoint*) value { - if (resultRouteNote.hasLocation && - resultRouteNote.location != [RGDPoint defaultInstance]) { - resultRouteNote.location = - [[[RGDPoint builderWithPrototype:resultRouteNote.location] mergeFrom:value] buildPartial]; - } else { - resultRouteNote.location = value; - } - resultRouteNote.hasLocation = YES; - return self; -} -- (RGDRouteNoteBuilder*) clearLocation { - resultRouteNote.hasLocation = NO; - resultRouteNote.location = [RGDPoint defaultInstance]; - return self; -} -- (BOOL) hasMessage { - return resultRouteNote.hasMessage; -} -- (NSString*) message { - return resultRouteNote.message; -} -- (RGDRouteNoteBuilder*) setMessage:(NSString*) value { - resultRouteNote.hasMessage = YES; - resultRouteNote.message = value; - return self; -} -- (RGDRouteNoteBuilder*) clearMessage { - resultRouteNote.hasMessage = NO; - resultRouteNote.message = @""; - return self; -} -@end - -@interface RGDRouteSummary () -@property SInt32 pointCount; -@property SInt32 featureCount; -@property SInt32 distance; -@property SInt32 elapsedTime; -@end - -@implementation RGDRouteSummary - -- (BOOL) hasPointCount { - return !!hasPointCount_; -} -- (void) setHasPointCount:(BOOL) _value_ { - hasPointCount_ = !!_value_; -} -@synthesize pointCount; -- (BOOL) hasFeatureCount { - return !!hasFeatureCount_; -} -- (void) setHasFeatureCount:(BOOL) _value_ { - hasFeatureCount_ = !!_value_; -} -@synthesize featureCount; -- (BOOL) hasDistance { - return !!hasDistance_; -} -- (void) setHasDistance:(BOOL) _value_ { - hasDistance_ = !!_value_; -} -@synthesize distance; -- (BOOL) hasElapsedTime { - return !!hasElapsedTime_; -} -- (void) setHasElapsedTime:(BOOL) _value_ { - hasElapsedTime_ = !!_value_; -} -@synthesize elapsedTime; -- (instancetype) init { - if ((self = [super init])) { - self.pointCount = 0; - self.featureCount = 0; - self.distance = 0; - self.elapsedTime = 0; - } - return self; -} -static RGDRouteSummary* defaultRGDRouteSummaryInstance = nil; -+ (void) initialize { - if (self == [RGDRouteSummary class]) { - defaultRGDRouteSummaryInstance = [[RGDRouteSummary alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultRGDRouteSummaryInstance; -} -- (instancetype) defaultInstance { - return defaultRGDRouteSummaryInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasPointCount) { - [output writeInt32:1 value:self.pointCount]; - } - if (self.hasFeatureCount) { - [output writeInt32:2 value:self.featureCount]; - } - if (self.hasDistance) { - [output writeInt32:3 value:self.distance]; - } - if (self.hasElapsedTime) { - [output writeInt32:4 value:self.elapsedTime]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasPointCount) { - size_ += computeInt32Size(1, self.pointCount); - } - if (self.hasFeatureCount) { - size_ += computeInt32Size(2, self.featureCount); - } - if (self.hasDistance) { - size_ += computeInt32Size(3, self.distance); - } - if (self.hasElapsedTime) { - size_ += computeInt32Size(4, self.elapsedTime); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (RGDRouteSummary*) parseFromData:(NSData*) data { - return (RGDRouteSummary*)[[[RGDRouteSummary builder] mergeFromData:data] build]; -} -+ (RGDRouteSummary*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RGDRouteSummary*)[[[RGDRouteSummary builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (RGDRouteSummary*) parseFromInputStream:(NSInputStream*) input { - return (RGDRouteSummary*)[[[RGDRouteSummary builder] mergeFromInputStream:input] build]; -} -+ (RGDRouteSummary*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RGDRouteSummary*)[[[RGDRouteSummary builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RGDRouteSummary*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (RGDRouteSummary*)[[[RGDRouteSummary builder] mergeFromCodedInputStream:input] build]; -} -+ (RGDRouteSummary*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (RGDRouteSummary*)[[[RGDRouteSummary builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (RGDRouteSummaryBuilder*) builder { - return [[RGDRouteSummaryBuilder alloc] init]; -} -+ (RGDRouteSummaryBuilder*) builderWithPrototype:(RGDRouteSummary*) prototype { - return [[RGDRouteSummary builder] mergeFrom:prototype]; -} -- (RGDRouteSummaryBuilder*) builder { - return [RGDRouteSummary builder]; -} -- (RGDRouteSummaryBuilder*) toBuilder { - return [RGDRouteSummary builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasPointCount) { - [output appendFormat:@"%@%@: %@\n", indent, @"pointCount", [NSNumber numberWithInteger:self.pointCount]]; - } - if (self.hasFeatureCount) { - [output appendFormat:@"%@%@: %@\n", indent, @"featureCount", [NSNumber numberWithInteger:self.featureCount]]; - } - if (self.hasDistance) { - [output appendFormat:@"%@%@: %@\n", indent, @"distance", [NSNumber numberWithInteger:self.distance]]; - } - if (self.hasElapsedTime) { - [output appendFormat:@"%@%@: %@\n", indent, @"elapsedTime", [NSNumber numberWithInteger:self.elapsedTime]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[RGDRouteSummary class]]) { - return NO; - } - RGDRouteSummary *otherMessage = other; - return - self.hasPointCount == otherMessage.hasPointCount && - (!self.hasPointCount || self.pointCount == otherMessage.pointCount) && - self.hasFeatureCount == otherMessage.hasFeatureCount && - (!self.hasFeatureCount || self.featureCount == otherMessage.featureCount) && - self.hasDistance == otherMessage.hasDistance && - (!self.hasDistance || self.distance == otherMessage.distance) && - self.hasElapsedTime == otherMessage.hasElapsedTime && - (!self.hasElapsedTime || self.elapsedTime == otherMessage.elapsedTime) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasPointCount) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.pointCount] hash]; - } - if (self.hasFeatureCount) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.featureCount] hash]; - } - if (self.hasDistance) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.distance] hash]; - } - if (self.hasElapsedTime) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.elapsedTime] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface RGDRouteSummaryBuilder() -@property (strong) RGDRouteSummary* resultRouteSummary; -@end - -@implementation RGDRouteSummaryBuilder -@synthesize resultRouteSummary; -- (instancetype) init { - if ((self = [super init])) { - self.resultRouteSummary = [[RGDRouteSummary alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultRouteSummary; -} -- (RGDRouteSummaryBuilder*) clear { - self.resultRouteSummary = [[RGDRouteSummary alloc] init]; - return self; -} -- (RGDRouteSummaryBuilder*) clone { - return [RGDRouteSummary builderWithPrototype:resultRouteSummary]; -} -- (RGDRouteSummary*) defaultInstance { - return [RGDRouteSummary defaultInstance]; -} -- (RGDRouteSummary*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (RGDRouteSummary*) buildPartial { - RGDRouteSummary* returnMe = resultRouteSummary; - self.resultRouteSummary = nil; - return returnMe; -} -- (RGDRouteSummaryBuilder*) mergeFrom:(RGDRouteSummary*) other { - if (other == [RGDRouteSummary defaultInstance]) { - return self; - } - if (other.hasPointCount) { - [self setPointCount:other.pointCount]; - } - if (other.hasFeatureCount) { - [self setFeatureCount:other.featureCount]; - } - if (other.hasDistance) { - [self setDistance:other.distance]; - } - if (other.hasElapsedTime) { - [self setElapsedTime:other.elapsedTime]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (RGDRouteSummaryBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (RGDRouteSummaryBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - [self setPointCount:[input readInt32]]; - break; - } - case 16: { - [self setFeatureCount:[input readInt32]]; - break; - } - case 24: { - [self setDistance:[input readInt32]]; - break; - } - case 32: { - [self setElapsedTime:[input readInt32]]; - break; - } - } - } -} -- (BOOL) hasPointCount { - return resultRouteSummary.hasPointCount; -} -- (SInt32) pointCount { - return resultRouteSummary.pointCount; -} -- (RGDRouteSummaryBuilder*) setPointCount:(SInt32) value { - resultRouteSummary.hasPointCount = YES; - resultRouteSummary.pointCount = value; - return self; -} -- (RGDRouteSummaryBuilder*) clearPointCount { - resultRouteSummary.hasPointCount = NO; - resultRouteSummary.pointCount = 0; - return self; -} -- (BOOL) hasFeatureCount { - return resultRouteSummary.hasFeatureCount; -} -- (SInt32) featureCount { - return resultRouteSummary.featureCount; -} -- (RGDRouteSummaryBuilder*) setFeatureCount:(SInt32) value { - resultRouteSummary.hasFeatureCount = YES; - resultRouteSummary.featureCount = value; - return self; -} -- (RGDRouteSummaryBuilder*) clearFeatureCount { - resultRouteSummary.hasFeatureCount = NO; - resultRouteSummary.featureCount = 0; - return self; -} -- (BOOL) hasDistance { - return resultRouteSummary.hasDistance; -} -- (SInt32) distance { - return resultRouteSummary.distance; -} -- (RGDRouteSummaryBuilder*) setDistance:(SInt32) value { - resultRouteSummary.hasDistance = YES; - resultRouteSummary.distance = value; - return self; -} -- (RGDRouteSummaryBuilder*) clearDistance { - resultRouteSummary.hasDistance = NO; - resultRouteSummary.distance = 0; - return self; -} -- (BOOL) hasElapsedTime { - return resultRouteSummary.hasElapsedTime; -} -- (SInt32) elapsedTime { - return resultRouteSummary.elapsedTime; -} -- (RGDRouteSummaryBuilder*) setElapsedTime:(SInt32) value { - resultRouteSummary.hasElapsedTime = YES; - resultRouteSummary.elapsedTime = value; - return self; -} -- (RGDRouteSummaryBuilder*) clearElapsedTime { - resultRouteSummary.hasElapsedTime = NO; - resultRouteSummary.elapsedTime = 0; - return self; -} -@end - - -// @@protoc_insertion_point(global_scope) diff --git a/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.podspec b/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.podspec index 04d847bf8f..5b1a68aad5 100644 --- a/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.podspec +++ b/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.podspec @@ -6,12 +6,19 @@ Pod::Spec.new do |s| s.license = 'New BSD' s.authors = { 'Jorge Canizales' => 'jcanizales@google.com' } - s.source_files = '*.pb.{h,m}' - s.public_header_files = '*.pb.h' - - s.platform = :ios s.ios.deployment_target = '6.0' - s.requires_arc = true + s.osx.deployment_target = '10.8' + + s.subspec 'Messages' do |ms| + ms.source_files = '*.pbobjc.{h,m}' + ms.requires_arc = false + ms.dependency 'Protobuf', '~> 3.0' + end - s.dependency 'ProtocolBuffers', '~> 1.9' + s.subspec 'Services' do |ss| + ss.source_files = '*.pbrpc.{h,m}' + ss.requires_arc = true + ss.dependency 'gRPC', '~> 0.0' + ss.dependency 'Route_guide/Messages' + end end diff --git a/src/objective-c/examples/Sample/RouteGuideClient/route_guide.proto b/src/objective-c/examples/Sample/RouteGuideClient/route_guide.proto index 91b0372a07..16dce26a2b 100644 --- a/src/objective-c/examples/Sample/RouteGuideClient/route_guide.proto +++ b/src/objective-c/examples/Sample/RouteGuideClient/route_guide.proto @@ -27,12 +27,11 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -syntax = "proto2"; +syntax = "proto3"; package grpc.example.routeguide; -import "google/protobuf/objectivec-descriptor.proto"; -option (google.protobuf.objectivec_file_options).class_prefix = "RGD"; +option objc_class_prefix = "RGD"; // Interface exported by the server. service RouteGuide { @@ -47,19 +46,19 @@ service RouteGuide { // streamed rather than returned at once (e.g. in a response message with a // repeated field), as the rectangle may cover a large area and contain a // huge number of features. -// rpc ListFeatures(Rectangle) returns (stream Feature) {} + rpc ListFeatures(Rectangle) returns (stream Feature) {} // A client-to-server streaming RPC. // // Accepts a stream of Points on a route being traversed, returning a // RouteSummary when traversal is completed. -// rpc RecordRoute(stream Point) returns (RouteSummary) {} + rpc RecordRoute(stream Point) returns (RouteSummary) {} // A Bidirectional streaming RPC. // // Accepts a stream of RouteNotes sent while a route is being traversed, // while receiving other RouteNotes (e.g. from other users). -// rpc RouteChat(stream RouteNote) returns (stream RouteNote) {} + rpc RouteChat(stream RouteNote) returns (stream RouteNote) {} } // Points are represented as latitude-longitude pairs in the E7 representation @@ -67,18 +66,18 @@ service RouteGuide { // Latitudes should be in the range +/- 90 degrees and longitude should be in // the range +/- 180 degrees (inclusive). message Point { - optional int32 latitude = 1; - optional int32 longitude = 2; + int32 latitude = 1; + int32 longitude = 2; } // A latitude-longitude rectangle, represented as two diagonally opposite // points "lo" and "hi". message Rectangle { // One corner of the rectangle. - optional Point lo = 1; + Point lo = 1; // The other corner of the rectangle. - optional Point hi = 2; + Point hi = 2; } // A feature names something at a given point. @@ -86,19 +85,19 @@ message Rectangle { // If a feature could not be named, the name is empty. message Feature { // The name of the feature. - optional string name = 1; + string name = 1; // The point where the feature is detected. - optional Point location = 2; + Point location = 2; } // A RouteNote is a message sent while at a given point. message RouteNote { // The location from which the message is sent. - optional Point location = 1; + Point location = 1; // The message to be sent. - optional string message = 2; + string message = 2; } // A RouteSummary is received in response to a RecordRoute rpc. @@ -108,14 +107,14 @@ message RouteNote { // the distance between each point. message RouteSummary { // The number of points received. - optional int32 point_count = 1; + int32 point_count = 1; // The number of known features passed while traversing the route. - optional int32 feature_count = 2; + int32 feature_count = 2; // The distance covered in metres. - optional int32 distance = 3; + int32 distance = 3; // The duration of the traversal in seconds. - optional int32 elapsed_time = 4; -}
\ No newline at end of file + int32 elapsed_time = 4; +} diff --git a/src/objective-c/examples/Sample/Sample/ViewController.m b/src/objective-c/examples/Sample/Sample/ViewController.m index c7d8e0d145..1c866babec 100644 --- a/src/objective-c/examples/Sample/Sample/ViewController.m +++ b/src/objective-c/examples/Sample/Sample/ViewController.m @@ -37,7 +37,8 @@ #import <gRPC/GRPCMethodName.h> #import <gRPC/GRXWriter+Immediate.h> #import <gRPC/GRXWriteable.h> -#import <RemoteTest/Messages.pb.h> +#import <RemoteTest/Messages.pbobjc.h> +#import <RemoteTest/Test.pbrpc.h> @interface ViewController () @end @@ -47,18 +48,34 @@ - (void)viewDidLoad { [super viewDidLoad]; + NSString * const kRemoteHost = @"grpc-test.sandbox.google.com"; + + RMTSimpleRequest *request = [[RMTSimpleRequest alloc] init]; + request.responseSize = 10; + request.fillUsername = YES; + request.fillOauthScope = YES; + + // Example gRPC call using a generated proto client library: + + RMTTestService *service = [[RMTTestService alloc] initWithHost:kRemoteHost]; + [service unaryCallWithRequest:request handler:^(RMTSimpleResponse *response, NSError *error) { + if (response) { + NSLog(@"Finished successfully with response:\n%@", response); + } else if (error) { + NSLog(@"Finished with error: %@", error); + } + }]; + + + // Same example call using the generic gRPC client library: + GRPCMethodName *method = [[GRPCMethodName alloc] initWithPackage:@"grpc.testing" interface:@"TestService" method:@"UnaryCall"]; - RMTSimpleRequest *request = [[[[[[RMTSimpleRequestBuilder alloc] init] - setResponseSize:100] - setFillUsername:YES] - setFillOauthScope:YES] - build]; id<GRXWriter> requestsWriter = [GRXWriter writerWithValue:[request data]]; - GRPCCall *call = [[GRPCCall alloc] initWithHost:@"grpc-test.sandbox.google.com" + GRPCCall *call = [[GRPCCall alloc] initWithHost:kRemoteHost method:method requestsWriter:requestsWriter]; @@ -66,7 +83,11 @@ RMTSimpleResponse *response = [RMTSimpleResponse parseFromData:value]; NSLog(@"Received response:\n%@", response); } completionHandler:^(NSError *errorOrNil) { - NSLog(@"Finished with error: %@", errorOrNil); + if (errorOrNil) { + NSLog(@"Finished with error: %@", errorOrNil); + } else { + NSLog(@"Finished successfully."); + } }]; [call startWithWriteable:responsesWriteable]; diff --git a/src/objective-c/examples/Sample/SampleTests/RemoteProtoTests.m b/src/objective-c/examples/Sample/SampleTests/RemoteProtoTests.m index 72ceed0c31..8e0e11d23d 100644 --- a/src/objective-c/examples/Sample/SampleTests/RemoteProtoTests.m +++ b/src/objective-c/examples/Sample/SampleTests/RemoteProtoTests.m @@ -36,10 +36,45 @@ #import <UIKit/UIKit.h> #import <XCTest/XCTest.h> -#import <gRPC/ProtoRPC.h> #import <gRPC/GRXWriter+Immediate.h> -#import <RemoteTest/Messages.pb.h> -#import <RemoteTest/Test.pb.h> +#import <gRPC/GRXBufferedPipe.h> +#import <gRPC/ProtoRPC.h> +#import <RemoteTest/Empty.pbobjc.h> +#import <RemoteTest/Messages.pbobjc.h> +#import <RemoteTest/Test.pbobjc.h> +#import <RemoteTest/Test.pbrpc.h> + +// Convenience constructors for the generated proto messages: + +@interface RMTStreamingOutputCallRequest (Constructors) ++ (instancetype)messageWithPayloadSize:(NSNumber *)payloadSize + requestedResponseSize:(NSNumber *)responseSize; +@end + +@implementation RMTStreamingOutputCallRequest (Constructors) ++ (instancetype)messageWithPayloadSize:(NSNumber *)payloadSize + requestedResponseSize:(NSNumber *)responseSize { + RMTStreamingOutputCallRequest *request = [self message]; + RMTResponseParameters *parameters = [RMTResponseParameters message]; + parameters.size = responseSize.integerValue; + [request.responseParametersArray addObject:parameters]; + request.payload.body = [NSMutableData dataWithLength:payloadSize.unsignedIntegerValue]; + return request; +} +@end + +@interface RMTStreamingOutputCallResponse (Constructors) ++ (instancetype)messageWithPayloadSize:(NSNumber *)payloadSize; +@end + +@implementation RMTStreamingOutputCallResponse (Constructors) ++ (instancetype)messageWithPayloadSize:(NSNumber *)payloadSize { + RMTStreamingOutputCallResponse * response = [self message]; + response.payload.type = RMTPayloadType_Compressable; + response.payload.body = [NSMutableData dataWithLength:payloadSize.unsignedIntegerValue]; + return response; +} +@end @interface RemoteProtoTests : XCTestCase @end @@ -57,136 +92,214 @@ - (void)testEmptyUnaryRPC { __weak XCTestExpectation *expectation = [self expectationWithDescription:@"EmptyUnary"]; - RMTEmpty *request = [RMTEmpty defaultInstance]; + RMTEmpty *request = [RMTEmpty message]; [_service emptyCallWithRequest:request handler:^(RMTEmpty *response, NSError *error) { XCTAssertNil(error, @"Finished with unexpected error: %@", error); - id expectedResponse = [RMTEmpty defaultInstance]; + id expectedResponse = [RMTEmpty message]; XCTAssertEqualObjects(response, expectedResponse); [expectation fulfill]; }]; - [self waitForExpectationsWithTimeout:2. handler:nil]; + [self waitForExpectationsWithTimeout:2 handler:nil]; } - (void)testLargeUnaryRPC { __weak XCTestExpectation *expectation = [self expectationWithDescription:@"LargeUnary"]; - RMTSimpleRequest *request = [[[[[[RMTSimpleRequestBuilder alloc] init] - setResponseType:RMTPayloadTypeCompressable] - setResponseSize:314159] - setPayloadBuilder:[[[RMTPayloadBuilder alloc] init] - setBody:[NSMutableData dataWithLength:271828]]] - build]; + RMTSimpleRequest *request = [RMTSimpleRequest message]; + request.responseType = RMTPayloadType_Compressable; + request.responseSize = 314159; + request.payload.body = [NSMutableData dataWithLength:271828]; [_service unaryCallWithRequest:request handler:^(RMTSimpleResponse *response, NSError *error) { XCTAssertNil(error, @"Finished with unexpected error: %@", error); - id expectedResponse = [[[[RMTSimpleResponseBuilder alloc] init] - setPayloadBuilder:[[[[RMTPayloadBuilder alloc] init] - setType:RMTPayloadTypeCompressable] - setBody:[NSMutableData dataWithLength:314159]]] - build]; + RMTSimpleResponse *expectedResponse = [RMTSimpleResponse message]; + expectedResponse.payload.type = RMTPayloadType_Compressable; + expectedResponse.payload.body = [NSMutableData dataWithLength:314159]; XCTAssertEqualObjects(response, expectedResponse); [expectation fulfill]; }]; - [self waitForExpectationsWithTimeout:4. handler:nil]; + [self waitForExpectationsWithTimeout:4 handler:nil]; } - (void)testClientStreamingRPC { __weak XCTestExpectation *expectation = [self expectationWithDescription:@"ClientStreaming"]; - id request1 = [[[[RMTStreamingInputCallRequestBuilder alloc] init] - setPayloadBuilder:[[[RMTPayloadBuilder alloc] init] - setBody:[NSMutableData dataWithLength:27182]]] - build]; - id request2 = [[[[RMTStreamingInputCallRequestBuilder alloc] init] - setPayloadBuilder:[[[RMTPayloadBuilder alloc] init] - setBody:[NSMutableData dataWithLength:8]]] - build]; - id request3 = [[[[RMTStreamingInputCallRequestBuilder alloc] init] - setPayloadBuilder:[[[RMTPayloadBuilder alloc] init] - setBody:[NSMutableData dataWithLength:1828]]] - build]; - id request4 = [[[[RMTStreamingInputCallRequestBuilder alloc] init] - setPayloadBuilder:[[[RMTPayloadBuilder alloc] init] - setBody:[NSMutableData dataWithLength:45904]]] - build]; + RMTStreamingInputCallRequest *request1 = [RMTStreamingInputCallRequest message]; + request1.payload.body = [NSMutableData dataWithLength:27182]; + + RMTStreamingInputCallRequest *request2 = [RMTStreamingInputCallRequest message]; + request2.payload.body = [NSMutableData dataWithLength:8]; + + RMTStreamingInputCallRequest *request3 = [RMTStreamingInputCallRequest message]; + request3.payload.body = [NSMutableData dataWithLength:1828]; + + RMTStreamingInputCallRequest *request4 = [RMTStreamingInputCallRequest message]; + request4.payload.body = [NSMutableData dataWithLength:45904]; + id<GRXWriter> writer = [GRXWriter writerWithContainer:@[request1, request2, request3, request4]]; [_service streamingInputCallWithRequestsWriter:writer - handler:^(RMTStreamingInputCallResponse *response, NSError *error) { + handler:^(RMTStreamingInputCallResponse *response, + NSError *error) { XCTAssertNil(error, @"Finished with unexpected error: %@", error); - id expectedResponse = [[[[RMTStreamingInputCallResponseBuilder alloc] init] - setAggregatedPayloadSize:74922] - build]; + RMTStreamingInputCallResponse *expectedResponse = [RMTStreamingInputCallResponse message]; + expectedResponse.aggregatedPayloadSize = 74922; XCTAssertEqualObjects(response, expectedResponse); [expectation fulfill]; }]; - [self waitForExpectationsWithTimeout:4. handler:nil]; + [self waitForExpectationsWithTimeout:4 handler:nil]; } - (void)testServerStreamingRPC { __weak XCTestExpectation *expectation = [self expectationWithDescription:@"ServerStreaming"]; + NSArray *expectedSizes = @[@31415, @9, @2653, @58979]; + + RMTStreamingOutputCallRequest *request = [RMTStreamingOutputCallRequest message]; + for (NSNumber *size in expectedSizes) { + RMTResponseParameters *parameters = [RMTResponseParameters message]; + parameters.size = [size integerValue]; + [request.responseParametersArray addObject:parameters]; + } + __block int index = 0; - id request = [[[[[[[RMTStreamingOutputCallRequestBuilder alloc] init] - addResponseParameters:[[[[RMTResponseParametersBuilder alloc] init] - setSize:31415] build]] - addResponseParameters:[[[[RMTResponseParametersBuilder alloc] init] - setSize:9] build]] - addResponseParameters:[[[[RMTResponseParametersBuilder alloc] init] - setSize:2653] build]] - addResponseParameters:[[[[RMTResponseParametersBuilder alloc] init] - setSize:58979] build]] - build]; - [_service streamingOutputCallWithRequest:request handler:^(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error){ + [_service streamingOutputCallWithRequest:request + handler:^(BOOL done, + RMTStreamingOutputCallResponse *response, + NSError *error){ XCTAssertNil(error, @"Finished with unexpected error: %@", error); - id expectedResponseBuilder = [[RMTStreamingOutputCallResponseBuilder alloc] init]; - id expectedPayload = [[[[[RMTPayloadBuilder alloc] init] - setType:RMTPayloadTypeCompressable] - setBody:[NSMutableData dataWithLength:[expectedSizes[index] unsignedIntegerValue]]] - build]; - expectedResponseBuilder = [expectedResponseBuilder setPayload:expectedPayload]; - id expectedResponse = [expectedResponseBuilder build]; - XCTAssertEqualObjects(response, expectedResponse); - - [expectation fulfill]; - index += 1; + XCTAssertTrue(done || response, @"Event handler called without an event."); + + if (response) { + XCTAssertLessThan(index, 4, @"More than 4 responses received."); + id expected = [RMTStreamingOutputCallResponse messageWithPayloadSize:expectedSizes[index]]; + XCTAssertEqualObjects(response, expected); + index += 1; + } + + if (done) { + XCTAssertEqual(index, 4, @"Received %i responses instead of 4.", index); + [expectation fulfill]; + } }]; [self waitForExpectationsWithTimeout:4 handler:nil]; } +- (void)testPingPongRPC { + __weak XCTestExpectation *expectation = [self expectationWithDescription:@"PingPong"]; + + NSArray *requests = @[@27182, @8, @1828, @45904]; + NSArray *responses = @[@31415, @9, @2653, @58979]; + + GRXBufferedPipe *requestsBuffer = [[GRXBufferedPipe alloc] init]; + + __block int index = 0; + + id request = [RMTStreamingOutputCallRequest messageWithPayloadSize:requests[index] + requestedResponseSize:responses[index]]; + [requestsBuffer writeValue:request]; + + [_service fullDuplexCallWithRequestsWriter:requestsBuffer + handler:^(BOOL done, + RMTStreamingOutputCallResponse *response, + NSError *error) { + XCTAssertNil(error, @"Finished with unexpected error: %@", error); + XCTAssertTrue(done || response, @"Event handler called without an event."); + + if (response) { + XCTAssertLessThan(index, 4, @"More than 4 responses received."); + id expected = [RMTStreamingOutputCallResponse messageWithPayloadSize:responses[index]]; + XCTAssertEqualObjects(response, expected); + index += 1; + if (index < 4) { + id request = [RMTStreamingOutputCallRequest messageWithPayloadSize:requests[index] + requestedResponseSize:responses[index]]; + [requestsBuffer writeValue:request]; + } else { + [requestsBuffer writesFinishedWithError:nil]; + } + } + + if (done) { + XCTAssertEqual(index, 4, @"Received %i responses instead of 4.", index); + [expectation fulfill]; + } + }]; + [self waitForExpectationsWithTimeout:2 handler:nil]; +} + - (void)testEmptyStreamRPC { __weak XCTestExpectation *expectation = [self expectationWithDescription:@"EmptyStream"]; [_service fullDuplexCallWithRequestsWriter:[GRXWriter emptyWriter] - handler:^(bool done, RMTStreamingOutputCallResponse *response, NSError *error) { - XCTAssertNil(error, @"Finished with unexpected error: %@", error); - XCTAssert(done, @"Unexpected response: %@", response); - [expectation fulfill]; - }]; - [self waitForExpectationsWithTimeout:4 handler:nil]; + handler:^(BOOL done, + RMTStreamingOutputCallResponse *response, + NSError *error) { + XCTAssertNil(error, @"Finished with unexpected error: %@", error); + XCTAssert(done, @"Unexpected response: %@", response); + [expectation fulfill]; + }]; + [self waitForExpectationsWithTimeout:2 handler:nil]; } - (void)testCancelAfterBeginRPC { __weak XCTestExpectation *expectation = [self expectationWithDescription:@"CancelAfterBegin"]; - // TODO(mlumish): change to writing that blocks instead of writing - ProtoRPC *call = [_service RPCToStreamingInputCallWithRequestsWriter:[GRXWriter emptyWriter] - handler:^(RMTStreamingInputCallResponse *response, NSError *error) { - XCTAssertEqual([error code], GRPC_STATUS_CANCELLED); - [expectation fulfill]; - }]; + + // A buffered pipe to which we never write any value acts as a writer that just hangs. + GRXBufferedPipe *requestsBuffer = [[GRXBufferedPipe alloc] init]; + + ProtoRPC *call = [_service RPCToStreamingInputCallWithRequestsWriter:requestsBuffer + handler:^(RMTStreamingInputCallResponse *response, + NSError *error) { + XCTAssertEqual(error.code, GRPC_STATUS_CANCELLED); + [expectation fulfill]; + }]; [call start]; [call cancel]; [self waitForExpectationsWithTimeout:1 handler:nil]; } +- (void)testCancelAfterFirstResponseRPC { + __weak XCTestExpectation *expectation = [self expectationWithDescription:@"CancelAfterFirstResponse"]; + + // A buffered pipe to which we write a single value but never close + GRXBufferedPipe *requestsBuffer = [[GRXBufferedPipe alloc] init]; + + __block BOOL receivedResponse = NO; + + id request = [RMTStreamingOutputCallRequest messageWithPayloadSize:@21782 + requestedResponseSize:@31415]; + + [requestsBuffer writeValue:request]; + + __block ProtoRPC *call = [_service RPCToFullDuplexCallWithRequestsWriter:requestsBuffer + handler:^(BOOL done, + RMTStreamingOutputCallResponse *response, + NSError *error) { + if (receivedResponse) { + XCTAssert(done, @"Unexpected extra response %@", response); + XCTAssertEqual(error.code, GRPC_STATUS_CANCELLED); + [expectation fulfill]; + } else { + XCTAssertNil(error, @"Finished with unexpected error: %@", error); + XCTAssertFalse(done, @"Finished without response"); + XCTAssertNotNil(response); + receivedResponse = YES; + [call cancel]; + } + }]; + [call start]; + [self waitForExpectationsWithTimeout:4 handler:nil]; +} + @end diff --git a/src/objective-c/examples/Sample/SampleTests/RemoteTests.m b/src/objective-c/examples/Sample/SampleTests/RemoteTests.m index 6091aa9d31..553c813b0b 100644 --- a/src/objective-c/examples/Sample/SampleTests/RemoteTests.m +++ b/src/objective-c/examples/Sample/SampleTests/RemoteTests.m @@ -38,7 +38,7 @@ #import <gRPC/GRPCMethodName.h> #import <gRPC/GRXWriter+Immediate.h> #import <gRPC/GRXWriteable.h> -#import <RemoteTest/Messages.pb.h> +#import <RemoteTest/Messages.pbobjc.h> @interface RemoteTests : XCTestCase @end @@ -111,11 +111,10 @@ interface:@"TestService" method:@"UnaryCall"]; - RMTSimpleRequest *request = [[[[[[RMTSimpleRequestBuilder alloc] init] - setResponseSize:100] - setFillUsername:YES] - setFillOauthScope:YES] - build]; + RMTSimpleRequest *request = [[RMTSimpleRequest alloc] init]; + request.responseSize = 100; + request.fillUsername = YES; + request.fillOauthScope = YES; id<GRXWriter> requestsWriter = [GRXWriter writerWithValue:[request data]]; GRPCCall *call = [[GRPCCall alloc] initWithHost:@"grpc-test.sandbox.google.com" diff --git a/src/objective-c/examples/Sample/SampleTests/SampleTests.m b/src/objective-c/examples/Sample/SampleTests/SampleTests.m index 6d6875c233..b1a0f78a01 100644 --- a/src/objective-c/examples/Sample/SampleTests/SampleTests.m +++ b/src/objective-c/examples/Sample/SampleTests/SampleTests.m @@ -38,7 +38,8 @@ #import <gRPC/GRPCMethodName.h> #import <gRPC/GRXWriter+Immediate.h> #import <gRPC/GRXWriteable.h> -#import <Route_guide/Route_guide.pb.h> +#import <Route_guide/RouteGuide.pbobjc.h> +#import <Route_guide/RouteGuide.pbrpc.h> @interface SampleTests : XCTestCase @end @@ -105,15 +106,15 @@ - (void)testSimpleProtoRPC { __weak XCTestExpectation *response = [self expectationWithDescription:@"Response received."]; - __weak XCTestExpectation *expectedResponse = - [self expectationWithDescription:@"Expected response."]; __weak XCTestExpectation *completion = [self expectationWithDescription:@"RPC completed."]; GRPCMethodName *method = [[GRPCMethodName alloc] initWithPackage:@"grpc.example.routeguide" interface:@"RouteGuide" method:@"GetFeature"]; - RGDPoint *point = [[[[[RGDPointBuilder alloc] init] setLatitude:28E7] setLongitude:-15E7] build]; + RGDPoint *point = [RGDPoint message]; + point.latitude = 28E7; + point.longitude = -15E7; id<GRXWriter> requestsWriter = [GRXWriter writerWithValue:[point data]]; GRPCCall *call = [[GRPCCall alloc] initWithHost:@"http://127.0.0.1:8980" @@ -122,11 +123,10 @@ id<GRXWriteable> responsesWriteable = [[GRXWriteable alloc] initWithValueHandler:^(NSData *value) { XCTAssertNotNil(value, @"nil value received as response."); - [response fulfill]; RGDFeature *feature = [RGDFeature parseFromData:value]; XCTAssertEqualObjects(point, feature.location); XCTAssertNotNil(feature.name, @"Response's name is nil."); - [expectedResponse fulfill]; + [response fulfill]; } completionHandler:^(NSError *errorOrNil) { XCTAssertNil(errorOrNil, @"Finished with unexpected error: %@", errorOrNil); [completion fulfill]; @@ -136,4 +136,22 @@ [self waitForExpectationsWithTimeout:2.0 handler:nil]; } + +- (void)testSimpleProtoRPCUsingGeneratedService { + __weak XCTestExpectation *completion = [self expectationWithDescription:@"RPC completed."]; + + RGDPoint *point = [RGDPoint message]; + point.latitude = 28E7; + point.longitude = -15E7; + + RGDRouteGuide *service = [[RGDRouteGuide alloc] initWithHost:@"http://127.0.0.1:8980"]; + [service getFeatureWithRequest:point handler:^(RGDFeature *response, NSError *error) { + XCTAssertNil(error, @"Finished with unexpected error: %@", error); + XCTAssertEqualObjects(point, response.location); + XCTAssertNotNil(response.name, @"Response's name is nil."); + [completion fulfill]; + }]; + + [self waitForExpectationsWithTimeout:2.0 handler:nil]; +} @end diff --git a/src/python/README.md b/src/python/README.md index b5eea239f3..c67201b670 100644 --- a/src/python/README.md +++ b/src/python/README.md @@ -7,7 +7,7 @@ The Python facility of gRPC. Status ------- -Usable with limitations, Alpha +Alpha : Ready for early adopters Prerequisites ----------------------- diff --git a/src/python/requirements.txt b/src/python/requirements.txt index 06a42e1c9f..d32d436d3c 100644 --- a/src/python/requirements.txt +++ b/src/python/requirements.txt @@ -1,3 +1,3 @@ enum34==1.0.4 futures==2.2.0 -protobuf==3.0.0-alpha-1 +protobuf==3.0.0a2 diff --git a/src/python/src/grpc/_adapter/_face_test_case.py b/src/python/src/grpc/_adapter/_face_test_case.py index 923e889844..5fa974ed06 100644 --- a/src/python/src/grpc/_adapter/_face_test_case.py +++ b/src/python/src/grpc/_adapter/_face_test_case.py @@ -43,7 +43,7 @@ from grpc.framework.foundation import logging_pool _TIMEOUT = 3 _MAXIMUM_TIMEOUT = 90 -_MAXIMUM_POOL_SIZE = 400 +_MAXIMUM_POOL_SIZE = 4 class FaceTestCase(test_case.FaceTestCase, coverage.BlockingCoverage): diff --git a/src/python/src/grpc/_adapter/_links_test.py b/src/python/src/grpc/_adapter/_links_test.py index 4987be389a..4fd76f60f8 100644 --- a/src/python/src/grpc/_adapter/_links_test.py +++ b/src/python/src/grpc/_adapter/_links_test.py @@ -54,8 +54,8 @@ def _transform_metadata(unused_metadata): class RoundTripTest(unittest.TestCase): def setUp(self): - self.fore_link_pool = logging_pool.pool(80) - self.rear_link_pool = logging_pool.pool(80) + self.fore_link_pool = logging_pool.pool(8) + self.rear_link_pool = logging_pool.pool(8) def tearDown(self): self.rear_link_pool.shutdown(wait=True) diff --git a/src/python/src/grpc/_adapter/_lonely_rear_link_test.py b/src/python/src/grpc/_adapter/_lonely_rear_link_test.py index 25799d679c..bdb1ee2379 100644 --- a/src/python/src/grpc/_adapter/_lonely_rear_link_test.py +++ b/src/python/src/grpc/_adapter/_lonely_rear_link_test.py @@ -43,7 +43,7 @@ _TIMEOUT = 2 class LonelyRearLinkTest(unittest.TestCase): def setUp(self): - self.pool = logging_pool.pool(80) + self.pool = logging_pool.pool(8) def tearDown(self): self.pool.shutdown(wait=True) diff --git a/src/python/src/grpc/_adapter/fore.py b/src/python/src/grpc/_adapter/fore.py index 05016cdaf3..69e145e3f6 100644 --- a/src/python/src/grpc/_adapter/fore.py +++ b/src/python/src/grpc/_adapter/fore.py @@ -41,7 +41,7 @@ from grpc.framework.base import null from grpc.framework.foundation import activated from grpc.framework.foundation import logging_pool -_THREAD_POOL_SIZE = 100 +_THREAD_POOL_SIZE = 10 @enum.unique diff --git a/src/python/src/grpc/_adapter/rear.py b/src/python/src/grpc/_adapter/rear.py index dd0a486117..b3b0b4ed32 100644 --- a/src/python/src/grpc/_adapter/rear.py +++ b/src/python/src/grpc/_adapter/rear.py @@ -41,7 +41,7 @@ from grpc.framework.base import null from grpc.framework.foundation import activated from grpc.framework.foundation import logging_pool -_THREAD_POOL_SIZE = 100 +_THREAD_POOL_SIZE = 10 _INVOCATION_EVENT_KINDS = ( _low.Event.Kind.METADATA_ACCEPTED, diff --git a/src/python/src/grpc/early_adopter/implementations.py b/src/python/src/grpc/early_adopter/implementations.py index f3f2a043eb..10919fae69 100644 --- a/src/python/src/grpc/early_adopter/implementations.py +++ b/src/python/src/grpc/early_adopter/implementations.py @@ -41,7 +41,7 @@ from grpc.framework.base import util as _base_utilities from grpc.framework.face import implementations as _face_implementations from grpc.framework.foundation import logging_pool -_THREAD_POOL_SIZE = 80 +_THREAD_POOL_SIZE = 8 _ONE_DAY_IN_SECONDS = 24 * 60 * 60 diff --git a/src/python/src/grpc/framework/base/implementations_test.py b/src/python/src/grpc/framework/base/implementations_test.py index 11e49caf75..d40bb4d92e 100644 --- a/src/python/src/grpc/framework/base/implementations_test.py +++ b/src/python/src/grpc/framework/base/implementations_test.py @@ -36,7 +36,7 @@ from grpc.framework.base import interfaces_test_case from grpc.framework.base import util from grpc.framework.foundation import logging_pool -POOL_MAX_WORKERS = 100 +POOL_MAX_WORKERS = 10 DEFAULT_TIMEOUT = 30 MAXIMUM_TIMEOUT = 60 diff --git a/src/python/src/grpc/framework/face/_calls.py b/src/python/src/grpc/framework/face/_calls.py index 75a550e3c7..87edeb0f0e 100644 --- a/src/python/src/grpc/framework/face/_calls.py +++ b/src/python/src/grpc/framework/face/_calls.py @@ -248,7 +248,7 @@ class _OperationFuture(future.Future): """See future.Future.add_done_callback for specification.""" with self._condition: if self._callbacks is not None: - self._callbacks.add(fn) + self._callbacks.append(fn) return callable_util.call_logging_exceptions(fn, _DONE_CALLBACK_LOG_MESSAGE, self) diff --git a/src/python/src/grpc/framework/face/_test_case.py b/src/python/src/grpc/framework/face/_test_case.py index b3a012db00..642d500628 100644 --- a/src/python/src/grpc/framework/face/_test_case.py +++ b/src/python/src/grpc/framework/face/_test_case.py @@ -35,7 +35,7 @@ from grpc.framework.face.testing import test_case from grpc.framework.foundation import logging_pool _TIMEOUT = 3 -_MAXIMUM_POOL_SIZE = 100 +_MAXIMUM_POOL_SIZE = 10 class FaceTestCase(test_case.FaceTestCase): diff --git a/src/python/src/grpc/framework/face/demonstration.py b/src/python/src/grpc/framework/face/demonstration.py index eabeac4569..f6b4b609ff 100644 --- a/src/python/src/grpc/framework/face/demonstration.py +++ b/src/python/src/grpc/framework/face/demonstration.py @@ -34,7 +34,7 @@ from grpc.framework.base import implementations as _base_implementations from grpc.framework.face import implementations from grpc.framework.foundation import logging_pool -_POOL_SIZE_LIMIT = 20 +_POOL_SIZE_LIMIT = 5 _MAXIMUM_TIMEOUT = 90 diff --git a/src/python/src/grpc/framework/face/testing/base_util.py b/src/python/src/grpc/framework/face/testing/base_util.py index 151d0ef793..1df1529b27 100644 --- a/src/python/src/grpc/framework/face/testing/base_util.py +++ b/src/python/src/grpc/framework/face/testing/base_util.py @@ -38,7 +38,7 @@ from grpc.framework.base import in_memory from grpc.framework.base import interfaces # pylint: disable=unused-import from grpc.framework.foundation import logging_pool -_POOL_SIZE_LIMIT = 20 +_POOL_SIZE_LIMIT = 5 _MAXIMUM_TIMEOUT = 90 diff --git a/src/python/src/grpc/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py b/src/python/src/grpc/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py index 0d51b64f1b..21bf9a4248 100644 --- a/src/python/src/grpc/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py +++ b/src/python/src/grpc/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py @@ -44,7 +44,7 @@ from grpc.framework.foundation import future from grpc.framework.foundation import logging_pool _TIMEOUT = 3 -_MAXIMUM_POOL_SIZE = 100 +_MAXIMUM_POOL_SIZE = 10 class _PauseableIterator(object): diff --git a/src/python/src/setup.py b/src/python/src/setup.py index a13dc4ec19..e936913cfd 100644 --- a/src/python/src/setup.py +++ b/src/python/src/setup.py @@ -93,6 +93,6 @@ setuptools.setup( install_requires=[ 'enum34==1.0.4', 'futures==2.2.0', - 'protobuf==3.0.0-alpha-1' + 'protobuf==3.0.0a2' ] ) diff --git a/src/ruby/bin/apis/pubsub_demo.rb b/src/ruby/bin/apis/pubsub_demo.rb index 6d69b0f21e..a039d036ac 100755 --- a/src/ruby/bin/apis/pubsub_demo.rb +++ b/src/ruby/bin/apis/pubsub_demo.rb @@ -79,7 +79,7 @@ end def publisher_stub(opts) address = "#{opts.host}:#{opts.port}" stub_clz = Tech::Pubsub::PublisherService::Stub # shorter - logger.info("... access PublisherService at #{address}") + GRPC.logger.info("... access PublisherService at #{address}") stub_clz.new(address, creds: ssl_creds, update_metadata: auth_proc(opts), GRPC::Core::Channel::SSL_TARGET => opts.host) @@ -89,7 +89,7 @@ end def subscriber_stub(opts) address = "#{opts.host}:#{opts.port}" stub_clz = Tech::Pubsub::SubscriberService::Stub # shorter - logger.info("... access SubscriberService at #{address}") + GRPC.logger.info("... access SubscriberService at #{address}") stub_clz.new(address, creds: ssl_creds, update_metadata: auth_proc(opts), GRPC::Core::Channel::SSL_TARGET => opts.host) diff --git a/src/ruby/bin/interop/interop_client.rb b/src/ruby/bin/interop/interop_client.rb index a388924722..8df03ffb3c 100755 --- a/src/ruby/bin/interop/interop_client.rb +++ b/src/ruby/bin/interop/interop_client.rb @@ -70,7 +70,7 @@ end # loads the certificates used to access the test server securely. def load_prod_cert fail 'could not find a production cert' if ENV['SSL_CERT_FILE'].nil? - logger.info("loading prod certs from #{ENV['SSL_CERT_FILE']}") + GRPC.logger.info("loading prod certs from #{ENV['SSL_CERT_FILE']}") File.open(ENV['SSL_CERT_FILE']).read end @@ -115,10 +115,10 @@ def create_stub(opts) stub_opts[:update_metadata] = auth_creds.updater_proc end - logger.info("... connecting securely to #{address}") + GRPC.logger.info("... connecting securely to #{address}") Grpc::Testing::TestService::Stub.new(address, **stub_opts) else - logger.info("... connecting insecurely to #{address}") + GRPC.logger.info("... connecting insecurely to #{address}") Grpc::Testing::TestService::Stub.new(address) end end diff --git a/src/ruby/bin/interop/interop_server.rb b/src/ruby/bin/interop/interop_server.rb index 72570d92f3..78cb8dd836 100755 --- a/src/ruby/bin/interop/interop_server.rb +++ b/src/ruby/bin/interop/interop_server.rb @@ -129,13 +129,13 @@ class TestTarget < Grpc::Testing::TestService::Service Thread.new do begin reqs.each do |req| - logger.info("read #{req.inspect}") + GRPC.logger.info("read #{req.inspect}") resp_size = req.response_parameters[0].size resp = cls.new(payload: Payload.new(type: req.response_type, body: nulls(resp_size))) q.push(resp) end - logger.info('finished reads') + GRPC.logger.info('finished reads') q.push(self) rescue StandardError => e q.push(e) # share the exception with the enumerator @@ -179,10 +179,10 @@ def main s = GRPC::RpcServer.new if opts['secure'] s.add_http2_port(host, test_server_creds) - logger.info("... running securely on #{host}") + GRPC.logger.info("... running securely on #{host}") else s.add_http2_port(host) - logger.info("... running insecurely on #{host}") + GRPC.logger.info("... running insecurely on #{host}") end s.handle(TestTarget) s.run_till_terminated diff --git a/src/ruby/bin/math_client.rb b/src/ruby/bin/math_client.rb index db254efb00..6319cda309 100755 --- a/src/ruby/bin/math_client.rb +++ b/src/ruby/bin/math_client.rb @@ -46,51 +46,51 @@ require 'optparse' include GRPC::Core::TimeConsts def do_div(stub) - logger.info('request_response') - logger.info('----------------') + GRPC.logger.info('request_response') + GRPC.logger.info('----------------') req = Math::DivArgs.new(dividend: 7, divisor: 3) - logger.info("div(7/3): req=#{req.inspect}") + GRPC.logger.info("div(7/3): req=#{req.inspect}") resp = stub.div(req, INFINITE_FUTURE) - logger.info("Answer: #{resp.inspect}") - logger.info('----------------') + GRPC.logger.info("Answer: #{resp.inspect}") + GRPC.logger.info('----------------') end def do_sum(stub) # to make client streaming requests, pass an enumerable of the inputs - logger.info('client_streamer') - logger.info('---------------') + GRPC.logger.info('client_streamer') + GRPC.logger.info('---------------') reqs = [1, 2, 3, 4, 5].map { |x| Math::Num.new(num: x) } - logger.info("sum(1, 2, 3, 4, 5): reqs=#{reqs.inspect}") + GRPC.logger.info("sum(1, 2, 3, 4, 5): reqs=#{reqs.inspect}") resp = stub.sum(reqs) # reqs.is_a?(Enumerable) - logger.info("Answer: #{resp.inspect}") - logger.info('---------------') + GRPC.logger.info("Answer: #{resp.inspect}") + GRPC.logger.info('---------------') end def do_fib(stub) - logger.info('server_streamer') - logger.info('----------------') + GRPC.logger.info('server_streamer') + GRPC.logger.info('----------------') req = Math::FibArgs.new(limit: 11) - logger.info("fib(11): req=#{req.inspect}") + GRPC.logger.info("fib(11): req=#{req.inspect}") resp = stub.fib(req, INFINITE_FUTURE) resp.each do |r| - logger.info("Answer: #{r.inspect}") + GRPC.logger.info("Answer: #{r.inspect}") end - logger.info('----------------') + GRPC.logger.info('----------------') end def do_div_many(stub) - logger.info('bidi_streamer') - logger.info('-------------') + GRPC.logger.info('bidi_streamer') + GRPC.logger.info('-------------') reqs = [] reqs << Math::DivArgs.new(dividend: 7, divisor: 3) reqs << Math::DivArgs.new(dividend: 5, divisor: 2) reqs << Math::DivArgs.new(dividend: 7, divisor: 2) - logger.info("div(7/3), div(5/2), div(7/2): reqs=#{reqs.inspect}") + GRPC.logger.info("div(7/3), div(5/2), div(7/2): reqs=#{reqs.inspect}") resp = stub.div_many(reqs, 10) resp.each do |r| - logger.info("Answer: #{r.inspect}") + GRPC.logger.info("Answer: #{r.inspect}") end - logger.info('----------------') + GRPC.logger.info('----------------') end def load_test_certs @@ -132,10 +132,10 @@ def main p stub_opts p options['host'] stub = Math::Math::Stub.new(options['host'], **stub_opts) - logger.info("... connecting securely on #{options['host']}") + GRPC.logger.info("... connecting securely on #{options['host']}") else stub = Math::Math::Stub.new(options['host']) - logger.info("... connecting insecurely on #{options['host']}") + GRPC.logger.info("... connecting insecurely on #{options['host']}") end do_div(stub) diff --git a/src/ruby/bin/math_server.rb b/src/ruby/bin/math_server.rb index e46d9c671f..b41ccf6ce1 100755 --- a/src/ruby/bin/math_server.rb +++ b/src/ruby/bin/math_server.rb @@ -128,13 +128,13 @@ class Calculator < Math::Math::Service t = Thread.new do begin requests.each do |req| - logger.info("read #{req.inspect}") + GRPC.logger.info("read #{req.inspect}") resp = Math::DivReply.new(quotient: req.dividend / req.divisor, remainder: req.dividend % req.divisor) q.push(resp) Thread.pass # let the internal Bidi threads run end - logger.info('finished reads') + GRPC.logger.info('finished reads') q.push(self) rescue StandardError => e q.push(e) # share the exception with the enumerator @@ -176,10 +176,10 @@ def main s = GRPC::RpcServer.new if options['secure'] s.add_http2_port(options['host'], test_server_creds) - logger.info("... running securely on #{options['host']}") + GRPC.logger.info("... running securely on #{options['host']}") else s.add_http2_port(options['host']) - logger.info("... running insecurely on #{options['host']}") + GRPC.logger.info("... running insecurely on #{options['host']}") end s.handle(Calculator) diff --git a/src/ruby/bin/noproto_client.rb b/src/ruby/bin/noproto_client.rb index f3fd110347..390a9c59c3 100755 --- a/src/ruby/bin/noproto_client.rb +++ b/src/ruby/bin/noproto_client.rb @@ -94,15 +94,15 @@ def main p stub_opts p options['host'] stub = NoProtoStub.new(options['host'], **stub_opts) - logger.info("... connecting securely on #{options['host']}") + GRPC.logger.info("... connecting securely on #{options['host']}") else stub = NoProtoStub.new(options['host']) - logger.info("... connecting insecurely on #{options['host']}") + GRPC.logger.info("... connecting insecurely on #{options['host']}") end - logger.info('sending a NoProto rpc') + GRPC.logger.info('sending a NoProto rpc') resp = stub.an_rpc(NoProtoMsg.new) - logger.info("got a response: #{resp}") + GRPC.logger.info("got a response: #{resp}") end main diff --git a/src/ruby/bin/noproto_server.rb b/src/ruby/bin/noproto_server.rb index f71daeadb3..90baaf9a2e 100755 --- a/src/ruby/bin/noproto_server.rb +++ b/src/ruby/bin/noproto_server.rb @@ -63,7 +63,7 @@ class NoProto < NoProtoService end def an_rpc(req, _call) - logger.info('echo service received a request') + GRPC.logger.info('echo service received a request') req end end @@ -98,10 +98,10 @@ def main s = GRPC::RpcServer.new if options['secure'] s.add_http2_port(options['host'], test_server_creds) - logger.info("... running securely on #{options['host']}") + GRPC.logger.info("... running securely on #{options['host']}") else s.add_http2_port(options['host']) - logger.info("... running insecurely on #{options['host']}") + GRPC.logger.info("... running insecurely on #{options['host']}") end s.handle(NoProto) diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb index f15f85bf56..1b801edc8e 100644 --- a/src/ruby/ext/grpc/extconf.rb +++ b/src/ruby/ext/grpc/extconf.rb @@ -34,13 +34,25 @@ INCLUDEDIR = RbConfig::CONFIG['includedir'] if ENV.key? 'GRPC_ROOT' GRPC_ROOT = ENV['GRPC_ROOT'] - if ENV.key? 'GRPC_LIB_DIR' - GRPC_LIB_DIR = ENV['GRPC_LIB_DIR'] +else + grpc_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + if File.exist?(File.join(grpc_root, 'include/grpc/grpc.h')) + GRPC_ROOT = grpc_root else - GRPC_LIB_DIR = 'libs/opt' + GRPC_ROOT = nil end +end + +if ENV.key? 'CONFIG' + GRPC_CONFIG = ENV['CONFIG'] else - GRPC_ROOT = nil + GRPC_CONFIG = 'opt' +end + +if (ENV.key? 'GRPC_LIB_DIR') && (!GRPC_ROOT.nil?) + GRPC_LIB_DIR = File.join(GRPC_ROOT, ENV['GRPC_LIB_DIR']) +else + GRPC_LIB_DIR = File.join(File.join(GRPC_ROOT, 'libs'), GRPC_CONFIG) end HEADER_DIRS = [ @@ -67,7 +79,10 @@ LIB_DIRS = [ unless GRPC_ROOT.nil? HEADER_DIRS.unshift File.join(GRPC_ROOT, 'include') - LIB_DIRS.unshift File.join(GRPC_ROOT, GRPC_LIB_DIR) + LIB_DIRS.unshift GRPC_LIB_DIR + unless File.exist?(File.join(GRPC_LIB_DIR, 'libgrpc.a')) + system("make -C #{GRPC_ROOT} static_c CONFIG=#{GRPC_CONFIG}") + end end def crash(msg) diff --git a/src/ruby/ext/grpc/rb_byte_buffer.c b/src/ruby/ext/grpc/rb_byte_buffer.c index e3a5277f54..edf0d3b115 100644 --- a/src/ruby/ext/grpc/rb_byte_buffer.c +++ b/src/ruby/ext/grpc/rb_byte_buffer.c @@ -33,7 +33,7 @@ #include "rb_byte_buffer.h" -#include <ruby.h> +#include <ruby/ruby.h> #include <grpc/grpc.h> #include <grpc/support/slice.h> diff --git a/src/ruby/ext/grpc/rb_byte_buffer.h b/src/ruby/ext/grpc/rb_byte_buffer.h index 96b9009dae..c7ddd76489 100644 --- a/src/ruby/ext/grpc/rb_byte_buffer.h +++ b/src/ruby/ext/grpc/rb_byte_buffer.h @@ -34,8 +34,9 @@ #ifndef GRPC_RB_BYTE_BUFFER_H_ #define GRPC_RB_BYTE_BUFFER_H_ +#include <ruby/ruby.h> + #include <grpc/grpc.h> -#include <ruby.h> /* Converts a char* with a length to a grpc_byte_buffer */ grpc_byte_buffer *grpc_rb_s_to_byte_buffer(char *string, size_t length); diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c index c46af250cd..29f870f929 100644 --- a/src/ruby/ext/grpc/rb_call.c +++ b/src/ruby/ext/grpc/rb_call.c @@ -33,7 +33,7 @@ #include "rb_call.h" -#include <ruby.h> +#include <ruby/ruby.h> #include <grpc/grpc.h> #include <grpc/support/alloc.h> diff --git a/src/ruby/ext/grpc/rb_call.h b/src/ruby/ext/grpc/rb_call.h index 003ce0429e..1d2fbc3580 100644 --- a/src/ruby/ext/grpc/rb_call.h +++ b/src/ruby/ext/grpc/rb_call.h @@ -34,8 +34,9 @@ #ifndef GRPC_RB_CALL_H_ #define GRPC_RB_CALL_H_ +#include <ruby/ruby.h> + #include <grpc/grpc.h> -#include <ruby.h> /* Gets the wrapped call from a VALUE. */ grpc_call* grpc_rb_get_wrapped_call(VALUE v); diff --git a/src/ruby/ext/grpc/rb_channel.c b/src/ruby/ext/grpc/rb_channel.c index 214675af92..d6876bc554 100644 --- a/src/ruby/ext/grpc/rb_channel.c +++ b/src/ruby/ext/grpc/rb_channel.c @@ -33,7 +33,7 @@ #include "rb_channel.h" -#include <ruby.h> +#include <ruby/ruby.h> #include <grpc/grpc.h> #include <grpc/grpc_security.h> diff --git a/src/ruby/ext/grpc/rb_channel.h b/src/ruby/ext/grpc/rb_channel.h index 6e3c087689..77e1f6acbc 100644 --- a/src/ruby/ext/grpc/rb_channel.h +++ b/src/ruby/ext/grpc/rb_channel.h @@ -34,7 +34,8 @@ #ifndef GRPC_RB_CHANNEL_H_ #define GRPC_RB_CHANNEL_H_ -#include <ruby.h> +#include <ruby/ruby.h> + #include <grpc/grpc.h> /* Initializes the Channel class. */ diff --git a/src/ruby/ext/grpc/rb_channel_args.c b/src/ruby/ext/grpc/rb_channel_args.c index acd545f5d2..42ed3a1ec8 100644 --- a/src/ruby/ext/grpc/rb_channel_args.c +++ b/src/ruby/ext/grpc/rb_channel_args.c @@ -33,7 +33,8 @@ #include "rb_channel_args.h" -#include <ruby.h> +#include <ruby/ruby.h> + #include <grpc/grpc.h> #include "rb_grpc.h" diff --git a/src/ruby/ext/grpc/rb_channel_args.h b/src/ruby/ext/grpc/rb_channel_args.h index 78a333bd08..591dd848ac 100644 --- a/src/ruby/ext/grpc/rb_channel_args.h +++ b/src/ruby/ext/grpc/rb_channel_args.h @@ -34,7 +34,8 @@ #ifndef GRPC_RB_CHANNEL_ARGS_H_ #define GRPC_RB_CHANNEL_ARGS_H_ -#include <ruby.h> +#include <ruby/ruby.h> + #include <grpc/grpc.h> /* Converts a hash object containing channel args to a channel args instance. diff --git a/src/ruby/ext/grpc/rb_completion_queue.h b/src/ruby/ext/grpc/rb_completion_queue.h index e4d04b10c8..6cc4e96589 100644 --- a/src/ruby/ext/grpc/rb_completion_queue.h +++ b/src/ruby/ext/grpc/rb_completion_queue.h @@ -34,8 +34,9 @@ #ifndef GRPC_RB_COMPLETION_QUEUE_H_ #define GRPC_RB_COMPLETION_QUEUE_H_ +#include <ruby/ruby.h> + #include <grpc/grpc.h> -#include <ruby.h> /* Gets the wrapped completion queue from the ruby wrapper */ grpc_completion_queue *grpc_rb_get_wrapped_completion_queue(VALUE v); diff --git a/src/ruby/ext/grpc/rb_credentials.c b/src/ruby/ext/grpc/rb_credentials.c index 1ec88914e4..3fca848b2b 100644 --- a/src/ruby/ext/grpc/rb_credentials.c +++ b/src/ruby/ext/grpc/rb_credentials.c @@ -33,7 +33,7 @@ #include "rb_credentials.h" -#include <ruby.h> +#include <ruby/ruby.h> #include <grpc/grpc.h> #include <grpc/grpc_security.h> diff --git a/src/ruby/ext/grpc/rb_credentials.h b/src/ruby/ext/grpc/rb_credentials.h index e7c43c9c78..840f7d5f9c 100644 --- a/src/ruby/ext/grpc/rb_credentials.h +++ b/src/ruby/ext/grpc/rb_credentials.h @@ -34,7 +34,8 @@ #ifndef GRPC_RB_CREDENTIALS_H_ #define GRPC_RB_CREDENTIALS_H_ -#include <ruby.h> +#include <ruby/ruby.h> + #include <grpc/grpc_security.h> /* Initializes the ruby Credentials class. */ diff --git a/src/ruby/ext/grpc/rb_grpc.h b/src/ruby/ext/grpc/rb_grpc.h index a502273de1..6ea6cbd0b6 100644 --- a/src/ruby/ext/grpc/rb_grpc.h +++ b/src/ruby/ext/grpc/rb_grpc.h @@ -35,7 +35,8 @@ #define GRPC_RB_H_ #include <sys/time.h> -#include <ruby.h> +#include <ruby/ruby.h> + #include <grpc/support/time.h> /* grpc_rb_mGrpcCore is the module containing the ruby wrapper GRPC classes. */ diff --git a/src/ruby/ext/grpc/rb_server.c b/src/ruby/ext/grpc/rb_server.c index 0651c36c0b..3182d03fab 100644 --- a/src/ruby/ext/grpc/rb_server.c +++ b/src/ruby/ext/grpc/rb_server.c @@ -33,7 +33,7 @@ #include "rb_server.h" -#include <ruby.h> +#include <ruby/ruby.h> #include <grpc/grpc.h> #include <grpc/grpc_security.h> diff --git a/src/ruby/ext/grpc/rb_server.h b/src/ruby/ext/grpc/rb_server.h index 5e4b711d35..59c9e6905b 100644 --- a/src/ruby/ext/grpc/rb_server.h +++ b/src/ruby/ext/grpc/rb_server.h @@ -34,7 +34,8 @@ #ifndef GRPC_RB_SERVER_H_ #define GRPC_RB_SERVER_H_ -#include <ruby.h> +#include <ruby/ruby.h> + #include <grpc/grpc.h> /* Initializes the Server class. */ diff --git a/src/ruby/ext/grpc/rb_server_credentials.c b/src/ruby/ext/grpc/rb_server_credentials.c index a86389445f..23271c40b7 100644 --- a/src/ruby/ext/grpc/rb_server_credentials.c +++ b/src/ruby/ext/grpc/rb_server_credentials.c @@ -33,7 +33,7 @@ #include "rb_server_credentials.h" -#include <ruby.h> +#include <ruby/ruby.h> #include <grpc/grpc.h> #include <grpc/grpc_security.h> diff --git a/src/ruby/ext/grpc/rb_server_credentials.h b/src/ruby/ext/grpc/rb_server_credentials.h index 35b395ad5c..69d919b740 100644 --- a/src/ruby/ext/grpc/rb_server_credentials.h +++ b/src/ruby/ext/grpc/rb_server_credentials.h @@ -34,7 +34,8 @@ #ifndef GRPC_RB_SERVER_CREDENTIALS_H_ #define GRPC_RB_SERVER_CREDENTIALS_H_ -#include <ruby.h> +#include <ruby/ruby.h> + #include <grpc/grpc_security.h> /* Initializes the ruby ServerCredentials class. */ diff --git a/src/ruby/lib/grpc/generic/active_call.rb b/src/ruby/lib/grpc/generic/active_call.rb index 947c39cd22..5f7beb5ab1 100644 --- a/src/ruby/lib/grpc/generic/active_call.rb +++ b/src/ruby/lib/grpc/generic/active_call.rb @@ -188,7 +188,7 @@ module GRPC # @param marshalled [false, true] indicates if the object is already # marshalled. def remote_send(req, marshalled = false) - logger.debug("sending #{req}, marshalled? #{marshalled}") + GRPC.logger.debug("sending #{req}, marshalled? #{marshalled}") if marshalled payload = req else @@ -230,14 +230,14 @@ module GRPC @call.metadata = batch_result.metadata @metadata_tag = nil end - logger.debug("received req: #{batch_result}") + GRPC.logger.debug("received req: #{batch_result}") unless batch_result.nil? || batch_result.message.nil? - logger.debug("received req.to_s: #{batch_result.message}") + GRPC.logger.debug("received req.to_s: #{batch_result.message}") res = @unmarshal.call(batch_result.message) - logger.debug("received_req (unmarshalled): #{res.inspect}") + GRPC.logger.debug("received_req (unmarshalled): #{res.inspect}") return res end - logger.debug('found nil; the final response has been sent') + GRPC.logger.debug('found nil; the final response has been sent') nil end diff --git a/src/ruby/lib/grpc/generic/bidi_call.rb b/src/ruby/lib/grpc/generic/bidi_call.rb index 4ca3004d6f..67143d40cf 100644 --- a/src/ruby/lib/grpc/generic/bidi_call.rb +++ b/src/ruby/lib/grpc/generic/bidi_call.rb @@ -115,10 +115,10 @@ module GRPC return enum_for(:each_queued_msg) unless block_given? count = 0 loop do - logger.debug("each_queued_msg: msg##{count}") + GRPC.logger.debug("each_queued_msg: msg##{count}") count += 1 req = @readq.pop - logger.debug("each_queued_msg: req = #{req}") + GRPC.logger.debug("each_queued_msg: req = #{req}") throw req if req.is_a? StandardError break if req.equal?(END_OF_READS) yield req @@ -134,22 +134,22 @@ module GRPC begin count = 0 requests.each do |req| - logger.debug("bidi-write_loop: #{count}") + GRPC.logger.debug("bidi-write_loop: #{count}") count += 1 payload = @marshal.call(req) @call.run_batch(@cq, write_tag, INFINITE_FUTURE, SEND_MESSAGE => payload) end if is_client - logger.debug("bidi-write-loop: sent #{count}, waiting to finish") + GRPC.logger.debug("bidi-write-loop: sent #{count}, waiting") batch_result = @call.run_batch(@cq, write_tag, INFINITE_FUTURE, SEND_CLOSE_FROM_CLIENT => nil, RECV_STATUS_ON_CLIENT => nil) batch_result.check_status end rescue StandardError => e - logger.warn('bidi-write_loop: failed') - logger.warn(e) + GRPC.logger.warn('bidi-write_loop: failed') + GRPC.logger.warn(e) raise e end end @@ -164,7 +164,7 @@ module GRPC # queue the initial read before beginning the loop loop do - logger.debug("bidi-read_loop: #{count}") + GRPC.logger.debug("bidi-read_loop: #{count}") count += 1 # TODO: ensure metadata is read if available, currently it's not batch_result = @call.run_batch(@cq, read_tag, INFINITE_FUTURE, @@ -172,19 +172,19 @@ module GRPC # handle the next message if batch_result.message.nil? @readq.push(END_OF_READS) - logger.debug('bidi-read-loop: done reading!') + GRPC.logger.debug('bidi-read-loop: done reading!') break end # push the latest read onto the queue and continue reading - logger.debug("received req: #{batch_result.message}") + GRPC.logger.debug("received req: #{batch_result.message}") res = @unmarshal.call(batch_result.message) @readq.push(res) end rescue StandardError => e - logger.warn('bidi: read_loop failed') - logger.warn(e) + GRPC.logger.warn('bidi: read_loop failed') + GRPC.logger.warn(e) @readq.push(e) # let each_queued_msg terminate with this error end end diff --git a/src/ruby/lib/grpc/generic/rpc_desc.rb b/src/ruby/lib/grpc/generic/rpc_desc.rb index 10211ae239..2fd61c5f7e 100644 --- a/src/ruby/lib/grpc/generic/rpc_desc.rb +++ b/src/ruby/lib/grpc/generic/rpc_desc.rb @@ -84,22 +84,22 @@ module GRPC rescue BadStatus => e # this is raised by handlers that want GRPC to send an application error # code and detail message and some additional app-specific metadata. - logger.debug("app err: #{active_call}, status:#{e.code}:#{e.details}") + GRPC.logger.debug("app err:#{active_call}, status:#{e.code}:#{e.details}") send_status(active_call, e.code, e.details, **e.metadata) rescue Core::CallError => e # This is raised by GRPC internals but should rarely, if ever happen. # Log it, but don't notify the other endpoint.. - logger.warn("failed call: #{active_call}\n#{e}") + GRPC.logger.warn("failed call: #{active_call}\n#{e}") rescue Core::OutOfTime # This is raised when active_call#method.call exceeeds the deadline # event. Send a status of deadline exceeded - logger.warn("late call: #{active_call}") + GRPC.logger.warn("late call: #{active_call}") send_status(active_call, DEADLINE_EXCEEDED, 'late') rescue StandardError => e # This will usuaally be an unhandled error in the handling code. # Send back a UNKNOWN status to the client - logger.warn("failed handler: #{active_call}; sending status:UNKNOWN") - logger.warn(e) + GRPC.logger.warn("failed handler: #{active_call}; sending status:UNKNOWN") + GRPC.logger.warn(e) send_status(active_call, UNKNOWN, 'no reason given') end @@ -139,8 +139,8 @@ module GRPC details = 'Not sure why' if details.nil? active_client.send_status(code, details, code == OK, **kw) rescue StandardError => e - logger.warn("Could not send status #{code}:#{details}") - logger.warn(e) + GRPC.logger.warn("Could not send status #{code}:#{details}") + GRPC.logger.warn(e) end end end diff --git a/src/ruby/lib/grpc/generic/rpc_server.rb b/src/ruby/lib/grpc/generic/rpc_server.rb index de22466089..665c144432 100644 --- a/src/ruby/lib/grpc/generic/rpc_server.rb +++ b/src/ruby/lib/grpc/generic/rpc_server.rb @@ -94,7 +94,7 @@ module GRPC def schedule(*args, &blk) fail 'already stopped' if @stopped return if blk.nil? - logger.info('schedule another job') + GRPC.logger.info('schedule another job') @jobs << [blk, args] end @@ -114,14 +114,14 @@ module GRPC # Stops the jobs in the pool def stop - logger.info('stopping, will wait for all the workers to exit') + GRPC.logger.info('stopping, will wait for all the workers to exit') @workers.size.times { schedule { throw :exit } } @stopped = true @stop_mutex.synchronize do # wait @keep_alive for works to stop @stop_cond.wait(@stop_mutex, @keep_alive) if @workers.size > 0 end forcibly_stop_workers - logger.info('stopped, all workers are shutdown') + GRPC.logger.info('stopped, all workers are shutdown') end protected @@ -129,14 +129,14 @@ module GRPC # Forcibly shutdown any threads that are still alive. def forcibly_stop_workers return unless @workers.size > 0 - logger.info("forcibly terminating #{@workers.size} worker(s)") + GRPC.logger.info("forcibly terminating #{@workers.size} worker(s)") @workers.each do |t| next unless t.alive? begin t.exit rescue StandardError => e - logger.warn('error while terminating a worker') - logger.warn(e) + GRPC.logger.warn('error while terminating a worker') + GRPC.logger.warn(e) end end end @@ -156,8 +156,8 @@ module GRPC blk, args = @jobs.pop blk.call(*args) rescue StandardError => e - logger.warn('Error in worker thread') - logger.warn(e) + GRPC.logger.warn('Error in worker thread') + GRPC.logger.warn(e) end end end @@ -365,7 +365,7 @@ module GRPC # the server to stop. def run if rpc_descs.size.zero? - logger.warn('did not run as no services were present') + GRPC.logger.warn('did not run as no services were present') return end @run_mutex.synchronize do @@ -381,9 +381,9 @@ module GRPC # Sends UNAVAILABLE if there are too many unprocessed jobs def available?(an_rpc) jobs_count, max = @pool.jobs_waiting, @max_waiting_requests - logger.info("waiting: #{jobs_count}, max: #{max}") + GRPC.logger.info("waiting: #{jobs_count}, max: #{max}") return an_rpc if @pool.jobs_waiting <= @max_waiting_requests - logger.warn("NOT AVAILABLE: too many jobs_waiting: #{an_rpc}") + GRPC.logger.warn("NOT AVAILABLE: too many jobs_waiting: #{an_rpc}") noop = proc { |x| x } c = ActiveCall.new(an_rpc.call, @cq, noop, noop, an_rpc.deadline) c.send_status(StatusCodes::UNAVAILABLE, '') @@ -394,7 +394,7 @@ module GRPC def found?(an_rpc) mth = an_rpc.method.to_sym return an_rpc if rpc_descs.key?(mth) - logger.warn("NOT_FOUND: #{an_rpc}") + GRPC.logger.warn("NOT_FOUND: #{an_rpc}") noop = proc { |x| x } c = ActiveCall.new(an_rpc.call, @cq, noop, noop, an_rpc.deadline) c.send_status(StatusCodes::NOT_FOUND, '') @@ -434,7 +434,7 @@ module GRPC return nil unless found?(an_rpc) # Create the ActiveCall - logger.info("deadline is #{an_rpc.deadline}; (now=#{Time.now})") + GRPC.logger.info("deadline is #{an_rpc.deadline}; (now=#{Time.now})") rpc_desc = rpc_descs[an_rpc.method.to_sym] ActiveCall.new(an_rpc.call, @cq, rpc_desc.marshal_proc, rpc_desc.unmarshal_proc(:input), @@ -474,7 +474,7 @@ module GRPC else handlers[route] = service.method(rpc_name) end - logger.info("handling #{route} with #{handlers[route]}") + GRPC.logger.info("handling #{route} with #{handlers[route]}") end end end diff --git a/src/ruby/lib/grpc/generic/service.rb b/src/ruby/lib/grpc/generic/service.rb index 8ea2c82f17..3b9743ea66 100644 --- a/src/ruby/lib/grpc/generic/service.rb +++ b/src/ruby/lib/grpc/generic/service.rb @@ -175,23 +175,23 @@ module GRPC route = "/#{route_prefix}/#{name}" if desc.request_response? define_method(mth_name) do |req, deadline = nil, **kw| - logger.debug("calling #{@host}:#{route}") + GRPC.logger.debug("calling #{@host}:#{route}") request_response(route, req, marshal, unmarshal, deadline, **kw) end elsif desc.client_streamer? define_method(mth_name) do |reqs, deadline = nil, **kw| - logger.debug("calling #{@host}:#{route}") + GRPC.logger.debug("calling #{@host}:#{route}") client_streamer(route, reqs, marshal, unmarshal, deadline, **kw) end elsif desc.server_streamer? define_method(mth_name) do |req, deadline = nil, **kw, &blk| - logger.debug("calling #{@host}:#{route}") + GRPC.logger.debug("calling #{@host}:#{route}") server_streamer(route, req, marshal, unmarshal, deadline, **kw, &blk) end else # is a bidi_stream define_method(mth_name) do |reqs, deadline = nil, **kw, &blk| - logger.debug("calling #{@host}:#{route}") + GRPC.logger.debug("calling #{@host}:#{route}") bidi_streamer(route, reqs, marshal, unmarshal, deadline, **kw, &blk) end diff --git a/src/ruby/lib/grpc/logconfig.rb b/src/ruby/lib/grpc/logconfig.rb index f36906fc45..96812170ba 100644 --- a/src/ruby/lib/grpc/logconfig.rb +++ b/src/ruby/lib/grpc/logconfig.rb @@ -29,7 +29,10 @@ require 'logging' -include Logging.globally # logger is accessible everywhere +# GRPC contains the General RPC module. +module GRPC + extend Logging.globally +end Logging.logger.root.appenders = Logging.appenders.stdout Logging.logger.root.level = :info diff --git a/src/ruby/spec/generic/rpc_server_spec.rb b/src/ruby/spec/generic/rpc_server_spec.rb index 2cd21a15e3..640b0f656c 100644 --- a/src/ruby/spec/generic/rpc_server_spec.rb +++ b/src/ruby/spec/generic/rpc_server_spec.rb @@ -69,7 +69,7 @@ class EchoService end def an_rpc(req, call) - logger.info('echo service received a request') + GRPC.logger.info('echo service received a request') call.output_metadata.update(@trailing_metadata) @received_md << call.metadata unless call.metadata.nil? req @@ -109,7 +109,7 @@ class SlowService end def an_rpc(req, call) - logger.info("starting a slow #{@delay} rpc") + GRPC.logger.info("starting a slow #{@delay} rpc") sleep @delay @received_md << call.metadata unless call.metadata.nil? req # send back the req as the response diff --git a/templates/Makefile.template b/templates/Makefile.template index 66703f812b..2da884e262 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -673,11 +673,7 @@ third_party/protobuf/configure: $(LIBDIR)/$(CONFIG)/protobuf/libprotobuf.a: third_party/protobuf/configure $(E) "[MAKE] Building protobuf" -ifeq ($(HAVE_CXX11),true) - $(Q)(cd third_party/protobuf ; CC="$(CC)" CXX="$(CXX)" LDFLAGS="$(LDFLAGS_$(CONFIG)) -g" CXXFLAGS="-DLANG_CXX11 -std=c++11" CPPFLAGS="$(PIC_CPPFLAGS) $(CPPFLAGS_$(CONFIG)) -g" ./configure --disable-shared --enable-static) -else - $(Q)(cd third_party/protobuf ; CC="$(CC)" CXX="$(CXX)" LDFLAGS="$(LDFLAGS_$(CONFIG)) -g" CXXFLAGS="-std=c++0x" CPPFLAGS="$(PIC_CPPFLAGS) $(CPPFLAGS_$(CONFIG)) -g" ./configure --disable-shared --enable-static) -endif + $(Q)(cd third_party/protobuf ; CC="$(CC)" CXX="$(CXX)" LDFLAGS="$(LDFLAGS_$(CONFIG)) -g" CPPFLAGS="$(PIC_CPPFLAGS) $(CPPFLAGS_$(CONFIG)) -g" ./configure --disable-shared --enable-static) $(Q)$(MAKE) -C third_party/protobuf clean $(Q)$(MAKE) -C third_party/protobuf $(Q)mkdir -p $(LIBDIR)/$(CONFIG)/protobuf diff --git a/templates/vsprojects/generate_debug_projects.sh b/templates/vsprojects/generate_debug_projects.sh index 3c40671c77..1bbe40b6c8 100755 --- a/templates/vsprojects/generate_debug_projects.sh +++ b/templates/vsprojects/generate_debug_projects.sh @@ -1,5 +1,34 @@ #!/bin/sh +# 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. + # To properly use this, you'll need to add: # # "debug": true diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index 66480254d2..7822d001d1 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -127,11 +127,15 @@ static gpr_slice merge_slices(gpr_slice *slices, size_t nslices) { } static int byte_buffer_eq_slice(grpc_byte_buffer *bb, gpr_slice b) { - gpr_slice a = - merge_slices(bb->data.slice_buffer.slices, bb->data.slice_buffer.count); - int ok = GPR_SLICE_LENGTH(a) == GPR_SLICE_LENGTH(b) && - 0 == memcmp(GPR_SLICE_START_PTR(a), GPR_SLICE_START_PTR(b), - GPR_SLICE_LENGTH(a)); + gpr_slice a; + int ok; + + if (!bb) return 0; + + a = merge_slices(bb->data.slice_buffer.slices, bb->data.slice_buffer.count); + ok = GPR_SLICE_LENGTH(a) == GPR_SLICE_LENGTH(b) && + 0 == memcmp(GPR_SLICE_START_PTR(a), GPR_SLICE_START_PTR(b), + GPR_SLICE_LENGTH(a)); gpr_slice_unref(a); gpr_slice_unref(b); return ok; diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c index be3c7ca17f..06614a93e7 100644 --- a/test/core/end2end/dualstack_socket_test.c +++ b/test/core/end2end/dualstack_socket_test.c @@ -211,6 +211,9 @@ void test_connect(const char *server_host, const char *client_host, int port, grpc_completion_queue_shutdown(server_cq); drain_cq(server_cq); grpc_completion_queue_destroy(server_cq); + + grpc_call_details_destroy(&call_details); + gpr_free(details); } int main(int argc, char **argv) { diff --git a/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c b/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c new file mode 100644 index 0000000000..1f53e581ab --- /dev/null +++ b/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c @@ -0,0 +1,156 @@ +/* + * + * 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. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include <string.h> + +#include "src/core/channel/client_channel.h" +#include "src/core/channel/connected_channel.h" +#include "src/core/channel/http_client_filter.h" +#include "src/core/channel/http_server_filter.h" +#include "src/core/iomgr/endpoint_pair.h" +#include "src/core/iomgr/iomgr.h" +#include "src/core/support/env.h" +#include "src/core/surface/channel.h" +#include "src/core/surface/client.h" +#include "src/core/surface/server.h" +#include "src/core/transport/chttp2_transport.h" +#include <grpc/support/alloc.h> +#include <grpc/support/log.h> +#include <grpc/support/sync.h> +#include <grpc/support/thd.h> +#include <grpc/support/useful.h> +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" + +/* chttp2 transport that is immediately available (used for testing + connected_channel without a client_channel */ + +static grpc_transport_setup_result server_setup_transport( + void *ts, grpc_transport *transport, grpc_mdctx *mdctx) { + grpc_end2end_test_fixture *f = ts; + static grpc_channel_filter const *extra_filters[] = { + &grpc_http_server_filter}; + return grpc_server_setup_transport(f->server, transport, extra_filters, + GPR_ARRAY_SIZE(extra_filters), mdctx); +} + +typedef struct { + grpc_end2end_test_fixture *f; + grpc_channel_args *client_args; +} sp_client_setup; + +static grpc_transport_setup_result client_setup_transport( + void *ts, grpc_transport *transport, grpc_mdctx *mdctx) { + sp_client_setup *cs = ts; + + const grpc_channel_filter *filters[] = {&grpc_client_surface_filter, + &grpc_http_client_filter, + &grpc_connected_channel_filter}; + size_t nfilters = sizeof(filters) / sizeof(*filters); + grpc_channel *channel = grpc_channel_create_from_filters( + filters, nfilters, cs->client_args, mdctx, 1); + + cs->f->client = channel; + + return grpc_connected_channel_bind_transport( + grpc_channel_get_channel_stack(channel), transport); +} + +static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( + grpc_channel_args *client_args, grpc_channel_args *server_args) { + grpc_endpoint_pair *sfd = gpr_malloc(sizeof(grpc_endpoint_pair)); + + grpc_end2end_test_fixture f; + memset(&f, 0, sizeof(f)); + f.fixture_data = sfd; + f.client_cq = grpc_completion_queue_create(); + f.server_cq = grpc_completion_queue_create(); + + *sfd = grpc_iomgr_create_endpoint_pair(65536); + + return f; +} + +static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f, + grpc_channel_args *client_args) { + grpc_endpoint_pair *sfd = f->fixture_data; + sp_client_setup cs; + cs.client_args = client_args; + cs.f = f; + grpc_create_chttp2_transport(client_setup_transport, &cs, client_args, + sfd->client, NULL, 0, grpc_mdctx_create(), 1); + GPR_ASSERT(f->client); +} + +static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f, + grpc_channel_args *server_args) { + grpc_endpoint_pair *sfd = f->fixture_data; + GPR_ASSERT(!f->server); + f->server = grpc_server_create_from_filters(NULL, 0, server_args); + grpc_server_register_completion_queue(f->server, f->server_cq); + grpc_server_start(f->server); + grpc_create_chttp2_transport(server_setup_transport, f, server_args, + sfd->server, NULL, 0, grpc_mdctx_create(), 0); +} + +static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) { + gpr_free(f->fixture_data); +} + +/* All test configurations */ +static grpc_end2end_test_config configs[] = { + {"chttp2/socketpair", 0, chttp2_create_fixture_socketpair, + chttp2_init_client_socketpair, chttp2_init_server_socketpair, + chttp2_tear_down_socketpair}, +}; + +int main(int argc, char **argv) { + size_t i; + + /* force tracing on, with a value to force many + code paths in trace.c to be taken */ + gpr_setenv("GRPC_TRACE", "doesnt-exist,http,all"); + + grpc_test_init(argc, argv); + grpc_init(); + + for (i = 0; i < sizeof(configs) / sizeof(*configs); i++) { + grpc_end2end_tests(configs[i]); + } + + grpc_shutdown(); + + return 0; +} diff --git a/test/core/end2end/gen_build_json.py b/test/core/end2end/gen_build_json.py index bce2d7a796..960ec51b5d 100755 --- a/test/core/end2end/gen_build_json.py +++ b/test/core/end2end/gen_build_json.py @@ -49,6 +49,7 @@ END2END_FIXTURES = { 'chttp2_simple_ssl_with_oauth2_fullstack': default_secure_fixture_options, 'chttp2_socket_pair': default_unsecure_fixture_options, 'chttp2_socket_pair_one_byte_at_a_time': default_unsecure_fixture_options, + 'chttp2_socket_pair_with_grpc_trace': default_unsecure_fixture_options, } TestOptions = collections.namedtuple('TestOptions', 'flaky secure') @@ -81,6 +82,7 @@ END2END_TESTS = { 'request_response_with_payload_and_call_creds': TestOptions(flaky=False, secure=True), 'request_with_large_metadata': default_test_options, 'request_with_payload': default_test_options, + 'server_finishes_request': default_test_options, 'simple_delayed_request': default_test_options, 'simple_request': default_test_options, 'simple_request_with_high_initial_sequence_number': default_test_options, diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c index f369e7805e..a5d8faad3a 100644 --- a/test/core/end2end/tests/invoke_large_request.c +++ b/test/core/end2end/tests/invoke_large_request.c @@ -171,23 +171,30 @@ static void test_invoke_large_request(grpc_end2end_test_config config) { op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &request_payload_recv; + op++; + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + + cq_expect_completion(v_server, tag(102), 1); + cq_verify(v_server); + + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; op->op = GRPC_OP_SEND_MESSAGE; op->data.send_message = response_payload; op++; + op = ops; op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; op->data.send_status_from_server.trailing_metadata_count = 0; op->data.send_status_from_server.status = GRPC_STATUS_UNIMPLEMENTED; op->data.send_status_from_server.status_details = "xyz"; op++; - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message = &request_payload_recv; - op++; - op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; - op->data.recv_close_on_server.cancelled = &was_cancelled; - op++; - GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(103))); - cq_expect_completion(v_server, tag(102), 1); + cq_expect_completion(v_server, tag(103), 1); cq_verify(v_server); cq_expect_completion(v_client, tag(1), 1); diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index 99aeb9d049..78502e4bb9 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -178,8 +178,7 @@ static void test_max_message_length(grpc_end2end_test_config config) { cq_expect_completion(v_client, tag(1), 1); cq_verify(v_client); - GPR_ASSERT(status == GRPC_STATUS_CANCELLED); - GPR_ASSERT(0 == strcmp(details, "Cancelled")); + GPR_ASSERT(status != GRPC_STATUS_OK); GPR_ASSERT(0 == strcmp(call_details.method, "/foo")); GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234")); GPR_ASSERT(was_cancelled == 1); @@ -189,6 +188,7 @@ static void test_max_message_length(grpc_end2end_test_config config) { grpc_metadata_array_destroy(&trailing_metadata_recv); grpc_metadata_array_destroy(&request_metadata_recv); grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); grpc_call_destroy(c); grpc_call_destroy(s); diff --git a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c index 709dc47b72..868b5f078b 100644 --- a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c +++ b/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c @@ -188,6 +188,18 @@ static void test_request_response_with_metadata_and_payload( op->data.send_initial_metadata.count = 2; op->data.send_initial_metadata.metadata = meta_s; op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &request_payload_recv; + op++; + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + + cq_expect_completion(v_server, tag(102), 1); + cq_verify(v_server); + + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; op->op = GRPC_OP_SEND_MESSAGE; op->data.send_message = response_payload; op++; @@ -196,15 +208,9 @@ static void test_request_response_with_metadata_and_payload( op->data.send_status_from_server.status = GRPC_STATUS_OK; op->data.send_status_from_server.status_details = "xyz"; op++; - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message = &request_payload_recv; - op++; - op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; - op->data.recv_close_on_server.cancelled = &was_cancelled; - op++; - GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(103))); - cq_expect_completion(v_server, tag(102), 1); + cq_expect_completion(v_server, tag(103), 1); cq_verify(v_server); cq_expect_completion(v_client, tag(1), 1); diff --git a/test/core/end2end/tests/request_response_with_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_metadata_and_payload.c index bc32a503dd..9c5d290219 100644 --- a/test/core/end2end/tests/request_response_with_metadata_and_payload.c +++ b/test/core/end2end/tests/request_response_with_metadata_and_payload.c @@ -174,6 +174,18 @@ static void test_request_response_with_metadata_and_payload( op->data.send_initial_metadata.count = 2; op->data.send_initial_metadata.metadata = meta_s; op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &request_payload_recv; + op++; + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + + cq_expect_completion(v_server, tag(102), 1); + cq_verify(v_server); + + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; op->op = GRPC_OP_SEND_MESSAGE; op->data.send_message = response_payload; op++; @@ -182,15 +194,9 @@ static void test_request_response_with_metadata_and_payload( op->data.send_status_from_server.status = GRPC_STATUS_OK; op->data.send_status_from_server.status_details = "xyz"; op++; - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message = &request_payload_recv; - op++; - op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; - op->data.recv_close_on_server.cancelled = &was_cancelled; - op++; - GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(103))); - cq_expect_completion(v_server, tag(102), 1); + cq_expect_completion(v_server, tag(103), 1); cq_verify(v_server); cq_expect_completion(v_client, tag(1), 1); diff --git a/test/core/end2end/tests/request_response_with_payload.c b/test/core/end2end/tests/request_response_with_payload.c index be0cca696b..7db202754e 100644 --- a/test/core/end2end/tests/request_response_with_payload.c +++ b/test/core/end2end/tests/request_response_with_payload.c @@ -165,6 +165,18 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) { op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &request_payload_recv; + op++; + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + + cq_expect_completion(v_server, tag(102), 1); + cq_verify(v_server); + + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; op->op = GRPC_OP_SEND_MESSAGE; op->data.send_message = response_payload; op++; @@ -173,15 +185,9 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) { op->data.send_status_from_server.status = GRPC_STATUS_OK; op->data.send_status_from_server.status_details = "xyz"; op++; - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message = &request_payload_recv; - op++; - op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; - op->data.recv_close_on_server.cancelled = &was_cancelled; - op++; - GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(103))); - cq_expect_completion(v_server, tag(102), 1); + cq_expect_completion(v_server, tag(103), 1); cq_verify(v_server); cq_expect_completion(v_client, tag(1), 1); diff --git a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c b/test/core/end2end/tests/request_response_with_payload_and_call_creds.c index 01554bed8c..437345960a 100644 --- a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c +++ b/test/core/end2end/tests/request_response_with_payload_and_call_creds.c @@ -125,6 +125,8 @@ static void test_call_creds_failure(grpc_end2end_test_config config) { GPR_ASSERT(grpc_call_set_credentials(c, creds) != GRPC_CALL_OK); grpc_credentials_release(creds); + grpc_call_destroy(c); + end_test(&f); config.tear_down_data(&f); } @@ -224,6 +226,18 @@ static void request_response_with_payload_and_call_creds( op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &request_payload_recv; + op++; + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + + cq_expect_completion(v_server, tag(102), 1); + cq_verify(v_server); + + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; op->op = GRPC_OP_SEND_MESSAGE; op->data.send_message = response_payload; op++; @@ -232,15 +246,9 @@ static void request_response_with_payload_and_call_creds( op->data.send_status_from_server.status = GRPC_STATUS_OK; op->data.send_status_from_server.status_details = "xyz"; op++; - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message = &request_payload_recv; - op++; - op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; - op->data.recv_close_on_server.cancelled = &was_cancelled; - op++; - GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(103))); - cq_expect_completion(v_server, tag(102), 1); + cq_expect_completion(v_server, tag(103), 1); cq_verify(v_server); cq_expect_completion(v_client, tag(1), 1); diff --git a/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c index 12f289cfdd..2f7b53ccf3 100644 --- a/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c +++ b/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c @@ -174,6 +174,18 @@ static void test_request_response_with_metadata_and_payload( op->data.send_initial_metadata.count = 2; op->data.send_initial_metadata.metadata = meta_s; op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &request_payload_recv; + op++; + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + + cq_expect_completion(v_server, tag(102), 1); + cq_verify(v_server); + + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; op->op = GRPC_OP_SEND_MESSAGE; op->data.send_message = response_payload; op++; @@ -183,15 +195,9 @@ static void test_request_response_with_metadata_and_payload( op->data.send_status_from_server.status = GRPC_STATUS_OK; op->data.send_status_from_server.status_details = "xyz"; op++; - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message = &request_payload_recv; - op++; - op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; - op->data.recv_close_on_server.cancelled = &was_cancelled; - op++; - GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(103))); - cq_expect_completion(v_server, tag(102), 1); + cq_expect_completion(v_server, tag(103), 1); cq_verify(v_server); cq_expect_completion(v_client, tag(1), 1); diff --git a/test/core/end2end/tests/request_with_large_metadata.c b/test/core/end2end/tests/request_with_large_metadata.c index 08a16213a1..81a1572501 100644 --- a/test/core/end2end/tests/request_with_large_metadata.c +++ b/test/core/end2end/tests/request_with_large_metadata.c @@ -169,20 +169,26 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) { op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; op++; - op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; - op->data.send_status_from_server.trailing_metadata_count = 0; - op->data.send_status_from_server.status = GRPC_STATUS_OK; - op->data.send_status_from_server.status_details = "xyz"; - op++; op->op = GRPC_OP_RECV_MESSAGE; op->data.recv_message = &request_payload_recv; op++; + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + + cq_expect_completion(v_server, tag(102), 1); + cq_verify(v_server); + + op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled; op++; - GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_OK; + op->data.send_status_from_server.status_details = "xyz"; + op++; + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(103))); - cq_expect_completion(v_server, tag(102), 1); + cq_expect_completion(v_server, tag(103), 1); cq_verify(v_server); cq_expect_completion(v_client, tag(1), 1); diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c index bba50b3113..0d527b4de5 100644 --- a/test/core/end2end/tests/request_with_payload.c +++ b/test/core/end2end/tests/request_with_payload.c @@ -160,20 +160,26 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) { op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; op++; - op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; - op->data.send_status_from_server.trailing_metadata_count = 0; - op->data.send_status_from_server.status = GRPC_STATUS_OK; - op->data.send_status_from_server.status_details = "xyz"; - op++; op->op = GRPC_OP_RECV_MESSAGE; op->data.recv_message = &request_payload_recv; op++; + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + + cq_expect_completion(v_server, tag(102), 1); + cq_verify(v_server); + + op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled; op++; - GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_OK; + op->data.send_status_from_server.status_details = "xyz"; + op++; + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(103))); - cq_expect_completion(v_server, tag(102), 1); + cq_expect_completion(v_server, tag(103), 1); cq_verify(v_server); cq_expect_completion(v_client, tag(1), 1); diff --git a/test/core/end2end/tests/server_finishes_request.c b/test/core/end2end/tests/server_finishes_request.c new file mode 100644 index 0000000000..c19871c581 --- /dev/null +++ b/test/core/end2end/tests/server_finishes_request.c @@ -0,0 +1,200 @@ +/* + * + * 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. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include <stdio.h> +#include <string.h> + +#include "src/core/support/string.h" +#include <grpc/byte_buffer.h> +#include <grpc/grpc.h> +#include <grpc/support/alloc.h> +#include <grpc/support/log.h> +#include <grpc/support/time.h> +#include <grpc/support/useful.h> +#include "test/core/end2end/cq_verifier.h" + +enum { TIMEOUT = 200000 }; + +static void *tag(gpr_intptr t) { return (void *)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char *test_name, + grpc_channel_args *client_args, + grpc_channel_args *server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "%s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_client(&f, client_args); + config.init_server(&f, server_args); + return f; +} + +static gpr_timespec n_seconds_time(int n) { + return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n); +} + +static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); } + +static void drain_cq(grpc_completion_queue *cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_time()); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture *f) { + if (!f->server) return; + grpc_server_shutdown(f->server); + grpc_server_destroy(f->server); + f->server = NULL; +} + +static void shutdown_client(grpc_end2end_test_fixture *f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = NULL; +} + +static void end_test(grpc_end2end_test_fixture *f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->server_cq); + drain_cq(f->server_cq); + grpc_completion_queue_destroy(f->server_cq); + grpc_completion_queue_shutdown(f->client_cq); + drain_cq(f->client_cq); + grpc_completion_queue_destroy(f->client_cq); +} + +static void simple_request_body(grpc_end2end_test_fixture f) { + grpc_call *c; + grpc_call *s; + gpr_timespec deadline = five_seconds_time(); + cq_verifier *v_client = cq_verifier_create(f.client_cq); + cq_verifier *v_server = cq_verifier_create(f.server_cq); + grpc_op ops[6]; + grpc_op *op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_status_code status; + char *details = NULL; + size_t details_capacity = 0; + int was_cancelled = 2; + + c = grpc_channel_create_call(f.client, f.client_cq, "/foo", + "foo.test.google.fr:1234", deadline); + GPR_ASSERT(c); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op->data.recv_status_on_client.status_details_capacity = &details_capacity; + op++; + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(c, ops, op - ops, tag(1))); + + GPR_ASSERT(GRPC_CALL_OK == + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.server_cq, + f.server_cq, tag(101))); + cq_expect_completion(v_server, tag(101), 1); + cq_verify(v_server); + + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_UNIMPLEMENTED; + op->data.send_status_from_server.status_details = "xyz"; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + + cq_expect_completion(v_server, tag(102), 1); + cq_verify(v_server); + + cq_expect_completion(v_client, tag(1), 1); + cq_verify(v_client); + + GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED); + GPR_ASSERT(0 == strcmp(details, "xyz")); + GPR_ASSERT(0 == strcmp(call_details.method, "/foo")); + GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234")); + GPR_ASSERT(was_cancelled == 0); + + gpr_free(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + + grpc_call_destroy(c); + grpc_call_destroy(s); + + cq_verifier_destroy(v_client); + cq_verifier_destroy(v_server); +} + +static void test_invoke_simple_request(grpc_end2end_test_config config) { + grpc_end2end_test_fixture f; + + f = begin_test(config, __FUNCTION__, NULL, NULL); + simple_request_body(f); + end_test(&f); + config.tear_down_data(&f); +} + +void grpc_end2end_tests(grpc_end2end_test_config config) { + test_invoke_simple_request(config); +} diff --git a/test/core/fling/fling_test.c b/test/core/fling/fling_test.c index 7c1643df6a..6b07f83d5b 100644 --- a/test/core/fling/fling_test.c +++ b/test/core/fling/fling_test.c @@ -60,7 +60,7 @@ int main(int argc, char **argv) { args[1] = "--bind"; gpr_join_host_port(&args[2], "::", port); args[3] = "--no-secure"; - svr = gpr_subprocess_create(4, args); + svr = gpr_subprocess_create(4, (const char**)args); gpr_free(args[0]); gpr_free(args[2]); @@ -71,7 +71,7 @@ int main(int argc, char **argv) { args[3] = "--scenario=ping-pong-request"; args[4] = "--no-secure"; args[5] = 0; - cli = gpr_subprocess_create(6, args); + cli = gpr_subprocess_create(6, (const char**)args); gpr_free(args[0]); gpr_free(args[2]); diff --git a/test/cpp/client/credentials_test.cc b/test/cpp/client/credentials_test.cc index 6840418989..ee94f455a4 100644 --- a/test/cpp/client/credentials_test.cc +++ b/test/cpp/client/credentials_test.cc @@ -46,8 +46,7 @@ class CredentialsTest : public ::testing::Test { }; TEST_F(CredentialsTest, InvalidServiceAccountCreds) { - std::unique_ptr<Credentials> bad1 = - ServiceAccountCredentials("", "", 1); + std::shared_ptr<Credentials> bad1 = ServiceAccountCredentials("", "", 1); EXPECT_EQ(nullptr, bad1.get()); } diff --git a/test/cpp/end2end/client_crash_test.cc b/test/cpp/end2end/client_crash_test.cc new file mode 100644 index 0000000000..e86681f75a --- /dev/null +++ b/test/cpp/end2end/client_crash_test.cc @@ -0,0 +1,165 @@ +/* + * + * 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. + * + */ + +#include <thread> + +#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/cpp/server/thread_pool.h" +#include <grpc++/channel_arguments.h> +#include <grpc++/channel_interface.h> +#include <grpc++/client_context.h> +#include <grpc++/create_channel.h> +#include <grpc++/credentials.h> +#include <grpc++/server.h> +#include <grpc++/server_builder.h> +#include <grpc++/server_context.h> +#include <grpc++/server_credentials.h> +#include <grpc++/status.h> +#include <grpc++/stream.h> +#include <grpc++/time.h> +#include <gtest/gtest.h> + +#include <grpc/grpc.h> +#include <grpc/support/thd.h> +#include <grpc/support/time.h> + +#include "test/cpp/util/subprocess.h" + +using grpc::cpp::test::util::EchoRequest; +using grpc::cpp::test::util::EchoResponse; +using std::chrono::system_clock; + +static std::string g_root; + +namespace grpc { +namespace testing { + +namespace { + +class CrashTest : public ::testing::Test { + protected: + CrashTest() {} + + std::unique_ptr<grpc::cpp::test::util::TestService::Stub> + CreateServerAndStub() { + auto port = grpc_pick_unused_port_or_die(); + std::ostringstream addr_stream; + addr_stream << "localhost:" << port; + auto addr = addr_stream.str(); + server_.reset(new SubProcess({ + g_root + "/client_crash_test_server", + "--address=" + addr, + })); + GPR_ASSERT(server_); + return grpc::cpp::test::util::TestService::NewStub( + CreateChannel(addr, InsecureCredentials(), ChannelArguments())); + } + + void KillServer() { + server_.reset(); + // give some time for the TCP connection to drop + gpr_sleep_until(gpr_time_add(gpr_now(), gpr_time_from_seconds(1))); + } + + private: + std::unique_ptr<SubProcess> server_; +}; + +TEST_F(CrashTest, KillAfterWrite) { + auto stub = CreateServerAndStub(); + + EchoRequest request; + EchoResponse response; + ClientContext context; + + auto stream = stub->BidiStream(&context); + + request.set_message("Hello"); + EXPECT_TRUE(stream->Write(request)); + EXPECT_TRUE(stream->Read(&response)); + EXPECT_EQ(response.message(), request.message()); + + request.set_message("I'm going to kill you"); + EXPECT_TRUE(stream->Write(request)); + + KillServer(); + + EXPECT_FALSE(stream->Read(&response)); + + EXPECT_FALSE(stream->Finish().IsOk()); +} + +TEST_F(CrashTest, KillBeforeWrite) { + auto stub = CreateServerAndStub(); + + EchoRequest request; + EchoResponse response; + ClientContext context; + + auto stream = stub->BidiStream(&context); + + request.set_message("Hello"); + EXPECT_TRUE(stream->Write(request)); + EXPECT_TRUE(stream->Read(&response)); + EXPECT_EQ(response.message(), request.message()); + + KillServer(); + + request.set_message("You should be dead"); + EXPECT_FALSE(stream->Write(request)); + EXPECT_FALSE(stream->Read(&response)); + + EXPECT_FALSE(stream->Finish().IsOk()); +} + +} // namespace + +} // namespace testing +} // namespace grpc + +int main(int argc, char** argv) { + std::string me = argv[0]; + auto lslash = me.rfind('/'); + if (lslash != std::string::npos) { + g_root = me.substr(0, lslash); + } else { + g_root = "."; + } + + grpc_test_init(argc, argv); + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/test/cpp/end2end/client_crash_test_server.cc b/test/cpp/end2end/client_crash_test_server.cc new file mode 100644 index 0000000000..20808a0240 --- /dev/null +++ b/test/cpp/end2end/client_crash_test_server.cc @@ -0,0 +1,94 @@ +/* + * + * 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. + * + */ + +#include <iostream> +#include <memory> +#include <string> +#include <gflags/gflags.h> + +#include <grpc++/server.h> +#include <grpc++/server_builder.h> +#include <grpc++/server_context.h> +#include <grpc++/server_credentials.h> +#include <grpc++/status.h> +#include "test/cpp/util/echo.grpc.pb.h" + +DEFINE_string(address, "", "Address to bind to"); + +using grpc::cpp::test::util::EchoRequest; +using grpc::cpp::test::util::EchoResponse; + +// In some distros, gflags is in the namespace google, and in some others, +// in gflags. This hack is enabling us to find both. +namespace google {} +namespace gflags {} +using namespace google; +using namespace gflags; + +namespace grpc { +namespace testing { + +class ServiceImpl GRPC_FINAL : public ::grpc::cpp::test::util::TestService::Service { + Status BidiStream(ServerContext* context, + ServerReaderWriter<EchoResponse, EchoRequest>* stream) + GRPC_OVERRIDE { + EchoRequest request; + EchoResponse response; + while (stream->Read(&request)) { + gpr_log(GPR_INFO, "recv msg %s", request.message().c_str()); + response.set_message(request.message()); + stream->Write(response); + } + return Status::OK; + } +}; + +void RunServer() { + ServiceImpl service; + + ServerBuilder builder; + builder.AddListeningPort(FLAGS_address, grpc::InsecureServerCredentials()); + builder.RegisterService(&service); + std::unique_ptr<Server> server(builder.BuildAndStart()); + std::cout << "Server listening on " << FLAGS_address << std::endl; + server->Wait(); +} +} +} + +int main(int argc, char** argv) { + ParseCommandLineFlags(&argc, &argv, true); + grpc::testing::RunServer(); + + return 0; +} diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index f35b16fe55..7a15591b44 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -33,11 +33,13 @@ #include <thread> +#include "src/core/security/credentials.h" +#include "src/cpp/server/thread_pool.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/cpp/server/thread_pool.h" +#include "test/cpp/util/fake_credentials.h" #include <grpc++/channel_arguments.h> #include <grpc++/channel_interface.h> #include <grpc++/client_context.h> @@ -94,18 +96,30 @@ class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { signal_client_ = true; } while (!context->IsCancelled()) { - std::this_thread::sleep_for(std::chrono::microseconds( - request->param().client_cancel_after_us())); + gpr_sleep_until(gpr_time_add( + gpr_now(), + gpr_time_from_micros(request->param().client_cancel_after_us()))); } return Status::Cancelled; } else if (request->has_param() && request->param().server_cancel_after_us()) { - std::this_thread::sleep_for( - std::chrono::microseconds(request->param().server_cancel_after_us())); + gpr_sleep_until(gpr_time_add( + gpr_now(), + gpr_time_from_micros(request->param().server_cancel_after_us()))); return Status::Cancelled; } else { EXPECT_FALSE(context->IsCancelled()); } + + if (request->has_param() && request->param().echo_metadata()) { + const std::multimap<grpc::string, grpc::string>& client_metadata = + context->client_metadata(); + for (std::multimap<grpc::string, grpc::string>::const_iterator iter = + client_metadata.begin(); + iter != client_metadata.end(); ++iter) { + context->AddTrailingMetadata((*iter).first, (*iter).second); + } + } return Status::OK; } @@ -180,7 +194,7 @@ class End2endTest : public ::testing::Test { // Setup server ServerBuilder builder; builder.AddListeningPort(server_address_.str(), - InsecureServerCredentials()); + FakeTransportSecurityServerCredentials()); builder.RegisterService(&service_); builder.SetMaxMessageSize( kMaxMessageSize_); // For testing max message size. @@ -192,8 +206,9 @@ class End2endTest : public ::testing::Test { void TearDown() GRPC_OVERRIDE { server_->Shutdown(); } void ResetStub() { - std::shared_ptr<ChannelInterface> channel = CreateChannel( - server_address_.str(), InsecureCredentials(), ChannelArguments()); + std::shared_ptr<ChannelInterface> channel = + CreateChannel(server_address_.str(), FakeTransportSecurityCredentials(), + ChannelArguments()); stub_ = std::move(grpc::cpp::test::util::TestService::NewStub(channel)); } @@ -404,8 +419,9 @@ TEST_F(End2endTest, BidiStream) { // Talk to the two services with the same name but different package names. // The two stubs are created on the same channel. TEST_F(End2endTest, DiffPackageServices) { - std::shared_ptr<ChannelInterface> channel = CreateChannel( - server_address_.str(), InsecureCredentials(), ChannelArguments()); + std::shared_ptr<ChannelInterface> channel = + CreateChannel(server_address_.str(), FakeTransportSecurityCredentials(), + ChannelArguments()); EchoRequest request; EchoResponse response; @@ -429,7 +445,7 @@ TEST_F(End2endTest, DiffPackageServices) { // rpc and stream should fail on bad credentials. TEST_F(End2endTest, BadCredentials) { - std::unique_ptr<Credentials> bad_creds = ServiceAccountCredentials("", "", 1); + std::shared_ptr<Credentials> bad_creds = ServiceAccountCredentials("", "", 1); EXPECT_EQ(nullptr, bad_creds.get()); std::shared_ptr<ChannelInterface> channel = CreateChannel(server_address_.str(), bad_creds, ChannelArguments()); @@ -438,7 +454,7 @@ TEST_F(End2endTest, BadCredentials) { EchoRequest request; EchoResponse response; ClientContext context; - grpc::string msg("hello"); + request.set_message("Hello"); Status s = stub->Echo(&context, request, &response); EXPECT_EQ("", response.message()); @@ -455,7 +471,7 @@ TEST_F(End2endTest, BadCredentials) { } void CancelRpc(ClientContext* context, int delay_us, TestServiceImpl* service) { - std::this_thread::sleep_for(std::chrono::microseconds(delay_us)); + gpr_sleep_until(gpr_time_add(gpr_now(), gpr_time_from_micros(delay_us))); while (!service->signal_client()) { } context->TryCancel(); @@ -588,6 +604,88 @@ TEST_F(End2endTest, RpcMaxMessageSize) { EXPECT_FALSE(s.IsOk()); } +bool MetadataContains(const std::multimap<grpc::string, grpc::string>& metadata, + const grpc::string& key, const grpc::string& value) { + int count = 0; + + for (std::multimap<grpc::string, grpc::string>::const_iterator iter = + metadata.begin(); + iter != metadata.end(); ++iter) { + if ((*iter).first == key && (*iter).second == value) { + count++; + } + } + return count == 1; +} + +TEST_F(End2endTest, SetPerCallCredentials) { + ResetStub(); + EchoRequest request; + EchoResponse response; + ClientContext context; + std::shared_ptr<Credentials> creds = + IAMCredentials("fake_token", "fake_selector"); + context.set_credentials(creds); + request.set_message("Hello"); + request.mutable_param()->set_echo_metadata(true); + + Status s = stub_->Echo(&context, request, &response); + EXPECT_EQ(request.message(), response.message()); + EXPECT_TRUE(s.IsOk()); + EXPECT_TRUE(MetadataContains(context.GetServerTrailingMetadata(), + GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, + "fake_token")); + EXPECT_TRUE(MetadataContains(context.GetServerTrailingMetadata(), + GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, + "fake_selector")); +} + +TEST_F(End2endTest, InsecurePerCallCredentials) { + ResetStub(); + EchoRequest request; + EchoResponse response; + ClientContext context; + std::shared_ptr<Credentials> creds = InsecureCredentials(); + context.set_credentials(creds); + request.set_message("Hello"); + request.mutable_param()->set_echo_metadata(true); + + Status s = stub_->Echo(&context, request, &response); + EXPECT_EQ(StatusCode::CANCELLED, s.code()); + EXPECT_EQ("Failed to set credentials to rpc.", s.details()); +} + +TEST_F(End2endTest, OverridePerCallCredentials) { + ResetStub(); + EchoRequest request; + EchoResponse response; + ClientContext context; + std::shared_ptr<Credentials> creds1 = + IAMCredentials("fake_token1", "fake_selector1"); + context.set_credentials(creds1); + std::shared_ptr<Credentials> creds2 = + IAMCredentials("fake_token2", "fake_selector2"); + context.set_credentials(creds2); + request.set_message("Hello"); + request.mutable_param()->set_echo_metadata(true); + + Status s = stub_->Echo(&context, request, &response); + EXPECT_TRUE(MetadataContains(context.GetServerTrailingMetadata(), + GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, + "fake_token2")); + EXPECT_TRUE(MetadataContains(context.GetServerTrailingMetadata(), + GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, + "fake_selector2")); + EXPECT_FALSE(MetadataContains(context.GetServerTrailingMetadata(), + GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, + "fake_token1")); + EXPECT_FALSE(MetadataContains(context.GetServerTrailingMetadata(), + GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, + "fake_selector1")); + EXPECT_EQ(request.message(), response.message()); + EXPECT_TRUE(s.IsOk()); +} + } // namespace testing } // namespace grpc diff --git a/test/cpp/end2end/server_crash_test.cc b/test/cpp/end2end/server_crash_test.cc new file mode 100644 index 0000000000..11d73aec7d --- /dev/null +++ b/test/cpp/end2end/server_crash_test.cc @@ -0,0 +1,166 @@ +/* + * + * 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. + * + */ + +#include <thread> + +#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/cpp/server/thread_pool.h" +#include <grpc++/channel_arguments.h> +#include <grpc++/channel_interface.h> +#include <grpc++/client_context.h> +#include <grpc++/create_channel.h> +#include <grpc++/credentials.h> +#include <grpc++/server.h> +#include <grpc++/server_builder.h> +#include <grpc++/server_context.h> +#include <grpc++/server_credentials.h> +#include <grpc++/status.h> +#include <grpc++/stream.h> +#include <grpc++/time.h> +#include <gtest/gtest.h> + +#include <grpc/grpc.h> +#include <grpc/support/thd.h> +#include <grpc/support/time.h> + +#include "test/cpp/util/subprocess.h" + +using grpc::cpp::test::util::EchoRequest; +using grpc::cpp::test::util::EchoResponse; +using std::chrono::system_clock; + +static std::string g_root; + +namespace grpc { +namespace testing { + +namespace { + +class ServiceImpl GRPC_FINAL : public ::grpc::cpp::test::util::TestService::Service { + Status BidiStream(ServerContext* context, + ServerReaderWriter<EchoResponse, EchoRequest>* stream) + GRPC_OVERRIDE { + EchoRequest request; + EchoResponse response; + while (stream->Read(&request)) { + gpr_log(GPR_INFO, "recv msg %s", request.message().c_str()); + response.set_message(request.message()); + stream->Write(response); + gpr_sleep_until(gpr_time_add(gpr_now(), gpr_time_from_seconds(1))); + } + return Status::OK; + } + + Status ResponseStream(ServerContext* context, const EchoRequest* request, + ServerWriter<EchoResponse>* writer) GRPC_OVERRIDE { + EchoResponse response; + for (int i = 0;; i++) { + std::ostringstream msg; + msg << "Hello " << i; + response.set_message(msg.str()); + if (!writer->Write(response)) break; + gpr_sleep_until(gpr_time_add(gpr_now(), gpr_time_from_seconds(1))); + } + return Status::OK; + } +}; + +class CrashTest : public ::testing::Test { + protected: + CrashTest() {} + + std::unique_ptr<Server> + CreateServerAndClient(const std::string& mode) { + auto port = grpc_pick_unused_port_or_die(); + std::ostringstream addr_stream; + addr_stream << "localhost:" << port; + auto addr = addr_stream.str(); + client_.reset(new SubProcess({ + g_root + "/server_crash_test_client", + "--address=" + addr, + "--mode=" + mode + })); + GPR_ASSERT(client_); + + ServerBuilder builder; + builder.AddListeningPort(addr, grpc::InsecureServerCredentials()); + builder.RegisterService(&service_); + return builder.BuildAndStart(); + } + + void KillClient() { + client_.reset(); + } + + private: + std::unique_ptr<SubProcess> client_; + ServiceImpl service_; +}; + +TEST_F(CrashTest, ResponseStream) { + auto server = CreateServerAndClient("response"); + + gpr_sleep_until(gpr_time_add(gpr_now(), gpr_time_from_seconds(5))); + KillClient(); + server->Shutdown(); +} + +TEST_F(CrashTest, BidiStream) { + auto server = CreateServerAndClient("bidi"); + + gpr_sleep_until(gpr_time_add(gpr_now(), gpr_time_from_seconds(5))); + KillClient(); + server->Shutdown(); +} + +} // namespace + +} // namespace testing +} // namespace grpc + +int main(int argc, char** argv) { + std::string me = argv[0]; + auto lslash = me.rfind('/'); + if (lslash != std::string::npos) { + g_root = me.substr(0, lslash); + } else { + g_root = "."; + } + + grpc_test_init(argc, argv); + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/test/cpp/end2end/server_crash_test_client.cc b/test/cpp/end2end/server_crash_test_client.cc new file mode 100644 index 0000000000..497ccb4cb2 --- /dev/null +++ b/test/cpp/end2end/server_crash_test_client.cc @@ -0,0 +1,93 @@ +/* + * + * 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. + * + */ + +#include <iostream> +#include <memory> +#include <sstream> +#include <string> +#include <gflags/gflags.h> + +#include <grpc++/channel_arguments.h> +#include <grpc++/channel_interface.h> +#include <grpc++/client_context.h> +#include <grpc++/create_channel.h> +#include <grpc++/credentials.h> +#include <grpc++/status.h> +#include "test/cpp/util/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; + +// In some distros, gflags is in the namespace google, and in some others, +// in gflags. This hack is enabling us to find both. +namespace google {} +namespace gflags {} +using namespace google; +using namespace gflags; + +int main(int argc, char** argv) { + ParseCommandLineFlags(&argc, &argv, true); + auto stub = grpc::cpp::test::util::TestService::NewStub( + grpc::CreateChannel(FLAGS_address, grpc::InsecureCredentials(), grpc::ChannelArguments())); + + EchoRequest request; + EchoResponse response; + grpc::ClientContext context; + + if (FLAGS_mode == "bidi") { + auto stream = stub->BidiStream(&context); + for (int i = 0;; i++) { + std::ostringstream msg; + msg << "Hello " << i; + request.set_message(msg.str()); + GPR_ASSERT(stream->Write(request)); + GPR_ASSERT(stream->Read(&response)); + GPR_ASSERT(response.message() == request.message()); + } + } else if (FLAGS_mode == "response") { + EchoRequest request; + request.set_message("Hello"); + auto stream = stub->ResponseStream(&context, request); + for (;;) { + GPR_ASSERT(stream->Read(&response)); + } + } else { + gpr_log(GPR_ERROR, "invalid test mode '%s'", FLAGS_mode.c_str()); + return 1; + } + + return 0; +} diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc index 12656128c0..310227a29c 100644 --- a/test/cpp/end2end/thread_stress_test.cc +++ b/test/cpp/end2end/thread_stress_test.cc @@ -94,14 +94,16 @@ class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { signal_client_ = true; } while (!context->IsCancelled()) { - std::this_thread::sleep_for(std::chrono::microseconds( - request->param().client_cancel_after_us())); + gpr_sleep_until(gpr_time_add( + gpr_now(), + gpr_time_from_micros(request->param().client_cancel_after_us()))); } return Status::Cancelled; } else if (request->has_param() && request->param().server_cancel_after_us()) { - std::this_thread::sleep_for( - std::chrono::microseconds(request->param().server_cancel_after_us())); + gpr_sleep_until(gpr_time_add( + gpr_now(), + gpr_time_from_micros(request->param().server_cancel_after_us()))); return Status::Cancelled; } else { EXPECT_FALSE(context->IsCancelled()); diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc index a1dea383e6..09fd1c8913 100644 --- a/test/cpp/interop/client_helper.cc +++ b/test/cpp/interop/client_helper.cc @@ -82,7 +82,7 @@ std::shared_ptr<ChannelInterface> CreateChannelForTestCase( FLAGS_server_port); if (test_case == "service_account_creds") { - std::unique_ptr<Credentials> creds; + std::shared_ptr<Credentials> creds; GPR_ASSERT(FLAGS_enable_ssl); grpc::string json_key = GetServiceAccountJsonKey(); std::chrono::seconds token_lifetime = std::chrono::hours(1); @@ -91,13 +91,13 @@ std::shared_ptr<ChannelInterface> CreateChannelForTestCase( return CreateTestChannel(host_port, FLAGS_server_host_override, FLAGS_enable_ssl, FLAGS_use_prod_roots, creds); } else if (test_case == "compute_engine_creds") { - std::unique_ptr<Credentials> creds; + std::shared_ptr<Credentials> creds; GPR_ASSERT(FLAGS_enable_ssl); creds = ComputeEngineCredentials(); return CreateTestChannel(host_port, FLAGS_server_host_override, FLAGS_enable_ssl, FLAGS_use_prod_roots, creds); } else if (test_case == "jwt_token_creds") { - std::unique_ptr<Credentials> creds; + std::shared_ptr<Credentials> creds; GPR_ASSERT(FLAGS_enable_ssl); grpc::string json_key = GetServiceAccountJsonKey(); std::chrono::seconds token_lifetime = std::chrono::hours(1); diff --git a/test/cpp/qps/async_streaming_ping_pong_test.cc b/test/cpp/qps/async_streaming_ping_pong_test.cc index a1822b7e15..d4871c0ba1 100644 --- a/test/cpp/qps/async_streaming_ping_pong_test.cc +++ b/test/cpp/qps/async_streaming_ping_pong_test.cc @@ -64,8 +64,8 @@ static void RunAsyncStreamingPingPong() { const auto result = RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); - ReportQPS(result); - ReportLatency(result); + ReportQPS(*result); + ReportLatency(*result); } } // namespace testing diff --git a/test/cpp/qps/async_unary_ping_pong_test.cc b/test/cpp/qps/async_unary_ping_pong_test.cc index 8b037a8656..35f188c986 100644 --- a/test/cpp/qps/async_unary_ping_pong_test.cc +++ b/test/cpp/qps/async_unary_ping_pong_test.cc @@ -64,8 +64,8 @@ static void RunAsyncUnaryPingPong() { const auto result = RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); - ReportQPS(result); - ReportLatency(result); + ReportQPS(*result); + ReportLatency(*result); } } // namespace testing diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 2dc5b3860f..dc3a9f2ac5 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -113,24 +113,26 @@ class Client { : done_(false), new_(nullptr), impl_([this, idx, client]() { - for (;;) { - // run the loop body - bool thread_still_ok = client->ThreadFunc(&histogram_, idx); - // lock, see if we're done - std::lock_guard<std::mutex> g(mu_); - if (!thread_still_ok) { - gpr_log(GPR_ERROR, "Finishing client thread due to RPC error"); - done_ = true; - } - if (done_) {return;} - // check if we're marking, swap out the histogram if so - if (new_) { - new_->Swap(&histogram_); - new_ = nullptr; - cv_.notify_one(); - } + for (;;) { + // run the loop body + bool thread_still_ok = client->ThreadFunc(&histogram_, idx); + // lock, see if we're done + std::lock_guard<std::mutex> g(mu_); + if (!thread_still_ok) { + gpr_log(GPR_ERROR, "Finishing client thread due to RPC error"); + done_ = true; } - }) {} + if (done_) { + return; + } + // check if we're marking, swap out the histogram if so + if (new_) { + new_->Swap(&histogram_); + new_ = nullptr; + cv_.notify_one(); + } + } + }) {} ~Thread() { { @@ -168,10 +170,9 @@ class Client { std::unique_ptr<Timer> timer_; }; -std::unique_ptr<Client> - CreateSynchronousUnaryClient(const ClientConfig& args); -std::unique_ptr<Client> - CreateSynchronousStreamingClient(const ClientConfig& args); +std::unique_ptr<Client> CreateSynchronousUnaryClient(const ClientConfig& args); +std::unique_ptr<Client> CreateSynchronousStreamingClient( + const ClientConfig& args); std::unique_ptr<Client> CreateAsyncUnaryClient(const ClientConfig& args); std::unique_ptr<Client> CreateAsyncStreamingClient(const ClientConfig& args); diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index e3ab57728d..00bbd8a8a0 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -128,16 +128,16 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext { class AsyncClient : public Client { public: explicit AsyncClient(const ClientConfig& config, - std::function<void(CompletionQueue*, TestService::Stub*, - const SimpleRequest&)> setup_ctx) : - Client(config) { + std::function<void(CompletionQueue*, TestService::Stub*, + const SimpleRequest&)> setup_ctx) + : Client(config) { for (int i = 0; i < config.async_client_threads(); i++) { cli_cqs_.emplace_back(new CompletionQueue); } int t = 0; for (int i = 0; i < config.outstanding_rpcs_per_channel(); i++) { for (auto channel = channels_.begin(); channel != channels_.end(); - channel++) { + channel++) { auto* cq = cli_cqs_[t].get(); t = (t + 1) % cli_cqs_.size(); setup_ctx(cq, channel->get_stub(), request_); @@ -155,16 +155,19 @@ class AsyncClient : public Client { } } - bool ThreadFunc(Histogram* histogram, size_t thread_idx) - GRPC_OVERRIDE GRPC_FINAL { + bool ThreadFunc(Histogram* histogram, + size_t thread_idx) GRPC_OVERRIDE GRPC_FINAL { void* got_tag; bool ok; - switch (cli_cqs_[thread_idx]->AsyncNext(&got_tag, &ok, - std::chrono::system_clock::now() + - std::chrono::seconds(1))) { - case CompletionQueue::SHUTDOWN: return false; - case CompletionQueue::TIMEOUT: return true; - case CompletionQueue::GOT_EVENT: break; + switch (cli_cqs_[thread_idx]->AsyncNext( + &got_tag, &ok, + std::chrono::system_clock::now() + std::chrono::seconds(1))) { + case CompletionQueue::SHUTDOWN: + return false; + case CompletionQueue::TIMEOUT: + return true; + case CompletionQueue::GOT_EVENT: + break; } ClientRpcContext* ctx = ClientRpcContext::detag(got_tag); @@ -177,18 +180,20 @@ class AsyncClient : public Client { return true; } + private: std::vector<std::unique_ptr<CompletionQueue>> cli_cqs_; }; class AsyncUnaryClient GRPC_FINAL : public AsyncClient { public: - explicit AsyncUnaryClient(const ClientConfig& config) : - AsyncClient(config, SetupCtx) { + explicit AsyncUnaryClient(const ClientConfig& config) + : AsyncClient(config, SetupCtx) { StartThreads(config.async_client_threads()); } ~AsyncUnaryClient() GRPC_OVERRIDE { EndThreads(); } -private: + + private: static void SetupCtx(CompletionQueue* cq, TestService::Stub* stub, const SimpleRequest& req) { auto check_done = [](grpc::Status s, SimpleResponse* response) {}; @@ -205,12 +210,11 @@ template <class RequestType, class ResponseType> class ClientRpcContextStreamingImpl : public ClientRpcContext { public: ClientRpcContextStreamingImpl( - TestService::Stub *stub, const RequestType &req, - std::function< - std::unique_ptr<grpc::ClientAsyncReaderWriter< - RequestType,ResponseType>>( - TestService::Stub *, grpc::ClientContext *, void *)> start_req, - std::function<void(grpc::Status, ResponseType *)> on_done) + TestService::Stub* stub, const RequestType& req, + std::function<std::unique_ptr< + grpc::ClientAsyncReaderWriter<RequestType, ResponseType>>( + TestService::Stub*, grpc::ClientContext*, void*)> start_req, + std::function<void(grpc::Status, ResponseType*)> on_done) : context_(), stub_(stub), req_(req), @@ -221,7 +225,7 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext { start_(Timer::Now()), stream_(start_req_(stub_, &context_, ClientRpcContext::tag(this))) {} ~ClientRpcContextStreamingImpl() GRPC_OVERRIDE {} - bool RunNextState(bool ok, Histogram *hist) GRPC_OVERRIDE { + bool RunNextState(bool ok, Histogram* hist) GRPC_OVERRIDE { return (this->*next_state_)(ok, hist); } void StartNewClone() GRPC_OVERRIDE { @@ -229,59 +233,58 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext { } private: - bool ReqSent(bool ok, Histogram *) { - return StartWrite(ok); - } + bool ReqSent(bool ok, Histogram*) { return StartWrite(ok); } bool StartWrite(bool ok) { if (!ok) { - return(false); + return (false); } start_ = Timer::Now(); next_state_ = &ClientRpcContextStreamingImpl::WriteDone; stream_->Write(req_, ClientRpcContext::tag(this)); return true; } - bool WriteDone(bool ok, Histogram *) { + bool WriteDone(bool ok, Histogram*) { if (!ok) { - return(false); + return (false); } next_state_ = &ClientRpcContextStreamingImpl::ReadDone; stream_->Read(&response_, ClientRpcContext::tag(this)); return true; } - bool ReadDone(bool ok, Histogram *hist) { + bool ReadDone(bool ok, Histogram* hist) { hist->Add((Timer::Now() - start_) * 1e9); return StartWrite(ok); } grpc::ClientContext context_; - TestService::Stub *stub_; + TestService::Stub* stub_; RequestType req_; ResponseType response_; - bool (ClientRpcContextStreamingImpl::*next_state_)(bool, Histogram *); - std::function<void(grpc::Status, ResponseType *)> callback_; - std::function<std::unique_ptr<grpc::ClientAsyncReaderWriter< - RequestType,ResponseType>>( - TestService::Stub *, grpc::ClientContext *, void *)> start_req_; + bool (ClientRpcContextStreamingImpl::*next_state_)(bool, Histogram*); + std::function<void(grpc::Status, ResponseType*)> callback_; + std::function< + std::unique_ptr<grpc::ClientAsyncReaderWriter<RequestType, ResponseType>>( + TestService::Stub*, grpc::ClientContext*, void*)> start_req_; grpc::Status status_; double start_; - std::unique_ptr<grpc::ClientAsyncReaderWriter<RequestType,ResponseType>> - stream_; + std::unique_ptr<grpc::ClientAsyncReaderWriter<RequestType, ResponseType>> + stream_; }; class AsyncStreamingClient GRPC_FINAL : public AsyncClient { public: - explicit AsyncStreamingClient(const ClientConfig &config) : - AsyncClient(config, SetupCtx) { + explicit AsyncStreamingClient(const ClientConfig& config) + : AsyncClient(config, SetupCtx) { StartThreads(config.async_client_threads()); } ~AsyncStreamingClient() GRPC_OVERRIDE { EndThreads(); } -private: + + private: static void SetupCtx(CompletionQueue* cq, TestService::Stub* stub, - const SimpleRequest& req) { + const SimpleRequest& req) { auto check_done = [](grpc::Status s, SimpleResponse* response) {}; - auto start_req = [cq](TestService::Stub *stub, grpc::ClientContext *ctx, - void *tag) { + auto start_req = [cq](TestService::Stub* stub, grpc::ClientContext* ctx, + void* tag) { auto stream = stub->AsyncStreamingCall(ctx, cq, tag); return stream; }; diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index 264293561d..c28dc91321 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -99,7 +99,9 @@ class SynchronousUnaryClient GRPC_FINAL : public SynchronousClient { class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient { public: SynchronousStreamingClient(const ClientConfig& config) - : SynchronousClient(config), context_(num_threads_), stream_(num_threads_) { + : SynchronousClient(config), + context_(num_threads_), + stream_(num_threads_) { for (size_t thread_idx = 0; thread_idx < num_threads_; thread_idx++) { auto* stub = channels_[thread_idx % channels_.size()].get_stub(); stream_[thread_idx] = stub->StreamingCall(&context_[thread_idx]); @@ -110,8 +112,8 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient { EndThreads(); for (auto stream = stream_.begin(); stream != stream_.end(); stream++) { if (*stream) { - (*stream)->WritesDone(); - EXPECT_TRUE((*stream)->Finish().IsOk()); + (*stream)->WritesDone(); + EXPECT_TRUE((*stream)->Finish().IsOk()); } } } @@ -119,7 +121,7 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient { bool ThreadFunc(Histogram* histogram, size_t thread_idx) GRPC_OVERRIDE { double start = Timer::Now(); if (stream_[thread_idx]->Write(request_) && - stream_[thread_idx]->Read(&responses_[thread_idx])) { + stream_[thread_idx]->Read(&responses_[thread_idx])) { histogram->Add((Timer::Now() - start) * 1e9); return true; } @@ -128,8 +130,8 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient { private: std::vector<grpc::ClientContext> context_; - std::vector<std::unique_ptr<grpc::ClientReaderWriter< - SimpleRequest, SimpleResponse>>> stream_; + std::vector<std::unique_ptr< + grpc::ClientReaderWriter<SimpleRequest, SimpleResponse>>> stream_; }; std::unique_ptr<Client> CreateSynchronousUnaryClient( diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 9f7d3b56a4..bf12730f97 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -44,9 +44,11 @@ #include <thread> #include <deque> #include <vector> +#include <unistd.h> #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/qps_worker.h" #include "test/core/util/port.h" +#include "test/core/util/test_config.h" using std::list; using std::thread; @@ -75,13 +77,10 @@ static deque<string> get_hosts(const string& name) { } } -ScenarioResult RunScenario(const ClientConfig& initial_client_config, - size_t num_clients, - const ServerConfig& server_config, - size_t num_servers, - int warmup_seconds, - int benchmark_seconds, - int spawn_local_worker_count) { +std::unique_ptr<ScenarioResult> RunScenario( + const ClientConfig& initial_client_config, size_t num_clients, + const ServerConfig& server_config, size_t num_servers, int warmup_seconds, + int benchmark_seconds, int spawn_local_worker_count) { // ClientContext allocator (all are destroyed at scope exit) list<ClientContext> contexts; auto alloc_context = [&contexts]() { @@ -89,6 +88,11 @@ ScenarioResult RunScenario(const ClientConfig& initial_client_config, return &contexts.back(); }; + // To be added to the result, containing the final configuration used for + // client and config (incluiding host, etc.) + ClientConfig result_client_config; + ServerConfig result_server_config; + // Get client, server lists auto workers = get_hosts("QPS_WORKERS"); ClientConfig client_config = initial_client_config; @@ -96,6 +100,16 @@ ScenarioResult RunScenario(const ClientConfig& initial_client_config, // Spawn some local workers if desired vector<unique_ptr<QpsWorker>> local_workers; for (int i = 0; i < abs(spawn_local_worker_count); i++) { + // act as if we're a new test -- gets a good rng seed + static bool called_init = false; + if (!called_init) { + char args_buf[100]; + strcpy(args_buf, "some-benchmark"); + char* args[] = {args_buf}; + grpc_test_init(1, args); + called_init = true; + } + int driver_port = grpc_pick_unused_port_or_die(); int benchmark_port = grpc_pick_unused_port_or_die(); local_workers.emplace_back(new QpsWorker(driver_port, benchmark_port)); @@ -127,6 +141,8 @@ ScenarioResult RunScenario(const ClientConfig& initial_client_config, sd.stub = std::move(Worker::NewStub( CreateChannel(workers[i], InsecureCredentials(), ChannelArguments()))); ServerArgs args; + result_server_config = server_config; + result_server_config.set_host(workers[i]); *args.mutable_setup() = server_config; sd.stream = std::move(sd.stub->RunServer(alloc_context())); GPR_ASSERT(sd.stream->Write(args)); @@ -156,6 +172,8 @@ ScenarioResult RunScenario(const ClientConfig& initial_client_config, cd.stub = std::move(Worker::NewStub(CreateChannel( workers[i + num_servers], InsecureCredentials(), ChannelArguments()))); ClientArgs args; + result_client_config = client_config; + result_client_config.set_host(workers[i + num_servers]); *args.mutable_setup() = client_config; cd.stream = std::move(cd.stub->RunTest(alloc_context())); GPR_ASSERT(cd.stream->Write(args)); @@ -193,10 +211,13 @@ ScenarioResult RunScenario(const ClientConfig& initial_client_config, // Wait some time gpr_log(GPR_INFO, "Running"); - gpr_sleep_until(gpr_time_add(start, gpr_time_from_seconds(benchmark_seconds))); + gpr_sleep_until( + gpr_time_add(start, gpr_time_from_seconds(benchmark_seconds))); // Finish a run - ScenarioResult result; + std::unique_ptr<ScenarioResult> result(new ScenarioResult); + result->client_config = result_client_config; + result->server_config = result_server_config; gpr_log(GPR_INFO, "Finishing"); for (auto server = servers.begin(); server != servers.end(); server++) { GPR_ASSERT(server->stream->Write(server_mark)); @@ -207,14 +228,14 @@ ScenarioResult RunScenario(const ClientConfig& initial_client_config, for (auto server = servers.begin(); server != servers.end(); server++) { GPR_ASSERT(server->stream->Read(&server_status)); const auto& stats = server_status.stats(); - result.server_resources.push_back(ResourceUsage{ + result->server_resources.push_back(ResourceUsage{ stats.time_elapsed(), stats.time_user(), stats.time_system()}); } for (auto client = clients.begin(); client != clients.end(); client++) { GPR_ASSERT(client->stream->Read(&client_status)); const auto& stats = client_status.stats(); - result.latencies.MergeProto(stats.latencies()); - result.client_resources.push_back(ResourceUsage{ + result->latencies.MergeProto(stats.latencies()); + result->client_resources.push_back(ResourceUsage{ stats.time_elapsed(), stats.time_user(), stats.time_system()}); } diff --git a/test/cpp/qps/driver.h b/test/cpp/qps/driver.h index eb7119a89d..5e9d4b3cb9 100644 --- a/test/cpp/qps/driver.h +++ b/test/cpp/qps/driver.h @@ -34,6 +34,8 @@ #ifndef TEST_QPS_DRIVER_H #define TEST_QPS_DRIVER_H +#include <memory> + #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/qpstest.grpc.pb.h" @@ -49,15 +51,14 @@ struct ScenarioResult { Histogram latencies; std::vector<ResourceUsage> client_resources; std::vector<ResourceUsage> server_resources; + ClientConfig client_config; + ServerConfig server_config; }; -ScenarioResult RunScenario(const grpc::testing::ClientConfig& client_config, - size_t num_clients, - const grpc::testing::ServerConfig& server_config, - size_t num_servers, - int warmup_seconds, - int benchmark_seconds, - int spawn_local_worker_count); +std::unique_ptr<ScenarioResult> RunScenario( + const grpc::testing::ClientConfig& client_config, size_t num_clients, + const grpc::testing::ServerConfig& server_config, size_t num_servers, + int warmup_seconds, int benchmark_seconds, int spawn_local_worker_count); } // namespace testing } // namespace grpc diff --git a/test/cpp/qps/qps-sweep.sh b/test/cpp/qps/qps-sweep.sh index 7bc6eade2c..cb93201933 100755 --- a/test/cpp/qps/qps-sweep.sh +++ b/test/cpp/qps/qps-sweep.sh @@ -1,5 +1,34 @@ #!/bin/sh +# 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. + if [ x"$QPS_WORKERS" == x ]; then echo Error: Must set QPS_WORKERS variable in form \ "host:port,host:port,..." 1>&2 diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index fc8e04201c..008830de4e 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -100,17 +100,16 @@ int main(int argc, char** argv) { // client will deadlock on a timer. GPR_ASSERT(!(server_type == grpc::testing::SYNCHRONOUS_SERVER && rpc_type == grpc::testing::STREAMING && - FLAGS_server_threads < FLAGS_client_channels * - FLAGS_outstanding_rpcs_per_channel)); + FLAGS_server_threads < + FLAGS_client_channels * FLAGS_outstanding_rpcs_per_channel)); - auto result = RunScenario(client_config, FLAGS_num_clients, - server_config, FLAGS_num_servers, - FLAGS_warmup_seconds, FLAGS_benchmark_seconds, - FLAGS_local_workers); + const auto result = RunScenario( + client_config, FLAGS_num_clients, server_config, FLAGS_num_servers, + FLAGS_warmup_seconds, FLAGS_benchmark_seconds, FLAGS_local_workers); - ReportQPSPerCore(result, server_config); - ReportLatency(result); - ReportTimes(result); + ReportQPSPerCore(*result, server_config); + ReportLatency(*result); + ReportTimes(*result); return 0; } diff --git a/test/cpp/qps/qps_test.cc b/test/cpp/qps/qps_test.cc index f567e4cf06..9a81d0fc90 100644 --- a/test/cpp/qps/qps_test.cc +++ b/test/cpp/qps/qps_test.cc @@ -64,8 +64,8 @@ static void RunQPS() { const auto result = RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); - ReportQPSPerCore(result, server_config); - ReportLatency(result); + ReportQPSPerCore(*result, server_config); + ReportLatency(*result); } } // namespace testing diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index 46d70dce52..fb49271991 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -64,17 +64,19 @@ namespace testing { std::unique_ptr<Client> CreateClient(const ClientConfig& config) { switch (config.client_type()) { case ClientType::SYNCHRONOUS_CLIENT: - return (config.rpc_type() == RpcType::UNARY) ? - CreateSynchronousUnaryClient(config) : - CreateSynchronousStreamingClient(config); + return (config.rpc_type() == RpcType::UNARY) + ? CreateSynchronousUnaryClient(config) + : CreateSynchronousStreamingClient(config); case ClientType::ASYNC_CLIENT: - return (config.rpc_type() == RpcType::UNARY) ? - CreateAsyncUnaryClient(config) : CreateAsyncStreamingClient(config); + return (config.rpc_type() == RpcType::UNARY) + ? CreateAsyncUnaryClient(config) + : CreateAsyncStreamingClient(config); } abort(); } -std::unique_ptr<Server> CreateServer(const ServerConfig& config, int server_port) { +std::unique_ptr<Server> CreateServer(const ServerConfig& config, + int server_port) { switch (config.server_type()) { case ServerType::SYNCHRONOUS_SERVER: return CreateSynchronousServer(config, server_port); @@ -86,7 +88,8 @@ std::unique_ptr<Server> CreateServer(const ServerConfig& config, int server_port class WorkerImpl GRPC_FINAL : public Worker::Service { public: - explicit WorkerImpl(int server_port) : server_port_(server_port), acquired_(false) {} + explicit WorkerImpl(int server_port) + : server_port_(server_port), acquired_(false) {} Status RunTest(ServerContext* ctx, ServerReaderWriter<ClientStatus, ClientArgs>* stream) @@ -97,7 +100,7 @@ class WorkerImpl GRPC_FINAL : public Worker::Service { } grpc_profiler_start("qps_client.prof"); - Status ret = RunTestBody(ctx,stream); + Status ret = RunTestBody(ctx, stream); grpc_profiler_stop(); return ret; } @@ -111,7 +114,7 @@ class WorkerImpl GRPC_FINAL : public Worker::Service { } grpc_profiler_start("qps_server.prof"); - Status ret = RunServerBody(ctx,stream); + Status ret = RunServerBody(ctx, stream); grpc_profiler_stop(); return ret; } @@ -226,8 +229,7 @@ QpsWorker::QpsWorker(int driver_port, int server_port) { server_ = std::move(builder.BuildAndStart()); } -QpsWorker::~QpsWorker() { -} +QpsWorker::~QpsWorker() {} } // namespace testing } // namespace grpc diff --git a/test/cpp/qps/qpstest.proto b/test/cpp/qps/qpstest.proto index 1553ef5f07..122a7df1ac 100644 --- a/test/cpp/qps/qpstest.proto +++ b/test/cpp/qps/qpstest.proto @@ -102,6 +102,7 @@ message ClientConfig { // only for async client: optional int32 async_client_threads = 7; optional RpcType rpc_type = 8 [default=UNARY]; + optional string host = 9; } // Request current stats @@ -129,6 +130,7 @@ message ServerConfig { required ServerType server_type = 1; optional int32 threads = 2 [default=1]; optional bool enable_ssl = 3 [default=false]; + optional string host = 4; } message ServerArgs { diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc index 29d88da344..3115ff3bfb 100644 --- a/test/cpp/qps/report.cc +++ b/test/cpp/qps/report.cc @@ -48,18 +48,20 @@ void ReportQPS(const ScenarioResult& result) { } // QPS: XXX (YYY/server core) -void ReportQPSPerCore(const ScenarioResult& result, const ServerConfig& server_config) { - auto qps = - result.latencies.Count() / - average(result.client_resources, - [](ResourceUsage u) { return u.wall_time; }); +void ReportQPSPerCore(const ScenarioResult& result, + const ServerConfig& server_config) { + auto qps = result.latencies.Count() / + average(result.client_resources, + [](ResourceUsage u) { return u.wall_time; }); - gpr_log(GPR_INFO, "QPS: %.1f (%.1f/server core)", qps, qps/server_config.threads()); + gpr_log(GPR_INFO, "QPS: %.1f (%.1f/server core)", qps, + qps / server_config.threads()); } // Latency (50/90/95/99/99.9%-ile): AA/BB/CC/DD/EE us void ReportLatency(const ScenarioResult& result) { - gpr_log(GPR_INFO, "Latencies (50/90/95/99/99.9%%-ile): %.1f/%.1f/%.1f/%.1f/%.1f us", + gpr_log(GPR_INFO, + "Latencies (50/90/95/99/99.9%%-ile): %.1f/%.1f/%.1f/%.1f/%.1f us", result.latencies.Percentile(50) / 1000, result.latencies.Percentile(90) / 1000, result.latencies.Percentile(95) / 1000, diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index 6cb3192908..b9998405f6 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -64,7 +64,7 @@ namespace testing { class AsyncQpsServerTest : public Server { public: AsyncQpsServerTest(const ServerConfig &config, int port) : shutdown_(false) { - char* server_address = NULL; + char *server_address = NULL; gpr_join_host_port(&server_address, "::", port); ServerBuilder builder; @@ -95,16 +95,19 @@ class AsyncQpsServerTest : public Server { threads_.push_back(std::thread([=]() { // Wait until work is available or we are shutting down bool ok; - void* got_tag; + void *got_tag; while (srv_cq_->Next(&got_tag, &ok)) { - ServerRpcContext* ctx = detag(got_tag); + ServerRpcContext *ctx = detag(got_tag); // The tag is a pointer to an RPC context to invoke - if (ctx->RunNextState(ok) == false) { + bool still_going = ctx->RunNextState(ok); + std::lock_guard<std::mutex> g(shutdown_mutex_); + if (!shutdown_) { // this RPC context is done, so refresh it - std::lock_guard<std::mutex> g(shutdown_mutex_); - if (!shutdown_) { + if (!still_going) { ctx->Reset(); } + } else { + return; } } return; @@ -116,11 +119,15 @@ class AsyncQpsServerTest : public Server { { std::lock_guard<std::mutex> g(shutdown_mutex_); shutdown_ = true; - srv_cq_->Shutdown(); } for (auto thr = threads_.begin(); thr != threads_.end(); thr++) { thr->join(); } + srv_cq_->Shutdown(); + bool ok; + void *got_tag; + while (srv_cq_->Next(&got_tag, &ok)) + ; while (!contexts_.empty()) { delete contexts_.front(); contexts_.pop_front(); @@ -133,23 +140,23 @@ class AsyncQpsServerTest : public Server { ServerRpcContext() {} virtual ~ServerRpcContext(){}; virtual bool RunNextState(bool) = 0; // next state, return false if done - virtual void Reset() = 0; // start this back at a clean state + virtual void Reset() = 0; // start this back at a clean state }; - static void* tag(ServerRpcContext* func) { - return reinterpret_cast<void*>(func); + static void *tag(ServerRpcContext *func) { + return reinterpret_cast<void *>(func); } - static ServerRpcContext* detag(void* tag) { - return reinterpret_cast<ServerRpcContext*>(tag); + static ServerRpcContext *detag(void *tag) { + return reinterpret_cast<ServerRpcContext *>(tag); } template <class RequestType, class ResponseType> class ServerRpcContextUnaryImpl GRPC_FINAL : public ServerRpcContext { public: ServerRpcContextUnaryImpl( - std::function<void(ServerContext*, RequestType*, - grpc::ServerAsyncResponseWriter<ResponseType>*, - void*)> request_method, - std::function<grpc::Status(const RequestType*, ResponseType*)> + std::function<void(ServerContext *, RequestType *, + grpc::ServerAsyncResponseWriter<ResponseType> *, + void *)> request_method, + std::function<grpc::Status(const RequestType *, ResponseType *)> invoke_method) : next_state_(&ServerRpcContextUnaryImpl::invoker), request_method_(request_method), @@ -159,7 +166,9 @@ class AsyncQpsServerTest : public Server { AsyncQpsServerTest::tag(this)); } ~ServerRpcContextUnaryImpl() GRPC_OVERRIDE {} - bool RunNextState(bool ok) GRPC_OVERRIDE {return (this->*next_state_)(ok);} + bool RunNextState(bool ok) GRPC_OVERRIDE { + return (this->*next_state_)(ok); + } void Reset() GRPC_OVERRIDE { srv_ctx_ = ServerContext(); req_ = RequestType(); @@ -192,10 +201,10 @@ class AsyncQpsServerTest : public Server { ServerContext srv_ctx_; RequestType req_; bool (ServerRpcContextUnaryImpl::*next_state_)(bool); - std::function<void(ServerContext*, RequestType*, - grpc::ServerAsyncResponseWriter<ResponseType>*, void*)> + std::function<void(ServerContext *, RequestType *, + grpc::ServerAsyncResponseWriter<ResponseType> *, void *)> request_method_; - std::function<grpc::Status(const RequestType*, ResponseType*)> + std::function<grpc::Status(const RequestType *, ResponseType *)> invoke_method_; grpc::ServerAsyncResponseWriter<ResponseType> response_writer_; }; @@ -204,9 +213,9 @@ class AsyncQpsServerTest : public Server { class ServerRpcContextStreamingImpl GRPC_FINAL : public ServerRpcContext { public: ServerRpcContextStreamingImpl( - std::function<void(ServerContext *, - grpc::ServerAsyncReaderWriter<ResponseType, - RequestType> *, void *)> request_method, + std::function<void(ServerContext *, grpc::ServerAsyncReaderWriter< + ResponseType, RequestType> *, + void *)> request_method, std::function<grpc::Status(const RequestType *, ResponseType *)> invoke_method) : next_state_(&ServerRpcContextStreamingImpl::request_done), @@ -215,14 +224,15 @@ class AsyncQpsServerTest : public Server { stream_(&srv_ctx_) { request_method_(&srv_ctx_, &stream_, AsyncQpsServerTest::tag(this)); } - ~ServerRpcContextStreamingImpl() GRPC_OVERRIDE { + ~ServerRpcContextStreamingImpl() GRPC_OVERRIDE {} + bool RunNextState(bool ok) GRPC_OVERRIDE { + return (this->*next_state_)(ok); } - bool RunNextState(bool ok) GRPC_OVERRIDE {return (this->*next_state_)(ok);} void Reset() GRPC_OVERRIDE { srv_ctx_ = ServerContext(); req_ = RequestType(); - stream_ = grpc::ServerAsyncReaderWriter<ResponseType, - RequestType>(&srv_ctx_); + stream_ = + grpc::ServerAsyncReaderWriter<ResponseType, RequestType>(&srv_ctx_); // Then request the method next_state_ = &ServerRpcContextStreamingImpl::request_done; @@ -241,47 +251,47 @@ class AsyncQpsServerTest : public Server { bool read_done(bool ok) { if (ok) { - // invoke the method - ResponseType response; - // Call the RPC processing function - grpc::Status status = invoke_method_(&req_, &response); - // initiate the write - stream_.Write(response, AsyncQpsServerTest::tag(this)); - next_state_ = &ServerRpcContextStreamingImpl::write_done; - } else { // client has sent writes done - // finish the stream - stream_.Finish(Status::OK, AsyncQpsServerTest::tag(this)); - next_state_ = &ServerRpcContextStreamingImpl::finish_done; + // invoke the method + ResponseType response; + // Call the RPC processing function + grpc::Status status = invoke_method_(&req_, &response); + // initiate the write + stream_.Write(response, AsyncQpsServerTest::tag(this)); + next_state_ = &ServerRpcContextStreamingImpl::write_done; + } else { // client has sent writes done + // finish the stream + stream_.Finish(Status::OK, AsyncQpsServerTest::tag(this)); + next_state_ = &ServerRpcContextStreamingImpl::finish_done; } return true; } bool write_done(bool ok) { // now go back and get another streaming read! if (ok) { - stream_.Read(&req_, AsyncQpsServerTest::tag(this)); - next_state_ = &ServerRpcContextStreamingImpl::read_done; - } - else { - stream_.Finish(Status::OK, AsyncQpsServerTest::tag(this)); - next_state_ = &ServerRpcContextStreamingImpl::finish_done; + stream_.Read(&req_, AsyncQpsServerTest::tag(this)); + next_state_ = &ServerRpcContextStreamingImpl::read_done; + } else { + stream_.Finish(Status::OK, AsyncQpsServerTest::tag(this)); + next_state_ = &ServerRpcContextStreamingImpl::finish_done; } return true; } - bool finish_done(bool ok) {return false; /* reset the context */ } + bool finish_done(bool ok) { return false; /* reset the context */ } ServerContext srv_ctx_; RequestType req_; bool (ServerRpcContextStreamingImpl::*next_state_)(bool); - std::function<void(ServerContext *, - grpc::ServerAsyncReaderWriter<ResponseType, - RequestType> *, void *)> request_method_; + std::function<void( + ServerContext *, + grpc::ServerAsyncReaderWriter<ResponseType, RequestType> *, void *)> + request_method_; std::function<grpc::Status(const RequestType *, ResponseType *)> invoke_method_; - grpc::ServerAsyncReaderWriter<ResponseType,RequestType> stream_; + grpc::ServerAsyncReaderWriter<ResponseType, RequestType> stream_; }; - static Status ProcessRPC(const SimpleRequest* request, - SimpleResponse* response) { + static Status ProcessRPC(const SimpleRequest *request, + SimpleResponse *response) { if (request->response_size() > 0) { if (!SetPayload(request->response_type(), request->response_size(), response->mutable_payload())) { @@ -294,19 +304,20 @@ class AsyncQpsServerTest : public Server { std::unique_ptr<grpc::Server> server_; std::unique_ptr<grpc::ServerCompletionQueue> srv_cq_; TestService::AsyncService async_service_; - std::function<void(ServerContext*, SimpleRequest*, - grpc::ServerAsyncResponseWriter<SimpleResponse>*, void*)> + std::function<void(ServerContext *, SimpleRequest *, + grpc::ServerAsyncResponseWriter<SimpleResponse> *, void *)> request_unary_; - std::function<void(ServerContext*, grpc::ServerAsyncReaderWriter< - SimpleResponse,SimpleRequest>*, void*)> + std::function<void( + ServerContext *, + grpc::ServerAsyncReaderWriter<SimpleResponse, SimpleRequest> *, void *)> request_streaming_; - std::forward_list<ServerRpcContext*> contexts_; + std::forward_list<ServerRpcContext *> contexts_; std::mutex shutdown_mutex_; bool shutdown_; }; -std::unique_ptr<Server> CreateAsyncServer(const ServerConfig& config, +std::unique_ptr<Server> CreateAsyncServer(const ServerConfig &config, int port) { return std::unique_ptr<Server>(new AsyncQpsServerTest(config, port)); } diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index 2770233a7c..bc00de9ced 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -70,18 +70,18 @@ class TestServiceImpl GRPC_FINAL : public TestService::Service { } return Status::OK; } - Status StreamingCall(ServerContext *context, - ServerReaderWriter<SimpleResponse, SimpleRequest>* - stream) GRPC_OVERRIDE { + Status StreamingCall( + ServerContext* context, + ServerReaderWriter<SimpleResponse, SimpleRequest>* stream) GRPC_OVERRIDE { SimpleRequest request; while (stream->Read(&request)) { SimpleResponse response; if (request.response_size() > 0) { - if (!Server::SetPayload(request.response_type(), - request.response_size(), - response.mutable_payload())) { - return Status(grpc::StatusCode::INTERNAL, "Error creating payload."); - } + if (!Server::SetPayload(request.response_type(), + request.response_size(), + response.mutable_payload())) { + return Status(grpc::StatusCode::INTERNAL, "Error creating payload."); + } } stream->Write(response); } diff --git a/test/cpp/qps/single_run_localhost.sh b/test/cpp/qps/single_run_localhost.sh index 2f60b4e49d..9d76f08f80 100755 --- a/test/cpp/qps/single_run_localhost.sh +++ b/test/cpp/qps/single_run_localhost.sh @@ -1,4 +1,32 @@ #!/bin/sh +# 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. # performs a single qps run with one client and one server diff --git a/test/cpp/qps/sync_streaming_ping_pong_test.cc b/test/cpp/qps/sync_streaming_ping_pong_test.cc index 48c7ff63e0..218306846b 100644 --- a/test/cpp/qps/sync_streaming_ping_pong_test.cc +++ b/test/cpp/qps/sync_streaming_ping_pong_test.cc @@ -63,8 +63,8 @@ static void RunSynchronousStreamingPingPong() { const auto result = RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); - ReportQPS(result); - ReportLatency(result); + ReportQPS(*result); + ReportLatency(*result); } } // namespace testing diff --git a/test/cpp/qps/sync_unary_ping_pong_test.cc b/test/cpp/qps/sync_unary_ping_pong_test.cc index 4c4de6377b..137ef79f2f 100644 --- a/test/cpp/qps/sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/sync_unary_ping_pong_test.cc @@ -63,8 +63,8 @@ static void RunSynchronousUnaryPingPong() { const auto result = RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); - ReportQPS(result); - ReportLatency(result); + ReportQPS(*result); + ReportLatency(*result); } } // namespace testing diff --git a/test/cpp/qps/worker.cc b/test/cpp/qps/worker.cc index 281c617382..dfc102fc17 100644 --- a/test/cpp/qps/worker.cc +++ b/test/cpp/qps/worker.cc @@ -37,6 +37,7 @@ #include <thread> #include <grpc/grpc.h> +#include <grpc/support/time.h> #include <gflags/gflags.h> #include "qps_worker.h" @@ -47,7 +48,7 @@ DEFINE_int32(server_port, 0, "Spawned server port."); static bool got_sigint = false; -static void sigint_handler(int x) {got_sigint = true;} +static void sigint_handler(int x) { got_sigint = true; } namespace grpc { namespace testing { @@ -56,7 +57,7 @@ static void RunServer() { QpsWorker worker(FLAGS_driver_port, FLAGS_server_port); while (!got_sigint) { - std::this_thread::sleep_for(std::chrono::seconds(5)); + gpr_sleep_until(gpr_time_add(gpr_now(), gpr_time_from_seconds(5))); } } @@ -69,6 +70,6 @@ int main(int argc, char** argv) { signal(SIGINT, sigint_handler); grpc::testing::RunServer(); - + return 0; } diff --git a/test/cpp/util/create_test_channel.cc b/test/cpp/util/create_test_channel.cc index f040acc4b1..dc48fa2d87 100644 --- a/test/cpp/util/create_test_channel.cc +++ b/test/cpp/util/create_test_channel.cc @@ -58,13 +58,13 @@ namespace grpc { std::shared_ptr<ChannelInterface> CreateTestChannel( const grpc::string& server, const grpc::string& override_hostname, bool enable_ssl, bool use_prod_roots, - const std::unique_ptr<Credentials>& creds) { + const std::shared_ptr<Credentials>& creds) { ChannelArguments channel_args; if (enable_ssl) { const char* roots_certs = use_prod_roots ? "" : test_root_cert; SslCredentialsOptions ssl_opts = {roots_certs, "", ""}; - std::unique_ptr<Credentials> channel_creds = SslCredentials(ssl_opts); + std::shared_ptr<Credentials> channel_creds = SslCredentials(ssl_opts); if (!server.empty() && !override_hostname.empty()) { channel_args.SetSslTargetNameOverride(override_hostname); @@ -84,7 +84,7 @@ std::shared_ptr<ChannelInterface> CreateTestChannel( const grpc::string& server, const grpc::string& override_hostname, bool enable_ssl, bool use_prod_roots) { return CreateTestChannel(server, override_hostname, enable_ssl, - use_prod_roots, std::unique_ptr<Credentials>()); + use_prod_roots, std::shared_ptr<Credentials>()); } // Shortcut for end2end and interop tests. diff --git a/test/cpp/util/create_test_channel.h b/test/cpp/util/create_test_channel.h index 5c298ce850..5f2609ddd8 100644 --- a/test/cpp/util/create_test_channel.h +++ b/test/cpp/util/create_test_channel.h @@ -52,7 +52,7 @@ std::shared_ptr<ChannelInterface> CreateTestChannel( std::shared_ptr<ChannelInterface> CreateTestChannel( const grpc::string& server, const grpc::string& override_hostname, bool enable_ssl, bool use_prod_roots, - const std::unique_ptr<Credentials>& creds); + const std::shared_ptr<Credentials>& creds); } // namespace grpc diff --git a/test/cpp/util/fake_credentials.cc b/test/cpp/util/fake_credentials.cc new file mode 100644 index 0000000000..f5b83b8159 --- /dev/null +++ b/test/cpp/util/fake_credentials.cc @@ -0,0 +1,58 @@ +/* + * + * 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. + * + */ + +#include <grpc/grpc_security.h> +#include <grpc++/channel_arguments.h> +#include <grpc++/credentials.h> +#include <grpc++/server_credentials.h> +#include "src/cpp/client/channel.h" +#include "src/cpp/client/secure_credentials.h" +#include "src/cpp/server/secure_server_credentials.h" + +namespace grpc { +namespace testing { + +std::shared_ptr<Credentials> FakeTransportSecurityCredentials() { + grpc_credentials* c_creds = grpc_fake_transport_security_credentials_create(); + return std::shared_ptr<Credentials>(new SecureCredentials(c_creds)); +} + +std::shared_ptr<ServerCredentials> FakeTransportSecurityServerCredentials() { + grpc_server_credentials* c_creds = + grpc_fake_transport_security_server_credentials_create(); + return std::shared_ptr<ServerCredentials>( + new SecureServerCredentials(c_creds)); +} + +} // namespace testing +} // namespace grpc diff --git a/test/cpp/util/fake_credentials.h b/test/cpp/util/fake_credentials.h new file mode 100644 index 0000000000..e1ba7bb9e4 --- /dev/null +++ b/test/cpp/util/fake_credentials.h @@ -0,0 +1,51 @@ +/* + * + * 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. + * + */ + +#ifndef GRPC_TEST_CPP_UTIL_FAKE_CREDENTIALS_H +#define GRPC_TEST_CPP_UTIL_FAKE_CREDENTIALS_H + +#include <memory> + +namespace grpc { +class Credentials; +class ServerCredentials; + +namespace testing { + +std::shared_ptr<Credentials> FakeTransportSecurityCredentials(); +std::shared_ptr<ServerCredentials> FakeTransportSecurityServerCredentials(); + +} // namespace testing +} // namespace grpc + +#endif // GRPC_TEST_CPP_UTIL_FAKE_CREDENTIALS_H diff --git a/test/cpp/util/grpc_cli.cc b/test/cpp/util/grpc_cli.cc index d71a7a0b77..ad3c0af877 100644 --- a/test/cpp/util/grpc_cli.cc +++ b/test/cpp/util/grpc_cli.cc @@ -104,7 +104,7 @@ int main(int argc, char** argv) { std::stringstream input_stream; input_stream << input_file.rdbuf(); - std::unique_ptr<grpc::Credentials> creds; + std::shared_ptr<grpc::Credentials> creds; if (!FLAGS_enable_ssl) { creds = grpc::InsecureCredentials(); } else { diff --git a/test/cpp/util/messages.proto b/test/cpp/util/messages.proto index a79bce1f30..062f66c091 100644 --- a/test/cpp/util/messages.proto +++ b/test/cpp/util/messages.proto @@ -36,6 +36,7 @@ message RequestParams { optional bool echo_deadline = 1; optional int32 client_cancel_after_us = 2; optional int32 server_cancel_after_us = 3; + optional bool echo_metadata = 4; } message EchoRequest { diff --git a/test/cpp/util/subprocess.cc b/test/cpp/util/subprocess.cc new file mode 100644 index 0000000000..d758f629ac --- /dev/null +++ b/test/cpp/util/subprocess.cc @@ -0,0 +1,59 @@ +/* + * + * 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. + * + */ + +#include "test/cpp/util/subprocess.h" + +#include <vector> + +#include <grpc/support/subprocess.h> + +namespace grpc { + +static gpr_subprocess *MakeProcess(std::initializer_list<std::string> args) { + std::vector<const char *> vargs; + for (auto it = args.begin(); it != args.end(); ++it) { + vargs.push_back(it->c_str()); + } + return gpr_subprocess_create(vargs.size(), &vargs[0]); +} + +SubProcess::SubProcess(std::initializer_list<std::string> args) + : subprocess_(MakeProcess(args)) {} + +SubProcess::~SubProcess() { gpr_subprocess_destroy(subprocess_); } + +int SubProcess::Join() { return gpr_subprocess_join(subprocess_); } + +void SubProcess::Interrupt() { gpr_subprocess_interrupt(subprocess_); } + +} // namespace grpc
\ No newline at end of file diff --git a/test/cpp/util/subprocess.h b/test/cpp/util/subprocess.h new file mode 100644 index 0000000000..8fafe3d177 --- /dev/null +++ b/test/cpp/util/subprocess.h @@ -0,0 +1,61 @@ +/* + * + * 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. + * + */ + +#ifndef GRPC_TEST_CPP_UTIL_SUBPROCESS_H +#define GRPC_TEST_CPP_UTIL_SUBPROCESS_H + +#include <initializer_list> +#include <string> + +struct gpr_subprocess; + +namespace grpc { + +class SubProcess { + public: + SubProcess(std::initializer_list<std::string> args); + ~SubProcess(); + + int Join(); + void Interrupt(); + + private: + SubProcess(const SubProcess& other); + SubProcess& operator=(const SubProcess& other); + + gpr_subprocess* const subprocess_; +}; + +} // namespace grpc + +#endif // GRPC_TEST_CPP_UTIL_SUBPROCESS_H diff --git a/third_party/protobuf b/third_party/protobuf -Subproject 644a6a1da71385e9d7a7a26b3476c93fdd71788 +Subproject a8b38c598d7f65b281a72809b28117afdb76093 diff --git a/tools/distrib/python/submit.py b/tools/distrib/python/submit.py index 79ebb93e57..dd48f440ba 100755 --- a/tools/distrib/python/submit.py +++ b/tools/distrib/python/submit.py @@ -1,4 +1,32 @@ #!/usr/bin/env python +# 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. import argparse import os diff --git a/tools/dockerfile/grpc_cxx/build.sh b/tools/dockerfile/grpc_cxx/build.sh index 8a9e95ccb8..8df3f15412 100755 --- a/tools/dockerfile/grpc_cxx/build.sh +++ b/tools/dockerfile/grpc_cxx/build.sh @@ -1,4 +1,32 @@ #!/bin/bash +# 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. rm -rf /var/local/git cp -R /var/local/git-clone /var/local/git diff --git a/tools/dockerfile/grpc_java/build.sh b/tools/dockerfile/grpc_java/build.sh index ce35018533..e55f2e0f47 100755 --- a/tools/dockerfile/grpc_java/build.sh +++ b/tools/dockerfile/grpc_java/build.sh @@ -1,4 +1,32 @@ #!/bin/bash +# 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. rm -rf /var/local/git cp -R /var/local/git-clone /var/local/git cd /var/local/git/grpc-java/lib/netty && \ diff --git a/tools/dockerfile/grpc_java_android/Dockerfile b/tools/dockerfile/grpc_java_android/Dockerfile index d11e88943c..2dc2202e9d 100644 --- a/tools/dockerfile/grpc_java_android/Dockerfile +++ b/tools/dockerfile/grpc_java_android/Dockerfile @@ -44,10 +44,13 @@ ENV PATH $PATH:$ANDROID_HOME/platform-tools ENV HOME /root # Update sdk for android 5.1 (API level 22) -RUN echo y | android update sdk --all --filter platform-tools,build-tools-22.0.1,sys-img-armeabi-v7a-android-22,android-22,extra-android-m2repository,extra-google-m2repository --no-ui --force +RUN echo y | android update sdk --all --filter platform-tools,build-tools-22.0.1,sys-img-armeabi-v7a-addon-google_apis-google-22,sys-img-armeabi-v7a-addon-google_apis-google-21,sys-img-armeabi-v7a-android-19,addon-google_apis-google-22,addon-google_apis-google-21,addon-google_apis-google-19,extra-android-m2repository,extra-google-m2repository --no-ui --force + # Create an AVD with API level 22 -RUN echo no | android create avd --force -n avd-api-22 -t android-22 +RUN echo no | android create avd --force -n avd-google-api-22 -t "Google Inc.:Google APIs:22" --abi google_apis/armeabi-v7a +RUN echo no | android create avd --force -n avd-google-api-21 -t "Google Inc.:Google APIs:21" --abi google_apis/armeabi-v7a +RUN echo no | android create avd --force -n avd-google-api-19 -t "Google Inc.:Google APIs:19" --abi default/armeabi-v7a # Pull gRPC Java and trigger download of needed Maven and Gradle artifacts. RUN git clone --depth 1 https://github.com/grpc/grpc-java.git /var/local/git/grpc-java && \ diff --git a/tools/dockerfile/grpc_node/build.sh b/tools/dockerfile/grpc_node/build.sh new file mode 100755 index 0000000000..be89cc1fcf --- /dev/null +++ b/tools/dockerfile/grpc_node/build.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# 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. +cp -R /var/local/git-clone/grpc /var/local/git + +make clean -C /var/local/git/grpc + +make install_c -j12 -C /var/local/git/grpc + +cd /var/local/git/grpc/src/node && npm install && node-gyp rebuild diff --git a/tools/dockerfile/grpc_python_base/Dockerfile b/tools/dockerfile/grpc_python_base/Dockerfile index 0d45f40242..90a57bf341 100644 --- a/tools/dockerfile/grpc_python_base/Dockerfile +++ b/tools/dockerfile/grpc_python_base/Dockerfile @@ -43,7 +43,7 @@ RUN apt-get update && apt-get install -y \ python-virtualenv # Install Python packages from PyPI -RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0-alpha-1 +RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 # Get the GRPC source from GitHub RUN git clone --recursive https://github.com/grpc/grpc.git /var/local/git/grpc diff --git a/tools/dockerfile/grpc_ruby/build.sh b/tools/dockerfile/grpc_ruby/build.sh new file mode 100755 index 0000000000..1165561894 --- /dev/null +++ b/tools/dockerfile/grpc_ruby/build.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# 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. +cp -R /var/local/git-clone/grpc /var/local/git + +make clean -C /var/local/git/grpc + +make install_c -j12 -C /var/local/git/grpc + +/bin/bash -l -c 'cd /var/local/git/grpc/src/ruby && gem update bundler && bundle && rake' diff --git a/tools/gce_setup/grpc_docker.sh b/tools/gce_setup/grpc_docker.sh index c9a825c3e9..123d0615b4 100755 --- a/tools/gce_setup/grpc_docker.sh +++ b/tools/gce_setup/grpc_docker.sh @@ -428,6 +428,7 @@ grpc_interop_test_args() { python) grpc_port=8050 ;; ruby) grpc_port=8060 ;; csharp_mono) grpc_port=8070 ;; + csharp_dotnet) grpc_port=8070 ;; *) echo "bad server_type: $1" 1>&2; return 1 ;; esac shift @@ -870,6 +871,23 @@ grpc_launch_servers() { done } +# Launch servers on windows. +grpc_launch_windows_servers() { + local host='grpc-windows-interop1' + local killcmd="ps -e | grep Grpc.IntegrationTesting | awk '{print \\\$1}' | xargs kill -9" + echo "killing all servers and clients on $host with command $killcmd" + gcloud compute $project_opt ssh $zone_opt stoked-keyword-656@grpc-windows-proxy --command "ssh $host \"$killcmd\"" + + local cmd='cd /cygdrive/c/github/grpc/src/csharp/Grpc.IntegrationTesting.Server/bin/Debug && ./Grpc.IntegrationTesting.Server.exe --use_tls=true --port=8070' + # gcloud's auto-uploading of RSA keys doesn't work for Windows VMs. + # So we have a linux machine that is authorized to access the Windows + # machine through ssh and we use gcloud auth support to logon to the proxy. + echo "will run:" + echo " $cmd" + echo "on $host (through grpc-windows-proxy)" + gcloud compute $project_opt ssh $zone_opt stoked-keyword-656@grpc-windows-proxy --command "ssh $host '$cmd'" +} + # Runs a test command on a docker instance # # The test command is issued via gcloud compute @@ -949,6 +967,7 @@ test_runner() { # node: 8040 # python: 8050 # ruby: 8060 +# csharp: 8070 # # each client_type should have an associated bash func: # grpc_interop_gen_<client_type>_cmd diff --git a/tools/gce_setup/private_build_and_test.sh b/tools/gce_setup/private_build_and_test.sh index 9c5c347a30..7d5d25eb01 100755 --- a/tools/gce_setup/private_build_and_test.sh +++ b/tools/gce_setup/private_build_and_test.sh @@ -1,4 +1,32 @@ #!/bin/bash +# 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. # This script has to be run from the same directory as grpc_docker.sh and after grpc_docker.sh is sourced # diff --git a/tools/run_tests/antagonist.py b/tools/run_tests/antagonist.py new file mode 100755 index 0000000000..111839ccf9 --- /dev/null +++ b/tools/run_tests/antagonist.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python +# 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. + +"""This is used by run_tests.py to create cpu load on a machine""" + +while True: + pass diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index b14597804f..dc5baccf9f 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -37,6 +37,6 @@ root=`pwd` rm -rf python2.7_virtual_environment virtualenv -p /usr/bin/python2.7 python2.7_virtual_environment source python2.7_virtual_environment/bin/activate -pip install enum34==1.0.4 futures==2.2.0 protobuf==3.0.0-alpha-1 +pip install enum34==1.0.4 futures==2.2.0 protobuf==3.0.0a2 CFLAGS=-I$root/include LDFLAGS=-L$root/libs/$CONFIG pip install src/python/src pip install src/python/interop diff --git a/tools/run_tests/build_ruby.sh b/tools/run_tests/build_ruby.sh index 53a69cf079..de96413bc1 100755 --- a/tools/run_tests/build_ruby.sh +++ b/tools/run_tests/build_ruby.sh @@ -31,17 +31,10 @@ set -ex -CONFIG=${CONFIG:-opt} +export CONFIG=${CONFIG:-opt} -# change to grpc repo root -cd $(dirname $0)/../.. - -# tells npm install to look for files in that directory -export GRPC_ROOT=`pwd` -# tells npm install the subdirectory with library files -export GRPC_LIB_SUBDIR=libs/$CONFIG - -cd src/ruby +# change to grpc's ruby directory +cd $(dirname $0)/../../src/ruby bundle install rake compile:grpc diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py index 28b7d30371..a58071ee35 100755 --- a/tools/run_tests/jobset.py +++ b/tools/run_tests/jobset.py @@ -209,8 +209,9 @@ class Job(object): self._state = _FAILURE self._tempfile.seek(0) stdout = self._tempfile.read() - message('FAILED', '%s [ret=%d]' % ( - self._spec.shortname, self._process.returncode), stdout, do_newline=True) + message('FAILED', '%s [ret=%d, pid=%d]' % ( + self._spec.shortname, self._process.returncode, self._process.pid), + stdout, do_newline=True) else: self._state = _SUCCESS message('PASSED', '%s [time=%.1fsec]' % (self._spec.shortname, elapsed), diff --git a/tools/run_tests/prepare_travis.sh b/tools/run_tests/prepare_travis.sh index a8ddc578d5..34a058f2a8 100755 --- a/tools/run_tests/prepare_travis.sh +++ b/tools/run_tests/prepare_travis.sh @@ -1,4 +1,32 @@ #!/bin/bash +# 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. cd `dirname $0`/../.. grpc_dir=`pwd` diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh index f0e091f47a..cab08f9358 100755 --- a/tools/run_tests/run_python.sh +++ b/tools/run_tests/run_python.sh @@ -35,5 +35,6 @@ cd $(dirname $0)/../.. root=`pwd` export LD_LIBRARY_PATH=$root/libs/$CONFIG +export DYLD_LIBRARY_PATH=$root/libs/$CONFIG source python2.7_virtual_environment/bin/activate python2.7 -B $* diff --git a/tools/run_tests/run_sanity.sh b/tools/run_tests/run_sanity.sh index 959197eb3d..07e559fb03 100755 --- a/tools/run_tests/run_sanity.sh +++ b/tools/run_tests/run_sanity.sh @@ -45,6 +45,6 @@ git submodule > $submodules diff -u $submodules - << EOF 05b155ff59114735ec8cd089f669c4c3d8f59029 third_party/gflags (v2.1.0-45-g05b155f) 3df69d3aefde7671053d4e3c242b228e5d79c83f third_party/openssl (OpenSSL_1_0_2a) - 644a6a1da71385e9d7a7a26b3476c93fdd71788c third_party/protobuf (v3.0.0-alpha-1-35-g644a6a1) + a8b38c598d7f65b281a72809b28117afdb760931 third_party/protobuf (v3.0.0-alpha-1-978-ga8b38c5) 50893291621658f355bc5b4d450a8d06a563053d third_party/zlib (v1.2.8) EOF diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 7150ebb553..3a344693c1 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -40,6 +40,7 @@ import re import sys import time import platform +import subprocess import jobset import watch_dirs @@ -61,7 +62,7 @@ class SimpleConfig(object): self.environ = environ self.environ['CONFIG'] = config - def job_spec(self, cmdline, hash_targets, shortname=None): + def job_spec(self, cmdline, hash_targets, shortname=None, environ={}): """Construct a jobset.JobSpec for a test under this config Args: @@ -73,9 +74,12 @@ class SimpleConfig(object): -- if used, all artifacts needed to run the test must be listed """ + actual_environ = self.environ.copy() + for k, v in environ.iteritems(): + actual_environ[k] = v return jobset.JobSpec(cmdline=cmdline, shortname=shortname, - environ=self.environ, + environ=actual_environ, hash_targets=hash_targets if self.allow_hashing else None) @@ -143,7 +147,8 @@ class CLanguage(object): class NodeLanguage(object): def test_specs(self, config, travis): - return [config.job_spec(['tools/run_tests/run_node.sh'], None)] + return [config.job_spec(['tools/run_tests/run_node.sh'], None, + environ={'GRPC_TRACE': 'surface,batch'})] def make_targets(self): return ['static_c'] @@ -161,7 +166,8 @@ class NodeLanguage(object): class PhpLanguage(object): def test_specs(self, config, travis): - return [config.job_spec(['src/php/bin/run_tests.sh'], None)] + return [config.job_spec(['src/php/bin/run_tests.sh'], None, + environ={'GRPC_TRACE': 'surface,batch'})] def make_targets(self): return ['static_c'] @@ -184,15 +190,17 @@ class PythonLanguage(object): def test_specs(self, config, travis): modules = [config.job_spec(['tools/run_tests/run_python.sh', '-m', - test['module']], - None, + test['module']], + None, + environ={'GRPC_TRACE': 'surface,batch'}, shortname=test['module']) for test in self._tests if 'module' in test] files = [config.job_spec(['tools/run_tests/run_python.sh', - test['file']], - None, + test['file']], + None, + environ={'GRPC_TRACE': 'surface,batch'}, shortname=test['file']) - for test in self._tests if 'file' in test] + for test in self._tests if 'file' in test] return files + modules def make_targets(self): @@ -211,10 +219,11 @@ class PythonLanguage(object): class RubyLanguage(object): def test_specs(self, config, travis): - return [config.job_spec(['tools/run_tests/run_ruby.sh'], None)] + return [config.job_spec(['tools/run_tests/run_ruby.sh'], None, + environ={'GRPC_TRACE': 'surface,batch'})] def make_targets(self): - return ['static_c'] + return ['run_dep_checks'] def build_steps(self): return [['tools/run_tests/build_ruby.sh']] @@ -232,7 +241,8 @@ class CSharpLanguage(object): 'Grpc.Examples.Tests', 'Grpc.IntegrationTesting'] return [config.job_spec(['tools/run_tests/run_csharp.sh', assembly], - None, shortname=assembly) + None, shortname=assembly, + environ={'GRPC_TRACE': 'surface,batch'}) for assembly in assemblies ] def make_targets(self): @@ -341,6 +351,7 @@ argp.add_argument('-l', '--language', choices=sorted(_LANGUAGES.keys()), nargs='+', default=sorted(_LANGUAGES.keys())) +argp.add_argument('-a', '--antagonists', default=0, type=int) args = argp.parse_args() # grab config @@ -435,14 +446,21 @@ def _build_and_run(check_cancelled, newline_on_success, travis, cache): newline_on_success=newline_on_success, travis=travis): return 1 - # run all the tests - all_runs = itertools.chain.from_iterable( - itertools.repeat(one_run, runs_per_test)) - if not jobset.run(all_runs, check_cancelled, - newline_on_success=newline_on_success, travis=travis, - maxjobs=min(args.jobs, min(c.maxjobs for c in run_configs)), - cache=cache): - return 2 + # start antagonists + antagonists = [subprocess.Popen(['tools/run_tests/antagonist.py']) + for _ in range(0, args.antagonists)] + try: + # run all the tests + all_runs = itertools.chain.from_iterable( + itertools.repeat(one_run, runs_per_test)) + if not jobset.run(all_runs, check_cancelled, + newline_on_success=newline_on_success, travis=travis, + maxjobs=min(args.jobs, min(c.maxjobs for c in run_configs)), + cache=cache): + return 2 + finally: + for antagonist in antagonists: + antagonist.kill() return 0 diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index d161041c1f..5dae3e8eb5 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -599,6 +599,24 @@ { "flaky": false, "language": "c++", + "name": "async_streaming_ping_pong_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c++", + "name": "async_unary_ping_pong_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c++", "name": "channel_arguments_test", "platforms": [ "windows", @@ -617,6 +635,15 @@ { "flaky": false, "language": "c++", + "name": "client_crash_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c++", "name": "credentials_test", "platforms": [ "windows", @@ -671,6 +698,15 @@ { "flaky": false, "language": "c++", + "name": "server_crash_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c++", "name": "status_test", "platforms": [ "windows", @@ -680,6 +716,24 @@ { "flaky": false, "language": "c++", + "name": "sync_streaming_ping_pong_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c++", + "name": "sync_unary_ping_pong_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c++", "name": "thread_pool_test", "platforms": [ "windows", @@ -923,6 +977,15 @@ { "flaky": false, "language": "c", + "name": "chttp2_fake_security_server_finishes_request_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", "name": "chttp2_fake_security_simple_delayed_request_test", "platforms": [ "windows", @@ -1175,6 +1238,15 @@ { "flaky": false, "language": "c", + "name": "chttp2_fullstack_server_finishes_request_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", "name": "chttp2_fullstack_simple_delayed_request_test", "platforms": [ "windows", @@ -1402,6 +1474,14 @@ { "flaky": false, "language": "c", + "name": "chttp2_fullstack_uds_posix_server_finishes_request_test", + "platforms": [ + "posix" + ] + }, + { + "flaky": false, + "language": "c", "name": "chttp2_fullstack_uds_posix_simple_delayed_request_test", "platforms": [ "posix" @@ -1651,6 +1731,15 @@ { "flaky": false, "language": "c", + "name": "chttp2_simple_ssl_fullstack_server_finishes_request_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", "name": "chttp2_simple_ssl_fullstack_simple_delayed_request_test", "platforms": [ "windows", @@ -1903,6 +1992,15 @@ { "flaky": false, "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test", "platforms": [ "windows", @@ -2155,6 +2253,15 @@ { "flaky": false, "language": "c", + "name": "chttp2_socket_pair_server_finishes_request_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", "name": "chttp2_socket_pair_simple_delayed_request_test", "platforms": [ "windows", @@ -2407,6 +2514,15 @@ { "flaky": false, "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test", "platforms": [ "windows", @@ -2434,6 +2550,267 @@ { "flaky": false, "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_bad_hostname_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": true, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_census_simple_request_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_disappearing_server_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_empty_batch_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": true, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_invoke_large_request_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_max_message_length_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_no_op_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_registered_call_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_with_payload_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_server_finishes_request_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_simple_request_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", "name": "chttp2_fullstack_bad_hostname_unsecure_test", "platforms": [ "windows", @@ -2650,6 +3027,15 @@ { "flaky": false, "language": "c", + "name": "chttp2_fullstack_server_finishes_request_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", "name": "chttp2_fullstack_simple_delayed_request_unsecure_test", "platforms": [ "windows", @@ -2869,6 +3255,14 @@ { "flaky": false, "language": "c", + "name": "chttp2_fullstack_uds_posix_server_finishes_request_unsecure_test", + "platforms": [ + "posix" + ] + }, + { + "flaky": false, + "language": "c", "name": "chttp2_fullstack_uds_posix_simple_delayed_request_unsecure_test", "platforms": [ "posix" @@ -3109,6 +3503,15 @@ { "flaky": false, "language": "c", + "name": "chttp2_socket_pair_server_finishes_request_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", "name": "chttp2_socket_pair_simple_delayed_request_unsecure_test", "platforms": [ "windows", @@ -3352,6 +3755,15 @@ { "flaky": false, "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_unsecure_test", "platforms": [ "windows", @@ -3375,6 +3787,258 @@ "windows", "posix" ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": true, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test", + "platforms": [ + "windows", + "posix" + ] } ] diff --git a/vsprojects/Grpc.mak b/vsprojects/Grpc.mak index 275ad42d84..119a00f319 100644 --- a/vsprojects/Grpc.mak +++ b/vsprojects/Grpc.mak @@ -54,10 +54,10 @@ all: buildtests $(OUT_DIR): mkdir $(OUT_DIR) -build_libs: build_gpr build_gpr_test_util build_grpc build_grpc_test_util build_grpc_test_util_unsecure build_grpc_unsecure Debug\end2end_fixture_chttp2_fake_security.lib Debug\end2end_fixture_chttp2_fullstack.lib Debug\end2end_fixture_chttp2_simple_ssl_fullstack.lib Debug\end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.lib Debug\end2end_fixture_chttp2_socket_pair.lib Debug\end2end_fixture_chttp2_socket_pair_one_byte_at_a_time.lib Debug\end2end_test_bad_hostname.lib Debug\end2end_test_cancel_after_accept.lib Debug\end2end_test_cancel_after_accept_and_writes_closed.lib Debug\end2end_test_cancel_after_invoke.lib Debug\end2end_test_cancel_before_invoke.lib Debug\end2end_test_cancel_in_a_vacuum.lib Debug\end2end_test_census_simple_request.lib Debug\end2end_test_disappearing_server.lib Debug\end2end_test_early_server_shutdown_finishes_inflight_calls.lib Debug\end2end_test_early_server_shutdown_finishes_tags.lib Debug\end2end_test_empty_batch.lib Debug\end2end_test_graceful_server_shutdown.lib Debug\end2end_test_invoke_large_request.lib Debug\end2end_test_max_concurrent_streams.lib Debug\end2end_test_max_message_length.lib Debug\end2end_test_no_op.lib Debug\end2end_test_ping_pong_streaming.lib Debug\end2end_test_registered_call.lib Debug\end2end_test_request_response_with_binary_metadata_and_payload.lib Debug\end2end_test_request_response_with_metadata_and_payload.lib Debug\end2end_test_request_response_with_payload.lib Debug\end2end_test_request_response_with_payload_and_call_creds.lib Debug\end2end_test_request_response_with_trailing_metadata_and_payload.lib Debug\end2end_test_request_with_large_metadata.lib Debug\end2end_test_request_with_payload.lib Debug\end2end_test_simple_delayed_request.lib Debug\end2end_test_simple_request.lib Debug\end2end_test_simple_request_with_high_initial_sequence_number.lib Debug\end2end_certs.lib +build_libs: build_gpr build_gpr_test_util build_grpc build_grpc_test_util build_grpc_test_util_unsecure build_grpc_unsecure Debug\end2end_fixture_chttp2_fake_security.lib Debug\end2end_fixture_chttp2_fullstack.lib Debug\end2end_fixture_chttp2_simple_ssl_fullstack.lib Debug\end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.lib Debug\end2end_fixture_chttp2_socket_pair.lib Debug\end2end_fixture_chttp2_socket_pair_one_byte_at_a_time.lib Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_bad_hostname.lib Debug\end2end_test_cancel_after_accept.lib Debug\end2end_test_cancel_after_accept_and_writes_closed.lib Debug\end2end_test_cancel_after_invoke.lib Debug\end2end_test_cancel_before_invoke.lib Debug\end2end_test_cancel_in_a_vacuum.lib Debug\end2end_test_census_simple_request.lib Debug\end2end_test_disappearing_server.lib Debug\end2end_test_early_server_shutdown_finishes_inflight_calls.lib Debug\end2end_test_early_server_shutdown_finishes_tags.lib Debug\end2end_test_empty_batch.lib Debug\end2end_test_graceful_server_shutdown.lib Debug\end2end_test_invoke_large_request.lib Debug\end2end_test_max_concurrent_streams.lib Debug\end2end_test_max_message_length.lib Debug\end2end_test_no_op.lib Debug\end2end_test_ping_pong_streaming.lib Debug\end2end_test_registered_call.lib Debug\end2end_test_request_response_with_binary_metadata_and_payload.lib Debug\end2end_test_request_response_with_metadata_and_payload.lib Debug\end2end_test_request_response_with_payload.lib Debug\end2end_test_request_response_with_payload_and_call_creds.lib Debug\end2end_test_request_response_with_trailing_metadata_and_payload.lib Debug\end2end_test_request_with_large_metadata.lib Debug\end2end_test_request_with_payload.lib Debug\end2end_test_server_finishes_request.lib Debug\end2end_test_simple_delayed_request.lib Debug\end2end_test_simple_request.lib Debug\end2end_test_simple_request_with_high_initial_sequence_number.lib Debug\end2end_certs.lib buildtests: buildtests_c buildtests_cxx -buildtests_c: alarm_heap_test.exe alarm_list_test.exe alarm_test.exe alpn_test.exe bin_encoder_test.exe census_hash_table_test.exe census_statistics_multiple_writers_circular_buffer_test.exe census_statistics_multiple_writers_test.exe census_statistics_performance_test.exe census_statistics_quick_test.exe census_statistics_small_log_test.exe census_stub_test.exe census_window_stats_test.exe chttp2_status_conversion_test.exe chttp2_stream_encoder_test.exe chttp2_stream_map_test.exe fling_client.exe fling_server.exe gpr_cancellable_test.exe gpr_cmdline_test.exe gpr_env_test.exe gpr_file_test.exe gpr_histogram_test.exe gpr_host_port_test.exe gpr_log_test.exe gpr_slice_buffer_test.exe gpr_slice_test.exe gpr_string_test.exe gpr_sync_test.exe gpr_thd_test.exe gpr_time_test.exe gpr_tls_test.exe gpr_useful_test.exe grpc_base64_test.exe grpc_byte_buffer_reader_test.exe grpc_channel_stack_test.exe grpc_completion_queue_test.exe grpc_credentials_test.exe grpc_json_token_test.exe grpc_stream_op_test.exe hpack_parser_test.exe hpack_table_test.exe httpcli_format_request_test.exe httpcli_parser_test.exe httpcli_test.exe json_rewrite.exe json_rewrite_test.exe json_test.exe lame_client_test.exe message_compress_test.exe multi_init_test.exe murmur_hash_test.exe no_server_test.exe resolve_address_test.exe secure_endpoint_test.exe sockaddr_utils_test.exe time_averaged_stats_test.exe time_test.exe timeout_encoding_test.exe timers_test.exe transport_metadata_test.exe transport_security_test.exe chttp2_fake_security_bad_hostname_test.exe chttp2_fake_security_cancel_after_accept_test.exe chttp2_fake_security_cancel_after_accept_and_writes_closed_test.exe chttp2_fake_security_cancel_after_invoke_test.exe chttp2_fake_security_cancel_before_invoke_test.exe chttp2_fake_security_cancel_in_a_vacuum_test.exe chttp2_fake_security_census_simple_request_test.exe chttp2_fake_security_disappearing_server_test.exe chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test.exe chttp2_fake_security_early_server_shutdown_finishes_tags_test.exe chttp2_fake_security_empty_batch_test.exe chttp2_fake_security_graceful_server_shutdown_test.exe chttp2_fake_security_invoke_large_request_test.exe chttp2_fake_security_max_concurrent_streams_test.exe chttp2_fake_security_max_message_length_test.exe chttp2_fake_security_no_op_test.exe chttp2_fake_security_ping_pong_streaming_test.exe chttp2_fake_security_registered_call_test.exe chttp2_fake_security_request_response_with_binary_metadata_and_payload_test.exe chttp2_fake_security_request_response_with_metadata_and_payload_test.exe chttp2_fake_security_request_response_with_payload_test.exe chttp2_fake_security_request_response_with_payload_and_call_creds_test.exe chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test.exe chttp2_fake_security_request_with_large_metadata_test.exe chttp2_fake_security_request_with_payload_test.exe chttp2_fake_security_simple_delayed_request_test.exe chttp2_fake_security_simple_request_test.exe chttp2_fake_security_simple_request_with_high_initial_sequence_number_test.exe chttp2_fullstack_bad_hostname_test.exe chttp2_fullstack_cancel_after_accept_test.exe chttp2_fullstack_cancel_after_accept_and_writes_closed_test.exe chttp2_fullstack_cancel_after_invoke_test.exe chttp2_fullstack_cancel_before_invoke_test.exe chttp2_fullstack_cancel_in_a_vacuum_test.exe chttp2_fullstack_census_simple_request_test.exe chttp2_fullstack_disappearing_server_test.exe chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test.exe chttp2_fullstack_early_server_shutdown_finishes_tags_test.exe chttp2_fullstack_empty_batch_test.exe chttp2_fullstack_graceful_server_shutdown_test.exe chttp2_fullstack_invoke_large_request_test.exe chttp2_fullstack_max_concurrent_streams_test.exe chttp2_fullstack_max_message_length_test.exe chttp2_fullstack_no_op_test.exe chttp2_fullstack_ping_pong_streaming_test.exe chttp2_fullstack_registered_call_test.exe chttp2_fullstack_request_response_with_binary_metadata_and_payload_test.exe chttp2_fullstack_request_response_with_metadata_and_payload_test.exe chttp2_fullstack_request_response_with_payload_test.exe chttp2_fullstack_request_response_with_payload_and_call_creds_test.exe chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test.exe chttp2_fullstack_request_with_large_metadata_test.exe chttp2_fullstack_request_with_payload_test.exe chttp2_fullstack_simple_delayed_request_test.exe chttp2_fullstack_simple_request_test.exe chttp2_fullstack_simple_request_with_high_initial_sequence_number_test.exe chttp2_simple_ssl_fullstack_bad_hostname_test.exe chttp2_simple_ssl_fullstack_cancel_after_accept_test.exe chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test.exe chttp2_simple_ssl_fullstack_cancel_after_invoke_test.exe chttp2_simple_ssl_fullstack_cancel_before_invoke_test.exe chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test.exe chttp2_simple_ssl_fullstack_census_simple_request_test.exe chttp2_simple_ssl_fullstack_disappearing_server_test.exe chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test.exe chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test.exe chttp2_simple_ssl_fullstack_empty_batch_test.exe chttp2_simple_ssl_fullstack_graceful_server_shutdown_test.exe chttp2_simple_ssl_fullstack_invoke_large_request_test.exe chttp2_simple_ssl_fullstack_max_concurrent_streams_test.exe chttp2_simple_ssl_fullstack_max_message_length_test.exe chttp2_simple_ssl_fullstack_no_op_test.exe chttp2_simple_ssl_fullstack_ping_pong_streaming_test.exe chttp2_simple_ssl_fullstack_registered_call_test.exe chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test.exe chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test.exe chttp2_simple_ssl_fullstack_request_response_with_payload_test.exe chttp2_simple_ssl_fullstack_request_response_with_payload_and_call_creds_test.exe chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test.exe chttp2_simple_ssl_fullstack_request_with_large_metadata_test.exe chttp2_simple_ssl_fullstack_request_with_payload_test.exe chttp2_simple_ssl_fullstack_simple_delayed_request_test.exe chttp2_simple_ssl_fullstack_simple_request_test.exe chttp2_simple_ssl_fullstack_simple_request_with_high_initial_sequence_number_test.exe chttp2_simple_ssl_with_oauth2_fullstack_bad_hostname_test.exe chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test.exe chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test.exe chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test.exe chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test.exe chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test.exe chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test.exe chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test.exe chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test.exe chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test.exe chttp2_simple_ssl_with_oauth2_fullstack_empty_batch_test.exe chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_test.exe chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test.exe chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test.exe chttp2_simple_ssl_with_oauth2_fullstack_max_message_length_test.exe chttp2_simple_ssl_with_oauth2_fullstack_no_op_test.exe chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test.exe chttp2_simple_ssl_with_oauth2_fullstack_registered_call_test.exe chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test.exe chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test.exe chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test.exe chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_and_call_creds_test.exe chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test.exe chttp2_simple_ssl_with_oauth2_fullstack_request_with_large_metadata_test.exe chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_test.exe chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test.exe chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test.exe chttp2_simple_ssl_with_oauth2_fullstack_simple_request_with_high_initial_sequence_number_test.exe chttp2_socket_pair_bad_hostname_test.exe chttp2_socket_pair_cancel_after_accept_test.exe chttp2_socket_pair_cancel_after_accept_and_writes_closed_test.exe chttp2_socket_pair_cancel_after_invoke_test.exe chttp2_socket_pair_cancel_before_invoke_test.exe chttp2_socket_pair_cancel_in_a_vacuum_test.exe chttp2_socket_pair_census_simple_request_test.exe chttp2_socket_pair_disappearing_server_test.exe chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test.exe chttp2_socket_pair_early_server_shutdown_finishes_tags_test.exe chttp2_socket_pair_empty_batch_test.exe chttp2_socket_pair_graceful_server_shutdown_test.exe chttp2_socket_pair_invoke_large_request_test.exe chttp2_socket_pair_max_concurrent_streams_test.exe chttp2_socket_pair_max_message_length_test.exe chttp2_socket_pair_no_op_test.exe chttp2_socket_pair_ping_pong_streaming_test.exe chttp2_socket_pair_registered_call_test.exe chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test.exe chttp2_socket_pair_request_response_with_metadata_and_payload_test.exe chttp2_socket_pair_request_response_with_payload_test.exe chttp2_socket_pair_request_response_with_payload_and_call_creds_test.exe chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test.exe chttp2_socket_pair_request_with_large_metadata_test.exe chttp2_socket_pair_request_with_payload_test.exe chttp2_socket_pair_simple_delayed_request_test.exe chttp2_socket_pair_simple_request_test.exe chttp2_socket_pair_simple_request_with_high_initial_sequence_number_test.exe chttp2_socket_pair_one_byte_at_a_time_bad_hostname_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test.exe chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test.exe chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test.exe chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test.exe chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test.exe chttp2_socket_pair_one_byte_at_a_time_empty_batch_test.exe chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_test.exe chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test.exe chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test.exe chttp2_socket_pair_one_byte_at_a_time_max_message_length_test.exe chttp2_socket_pair_one_byte_at_a_time_no_op_test.exe chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test.exe chttp2_socket_pair_one_byte_at_a_time_registered_call_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_and_call_creds_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test.exe chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_test.exe chttp2_socket_pair_one_byte_at_a_time_request_with_payload_test.exe chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test.exe chttp2_socket_pair_one_byte_at_a_time_simple_request_test.exe chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_test.exe chttp2_fullstack_bad_hostname_unsecure_test.exe chttp2_fullstack_cancel_after_accept_unsecure_test.exe chttp2_fullstack_cancel_after_accept_and_writes_closed_unsecure_test.exe chttp2_fullstack_cancel_after_invoke_unsecure_test.exe chttp2_fullstack_cancel_before_invoke_unsecure_test.exe chttp2_fullstack_cancel_in_a_vacuum_unsecure_test.exe chttp2_fullstack_census_simple_request_unsecure_test.exe chttp2_fullstack_disappearing_server_unsecure_test.exe chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_unsecure_test.exe chttp2_fullstack_early_server_shutdown_finishes_tags_unsecure_test.exe chttp2_fullstack_empty_batch_unsecure_test.exe chttp2_fullstack_graceful_server_shutdown_unsecure_test.exe chttp2_fullstack_invoke_large_request_unsecure_test.exe chttp2_fullstack_max_concurrent_streams_unsecure_test.exe chttp2_fullstack_max_message_length_unsecure_test.exe chttp2_fullstack_no_op_unsecure_test.exe chttp2_fullstack_ping_pong_streaming_unsecure_test.exe chttp2_fullstack_registered_call_unsecure_test.exe chttp2_fullstack_request_response_with_binary_metadata_and_payload_unsecure_test.exe chttp2_fullstack_request_response_with_metadata_and_payload_unsecure_test.exe chttp2_fullstack_request_response_with_payload_unsecure_test.exe chttp2_fullstack_request_response_with_trailing_metadata_and_payload_unsecure_test.exe chttp2_fullstack_request_with_large_metadata_unsecure_test.exe chttp2_fullstack_request_with_payload_unsecure_test.exe chttp2_fullstack_simple_delayed_request_unsecure_test.exe chttp2_fullstack_simple_request_unsecure_test.exe chttp2_fullstack_simple_request_with_high_initial_sequence_number_unsecure_test.exe chttp2_socket_pair_bad_hostname_unsecure_test.exe chttp2_socket_pair_cancel_after_accept_unsecure_test.exe chttp2_socket_pair_cancel_after_accept_and_writes_closed_unsecure_test.exe chttp2_socket_pair_cancel_after_invoke_unsecure_test.exe chttp2_socket_pair_cancel_before_invoke_unsecure_test.exe chttp2_socket_pair_cancel_in_a_vacuum_unsecure_test.exe chttp2_socket_pair_census_simple_request_unsecure_test.exe chttp2_socket_pair_disappearing_server_unsecure_test.exe chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_unsecure_test.exe chttp2_socket_pair_early_server_shutdown_finishes_tags_unsecure_test.exe chttp2_socket_pair_empty_batch_unsecure_test.exe chttp2_socket_pair_graceful_server_shutdown_unsecure_test.exe chttp2_socket_pair_invoke_large_request_unsecure_test.exe chttp2_socket_pair_max_concurrent_streams_unsecure_test.exe chttp2_socket_pair_max_message_length_unsecure_test.exe chttp2_socket_pair_no_op_unsecure_test.exe chttp2_socket_pair_ping_pong_streaming_unsecure_test.exe chttp2_socket_pair_registered_call_unsecure_test.exe chttp2_socket_pair_request_response_with_binary_metadata_and_payload_unsecure_test.exe chttp2_socket_pair_request_response_with_metadata_and_payload_unsecure_test.exe chttp2_socket_pair_request_response_with_payload_unsecure_test.exe chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_unsecure_test.exe chttp2_socket_pair_request_with_large_metadata_unsecure_test.exe chttp2_socket_pair_request_with_payload_unsecure_test.exe chttp2_socket_pair_simple_delayed_request_unsecure_test.exe chttp2_socket_pair_simple_request_unsecure_test.exe chttp2_socket_pair_simple_request_with_high_initial_sequence_number_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_bad_hostname_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_census_simple_request_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_disappearing_server_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_empty_batch_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_max_message_length_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_no_op_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_registered_call_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_request_with_payload_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_simple_request_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_unsecure_test.exe +buildtests_c: alarm_heap_test.exe alarm_list_test.exe alarm_test.exe alpn_test.exe bin_encoder_test.exe census_hash_table_test.exe census_statistics_multiple_writers_circular_buffer_test.exe census_statistics_multiple_writers_test.exe census_statistics_performance_test.exe census_statistics_quick_test.exe census_statistics_small_log_test.exe census_stub_test.exe census_window_stats_test.exe chttp2_status_conversion_test.exe chttp2_stream_encoder_test.exe chttp2_stream_map_test.exe fling_client.exe fling_server.exe gpr_cancellable_test.exe gpr_cmdline_test.exe gpr_env_test.exe gpr_file_test.exe gpr_histogram_test.exe gpr_host_port_test.exe gpr_log_test.exe gpr_slice_buffer_test.exe gpr_slice_test.exe gpr_string_test.exe gpr_sync_test.exe gpr_thd_test.exe gpr_time_test.exe gpr_tls_test.exe gpr_useful_test.exe grpc_base64_test.exe grpc_byte_buffer_reader_test.exe grpc_channel_stack_test.exe grpc_completion_queue_test.exe grpc_credentials_test.exe grpc_json_token_test.exe grpc_stream_op_test.exe hpack_parser_test.exe hpack_table_test.exe httpcli_format_request_test.exe httpcli_parser_test.exe httpcli_test.exe json_rewrite.exe json_rewrite_test.exe json_test.exe lame_client_test.exe message_compress_test.exe multi_init_test.exe murmur_hash_test.exe no_server_test.exe resolve_address_test.exe secure_endpoint_test.exe sockaddr_utils_test.exe time_averaged_stats_test.exe time_test.exe timeout_encoding_test.exe timers_test.exe transport_metadata_test.exe transport_security_test.exe chttp2_fake_security_bad_hostname_test.exe chttp2_fake_security_cancel_after_accept_test.exe chttp2_fake_security_cancel_after_accept_and_writes_closed_test.exe chttp2_fake_security_cancel_after_invoke_test.exe chttp2_fake_security_cancel_before_invoke_test.exe chttp2_fake_security_cancel_in_a_vacuum_test.exe chttp2_fake_security_census_simple_request_test.exe chttp2_fake_security_disappearing_server_test.exe chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test.exe chttp2_fake_security_early_server_shutdown_finishes_tags_test.exe chttp2_fake_security_empty_batch_test.exe chttp2_fake_security_graceful_server_shutdown_test.exe chttp2_fake_security_invoke_large_request_test.exe chttp2_fake_security_max_concurrent_streams_test.exe chttp2_fake_security_max_message_length_test.exe chttp2_fake_security_no_op_test.exe chttp2_fake_security_ping_pong_streaming_test.exe chttp2_fake_security_registered_call_test.exe chttp2_fake_security_request_response_with_binary_metadata_and_payload_test.exe chttp2_fake_security_request_response_with_metadata_and_payload_test.exe chttp2_fake_security_request_response_with_payload_test.exe chttp2_fake_security_request_response_with_payload_and_call_creds_test.exe chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test.exe chttp2_fake_security_request_with_large_metadata_test.exe chttp2_fake_security_request_with_payload_test.exe chttp2_fake_security_server_finishes_request_test.exe chttp2_fake_security_simple_delayed_request_test.exe chttp2_fake_security_simple_request_test.exe chttp2_fake_security_simple_request_with_high_initial_sequence_number_test.exe chttp2_fullstack_bad_hostname_test.exe chttp2_fullstack_cancel_after_accept_test.exe chttp2_fullstack_cancel_after_accept_and_writes_closed_test.exe chttp2_fullstack_cancel_after_invoke_test.exe chttp2_fullstack_cancel_before_invoke_test.exe chttp2_fullstack_cancel_in_a_vacuum_test.exe chttp2_fullstack_census_simple_request_test.exe chttp2_fullstack_disappearing_server_test.exe chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test.exe chttp2_fullstack_early_server_shutdown_finishes_tags_test.exe chttp2_fullstack_empty_batch_test.exe chttp2_fullstack_graceful_server_shutdown_test.exe chttp2_fullstack_invoke_large_request_test.exe chttp2_fullstack_max_concurrent_streams_test.exe chttp2_fullstack_max_message_length_test.exe chttp2_fullstack_no_op_test.exe chttp2_fullstack_ping_pong_streaming_test.exe chttp2_fullstack_registered_call_test.exe chttp2_fullstack_request_response_with_binary_metadata_and_payload_test.exe chttp2_fullstack_request_response_with_metadata_and_payload_test.exe chttp2_fullstack_request_response_with_payload_test.exe chttp2_fullstack_request_response_with_payload_and_call_creds_test.exe chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test.exe chttp2_fullstack_request_with_large_metadata_test.exe chttp2_fullstack_request_with_payload_test.exe chttp2_fullstack_server_finishes_request_test.exe chttp2_fullstack_simple_delayed_request_test.exe chttp2_fullstack_simple_request_test.exe chttp2_fullstack_simple_request_with_high_initial_sequence_number_test.exe chttp2_simple_ssl_fullstack_bad_hostname_test.exe chttp2_simple_ssl_fullstack_cancel_after_accept_test.exe chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test.exe chttp2_simple_ssl_fullstack_cancel_after_invoke_test.exe chttp2_simple_ssl_fullstack_cancel_before_invoke_test.exe chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test.exe chttp2_simple_ssl_fullstack_census_simple_request_test.exe chttp2_simple_ssl_fullstack_disappearing_server_test.exe chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test.exe chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test.exe chttp2_simple_ssl_fullstack_empty_batch_test.exe chttp2_simple_ssl_fullstack_graceful_server_shutdown_test.exe chttp2_simple_ssl_fullstack_invoke_large_request_test.exe chttp2_simple_ssl_fullstack_max_concurrent_streams_test.exe chttp2_simple_ssl_fullstack_max_message_length_test.exe chttp2_simple_ssl_fullstack_no_op_test.exe chttp2_simple_ssl_fullstack_ping_pong_streaming_test.exe chttp2_simple_ssl_fullstack_registered_call_test.exe chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test.exe chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test.exe chttp2_simple_ssl_fullstack_request_response_with_payload_test.exe chttp2_simple_ssl_fullstack_request_response_with_payload_and_call_creds_test.exe chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test.exe chttp2_simple_ssl_fullstack_request_with_large_metadata_test.exe chttp2_simple_ssl_fullstack_request_with_payload_test.exe chttp2_simple_ssl_fullstack_server_finishes_request_test.exe chttp2_simple_ssl_fullstack_simple_delayed_request_test.exe chttp2_simple_ssl_fullstack_simple_request_test.exe chttp2_simple_ssl_fullstack_simple_request_with_high_initial_sequence_number_test.exe chttp2_simple_ssl_with_oauth2_fullstack_bad_hostname_test.exe chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test.exe chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test.exe chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test.exe chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test.exe chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test.exe chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test.exe chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test.exe chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test.exe chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test.exe chttp2_simple_ssl_with_oauth2_fullstack_empty_batch_test.exe chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_test.exe chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test.exe chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test.exe chttp2_simple_ssl_with_oauth2_fullstack_max_message_length_test.exe chttp2_simple_ssl_with_oauth2_fullstack_no_op_test.exe chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test.exe chttp2_simple_ssl_with_oauth2_fullstack_registered_call_test.exe chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test.exe chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test.exe chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test.exe chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_and_call_creds_test.exe chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test.exe chttp2_simple_ssl_with_oauth2_fullstack_request_with_large_metadata_test.exe chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_test.exe chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test.exe chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test.exe chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test.exe chttp2_simple_ssl_with_oauth2_fullstack_simple_request_with_high_initial_sequence_number_test.exe chttp2_socket_pair_bad_hostname_test.exe chttp2_socket_pair_cancel_after_accept_test.exe chttp2_socket_pair_cancel_after_accept_and_writes_closed_test.exe chttp2_socket_pair_cancel_after_invoke_test.exe chttp2_socket_pair_cancel_before_invoke_test.exe chttp2_socket_pair_cancel_in_a_vacuum_test.exe chttp2_socket_pair_census_simple_request_test.exe chttp2_socket_pair_disappearing_server_test.exe chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test.exe chttp2_socket_pair_early_server_shutdown_finishes_tags_test.exe chttp2_socket_pair_empty_batch_test.exe chttp2_socket_pair_graceful_server_shutdown_test.exe chttp2_socket_pair_invoke_large_request_test.exe chttp2_socket_pair_max_concurrent_streams_test.exe chttp2_socket_pair_max_message_length_test.exe chttp2_socket_pair_no_op_test.exe chttp2_socket_pair_ping_pong_streaming_test.exe chttp2_socket_pair_registered_call_test.exe chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test.exe chttp2_socket_pair_request_response_with_metadata_and_payload_test.exe chttp2_socket_pair_request_response_with_payload_test.exe chttp2_socket_pair_request_response_with_payload_and_call_creds_test.exe chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test.exe chttp2_socket_pair_request_with_large_metadata_test.exe chttp2_socket_pair_request_with_payload_test.exe chttp2_socket_pair_server_finishes_request_test.exe chttp2_socket_pair_simple_delayed_request_test.exe chttp2_socket_pair_simple_request_test.exe chttp2_socket_pair_simple_request_with_high_initial_sequence_number_test.exe chttp2_socket_pair_one_byte_at_a_time_bad_hostname_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test.exe chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test.exe chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test.exe chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test.exe chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test.exe chttp2_socket_pair_one_byte_at_a_time_empty_batch_test.exe chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_test.exe chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test.exe chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test.exe chttp2_socket_pair_one_byte_at_a_time_max_message_length_test.exe chttp2_socket_pair_one_byte_at_a_time_no_op_test.exe chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test.exe chttp2_socket_pair_one_byte_at_a_time_registered_call_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_and_call_creds_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test.exe chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_test.exe chttp2_socket_pair_one_byte_at_a_time_request_with_payload_test.exe chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test.exe chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test.exe chttp2_socket_pair_one_byte_at_a_time_simple_request_test.exe chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_test.exe chttp2_socket_pair_with_grpc_trace_bad_hostname_test.exe chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test.exe chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test.exe chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test.exe chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test.exe chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test.exe chttp2_socket_pair_with_grpc_trace_census_simple_request_test.exe chttp2_socket_pair_with_grpc_trace_disappearing_server_test.exe chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test.exe chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test.exe chttp2_socket_pair_with_grpc_trace_empty_batch_test.exe chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test.exe chttp2_socket_pair_with_grpc_trace_invoke_large_request_test.exe chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test.exe chttp2_socket_pair_with_grpc_trace_max_message_length_test.exe chttp2_socket_pair_with_grpc_trace_no_op_test.exe chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test.exe chttp2_socket_pair_with_grpc_trace_registered_call_test.exe chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test.exe chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test.exe chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test.exe chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test.exe chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test.exe chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test.exe chttp2_socket_pair_with_grpc_trace_request_with_payload_test.exe chttp2_socket_pair_with_grpc_trace_server_finishes_request_test.exe chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test.exe chttp2_socket_pair_with_grpc_trace_simple_request_test.exe chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test.exe chttp2_fullstack_bad_hostname_unsecure_test.exe chttp2_fullstack_cancel_after_accept_unsecure_test.exe chttp2_fullstack_cancel_after_accept_and_writes_closed_unsecure_test.exe chttp2_fullstack_cancel_after_invoke_unsecure_test.exe chttp2_fullstack_cancel_before_invoke_unsecure_test.exe chttp2_fullstack_cancel_in_a_vacuum_unsecure_test.exe chttp2_fullstack_census_simple_request_unsecure_test.exe chttp2_fullstack_disappearing_server_unsecure_test.exe chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_unsecure_test.exe chttp2_fullstack_early_server_shutdown_finishes_tags_unsecure_test.exe chttp2_fullstack_empty_batch_unsecure_test.exe chttp2_fullstack_graceful_server_shutdown_unsecure_test.exe chttp2_fullstack_invoke_large_request_unsecure_test.exe chttp2_fullstack_max_concurrent_streams_unsecure_test.exe chttp2_fullstack_max_message_length_unsecure_test.exe chttp2_fullstack_no_op_unsecure_test.exe chttp2_fullstack_ping_pong_streaming_unsecure_test.exe chttp2_fullstack_registered_call_unsecure_test.exe chttp2_fullstack_request_response_with_binary_metadata_and_payload_unsecure_test.exe chttp2_fullstack_request_response_with_metadata_and_payload_unsecure_test.exe chttp2_fullstack_request_response_with_payload_unsecure_test.exe chttp2_fullstack_request_response_with_trailing_metadata_and_payload_unsecure_test.exe chttp2_fullstack_request_with_large_metadata_unsecure_test.exe chttp2_fullstack_request_with_payload_unsecure_test.exe chttp2_fullstack_server_finishes_request_unsecure_test.exe chttp2_fullstack_simple_delayed_request_unsecure_test.exe chttp2_fullstack_simple_request_unsecure_test.exe chttp2_fullstack_simple_request_with_high_initial_sequence_number_unsecure_test.exe chttp2_socket_pair_bad_hostname_unsecure_test.exe chttp2_socket_pair_cancel_after_accept_unsecure_test.exe chttp2_socket_pair_cancel_after_accept_and_writes_closed_unsecure_test.exe chttp2_socket_pair_cancel_after_invoke_unsecure_test.exe chttp2_socket_pair_cancel_before_invoke_unsecure_test.exe chttp2_socket_pair_cancel_in_a_vacuum_unsecure_test.exe chttp2_socket_pair_census_simple_request_unsecure_test.exe chttp2_socket_pair_disappearing_server_unsecure_test.exe chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_unsecure_test.exe chttp2_socket_pair_early_server_shutdown_finishes_tags_unsecure_test.exe chttp2_socket_pair_empty_batch_unsecure_test.exe chttp2_socket_pair_graceful_server_shutdown_unsecure_test.exe chttp2_socket_pair_invoke_large_request_unsecure_test.exe chttp2_socket_pair_max_concurrent_streams_unsecure_test.exe chttp2_socket_pair_max_message_length_unsecure_test.exe chttp2_socket_pair_no_op_unsecure_test.exe chttp2_socket_pair_ping_pong_streaming_unsecure_test.exe chttp2_socket_pair_registered_call_unsecure_test.exe chttp2_socket_pair_request_response_with_binary_metadata_and_payload_unsecure_test.exe chttp2_socket_pair_request_response_with_metadata_and_payload_unsecure_test.exe chttp2_socket_pair_request_response_with_payload_unsecure_test.exe chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_unsecure_test.exe chttp2_socket_pair_request_with_large_metadata_unsecure_test.exe chttp2_socket_pair_request_with_payload_unsecure_test.exe chttp2_socket_pair_server_finishes_request_unsecure_test.exe chttp2_socket_pair_simple_delayed_request_unsecure_test.exe chttp2_socket_pair_simple_request_unsecure_test.exe chttp2_socket_pair_simple_request_with_high_initial_sequence_number_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_bad_hostname_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_census_simple_request_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_disappearing_server_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_empty_batch_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_max_message_length_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_no_op_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_registered_call_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_request_with_payload_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_simple_request_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test.exe chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test.exe echo All tests built. buildtests_cxx: interop_client.exe interop_server.exe @@ -721,6 +721,13 @@ chttp2_fake_security_request_with_payload_test.exe: build_libs $(OUT_DIR) chttp2_fake_security_request_with_payload_test: chttp2_fake_security_request_with_payload_test.exe echo Running chttp2_fake_security_request_with_payload_test $(OUT_DIR)\chttp2_fake_security_request_with_payload_test.exe +chttp2_fake_security_server_finishes_request_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_fake_security_server_finishes_request_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_fake_security_server_finishes_request_test.exe" Debug\end2end_fixture_chttp2_fake_security.lib Debug\end2end_test_server_finishes_request.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_fake_security_server_finishes_request_test: chttp2_fake_security_server_finishes_request_test.exe + echo Running chttp2_fake_security_server_finishes_request_test + $(OUT_DIR)\chttp2_fake_security_server_finishes_request_test.exe chttp2_fake_security_simple_delayed_request_test.exe: build_libs $(OUT_DIR) echo Building chttp2_fake_security_simple_delayed_request_test $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c @@ -917,6 +924,13 @@ chttp2_fullstack_request_with_payload_test.exe: build_libs $(OUT_DIR) chttp2_fullstack_request_with_payload_test: chttp2_fullstack_request_with_payload_test.exe echo Running chttp2_fullstack_request_with_payload_test $(OUT_DIR)\chttp2_fullstack_request_with_payload_test.exe +chttp2_fullstack_server_finishes_request_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_fullstack_server_finishes_request_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_fullstack_server_finishes_request_test.exe" Debug\end2end_fixture_chttp2_fullstack.lib Debug\end2end_test_server_finishes_request.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_fullstack_server_finishes_request_test: chttp2_fullstack_server_finishes_request_test.exe + echo Running chttp2_fullstack_server_finishes_request_test + $(OUT_DIR)\chttp2_fullstack_server_finishes_request_test.exe chttp2_fullstack_simple_delayed_request_test.exe: build_libs $(OUT_DIR) echo Building chttp2_fullstack_simple_delayed_request_test $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c @@ -1113,6 +1127,13 @@ chttp2_simple_ssl_fullstack_request_with_payload_test.exe: build_libs $(OUT_DIR) chttp2_simple_ssl_fullstack_request_with_payload_test: chttp2_simple_ssl_fullstack_request_with_payload_test.exe echo Running chttp2_simple_ssl_fullstack_request_with_payload_test $(OUT_DIR)\chttp2_simple_ssl_fullstack_request_with_payload_test.exe +chttp2_simple_ssl_fullstack_server_finishes_request_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_simple_ssl_fullstack_server_finishes_request_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_simple_ssl_fullstack_server_finishes_request_test.exe" Debug\end2end_fixture_chttp2_simple_ssl_fullstack.lib Debug\end2end_test_server_finishes_request.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_simple_ssl_fullstack_server_finishes_request_test: chttp2_simple_ssl_fullstack_server_finishes_request_test.exe + echo Running chttp2_simple_ssl_fullstack_server_finishes_request_test + $(OUT_DIR)\chttp2_simple_ssl_fullstack_server_finishes_request_test.exe chttp2_simple_ssl_fullstack_simple_delayed_request_test.exe: build_libs $(OUT_DIR) echo Building chttp2_simple_ssl_fullstack_simple_delayed_request_test $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c @@ -1309,6 +1330,13 @@ chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_test.exe: build_lib chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_test: chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_test.exe echo Running chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_test $(OUT_DIR)\chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_test.exe +chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test.exe" Debug\end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.lib Debug\end2end_test_server_finishes_request.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test: chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test.exe + echo Running chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test + $(OUT_DIR)\chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test.exe chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test.exe: build_libs $(OUT_DIR) echo Building chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c @@ -1505,6 +1533,13 @@ chttp2_socket_pair_request_with_payload_test.exe: build_libs $(OUT_DIR) chttp2_socket_pair_request_with_payload_test: chttp2_socket_pair_request_with_payload_test.exe echo Running chttp2_socket_pair_request_with_payload_test $(OUT_DIR)\chttp2_socket_pair_request_with_payload_test.exe +chttp2_socket_pair_server_finishes_request_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_server_finishes_request_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_server_finishes_request_test.exe" Debug\end2end_fixture_chttp2_socket_pair.lib Debug\end2end_test_server_finishes_request.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_server_finishes_request_test: chttp2_socket_pair_server_finishes_request_test.exe + echo Running chttp2_socket_pair_server_finishes_request_test + $(OUT_DIR)\chttp2_socket_pair_server_finishes_request_test.exe chttp2_socket_pair_simple_delayed_request_test.exe: build_libs $(OUT_DIR) echo Building chttp2_socket_pair_simple_delayed_request_test $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c @@ -1701,6 +1736,13 @@ chttp2_socket_pair_one_byte_at_a_time_request_with_payload_test.exe: build_libs chttp2_socket_pair_one_byte_at_a_time_request_with_payload_test: chttp2_socket_pair_one_byte_at_a_time_request_with_payload_test.exe echo Running chttp2_socket_pair_one_byte_at_a_time_request_with_payload_test $(OUT_DIR)\chttp2_socket_pair_one_byte_at_a_time_request_with_payload_test.exe +chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test.exe" Debug\end2end_fixture_chttp2_socket_pair_one_byte_at_a_time.lib Debug\end2end_test_server_finishes_request.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test: chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test.exe + echo Running chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test + $(OUT_DIR)\chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test.exe chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test.exe: build_libs $(OUT_DIR) echo Building chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c @@ -1722,6 +1764,209 @@ chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_ chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_test: chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_test.exe echo Running chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_test $(OUT_DIR)\chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_test.exe +chttp2_socket_pair_with_grpc_trace_bad_hostname_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_bad_hostname_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_bad_hostname_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_bad_hostname.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_bad_hostname_test: chttp2_socket_pair_with_grpc_trace_bad_hostname_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_bad_hostname_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_bad_hostname_test.exe +chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_cancel_after_accept.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test: chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test.exe +chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_cancel_after_accept_and_writes_closed.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test: chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test.exe +chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_cancel_after_invoke.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test: chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test.exe +chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_cancel_before_invoke.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test: chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test.exe +chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_cancel_in_a_vacuum.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test: chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test.exe +chttp2_socket_pair_with_grpc_trace_census_simple_request_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_census_simple_request_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_census_simple_request_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_census_simple_request.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_census_simple_request_test: chttp2_socket_pair_with_grpc_trace_census_simple_request_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_census_simple_request_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_census_simple_request_test.exe +chttp2_socket_pair_with_grpc_trace_disappearing_server_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_disappearing_server_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_disappearing_server_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_disappearing_server.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_disappearing_server_test: chttp2_socket_pair_with_grpc_trace_disappearing_server_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_disappearing_server_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_disappearing_server_test.exe +chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_early_server_shutdown_finishes_inflight_calls.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test: chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test.exe +chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_early_server_shutdown_finishes_tags.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test: chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test.exe +chttp2_socket_pair_with_grpc_trace_empty_batch_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_empty_batch_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_empty_batch_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_empty_batch.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_empty_batch_test: chttp2_socket_pair_with_grpc_trace_empty_batch_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_empty_batch_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_empty_batch_test.exe +chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_graceful_server_shutdown.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test: chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test.exe +chttp2_socket_pair_with_grpc_trace_invoke_large_request_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_invoke_large_request_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_invoke_large_request_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_invoke_large_request.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_invoke_large_request_test: chttp2_socket_pair_with_grpc_trace_invoke_large_request_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_invoke_large_request_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_invoke_large_request_test.exe +chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_max_concurrent_streams.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test: chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test.exe +chttp2_socket_pair_with_grpc_trace_max_message_length_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_max_message_length_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_max_message_length_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_max_message_length.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_max_message_length_test: chttp2_socket_pair_with_grpc_trace_max_message_length_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_max_message_length_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_max_message_length_test.exe +chttp2_socket_pair_with_grpc_trace_no_op_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_no_op_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_no_op_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_no_op.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_no_op_test: chttp2_socket_pair_with_grpc_trace_no_op_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_no_op_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_no_op_test.exe +chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_ping_pong_streaming.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test: chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test.exe +chttp2_socket_pair_with_grpc_trace_registered_call_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_registered_call_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_registered_call_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_registered_call.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_registered_call_test: chttp2_socket_pair_with_grpc_trace_registered_call_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_registered_call_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_registered_call_test.exe +chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_request_response_with_binary_metadata_and_payload.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test: chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test.exe +chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_request_response_with_metadata_and_payload.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test: chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test.exe +chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_request_response_with_payload.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test: chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test.exe +chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_request_response_with_payload_and_call_creds.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test: chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test.exe +chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_request_response_with_trailing_metadata_and_payload.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test: chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test.exe +chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_request_with_large_metadata.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test: chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test.exe +chttp2_socket_pair_with_grpc_trace_request_with_payload_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_request_with_payload_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_with_payload_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_request_with_payload.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_request_with_payload_test: chttp2_socket_pair_with_grpc_trace_request_with_payload_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_request_with_payload_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_with_payload_test.exe +chttp2_socket_pair_with_grpc_trace_server_finishes_request_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_server_finishes_request_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_server_finishes_request_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_server_finishes_request.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_server_finishes_request_test: chttp2_socket_pair_with_grpc_trace_server_finishes_request_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_server_finishes_request_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_server_finishes_request_test.exe +chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_simple_delayed_request.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test: chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test.exe +chttp2_socket_pair_with_grpc_trace_simple_request_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_simple_request_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_simple_request_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_simple_request.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_simple_request_test: chttp2_socket_pair_with_grpc_trace_simple_request_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_simple_request_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_simple_request_test.exe +chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_simple_request_with_high_initial_sequence_number.lib Debug\end2end_certs.lib Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test: chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test.exe chttp2_fullstack_bad_hostname_unsecure_test.exe: build_libs $(OUT_DIR) echo Building chttp2_fullstack_bad_hostname_unsecure_test $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c @@ -1890,6 +2135,13 @@ chttp2_fullstack_request_with_payload_unsecure_test.exe: build_libs $(OUT_DIR) chttp2_fullstack_request_with_payload_unsecure_test: chttp2_fullstack_request_with_payload_unsecure_test.exe echo Running chttp2_fullstack_request_with_payload_unsecure_test $(OUT_DIR)\chttp2_fullstack_request_with_payload_unsecure_test.exe +chttp2_fullstack_server_finishes_request_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_fullstack_server_finishes_request_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_fullstack_server_finishes_request_unsecure_test.exe" Debug\end2end_fixture_chttp2_fullstack.lib Debug\end2end_test_server_finishes_request.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_fullstack_server_finishes_request_unsecure_test: chttp2_fullstack_server_finishes_request_unsecure_test.exe + echo Running chttp2_fullstack_server_finishes_request_unsecure_test + $(OUT_DIR)\chttp2_fullstack_server_finishes_request_unsecure_test.exe chttp2_fullstack_simple_delayed_request_unsecure_test.exe: build_libs $(OUT_DIR) echo Building chttp2_fullstack_simple_delayed_request_unsecure_test $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c @@ -2079,6 +2331,13 @@ chttp2_socket_pair_request_with_payload_unsecure_test.exe: build_libs $(OUT_DIR) chttp2_socket_pair_request_with_payload_unsecure_test: chttp2_socket_pair_request_with_payload_unsecure_test.exe echo Running chttp2_socket_pair_request_with_payload_unsecure_test $(OUT_DIR)\chttp2_socket_pair_request_with_payload_unsecure_test.exe +chttp2_socket_pair_server_finishes_request_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_server_finishes_request_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_server_finishes_request_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair.lib Debug\end2end_test_server_finishes_request.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_server_finishes_request_unsecure_test: chttp2_socket_pair_server_finishes_request_unsecure_test.exe + echo Running chttp2_socket_pair_server_finishes_request_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_server_finishes_request_unsecure_test.exe chttp2_socket_pair_simple_delayed_request_unsecure_test.exe: build_libs $(OUT_DIR) echo Building chttp2_socket_pair_simple_delayed_request_unsecure_test $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c @@ -2268,6 +2527,13 @@ chttp2_socket_pair_one_byte_at_a_time_request_with_payload_unsecure_test.exe: bu chttp2_socket_pair_one_byte_at_a_time_request_with_payload_unsecure_test: chttp2_socket_pair_one_byte_at_a_time_request_with_payload_unsecure_test.exe echo Running chttp2_socket_pair_one_byte_at_a_time_request_with_payload_unsecure_test $(OUT_DIR)\chttp2_socket_pair_one_byte_at_a_time_request_with_payload_unsecure_test.exe +chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_one_byte_at_a_time.lib Debug\end2end_test_server_finishes_request.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test: chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test.exe + echo Running chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test.exe chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_unsecure_test.exe: build_libs $(OUT_DIR) echo Building chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_unsecure_test $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c @@ -2289,6 +2555,202 @@ chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_ chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_unsecure_test: chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_unsecure_test.exe echo Running chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_unsecure_test $(OUT_DIR)\chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_bad_hostname.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test: chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_cancel_after_accept.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test: chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_cancel_after_accept_and_writes_closed.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test: chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_cancel_after_invoke.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test: chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_cancel_before_invoke.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test: chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_cancel_in_a_vacuum.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test: chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_census_simple_request.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test: chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_disappearing_server.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test: chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_early_server_shutdown_finishes_inflight_calls.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test: chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_early_server_shutdown_finishes_tags.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test: chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_empty_batch.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test: chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_graceful_server_shutdown.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test: chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_invoke_large_request.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test: chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_max_concurrent_streams.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test: chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_max_message_length.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test: chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_no_op.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test: chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_ping_pong_streaming.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test: chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_registered_call.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test: chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_request_response_with_binary_metadata_and_payload.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test: chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_request_response_with_metadata_and_payload.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test: chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_request_response_with_payload.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test: chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_request_response_with_trailing_metadata_and_payload.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test: chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_request_with_large_metadata.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test: chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_request_with_payload.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test: chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_server_finishes_request.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test: chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_simple_delayed_request.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test: chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_simple_request.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test: chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test.exe +chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test.exe: build_libs $(OUT_DIR) + echo Building chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\vsprojects\dummy.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test.exe" Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib Debug\end2end_test_simple_request_with_high_initial_sequence_number.lib Debug\grpc_test_util_unsecure.lib Debug\grpc_unsecure.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dummy.obj +chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test: chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test.exe + echo Running chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test + $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test.exe build_gpr: msbuild grpc.sln /t:gpr /p:Configuration=Debug /p:Linkage-grpc_dependencies_zlib=static build_gpr_test_util: @@ -2325,6 +2787,10 @@ Debug\end2end_fixture_chttp2_socket_pair_one_byte_at_a_time.lib: $(OUT_DIR) echo Building end2end_fixture_chttp2_socket_pair_one_byte_at_a_time $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\end2end\fixtures\chttp2_socket_pair_one_byte_at_a_time.c $(LIBTOOL) /OUT:"Debug\end2end_fixture_chttp2_socket_pair_one_byte_at_a_time.lib" $(OUT_DIR)\chttp2_socket_pair_one_byte_at_a_time.obj +Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib: $(OUT_DIR) + echo Building end2end_fixture_chttp2_socket_pair_with_grpc_trace + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\end2end\fixtures\chttp2_socket_pair_with_grpc_trace.c + $(LIBTOOL) /OUT:"Debug\end2end_fixture_chttp2_socket_pair_with_grpc_trace.lib" $(OUT_DIR)\chttp2_socket_pair_with_grpc_trace.obj Debug\end2end_test_bad_hostname.lib: $(OUT_DIR) echo Building end2end_test_bad_hostname $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\end2end\tests\bad_hostname.c @@ -2425,6 +2891,10 @@ Debug\end2end_test_request_with_payload.lib: $(OUT_DIR) echo Building end2end_test_request_with_payload $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\end2end\tests\request_with_payload.c $(LIBTOOL) /OUT:"Debug\end2end_test_request_with_payload.lib" $(OUT_DIR)\request_with_payload.obj +Debug\end2end_test_server_finishes_request.lib: $(OUT_DIR) + echo Building end2end_test_server_finishes_request + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\end2end\tests\server_finishes_request.c + $(LIBTOOL) /OUT:"Debug\end2end_test_server_finishes_request.lib" $(OUT_DIR)\server_finishes_request.obj Debug\end2end_test_simple_delayed_request.lib: $(OUT_DIR) echo Building end2end_test_simple_delayed_request $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\end2end\tests\simple_delayed_request.c diff --git a/vsprojects/grpc/grpc.vcxproj b/vsprojects/grpc/grpc.vcxproj index e6c474541d..1c965388bb 100644 --- a/vsprojects/grpc/grpc.vcxproj +++ b/vsprojects/grpc/grpc.vcxproj @@ -151,7 +151,6 @@ <ClInclude Include="..\..\include\grpc\byte_buffer.h" /> <ClInclude Include="..\..\include\grpc\byte_buffer_reader.h" /> <ClInclude Include="..\..\include\grpc\grpc.h" /> - <ClInclude Include="..\..\include\grpc\grpc_http.h" /> <ClInclude Include="..\..\include\grpc\status.h" /> </ItemGroup> <ItemGroup> diff --git a/vsprojects/grpc/grpc.vcxproj.filters b/vsprojects/grpc/grpc.vcxproj.filters index ef9387dd2a..ff6afb2eca 100644 --- a/vsprojects/grpc/grpc.vcxproj.filters +++ b/vsprojects/grpc/grpc.vcxproj.filters @@ -369,9 +369,6 @@ <ClInclude Include="..\..\include\grpc\grpc.h"> <Filter>include\grpc</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc\grpc_http.h"> - <Filter>include\grpc</Filter> - </ClInclude> <ClInclude Include="..\..\include\grpc\status.h"> <Filter>include\grpc</Filter> </ClInclude> diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj index c1572259ab..3dfda32eaa 100644 --- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj @@ -149,7 +149,6 @@ <ClInclude Include="..\..\include\grpc\byte_buffer.h" /> <ClInclude Include="..\..\include\grpc\byte_buffer_reader.h" /> <ClInclude Include="..\..\include\grpc\grpc.h" /> - <ClInclude Include="..\..\include\grpc\grpc_http.h" /> <ClInclude Include="..\..\include\grpc\status.h" /> </ItemGroup> <ItemGroup> diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters index 0bee095da3..4c9c86eecd 100644 --- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -306,9 +306,6 @@ <ClInclude Include="..\..\include\grpc\grpc.h"> <Filter>include\grpc</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc\grpc_http.h"> - <Filter>include\grpc</Filter> - </ClInclude> <ClInclude Include="..\..\include\grpc\status.h"> <Filter>include\grpc</Filter> </ClInclude> diff --git a/vsprojects/nuget_package/buildall.bat b/vsprojects/nuget_package/buildall.bat index 837eef0f6a..f94b1487e2 100644 --- a/vsprojects/nuget_package/buildall.bat +++ b/vsprojects/nuget_package/buildall.bat @@ -1,5 +1,4 @@ @echo off -setlocal REM setlocal REM call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64 diff --git a/vsprojects/nuget_package/grpc.native.csharp_ext.nuspec b/vsprojects/nuget_package/grpc.native.csharp_ext.nuspec index 91740ac8fd..dfaa867db0 100644 --- a/vsprojects/nuget_package/grpc.native.csharp_ext.nuspec +++ b/vsprojects/nuget_package/grpc.native.csharp_ext.nuspec @@ -2,14 +2,14 @@ <package> <metadata> <id>grpc.native.csharp_ext</id> - <version>0.8.0.0</version> + <version>0.9.0.0</version> <authors>Google Inc.</authors> <owners>Jan Tattermusch</owners> <licenseUrl>https://github.com/grpc/grpc/blob/master/LICENSE</licenseUrl> <projectUrl>http://github.com/grpc/grpc</projectUrl> <requireLicenseAcceptance>false</requireLicenseAcceptance> <description>Native extension needed by gRPC C# library. This is not the package you are looking for, it is only meant to be used as a dependency.</description> - <releaseNotes>Release of gRPC C core 0.8.0 libraries.</releaseNotes> + <releaseNotes>Release of gRPC C core 0.9.0 libraries.</releaseNotes> <copyright>Copyright 2015</copyright> <title>gRPC C# Native Extension</title> <summary>Native library required by gRPC C#</summary> |