diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000000..651e1296ba3 --- /dev/null +++ b/.clang-format @@ -0,0 +1,57 @@ +--- +Language: Cpp +# BasedOnStyle: Google +AccessModifierOffset: -1 +ConstructorInitializerIndentWidth: 4 +AlignEscapedNewlinesLeft: true +AlignTrailingComments: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: false +AllowShortIfStatementsOnASingleLine: true +AllowShortLoopsOnASingleLine: true +AllowShortFunctionsOnASingleLine: All +AlwaysBreakTemplateDeclarations: true +AlwaysBreakBeforeMultilineStrings: true +BreakBeforeBinaryOperators: false +BreakBeforeTernaryOperators: true +BreakConstructorInitializersBeforeComma: false +BinPackParameters: true +ColumnLimit: 80 +ConstructorInitializerAllOnOneLineOrOnePerLine: true +DerivePointerAlignment: true +ExperimentalAutoDetectBinPacking: false +IndentCaseLabels: true +IndentWrappedFunctionNames: false +IndentFunctionDeclarationAfterType: false +MaxEmptyLinesToKeep: 1 +KeepEmptyLinesAtTheStartOfBlocks: false +NamespaceIndentation: None +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: false +PenaltyBreakBeforeFirstCallParameter: 1 +PenaltyBreakComment: 300 +PenaltyBreakString: 1000 +PenaltyBreakFirstLessLess: 120 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 200 +PointerAlignment: Left +SpacesBeforeTrailingComments: 2 +Cpp11BracedListStyle: true +Standard: Auto +IndentWidth: 2 +TabWidth: 8 +UseTab: Never +BreakBeforeBraces: Attach +SpacesInParentheses: false +SpacesInAngles: false +SpaceInEmptyParentheses: false +SpacesInCStyleCastParentheses: false +SpacesInContainerLiterals: true +SpaceBeforeAssignmentOperators: true +ContinuationIndentWidth: 4 +CommentPragmas: '^ IWYU pragma:' +ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] +SpaceBeforeParens: ControlStatements +DisableFormat: false +... + diff --git a/.gitignore b/.gitignore index 5202b53ad25..3efc25aafb1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,19 @@ +# C/C++ build outputs bins -deps +gens libs objs + +# gcov coverage data +coverage +*.gcno + +# profiler output +*.prof + +# python compiled objects *.pyc +# cache for run_tests.py +.run_tests_cache + diff --git a/.gitmodules b/.gitmodules index 9a287d9ee2d..97b7197be32 100644 --- a/.gitmodules +++ b/.gitmodules @@ -9,10 +9,6 @@ path = third_party/protobuf url = https://github.com/google/protobuf.git branch = v3.0.0-alpha-1 -[submodule "third_party/libevent"] - path = third_party/libevent - url = https://github.com/libevent/libevent.git - branch = patches-2.0 [submodule "third_party/gflags"] path = third_party/gflags url = https://code.google.com/p/gflags diff --git a/INSTALL b/INSTALL index 20e27c1b805..a9b0b58aa6e 100644 --- a/INSTALL +++ b/INSTALL @@ -12,8 +12,7 @@ Note that the Makefile makes it much easier for you to compile from sources if you were to clone recursively our git repository. -grpc core currently depends on zlib and OpenSSL 1.0.2beta3, and also requires -libevent2 for the Linux port. +grpc core currently depends on zlib and OpenSSL 1.0.2beta3. grpc++'s tests depends on protobuf 3.0.0, gtests and gflags. @@ -46,7 +45,7 @@ and let the Makefile build them itself. You may also install the dependencies yourself, from the sources, or from your distribution's package manager. -The development packages needed for grpc are libevent2 under Linux, and zlib. +The only development package needed for grpc is zlib. The development packages needed for grpc++'s tests are gtests, and gflags. To the best of our knowledge, no distribution has an OpenSSL package that diff --git a/Makefile b/Makefile index 35c2d848003..1fefcfd09fe 100644 --- a/Makefile +++ b/Makefile @@ -22,33 +22,61 @@ CPPFLAGS_dbg = -O0 LDFLAGS_dbg = DEFINES_dbg = _DEBUG DEBUG +VALID_CONFIG_valgrind = 1 +REQUIRE_CUSTOM_LIBRARIES_valgrind = 1 +CC_valgrind = gcc +CXX_valgrind = g++ +LD_valgrind = gcc +LDXX_valgrind = g++ +CPPFLAGS_valgrind = -O0 +OPENSSL_CFLAGS_valgrind = -DPURIFY +LDFLAGS_valgrind = +DEFINES_valgrind = _DEBUG DEBUG + VALID_CONFIG_tsan = 1 +REQUIRE_CUSTOM_LIBRARIES_tsan = 1 CC_tsan = clang CXX_tsan = clang++ LD_tsan = clang LDXX_tsan = clang++ CPPFLAGS_tsan = -O1 -fsanitize=thread -fno-omit-frame-pointer +OPENSSL_CONFIG_tsan = no-asm LDFLAGS_tsan = -fsanitize=thread DEFINES_tsan = NDEBUG VALID_CONFIG_asan = 1 +REQUIRE_CUSTOM_LIBRARIES_asan = 1 CC_asan = clang CXX_asan = clang++ LD_asan = clang LDXX_asan = clang++ CPPFLAGS_asan = -O1 -fsanitize=address -fno-omit-frame-pointer +OPENSSL_CONFIG_asan = no-asm LDFLAGS_asan = -fsanitize=address DEFINES_asan = NDEBUG VALID_CONFIG_msan = 1 +REQUIRE_CUSTOM_LIBRARIES_msan = 1 CC_msan = clang CXX_msan = clang++ LD_msan = clang LDXX_msan = clang++ CPPFLAGS_msan = -O1 -fsanitize=memory -fno-omit-frame-pointer +OPENSSL_CFLAGS_msan = -DPURIFY +OPENSSL_CONFIG_msan = no-asm LDFLAGS_msan = -fsanitize=memory DEFINES_msan = NDEBUG +VALID_CONFIG_gcov = 1 +CC_gcov = gcc +CXX_gcov = g++ +LD_gcov = gcc +LDXX_gcov = g++ +CPPFLAGS_gcov = -O0 -fprofile-arcs -ftest-coverage +LDFLAGS_gcov = -fprofile-arcs -ftest-coverage +DEFINES_gcov = NDEBUG + + # General settings. # You may want to change these depending on your system. @@ -69,6 +97,12 @@ ifndef VALID_CONFIG_$(CONFIG) $(error Invalid CONFIG value '$(CONFIG)') endif + +# The HOST compiler settings are used to compile the protoc plugins. +# In most cases, you won't have to change anything, but if you are +# cross-compiling, you can override these variables from GNU make's +# command line: make CC=cross-gcc HOST_CC=gcc + HOST_CC = $(CC) HOST_CXX = $(CXX) HOST_LD = $(LD) @@ -145,9 +179,22 @@ endif OPENSSL_ALPN_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o /dev/null test/build/openssl-alpn.c -lssl -lcrypto -ldl $(LDFLAGS) ZLIB_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o /dev/null test/build/zlib.c -lz $(LDFLAGS) +PERFTOOLS_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o /dev/null test/build/perftools.c -lprofiler $(LDFLAGS) + +HAS_SYSTEM_PERFTOOLS = $(shell $(PERFTOOLS_CHECK_CMD) 2> /dev/null && echo true || echo false) +ifeq ($(HAS_SYSTEM_PERFTOOLS),true) +DEFINES += GRPC_HAVE_PERFTOOLS +LIBS += profiler +endif +ifndef REQUIRE_CUSTOM_LIBRARIES_$(CONFIG) HAS_SYSTEM_OPENSSL_ALPN = $(shell $(OPENSSL_ALPN_CHECK_CMD) 2> /dev/null && echo true || echo false) HAS_SYSTEM_ZLIB = $(shell $(ZLIB_CHECK_CMD) 2> /dev/null && echo true || echo false) +else +# override system libraries if the config requires a custom compiled library +HAS_SYSTEM_OPENSSL_ALPN = false +HAS_SYSTEM_ZLIB = false +endif ifeq ($(wildcard third_party/openssl/ssl/ssl.h),) HAS_EMBEDDED_OPENSSL_ALPN = false @@ -163,7 +210,7 @@ endif ifeq ($(HAS_SYSTEM_ZLIB),false) ifeq ($(HAS_EMBEDDED_ZLIB),true) -ZLIB_DEP = third_party/zlib/libz.a +ZLIB_DEP = libs/$(CONFIG)/zlib/libz.a CPPFLAGS += -Ithird_party/zlib LDFLAGS += -Lthird_party/zlib else @@ -173,10 +220,10 @@ endif ifeq ($(HAS_SYSTEM_OPENSSL_ALPN),false) ifeq ($(HAS_EMBEDDED_OPENSSL_ALPN),true) -OPENSSL_DEP = third_party/openssl/libssl.a -OPENSSL_MERGE_LIBS += third_party/openssl/libssl.a third_party/openssl/libcrypto.a +OPENSSL_DEP = libs/$(CONFIG)/openssl/libssl.a +OPENSSL_MERGE_LIBS += libs/$(CONFIG)/openssl/libssl.a libs/$(CONFIG)/openssl/libcrypto.a CPPFLAGS += -Ithird_party/openssl/include -LDFLAGS += -Lthird_party/openssl +LDFLAGS += -Llibs/$(CONFIG)/openssl LIBS_SECURE = dl else NO_SECURE = true @@ -187,16 +234,13 @@ endif LDLIBS_SECURE += $(addprefix -l, $(LIBS_SECURE)) -ifneq ($(DEP_MISSING),) -NO_DEPS = true -endif - -ifneq ($(MAKECMDGOALS),clean) +ifeq ($(MAKECMDGOALS),clean) NO_DEPS = true endif .SECONDARY = %.pb.h %.pb.cc +PROTOC_PLUGINS= bins/$(CONFIG)/cpp_plugin bins/$(CONFIG)/ruby_plugin ifeq ($(DEP_MISSING),) all: static shared dep_error: @@ -250,90 +294,90 @@ openssl_dep_message: stop: @false +alarm_heap_test: bins/$(CONFIG)/alarm_heap_test +alarm_list_test: bins/$(CONFIG)/alarm_list_test +alarm_test: bins/$(CONFIG)/alarm_test +alpn_test: bins/$(CONFIG)/alpn_test +bin_encoder_test: bins/$(CONFIG)/bin_encoder_test +census_hash_table_test: bins/$(CONFIG)/census_hash_table_test +census_statistics_multiple_writers_circular_buffer_test: bins/$(CONFIG)/census_statistics_multiple_writers_circular_buffer_test +census_statistics_multiple_writers_test: bins/$(CONFIG)/census_statistics_multiple_writers_test +census_statistics_performance_test: bins/$(CONFIG)/census_statistics_performance_test +census_statistics_quick_test: bins/$(CONFIG)/census_statistics_quick_test +census_statistics_small_log_test: bins/$(CONFIG)/census_statistics_small_log_test +census_stats_store_test: bins/$(CONFIG)/census_stats_store_test +census_stub_test: bins/$(CONFIG)/census_stub_test +census_trace_store_test: bins/$(CONFIG)/census_trace_store_test +census_window_stats_test: bins/$(CONFIG)/census_window_stats_test +chttp2_status_conversion_test: bins/$(CONFIG)/chttp2_status_conversion_test +chttp2_stream_encoder_test: bins/$(CONFIG)/chttp2_stream_encoder_test +chttp2_stream_map_test: bins/$(CONFIG)/chttp2_stream_map_test +chttp2_transport_end2end_test: bins/$(CONFIG)/chttp2_transport_end2end_test +dualstack_socket_test: bins/$(CONFIG)/dualstack_socket_test +echo_client: bins/$(CONFIG)/echo_client +echo_server: bins/$(CONFIG)/echo_server +echo_test: bins/$(CONFIG)/echo_test +fd_posix_test: bins/$(CONFIG)/fd_posix_test +fling_client: bins/$(CONFIG)/fling_client +fling_server: bins/$(CONFIG)/fling_server +fling_stream_test: bins/$(CONFIG)/fling_stream_test +fling_test: bins/$(CONFIG)/fling_test gen_hpack_tables: bins/$(CONFIG)/gen_hpack_tables -cpp_plugin: bins/$(CONFIG)/cpp_plugin -ruby_plugin: bins/$(CONFIG)/ruby_plugin -go_plugin: bins/$(CONFIG)/go_plugin -grpc_byte_buffer_reader_test: bins/$(CONFIG)/grpc_byte_buffer_reader_test gpr_cancellable_test: bins/$(CONFIG)/gpr_cancellable_test -gpr_log_test: bins/$(CONFIG)/gpr_log_test -gpr_useful_test: bins/$(CONFIG)/gpr_useful_test gpr_cmdline_test: bins/$(CONFIG)/gpr_cmdline_test gpr_histogram_test: bins/$(CONFIG)/gpr_histogram_test gpr_host_port_test: bins/$(CONFIG)/gpr_host_port_test +gpr_log_test: bins/$(CONFIG)/gpr_log_test gpr_slice_buffer_test: bins/$(CONFIG)/gpr_slice_buffer_test gpr_slice_test: bins/$(CONFIG)/gpr_slice_test gpr_string_test: bins/$(CONFIG)/gpr_string_test gpr_sync_test: bins/$(CONFIG)/gpr_sync_test gpr_thd_test: bins/$(CONFIG)/gpr_thd_test gpr_time_test: bins/$(CONFIG)/gpr_time_test -murmur_hash_test: bins/$(CONFIG)/murmur_hash_test +gpr_useful_test: bins/$(CONFIG)/gpr_useful_test +grpc_base64_test: bins/$(CONFIG)/grpc_base64_test +grpc_byte_buffer_reader_test: bins/$(CONFIG)/grpc_byte_buffer_reader_test +grpc_channel_stack_test: bins/$(CONFIG)/grpc_channel_stack_test +grpc_completion_queue_benchmark: bins/$(CONFIG)/grpc_completion_queue_benchmark +grpc_completion_queue_test: bins/$(CONFIG)/grpc_completion_queue_test +grpc_credentials_test: bins/$(CONFIG)/grpc_credentials_test +grpc_fetch_oauth2: bins/$(CONFIG)/grpc_fetch_oauth2 +grpc_json_token_test: bins/$(CONFIG)/grpc_json_token_test grpc_stream_op_test: bins/$(CONFIG)/grpc_stream_op_test -alpn_test: bins/$(CONFIG)/alpn_test -time_averaged_stats_test: bins/$(CONFIG)/time_averaged_stats_test -chttp2_stream_encoder_test: bins/$(CONFIG)/chttp2_stream_encoder_test -hpack_table_test: bins/$(CONFIG)/hpack_table_test -chttp2_stream_map_test: bins/$(CONFIG)/chttp2_stream_map_test hpack_parser_test: bins/$(CONFIG)/hpack_parser_test -transport_metadata_test: bins/$(CONFIG)/transport_metadata_test -chttp2_status_conversion_test: bins/$(CONFIG)/chttp2_status_conversion_test -chttp2_transport_end2end_test: bins/$(CONFIG)/chttp2_transport_end2end_test -tcp_posix_test: bins/$(CONFIG)/tcp_posix_test -dualstack_socket_test: bins/$(CONFIG)/dualstack_socket_test +hpack_table_test: bins/$(CONFIG)/hpack_table_test +httpcli_format_request_test: bins/$(CONFIG)/httpcli_format_request_test +httpcli_parser_test: bins/$(CONFIG)/httpcli_parser_test +httpcli_test: bins/$(CONFIG)/httpcli_test +lame_client_test: bins/$(CONFIG)/lame_client_test +low_level_ping_pong_benchmark: bins/$(CONFIG)/low_level_ping_pong_benchmark +message_compress_test: bins/$(CONFIG)/message_compress_test +metadata_buffer_test: bins/$(CONFIG)/metadata_buffer_test +murmur_hash_test: bins/$(CONFIG)/murmur_hash_test no_server_test: bins/$(CONFIG)/no_server_test +poll_kick_test: bins/$(CONFIG)/poll_kick_test resolve_address_test: bins/$(CONFIG)/resolve_address_test +secure_endpoint_test: bins/$(CONFIG)/secure_endpoint_test sockaddr_utils_test: bins/$(CONFIG)/sockaddr_utils_test -tcp_server_posix_test: bins/$(CONFIG)/tcp_server_posix_test tcp_client_posix_test: bins/$(CONFIG)/tcp_client_posix_test -grpc_channel_stack_test: bins/$(CONFIG)/grpc_channel_stack_test -metadata_buffer_test: bins/$(CONFIG)/metadata_buffer_test -grpc_completion_queue_test: bins/$(CONFIG)/grpc_completion_queue_test -grpc_completion_queue_benchmark: bins/$(CONFIG)/grpc_completion_queue_benchmark -census_trace_store_test: bins/$(CONFIG)/census_trace_store_test -census_stats_store_test: bins/$(CONFIG)/census_stats_store_test -census_window_stats_test: bins/$(CONFIG)/census_window_stats_test -census_statistics_quick_test: bins/$(CONFIG)/census_statistics_quick_test -census_statistics_small_log_test: bins/$(CONFIG)/census_statistics_small_log_test -census_statistics_performance_test: bins/$(CONFIG)/census_statistics_performance_test -census_statistics_multiple_writers_test: bins/$(CONFIG)/census_statistics_multiple_writers_test -census_statistics_multiple_writers_circular_buffer_test: bins/$(CONFIG)/census_statistics_multiple_writers_circular_buffer_test -census_stub_test: bins/$(CONFIG)/census_stub_test -census_hash_table_test: bins/$(CONFIG)/census_hash_table_test -fling_server: bins/$(CONFIG)/fling_server -fling_client: bins/$(CONFIG)/fling_client -fling_test: bins/$(CONFIG)/fling_test -echo_server: bins/$(CONFIG)/echo_server -echo_client: bins/$(CONFIG)/echo_client -echo_test: bins/$(CONFIG)/echo_test -low_level_ping_pong_benchmark: bins/$(CONFIG)/low_level_ping_pong_benchmark -message_compress_test: bins/$(CONFIG)/message_compress_test -bin_encoder_test: bins/$(CONFIG)/bin_encoder_test -secure_endpoint_test: bins/$(CONFIG)/secure_endpoint_test -httpcli_format_request_test: bins/$(CONFIG)/httpcli_format_request_test -httpcli_parser_test: bins/$(CONFIG)/httpcli_parser_test -httpcli_test: bins/$(CONFIG)/httpcli_test -grpc_credentials_test: bins/$(CONFIG)/grpc_credentials_test -grpc_fetch_oauth2: bins/$(CONFIG)/grpc_fetch_oauth2 -grpc_base64_test: bins/$(CONFIG)/grpc_base64_test -grpc_json_token_test: bins/$(CONFIG)/grpc_json_token_test +tcp_posix_test: bins/$(CONFIG)/tcp_posix_test +tcp_server_posix_test: bins/$(CONFIG)/tcp_server_posix_test +time_averaged_stats_test: bins/$(CONFIG)/time_averaged_stats_test +time_test: bins/$(CONFIG)/time_test timeout_encoding_test: bins/$(CONFIG)/timeout_encoding_test -fd_posix_test: bins/$(CONFIG)/fd_posix_test -fling_stream_test: bins/$(CONFIG)/fling_stream_test -lame_client_test: bins/$(CONFIG)/lame_client_test -thread_pool_test: bins/$(CONFIG)/thread_pool_test -status_test: bins/$(CONFIG)/status_test -sync_client_async_server_test: bins/$(CONFIG)/sync_client_async_server_test -qps_client: bins/$(CONFIG)/qps_client -qps_server: bins/$(CONFIG)/qps_server -interop_server: bins/$(CONFIG)/interop_server -interop_client: bins/$(CONFIG)/interop_client -end2end_test: bins/$(CONFIG)/end2end_test +transport_metadata_test: bins/$(CONFIG)/transport_metadata_test channel_arguments_test: bins/$(CONFIG)/channel_arguments_test +cpp_plugin: bins/$(CONFIG)/cpp_plugin credentials_test: bins/$(CONFIG)/credentials_test -alarm_test: bins/$(CONFIG)/alarm_test -alarm_list_test: bins/$(CONFIG)/alarm_list_test -alarm_heap_test: bins/$(CONFIG)/alarm_heap_test -time_test: bins/$(CONFIG)/time_test +end2end_test: bins/$(CONFIG)/end2end_test +interop_client: bins/$(CONFIG)/interop_client +interop_server: bins/$(CONFIG)/interop_server +qps_client: bins/$(CONFIG)/qps_client +qps_server: bins/$(CONFIG)/qps_server +ruby_plugin: bins/$(CONFIG)/ruby_plugin +status_test: bins/$(CONFIG)/status_test +sync_client_async_server_test: bins/$(CONFIG)/sync_client_async_server_test +thread_pool_test: bins/$(CONFIG)/thread_pool_test chttp2_fake_security_cancel_after_accept_test: bins/$(CONFIG)/chttp2_fake_security_cancel_after_accept_test chttp2_fake_security_cancel_after_accept_and_writes_closed_test: bins/$(CONFIG)/chttp2_fake_security_cancel_after_accept_and_writes_closed_test chttp2_fake_security_cancel_after_invoke_test: bins/$(CONFIG)/chttp2_fake_security_cancel_after_invoke_test @@ -343,6 +387,7 @@ chttp2_fake_security_census_simple_request_test: bins/$(CONFIG)/chttp2_fake_secu chttp2_fake_security_disappearing_server_test: bins/$(CONFIG)/chttp2_fake_security_disappearing_server_test chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test: bins/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test chttp2_fake_security_early_server_shutdown_finishes_tags_test: bins/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_tags_test +chttp2_fake_security_graceful_server_shutdown_test: bins/$(CONFIG)/chttp2_fake_security_graceful_server_shutdown_test chttp2_fake_security_invoke_large_request_test: bins/$(CONFIG)/chttp2_fake_security_invoke_large_request_test chttp2_fake_security_max_concurrent_streams_test: bins/$(CONFIG)/chttp2_fake_security_max_concurrent_streams_test chttp2_fake_security_no_op_test: bins/$(CONFIG)/chttp2_fake_security_no_op_test @@ -364,6 +409,7 @@ chttp2_fullstack_census_simple_request_test: bins/$(CONFIG)/chttp2_fullstack_cen chttp2_fullstack_disappearing_server_test: bins/$(CONFIG)/chttp2_fullstack_disappearing_server_test chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test: bins/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test chttp2_fullstack_early_server_shutdown_finishes_tags_test: bins/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_tags_test +chttp2_fullstack_graceful_server_shutdown_test: bins/$(CONFIG)/chttp2_fullstack_graceful_server_shutdown_test chttp2_fullstack_invoke_large_request_test: bins/$(CONFIG)/chttp2_fullstack_invoke_large_request_test chttp2_fullstack_max_concurrent_streams_test: bins/$(CONFIG)/chttp2_fullstack_max_concurrent_streams_test chttp2_fullstack_no_op_test: bins/$(CONFIG)/chttp2_fullstack_no_op_test @@ -385,6 +431,7 @@ chttp2_simple_ssl_fullstack_census_simple_request_test: bins/$(CONFIG)/chttp2_si chttp2_simple_ssl_fullstack_disappearing_server_test: bins/$(CONFIG)/chttp2_simple_ssl_fullstack_disappearing_server_test chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test: bins/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test: bins/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test +chttp2_simple_ssl_fullstack_graceful_server_shutdown_test: bins/$(CONFIG)/chttp2_simple_ssl_fullstack_graceful_server_shutdown_test chttp2_simple_ssl_fullstack_invoke_large_request_test: bins/$(CONFIG)/chttp2_simple_ssl_fullstack_invoke_large_request_test chttp2_simple_ssl_fullstack_max_concurrent_streams_test: bins/$(CONFIG)/chttp2_simple_ssl_fullstack_max_concurrent_streams_test chttp2_simple_ssl_fullstack_no_op_test: bins/$(CONFIG)/chttp2_simple_ssl_fullstack_no_op_test @@ -406,6 +453,7 @@ chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test: bins/$(CONFI chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test: bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test: bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test: bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test +chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_test: bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_test chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test: bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test: bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test chttp2_simple_ssl_with_oauth2_fullstack_no_op_test: bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_no_op_test @@ -427,6 +475,7 @@ chttp2_socket_pair_census_simple_request_test: bins/$(CONFIG)/chttp2_socket_pair chttp2_socket_pair_disappearing_server_test: bins/$(CONFIG)/chttp2_socket_pair_disappearing_server_test chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test: bins/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test chttp2_socket_pair_early_server_shutdown_finishes_tags_test: bins/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_tags_test +chttp2_socket_pair_graceful_server_shutdown_test: bins/$(CONFIG)/chttp2_socket_pair_graceful_server_shutdown_test chttp2_socket_pair_invoke_large_request_test: bins/$(CONFIG)/chttp2_socket_pair_invoke_large_request_test chttp2_socket_pair_max_concurrent_streams_test: bins/$(CONFIG)/chttp2_socket_pair_max_concurrent_streams_test chttp2_socket_pair_no_op_test: bins/$(CONFIG)/chttp2_socket_pair_no_op_test @@ -448,6 +497,7 @@ chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test: bins/$(CONFIG) chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test: bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test: bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test: bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test +chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_test: bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_test chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test: bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test: bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test chttp2_socket_pair_one_byte_at_a_time_no_op_test: bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_no_op_test @@ -465,55 +515,103 @@ run_dep_checks: $(OPENSSL_ALPN_CHECK_CMD) || true $(ZLIB_CHECK_CMD) || true -third_party/zlib/libz.a: - (cd third_party/zlib ; CFLAGS="-fPIC -fvisibility=hidden" ./configure --static) - $(MAKE) -C third_party/zlib - -third_party/openssl/libssl.a: - (cd third_party/openssl ; CC="$(CC) -fPIC -fvisibility=hidden" ./config) - $(MAKE) -C third_party/openssl build_crypto build_ssl +libs/$(CONFIG)/zlib/libz.a: + $(E) "[MAKE] Building zlib" + $(Q)(cd third_party/zlib ; CC="$(CC)" CFLAGS="-fPIC -fvisibility=hidden $(CPPFLAGS_$(CONFIG))" ./configure --static) + $(Q)$(MAKE) -C third_party/zlib clean + $(Q)$(MAKE) -C third_party/zlib + $(Q)mkdir -p libs/$(CONFIG)/zlib + $(Q)cp third_party/zlib/libz.a libs/$(CONFIG)/zlib + +libs/$(CONFIG)/openssl/libssl.a: + $(E) "[MAKE] Building openssl" + $(Q)(cd third_party/openssl ; CC="$(CC) -fPIC -fvisibility=hidden $(CPPFLAGS_$(CONFIG)) $(OPENSSL_CFLAGS_$(CONFIG))" ./config $(OPENSSL_CONFIG_$(CONFIG))) + $(Q)$(MAKE) -C third_party/openssl clean + $(Q)$(MAKE) -C third_party/openssl build_crypto build_ssl + $(Q)mkdir -p libs/$(CONFIG)/openssl + $(Q)cp third_party/openssl/libssl.a third_party/openssl/libcrypto.a libs/$(CONFIG)/openssl static: static_c static_cxx -static_c: dep_c libs/$(CONFIG)/libgpr.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgrpc_unsecure.a +static_c: libs/$(CONFIG)/libgpr.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgrpc_unsecure.a -static_cxx: dep_cxx libs/$(CONFIG)/libgrpc++.a +static_cxx: libs/$(CONFIG)/libgrpc++.a shared: shared_c shared_cxx -shared_c: dep_c libs/$(CONFIG)/libgpr.$(SHARED_EXT) libs/$(CONFIG)/libgrpc.$(SHARED_EXT) libs/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT) +shared_c: libs/$(CONFIG)/libgpr.$(SHARED_EXT) libs/$(CONFIG)/libgrpc.$(SHARED_EXT) libs/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT) -shared_cxx: dep_cxx libs/$(CONFIG)/libgrpc++.$(SHARED_EXT) +shared_cxx: libs/$(CONFIG)/libgrpc++.$(SHARED_EXT) privatelibs: privatelibs_c privatelibs_cxx -privatelibs_c: dep_c libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a libs/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a libs/$(CONFIG)/libend2end_test_cancel_after_accept.a libs/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a libs/$(CONFIG)/libend2end_test_cancel_after_invoke.a libs/$(CONFIG)/libend2end_test_cancel_before_invoke.a libs/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a libs/$(CONFIG)/libend2end_test_census_simple_request.a libs/$(CONFIG)/libend2end_test_disappearing_server.a libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a libs/$(CONFIG)/libend2end_test_invoke_large_request.a libs/$(CONFIG)/libend2end_test_max_concurrent_streams.a libs/$(CONFIG)/libend2end_test_no_op.a libs/$(CONFIG)/libend2end_test_ping_pong_streaming.a libs/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_simple_delayed_request.a libs/$(CONFIG)/libend2end_test_simple_request.a libs/$(CONFIG)/libend2end_test_thread_stress.a libs/$(CONFIG)/libend2end_test_writes_done_hangs_with_pending_read.a libs/$(CONFIG)/libend2end_certs.a +privatelibs_c: libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a libs/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a libs/$(CONFIG)/libend2end_test_cancel_after_accept.a libs/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a libs/$(CONFIG)/libend2end_test_cancel_after_invoke.a libs/$(CONFIG)/libend2end_test_cancel_before_invoke.a libs/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a libs/$(CONFIG)/libend2end_test_census_simple_request.a libs/$(CONFIG)/libend2end_test_disappearing_server.a libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a libs/$(CONFIG)/libend2end_test_graceful_server_shutdown.a libs/$(CONFIG)/libend2end_test_invoke_large_request.a libs/$(CONFIG)/libend2end_test_max_concurrent_streams.a libs/$(CONFIG)/libend2end_test_no_op.a libs/$(CONFIG)/libend2end_test_ping_pong_streaming.a libs/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_simple_delayed_request.a libs/$(CONFIG)/libend2end_test_simple_request.a libs/$(CONFIG)/libend2end_test_thread_stress.a libs/$(CONFIG)/libend2end_test_writes_done_hangs_with_pending_read.a libs/$(CONFIG)/libend2end_certs.a -privatelibs_cxx: dep_cxx libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a libs/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a libs/$(CONFIG)/libend2end_test_cancel_after_accept.a libs/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a libs/$(CONFIG)/libend2end_test_cancel_after_invoke.a libs/$(CONFIG)/libend2end_test_cancel_before_invoke.a libs/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a libs/$(CONFIG)/libend2end_test_census_simple_request.a libs/$(CONFIG)/libend2end_test_disappearing_server.a libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a libs/$(CONFIG)/libend2end_test_invoke_large_request.a libs/$(CONFIG)/libend2end_test_max_concurrent_streams.a libs/$(CONFIG)/libend2end_test_no_op.a libs/$(CONFIG)/libend2end_test_ping_pong_streaming.a libs/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_simple_delayed_request.a libs/$(CONFIG)/libend2end_test_simple_request.a libs/$(CONFIG)/libend2end_test_thread_stress.a libs/$(CONFIG)/libend2end_test_writes_done_hangs_with_pending_read.a libs/$(CONFIG)/libend2end_certs.a +privatelibs_cxx: libs/$(CONFIG)/libgrpc++_test_util.a buildtests: buildtests_c buildtests_cxx -buildtests_c: bins_dep_c privatelibs_c bins/$(CONFIG)/grpc_byte_buffer_reader_test bins/$(CONFIG)/gpr_cancellable_test bins/$(CONFIG)/gpr_log_test bins/$(CONFIG)/gpr_useful_test bins/$(CONFIG)/gpr_cmdline_test bins/$(CONFIG)/gpr_histogram_test bins/$(CONFIG)/gpr_host_port_test bins/$(CONFIG)/gpr_slice_buffer_test bins/$(CONFIG)/gpr_slice_test bins/$(CONFIG)/gpr_string_test bins/$(CONFIG)/gpr_sync_test bins/$(CONFIG)/gpr_thd_test bins/$(CONFIG)/gpr_time_test bins/$(CONFIG)/murmur_hash_test bins/$(CONFIG)/grpc_stream_op_test bins/$(CONFIG)/alpn_test bins/$(CONFIG)/time_averaged_stats_test bins/$(CONFIG)/chttp2_stream_encoder_test bins/$(CONFIG)/hpack_table_test bins/$(CONFIG)/chttp2_stream_map_test bins/$(CONFIG)/hpack_parser_test bins/$(CONFIG)/transport_metadata_test bins/$(CONFIG)/chttp2_status_conversion_test bins/$(CONFIG)/chttp2_transport_end2end_test bins/$(CONFIG)/tcp_posix_test bins/$(CONFIG)/dualstack_socket_test bins/$(CONFIG)/no_server_test bins/$(CONFIG)/resolve_address_test bins/$(CONFIG)/sockaddr_utils_test bins/$(CONFIG)/tcp_server_posix_test bins/$(CONFIG)/tcp_client_posix_test bins/$(CONFIG)/grpc_channel_stack_test bins/$(CONFIG)/metadata_buffer_test bins/$(CONFIG)/grpc_completion_queue_test bins/$(CONFIG)/census_window_stats_test bins/$(CONFIG)/census_statistics_quick_test bins/$(CONFIG)/census_statistics_small_log_test bins/$(CONFIG)/census_statistics_performance_test bins/$(CONFIG)/census_statistics_multiple_writers_test bins/$(CONFIG)/census_statistics_multiple_writers_circular_buffer_test bins/$(CONFIG)/census_stub_test bins/$(CONFIG)/census_hash_table_test bins/$(CONFIG)/fling_server bins/$(CONFIG)/fling_client bins/$(CONFIG)/fling_test bins/$(CONFIG)/echo_server bins/$(CONFIG)/echo_client bins/$(CONFIG)/echo_test bins/$(CONFIG)/message_compress_test bins/$(CONFIG)/bin_encoder_test bins/$(CONFIG)/secure_endpoint_test bins/$(CONFIG)/httpcli_format_request_test bins/$(CONFIG)/httpcli_parser_test bins/$(CONFIG)/httpcli_test bins/$(CONFIG)/grpc_credentials_test bins/$(CONFIG)/grpc_base64_test bins/$(CONFIG)/grpc_json_token_test bins/$(CONFIG)/timeout_encoding_test bins/$(CONFIG)/fd_posix_test bins/$(CONFIG)/fling_stream_test bins/$(CONFIG)/lame_client_test bins/$(CONFIG)/alarm_test bins/$(CONFIG)/alarm_list_test bins/$(CONFIG)/alarm_heap_test bins/$(CONFIG)/time_test bins/$(CONFIG)/chttp2_fake_security_cancel_after_accept_test bins/$(CONFIG)/chttp2_fake_security_cancel_after_accept_and_writes_closed_test bins/$(CONFIG)/chttp2_fake_security_cancel_after_invoke_test bins/$(CONFIG)/chttp2_fake_security_cancel_before_invoke_test bins/$(CONFIG)/chttp2_fake_security_cancel_in_a_vacuum_test bins/$(CONFIG)/chttp2_fake_security_census_simple_request_test bins/$(CONFIG)/chttp2_fake_security_disappearing_server_test bins/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test bins/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_tags_test bins/$(CONFIG)/chttp2_fake_security_invoke_large_request_test bins/$(CONFIG)/chttp2_fake_security_max_concurrent_streams_test bins/$(CONFIG)/chttp2_fake_security_no_op_test bins/$(CONFIG)/chttp2_fake_security_ping_pong_streaming_test bins/$(CONFIG)/chttp2_fake_security_request_response_with_binary_metadata_and_payload_test bins/$(CONFIG)/chttp2_fake_security_request_response_with_metadata_and_payload_test bins/$(CONFIG)/chttp2_fake_security_request_response_with_payload_test bins/$(CONFIG)/chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test bins/$(CONFIG)/chttp2_fake_security_simple_delayed_request_test bins/$(CONFIG)/chttp2_fake_security_simple_request_test bins/$(CONFIG)/chttp2_fake_security_thread_stress_test bins/$(CONFIG)/chttp2_fake_security_writes_done_hangs_with_pending_read_test bins/$(CONFIG)/chttp2_fullstack_cancel_after_accept_test bins/$(CONFIG)/chttp2_fullstack_cancel_after_accept_and_writes_closed_test bins/$(CONFIG)/chttp2_fullstack_cancel_after_invoke_test bins/$(CONFIG)/chttp2_fullstack_cancel_before_invoke_test bins/$(CONFIG)/chttp2_fullstack_cancel_in_a_vacuum_test bins/$(CONFIG)/chttp2_fullstack_census_simple_request_test bins/$(CONFIG)/chttp2_fullstack_disappearing_server_test bins/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test bins/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_tags_test bins/$(CONFIG)/chttp2_fullstack_invoke_large_request_test bins/$(CONFIG)/chttp2_fullstack_max_concurrent_streams_test bins/$(CONFIG)/chttp2_fullstack_no_op_test bins/$(CONFIG)/chttp2_fullstack_ping_pong_streaming_test bins/$(CONFIG)/chttp2_fullstack_request_response_with_binary_metadata_and_payload_test bins/$(CONFIG)/chttp2_fullstack_request_response_with_metadata_and_payload_test bins/$(CONFIG)/chttp2_fullstack_request_response_with_payload_test bins/$(CONFIG)/chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test bins/$(CONFIG)/chttp2_fullstack_simple_delayed_request_test bins/$(CONFIG)/chttp2_fullstack_simple_request_test bins/$(CONFIG)/chttp2_fullstack_thread_stress_test bins/$(CONFIG)/chttp2_fullstack_writes_done_hangs_with_pending_read_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_accept_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_invoke_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_before_invoke_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_census_simple_request_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_disappearing_server_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_invoke_large_request_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_max_concurrent_streams_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_no_op_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_ping_pong_streaming_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_payload_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_delayed_request_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_request_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_thread_stress_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_no_op_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test bins/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_test bins/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_and_writes_closed_test bins/$(CONFIG)/chttp2_socket_pair_cancel_after_invoke_test bins/$(CONFIG)/chttp2_socket_pair_cancel_before_invoke_test bins/$(CONFIG)/chttp2_socket_pair_cancel_in_a_vacuum_test bins/$(CONFIG)/chttp2_socket_pair_census_simple_request_test bins/$(CONFIG)/chttp2_socket_pair_disappearing_server_test bins/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test bins/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_tags_test bins/$(CONFIG)/chttp2_socket_pair_invoke_large_request_test bins/$(CONFIG)/chttp2_socket_pair_max_concurrent_streams_test bins/$(CONFIG)/chttp2_socket_pair_no_op_test bins/$(CONFIG)/chttp2_socket_pair_ping_pong_streaming_test bins/$(CONFIG)/chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test bins/$(CONFIG)/chttp2_socket_pair_request_response_with_metadata_and_payload_test bins/$(CONFIG)/chttp2_socket_pair_request_response_with_payload_test bins/$(CONFIG)/chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test bins/$(CONFIG)/chttp2_socket_pair_simple_delayed_request_test bins/$(CONFIG)/chttp2_socket_pair_simple_request_test bins/$(CONFIG)/chttp2_socket_pair_thread_stress_test bins/$(CONFIG)/chttp2_socket_pair_writes_done_hangs_with_pending_read_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_no_op_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_thread_stress_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test +buildtests_c: privatelibs_c bins/$(CONFIG)/alarm_heap_test bins/$(CONFIG)/alarm_list_test bins/$(CONFIG)/alarm_test bins/$(CONFIG)/alpn_test bins/$(CONFIG)/bin_encoder_test bins/$(CONFIG)/census_hash_table_test bins/$(CONFIG)/census_statistics_multiple_writers_circular_buffer_test bins/$(CONFIG)/census_statistics_multiple_writers_test bins/$(CONFIG)/census_statistics_performance_test bins/$(CONFIG)/census_statistics_quick_test bins/$(CONFIG)/census_statistics_small_log_test bins/$(CONFIG)/census_stub_test bins/$(CONFIG)/census_window_stats_test bins/$(CONFIG)/chttp2_status_conversion_test bins/$(CONFIG)/chttp2_stream_encoder_test bins/$(CONFIG)/chttp2_stream_map_test bins/$(CONFIG)/chttp2_transport_end2end_test bins/$(CONFIG)/dualstack_socket_test bins/$(CONFIG)/echo_client bins/$(CONFIG)/echo_server bins/$(CONFIG)/echo_test bins/$(CONFIG)/fd_posix_test bins/$(CONFIG)/fling_client bins/$(CONFIG)/fling_server bins/$(CONFIG)/fling_stream_test bins/$(CONFIG)/fling_test bins/$(CONFIG)/gpr_cancellable_test bins/$(CONFIG)/gpr_cmdline_test bins/$(CONFIG)/gpr_histogram_test bins/$(CONFIG)/gpr_host_port_test bins/$(CONFIG)/gpr_log_test bins/$(CONFIG)/gpr_slice_buffer_test bins/$(CONFIG)/gpr_slice_test bins/$(CONFIG)/gpr_string_test bins/$(CONFIG)/gpr_sync_test bins/$(CONFIG)/gpr_thd_test bins/$(CONFIG)/gpr_time_test bins/$(CONFIG)/gpr_useful_test bins/$(CONFIG)/grpc_base64_test bins/$(CONFIG)/grpc_byte_buffer_reader_test bins/$(CONFIG)/grpc_channel_stack_test bins/$(CONFIG)/grpc_completion_queue_test bins/$(CONFIG)/grpc_credentials_test bins/$(CONFIG)/grpc_json_token_test bins/$(CONFIG)/grpc_stream_op_test bins/$(CONFIG)/hpack_parser_test bins/$(CONFIG)/hpack_table_test bins/$(CONFIG)/httpcli_format_request_test bins/$(CONFIG)/httpcli_parser_test bins/$(CONFIG)/httpcli_test bins/$(CONFIG)/lame_client_test bins/$(CONFIG)/message_compress_test bins/$(CONFIG)/metadata_buffer_test bins/$(CONFIG)/murmur_hash_test bins/$(CONFIG)/no_server_test bins/$(CONFIG)/poll_kick_test bins/$(CONFIG)/resolve_address_test bins/$(CONFIG)/secure_endpoint_test bins/$(CONFIG)/sockaddr_utils_test bins/$(CONFIG)/tcp_client_posix_test bins/$(CONFIG)/tcp_posix_test bins/$(CONFIG)/tcp_server_posix_test bins/$(CONFIG)/time_averaged_stats_test bins/$(CONFIG)/time_test bins/$(CONFIG)/timeout_encoding_test bins/$(CONFIG)/transport_metadata_test bins/$(CONFIG)/chttp2_fake_security_cancel_after_accept_test bins/$(CONFIG)/chttp2_fake_security_cancel_after_accept_and_writes_closed_test bins/$(CONFIG)/chttp2_fake_security_cancel_after_invoke_test bins/$(CONFIG)/chttp2_fake_security_cancel_before_invoke_test bins/$(CONFIG)/chttp2_fake_security_cancel_in_a_vacuum_test bins/$(CONFIG)/chttp2_fake_security_census_simple_request_test bins/$(CONFIG)/chttp2_fake_security_disappearing_server_test bins/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test bins/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_tags_test bins/$(CONFIG)/chttp2_fake_security_graceful_server_shutdown_test bins/$(CONFIG)/chttp2_fake_security_invoke_large_request_test bins/$(CONFIG)/chttp2_fake_security_max_concurrent_streams_test bins/$(CONFIG)/chttp2_fake_security_no_op_test bins/$(CONFIG)/chttp2_fake_security_ping_pong_streaming_test bins/$(CONFIG)/chttp2_fake_security_request_response_with_binary_metadata_and_payload_test bins/$(CONFIG)/chttp2_fake_security_request_response_with_metadata_and_payload_test bins/$(CONFIG)/chttp2_fake_security_request_response_with_payload_test bins/$(CONFIG)/chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test bins/$(CONFIG)/chttp2_fake_security_simple_delayed_request_test bins/$(CONFIG)/chttp2_fake_security_simple_request_test bins/$(CONFIG)/chttp2_fake_security_thread_stress_test bins/$(CONFIG)/chttp2_fake_security_writes_done_hangs_with_pending_read_test bins/$(CONFIG)/chttp2_fullstack_cancel_after_accept_test bins/$(CONFIG)/chttp2_fullstack_cancel_after_accept_and_writes_closed_test bins/$(CONFIG)/chttp2_fullstack_cancel_after_invoke_test bins/$(CONFIG)/chttp2_fullstack_cancel_before_invoke_test bins/$(CONFIG)/chttp2_fullstack_cancel_in_a_vacuum_test bins/$(CONFIG)/chttp2_fullstack_census_simple_request_test bins/$(CONFIG)/chttp2_fullstack_disappearing_server_test bins/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test bins/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_tags_test bins/$(CONFIG)/chttp2_fullstack_graceful_server_shutdown_test bins/$(CONFIG)/chttp2_fullstack_invoke_large_request_test bins/$(CONFIG)/chttp2_fullstack_max_concurrent_streams_test bins/$(CONFIG)/chttp2_fullstack_no_op_test bins/$(CONFIG)/chttp2_fullstack_ping_pong_streaming_test bins/$(CONFIG)/chttp2_fullstack_request_response_with_binary_metadata_and_payload_test bins/$(CONFIG)/chttp2_fullstack_request_response_with_metadata_and_payload_test bins/$(CONFIG)/chttp2_fullstack_request_response_with_payload_test bins/$(CONFIG)/chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test bins/$(CONFIG)/chttp2_fullstack_simple_delayed_request_test bins/$(CONFIG)/chttp2_fullstack_simple_request_test bins/$(CONFIG)/chttp2_fullstack_thread_stress_test bins/$(CONFIG)/chttp2_fullstack_writes_done_hangs_with_pending_read_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_accept_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_invoke_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_before_invoke_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_census_simple_request_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_disappearing_server_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_graceful_server_shutdown_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_invoke_large_request_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_max_concurrent_streams_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_no_op_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_ping_pong_streaming_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_payload_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_delayed_request_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_request_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_thread_stress_test bins/$(CONFIG)/chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_no_op_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test bins/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_test bins/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_and_writes_closed_test bins/$(CONFIG)/chttp2_socket_pair_cancel_after_invoke_test bins/$(CONFIG)/chttp2_socket_pair_cancel_before_invoke_test bins/$(CONFIG)/chttp2_socket_pair_cancel_in_a_vacuum_test bins/$(CONFIG)/chttp2_socket_pair_census_simple_request_test bins/$(CONFIG)/chttp2_socket_pair_disappearing_server_test bins/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test bins/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_tags_test bins/$(CONFIG)/chttp2_socket_pair_graceful_server_shutdown_test bins/$(CONFIG)/chttp2_socket_pair_invoke_large_request_test bins/$(CONFIG)/chttp2_socket_pair_max_concurrent_streams_test bins/$(CONFIG)/chttp2_socket_pair_no_op_test bins/$(CONFIG)/chttp2_socket_pair_ping_pong_streaming_test bins/$(CONFIG)/chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test bins/$(CONFIG)/chttp2_socket_pair_request_response_with_metadata_and_payload_test bins/$(CONFIG)/chttp2_socket_pair_request_response_with_payload_test bins/$(CONFIG)/chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test bins/$(CONFIG)/chttp2_socket_pair_simple_delayed_request_test bins/$(CONFIG)/chttp2_socket_pair_simple_request_test bins/$(CONFIG)/chttp2_socket_pair_thread_stress_test bins/$(CONFIG)/chttp2_socket_pair_writes_done_hangs_with_pending_read_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_no_op_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_thread_stress_test bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test -buildtests_cxx: bins_dep_cxx privatelibs_cxx bins/thread_pool_test bins/status_test bins/sync_client_async_server_test bins/qps_client bins/qps_server bins/interop_server bins/interop_client bins/end2end_test bins/channel_arguments_test bins/credentials_test +buildtests_cxx: privatelibs_cxx bins/$(CONFIG)/channel_arguments_test bins/$(CONFIG)/credentials_test bins/$(CONFIG)/end2end_test bins/$(CONFIG)/interop_client bins/$(CONFIG)/interop_server bins/$(CONFIG)/qps_client bins/$(CONFIG)/qps_server bins/$(CONFIG)/status_test bins/$(CONFIG)/sync_client_async_server_test bins/$(CONFIG)/thread_pool_test test: test_c test_cxx test_c: buildtests_c - $(E) "[RUN] Testing grpc_byte_buffer_reader_test" - $(Q) ./bins/$(CONFIG)/grpc_byte_buffer_reader_test || ( echo test grpc_byte_buffer_reader_test failed ; exit 1 ) + $(E) "[RUN] Testing alarm_heap_test" + $(Q) ./bins/$(CONFIG)/alarm_heap_test || ( echo test alarm_heap_test failed ; exit 1 ) + $(E) "[RUN] Testing alarm_list_test" + $(Q) ./bins/$(CONFIG)/alarm_list_test || ( echo test alarm_list_test failed ; exit 1 ) + $(E) "[RUN] Testing alarm_test" + $(Q) ./bins/$(CONFIG)/alarm_test || ( echo test alarm_test failed ; exit 1 ) + $(E) "[RUN] Testing alpn_test" + $(Q) ./bins/$(CONFIG)/alpn_test || ( echo test alpn_test failed ; exit 1 ) + $(E) "[RUN] Testing bin_encoder_test" + $(Q) ./bins/$(CONFIG)/bin_encoder_test || ( echo test bin_encoder_test failed ; exit 1 ) + $(E) "[RUN] Testing census_hash_table_test" + $(Q) ./bins/$(CONFIG)/census_hash_table_test || ( echo test census_hash_table_test failed ; exit 1 ) + $(E) "[RUN] Testing census_statistics_multiple_writers_circular_buffer_test" + $(Q) ./bins/$(CONFIG)/census_statistics_multiple_writers_circular_buffer_test || ( echo test census_statistics_multiple_writers_circular_buffer_test failed ; exit 1 ) + $(E) "[RUN] Testing census_statistics_multiple_writers_test" + $(Q) ./bins/$(CONFIG)/census_statistics_multiple_writers_test || ( echo test census_statistics_multiple_writers_test failed ; exit 1 ) + $(E) "[RUN] Testing census_statistics_performance_test" + $(Q) ./bins/$(CONFIG)/census_statistics_performance_test || ( echo test census_statistics_performance_test failed ; exit 1 ) + $(E) "[RUN] Testing census_statistics_quick_test" + $(Q) ./bins/$(CONFIG)/census_statistics_quick_test || ( echo test census_statistics_quick_test failed ; exit 1 ) + $(E) "[RUN] Testing census_statistics_small_log_test" + $(Q) ./bins/$(CONFIG)/census_statistics_small_log_test || ( echo test census_statistics_small_log_test failed ; exit 1 ) + $(E) "[RUN] Testing census_stub_test" + $(Q) ./bins/$(CONFIG)/census_stub_test || ( echo test census_stub_test failed ; exit 1 ) + $(E) "[RUN] Testing census_window_stats_test" + $(Q) ./bins/$(CONFIG)/census_window_stats_test || ( echo test census_window_stats_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_status_conversion_test" + $(Q) ./bins/$(CONFIG)/chttp2_status_conversion_test || ( echo test chttp2_status_conversion_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_stream_encoder_test" + $(Q) ./bins/$(CONFIG)/chttp2_stream_encoder_test || ( echo test chttp2_stream_encoder_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_stream_map_test" + $(Q) ./bins/$(CONFIG)/chttp2_stream_map_test || ( echo test chttp2_stream_map_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_transport_end2end_test" + $(Q) ./bins/$(CONFIG)/chttp2_transport_end2end_test || ( echo test chttp2_transport_end2end_test failed ; exit 1 ) + $(E) "[RUN] Testing dualstack_socket_test" + $(Q) ./bins/$(CONFIG)/dualstack_socket_test || ( echo test dualstack_socket_test failed ; exit 1 ) + $(E) "[RUN] Testing echo_test" + $(Q) ./bins/$(CONFIG)/echo_test || ( echo test echo_test failed ; exit 1 ) + $(E) "[RUN] Testing fd_posix_test" + $(Q) ./bins/$(CONFIG)/fd_posix_test || ( echo test fd_posix_test failed ; exit 1 ) + $(E) "[RUN] Testing fling_stream_test" + $(Q) ./bins/$(CONFIG)/fling_stream_test || ( echo test fling_stream_test failed ; exit 1 ) + $(E) "[RUN] Testing fling_test" + $(Q) ./bins/$(CONFIG)/fling_test || ( echo test fling_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_cancellable_test" $(Q) ./bins/$(CONFIG)/gpr_cancellable_test || ( echo test gpr_cancellable_test failed ; exit 1 ) - $(E) "[RUN] Testing gpr_log_test" - $(Q) ./bins/$(CONFIG)/gpr_log_test || ( echo test gpr_log_test failed ; exit 1 ) - $(E) "[RUN] Testing gpr_useful_test" - $(Q) ./bins/$(CONFIG)/gpr_useful_test || ( echo test gpr_useful_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_cmdline_test" $(Q) ./bins/$(CONFIG)/gpr_cmdline_test || ( echo test gpr_cmdline_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_histogram_test" $(Q) ./bins/$(CONFIG)/gpr_histogram_test || ( echo test gpr_histogram_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_host_port_test" $(Q) ./bins/$(CONFIG)/gpr_host_port_test || ( echo test gpr_host_port_test failed ; exit 1 ) + $(E) "[RUN] Testing gpr_log_test" + $(Q) ./bins/$(CONFIG)/gpr_log_test || ( echo test gpr_log_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_slice_buffer_test" $(Q) ./bins/$(CONFIG)/gpr_slice_buffer_test || ( echo test gpr_slice_buffer_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_slice_test" @@ -526,102 +624,64 @@ test_c: buildtests_c $(Q) ./bins/$(CONFIG)/gpr_thd_test || ( echo test gpr_thd_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_time_test" $(Q) ./bins/$(CONFIG)/gpr_time_test || ( echo test gpr_time_test failed ; exit 1 ) - $(E) "[RUN] Testing murmur_hash_test" - $(Q) ./bins/$(CONFIG)/murmur_hash_test || ( echo test murmur_hash_test failed ; exit 1 ) + $(E) "[RUN] Testing gpr_useful_test" + $(Q) ./bins/$(CONFIG)/gpr_useful_test || ( echo test gpr_useful_test failed ; exit 1 ) + $(E) "[RUN] Testing grpc_base64_test" + $(Q) ./bins/$(CONFIG)/grpc_base64_test || ( echo test grpc_base64_test failed ; exit 1 ) + $(E) "[RUN] Testing grpc_byte_buffer_reader_test" + $(Q) ./bins/$(CONFIG)/grpc_byte_buffer_reader_test || ( echo test grpc_byte_buffer_reader_test failed ; exit 1 ) + $(E) "[RUN] Testing grpc_channel_stack_test" + $(Q) ./bins/$(CONFIG)/grpc_channel_stack_test || ( echo test grpc_channel_stack_test failed ; exit 1 ) + $(E) "[RUN] Testing grpc_completion_queue_test" + $(Q) ./bins/$(CONFIG)/grpc_completion_queue_test || ( echo test grpc_completion_queue_test failed ; exit 1 ) + $(E) "[RUN] Testing grpc_credentials_test" + $(Q) ./bins/$(CONFIG)/grpc_credentials_test || ( echo test grpc_credentials_test failed ; exit 1 ) + $(E) "[RUN] Testing grpc_json_token_test" + $(Q) ./bins/$(CONFIG)/grpc_json_token_test || ( echo test grpc_json_token_test failed ; exit 1 ) $(E) "[RUN] Testing grpc_stream_op_test" $(Q) ./bins/$(CONFIG)/grpc_stream_op_test || ( echo test grpc_stream_op_test failed ; exit 1 ) - $(E) "[RUN] Testing alpn_test" - $(Q) ./bins/$(CONFIG)/alpn_test || ( echo test alpn_test failed ; exit 1 ) - $(E) "[RUN] Testing time_averaged_stats_test" - $(Q) ./bins/$(CONFIG)/time_averaged_stats_test || ( echo test time_averaged_stats_test failed ; exit 1 ) - $(E) "[RUN] Testing chttp2_stream_encoder_test" - $(Q) ./bins/$(CONFIG)/chttp2_stream_encoder_test || ( echo test chttp2_stream_encoder_test failed ; exit 1 ) - $(E) "[RUN] Testing hpack_table_test" - $(Q) ./bins/$(CONFIG)/hpack_table_test || ( echo test hpack_table_test failed ; exit 1 ) - $(E) "[RUN] Testing chttp2_stream_map_test" - $(Q) ./bins/$(CONFIG)/chttp2_stream_map_test || ( echo test chttp2_stream_map_test failed ; exit 1 ) $(E) "[RUN] Testing hpack_parser_test" $(Q) ./bins/$(CONFIG)/hpack_parser_test || ( echo test hpack_parser_test failed ; exit 1 ) - $(E) "[RUN] Testing transport_metadata_test" - $(Q) ./bins/$(CONFIG)/transport_metadata_test || ( echo test transport_metadata_test failed ; exit 1 ) - $(E) "[RUN] Testing chttp2_status_conversion_test" - $(Q) ./bins/$(CONFIG)/chttp2_status_conversion_test || ( echo test chttp2_status_conversion_test failed ; exit 1 ) - $(E) "[RUN] Testing chttp2_transport_end2end_test" - $(Q) ./bins/$(CONFIG)/chttp2_transport_end2end_test || ( echo test chttp2_transport_end2end_test failed ; exit 1 ) - $(E) "[RUN] Testing tcp_posix_test" - $(Q) ./bins/$(CONFIG)/tcp_posix_test || ( echo test tcp_posix_test failed ; exit 1 ) - $(E) "[RUN] Testing dualstack_socket_test" - $(Q) ./bins/$(CONFIG)/dualstack_socket_test || ( echo test dualstack_socket_test failed ; exit 1 ) + $(E) "[RUN] Testing hpack_table_test" + $(Q) ./bins/$(CONFIG)/hpack_table_test || ( echo test hpack_table_test failed ; exit 1 ) + $(E) "[RUN] Testing httpcli_format_request_test" + $(Q) ./bins/$(CONFIG)/httpcli_format_request_test || ( echo test httpcli_format_request_test failed ; exit 1 ) + $(E) "[RUN] Testing httpcli_parser_test" + $(Q) ./bins/$(CONFIG)/httpcli_parser_test || ( echo test httpcli_parser_test failed ; exit 1 ) + $(E) "[RUN] Testing httpcli_test" + $(Q) ./bins/$(CONFIG)/httpcli_test || ( echo test httpcli_test failed ; exit 1 ) + $(E) "[RUN] Testing lame_client_test" + $(Q) ./bins/$(CONFIG)/lame_client_test || ( echo test lame_client_test failed ; exit 1 ) + $(E) "[RUN] Testing message_compress_test" + $(Q) ./bins/$(CONFIG)/message_compress_test || ( echo test message_compress_test failed ; exit 1 ) + $(E) "[RUN] Testing metadata_buffer_test" + $(Q) ./bins/$(CONFIG)/metadata_buffer_test || ( echo test metadata_buffer_test failed ; exit 1 ) + $(E) "[RUN] Testing murmur_hash_test" + $(Q) ./bins/$(CONFIG)/murmur_hash_test || ( echo test murmur_hash_test failed ; exit 1 ) $(E) "[RUN] Testing no_server_test" $(Q) ./bins/$(CONFIG)/no_server_test || ( echo test no_server_test failed ; exit 1 ) + $(E) "[RUN] Testing poll_kick_test" + $(Q) ./bins/$(CONFIG)/poll_kick_test || ( echo test poll_kick_test failed ; exit 1 ) $(E) "[RUN] Testing resolve_address_test" $(Q) ./bins/$(CONFIG)/resolve_address_test || ( echo test resolve_address_test failed ; exit 1 ) + $(E) "[RUN] Testing secure_endpoint_test" + $(Q) ./bins/$(CONFIG)/secure_endpoint_test || ( echo test secure_endpoint_test failed ; exit 1 ) $(E) "[RUN] Testing sockaddr_utils_test" $(Q) ./bins/$(CONFIG)/sockaddr_utils_test || ( echo test sockaddr_utils_test failed ; exit 1 ) - $(E) "[RUN] Testing tcp_server_posix_test" - $(Q) ./bins/$(CONFIG)/tcp_server_posix_test || ( echo test tcp_server_posix_test failed ; exit 1 ) $(E) "[RUN] Testing tcp_client_posix_test" $(Q) ./bins/$(CONFIG)/tcp_client_posix_test || ( echo test tcp_client_posix_test failed ; exit 1 ) - $(E) "[RUN] Testing grpc_channel_stack_test" - $(Q) ./bins/$(CONFIG)/grpc_channel_stack_test || ( echo test grpc_channel_stack_test failed ; exit 1 ) - $(E) "[RUN] Testing metadata_buffer_test" - $(Q) ./bins/$(CONFIG)/metadata_buffer_test || ( echo test metadata_buffer_test failed ; exit 1 ) - $(E) "[RUN] Testing grpc_completion_queue_test" - $(Q) ./bins/$(CONFIG)/grpc_completion_queue_test || ( echo test grpc_completion_queue_test failed ; exit 1 ) - $(E) "[RUN] Testing census_window_stats_test" - $(Q) ./bins/$(CONFIG)/census_window_stats_test || ( echo test census_window_stats_test failed ; exit 1 ) - $(E) "[RUN] Testing census_statistics_quick_test" - $(Q) ./bins/$(CONFIG)/census_statistics_quick_test || ( echo test census_statistics_quick_test failed ; exit 1 ) - $(E) "[RUN] Testing census_statistics_small_log_test" - $(Q) ./bins/$(CONFIG)/census_statistics_small_log_test || ( echo test census_statistics_small_log_test failed ; exit 1 ) - $(E) "[RUN] Testing census_statistics_performance_test" - $(Q) ./bins/$(CONFIG)/census_statistics_performance_test || ( echo test census_statistics_performance_test failed ; exit 1 ) - $(E) "[RUN] Testing census_statistics_multiple_writers_test" - $(Q) ./bins/$(CONFIG)/census_statistics_multiple_writers_test || ( echo test census_statistics_multiple_writers_test failed ; exit 1 ) - $(E) "[RUN] Testing census_statistics_multiple_writers_circular_buffer_test" - $(Q) ./bins/$(CONFIG)/census_statistics_multiple_writers_circular_buffer_test || ( echo test census_statistics_multiple_writers_circular_buffer_test failed ; exit 1 ) - $(E) "[RUN] Testing census_stub_test" - $(Q) ./bins/$(CONFIG)/census_stub_test || ( echo test census_stub_test failed ; exit 1 ) - $(E) "[RUN] Testing census_hash_table_test" - $(Q) ./bins/$(CONFIG)/census_hash_table_test || ( echo test census_hash_table_test failed ; exit 1 ) - $(E) "[RUN] Testing fling_test" - $(Q) ./bins/$(CONFIG)/fling_test || ( echo test fling_test failed ; exit 1 ) - $(E) "[RUN] Testing echo_test" - $(Q) ./bins/$(CONFIG)/echo_test || ( echo test echo_test failed ; exit 1 ) - $(E) "[RUN] Testing message_compress_test" - $(Q) ./bins/$(CONFIG)/message_compress_test || ( echo test message_compress_test failed ; exit 1 ) - $(E) "[RUN] Testing bin_encoder_test" - $(Q) ./bins/$(CONFIG)/bin_encoder_test || ( echo test bin_encoder_test failed ; exit 1 ) - $(E) "[RUN] Testing secure_endpoint_test" - $(Q) ./bins/$(CONFIG)/secure_endpoint_test || ( echo test secure_endpoint_test failed ; exit 1 ) - $(E) "[RUN] Testing httpcli_format_request_test" - $(Q) ./bins/$(CONFIG)/httpcli_format_request_test || ( echo test httpcli_format_request_test failed ; exit 1 ) - $(E) "[RUN] Testing httpcli_parser_test" - $(Q) ./bins/$(CONFIG)/httpcli_parser_test || ( echo test httpcli_parser_test failed ; exit 1 ) - $(E) "[RUN] Testing httpcli_test" - $(Q) ./bins/$(CONFIG)/httpcli_test || ( echo test httpcli_test failed ; exit 1 ) - $(E) "[RUN] Testing grpc_credentials_test" - $(Q) ./bins/$(CONFIG)/grpc_credentials_test || ( echo test grpc_credentials_test failed ; exit 1 ) - $(E) "[RUN] Testing grpc_base64_test" - $(Q) ./bins/$(CONFIG)/grpc_base64_test || ( echo test grpc_base64_test failed ; exit 1 ) - $(E) "[RUN] Testing grpc_json_token_test" - $(Q) ./bins/$(CONFIG)/grpc_json_token_test || ( echo test grpc_json_token_test failed ; exit 1 ) - $(E) "[RUN] Testing timeout_encoding_test" - $(Q) ./bins/$(CONFIG)/timeout_encoding_test || ( echo test timeout_encoding_test failed ; exit 1 ) - $(E) "[RUN] Testing fd_posix_test" - $(Q) ./bins/$(CONFIG)/fd_posix_test || ( echo test fd_posix_test failed ; exit 1 ) - $(E) "[RUN] Testing fling_stream_test" - $(Q) ./bins/$(CONFIG)/fling_stream_test || ( echo test fling_stream_test failed ; exit 1 ) - $(E) "[RUN] Testing lame_client_test" - $(Q) ./bins/$(CONFIG)/lame_client_test || ( echo test lame_client_test failed ; exit 1 ) - $(E) "[RUN] Testing alarm_test" - $(Q) ./bins/$(CONFIG)/alarm_test || ( echo test alarm_test failed ; exit 1 ) - $(E) "[RUN] Testing alarm_list_test" - $(Q) ./bins/$(CONFIG)/alarm_list_test || ( echo test alarm_list_test failed ; exit 1 ) - $(E) "[RUN] Testing alarm_heap_test" - $(Q) ./bins/$(CONFIG)/alarm_heap_test || ( echo test alarm_heap_test failed ; exit 1 ) + $(E) "[RUN] Testing tcp_posix_test" + $(Q) ./bins/$(CONFIG)/tcp_posix_test || ( echo test tcp_posix_test failed ; exit 1 ) + $(E) "[RUN] Testing tcp_server_posix_test" + $(Q) ./bins/$(CONFIG)/tcp_server_posix_test || ( echo test tcp_server_posix_test failed ; exit 1 ) + $(E) "[RUN] Testing time_averaged_stats_test" + $(Q) ./bins/$(CONFIG)/time_averaged_stats_test || ( echo test time_averaged_stats_test failed ; exit 1 ) $(E) "[RUN] Testing time_test" $(Q) ./bins/$(CONFIG)/time_test || ( echo test time_test failed ; exit 1 ) + $(E) "[RUN] Testing timeout_encoding_test" + $(Q) ./bins/$(CONFIG)/timeout_encoding_test || ( echo test timeout_encoding_test failed ; exit 1 ) + $(E) "[RUN] Testing transport_metadata_test" + $(Q) ./bins/$(CONFIG)/transport_metadata_test || ( echo test transport_metadata_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fake_security_cancel_after_accept_test" $(Q) ./bins/$(CONFIG)/chttp2_fake_security_cancel_after_accept_test || ( echo test chttp2_fake_security_cancel_after_accept_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fake_security_cancel_after_accept_and_writes_closed_test" @@ -640,6 +700,8 @@ test_c: buildtests_c $(Q) ./bins/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test || ( echo test chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fake_security_early_server_shutdown_finishes_tags_test" $(Q) ./bins/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_tags_test || ( echo test chttp2_fake_security_early_server_shutdown_finishes_tags_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_fake_security_graceful_server_shutdown_test" + $(Q) ./bins/$(CONFIG)/chttp2_fake_security_graceful_server_shutdown_test || ( echo test chttp2_fake_security_graceful_server_shutdown_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fake_security_invoke_large_request_test" $(Q) ./bins/$(CONFIG)/chttp2_fake_security_invoke_large_request_test || ( echo test chttp2_fake_security_invoke_large_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fake_security_max_concurrent_streams_test" @@ -682,6 +744,8 @@ test_c: buildtests_c $(Q) ./bins/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test || ( echo test chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_early_server_shutdown_finishes_tags_test" $(Q) ./bins/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_tags_test || ( echo test chttp2_fullstack_early_server_shutdown_finishes_tags_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_fullstack_graceful_server_shutdown_test" + $(Q) ./bins/$(CONFIG)/chttp2_fullstack_graceful_server_shutdown_test || ( echo test chttp2_fullstack_graceful_server_shutdown_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_invoke_large_request_test" $(Q) ./bins/$(CONFIG)/chttp2_fullstack_invoke_large_request_test || ( echo test chttp2_fullstack_invoke_large_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_fullstack_max_concurrent_streams_test" @@ -724,6 +788,8 @@ test_c: buildtests_c $(Q) ./bins/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test || ( echo test chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test" $(Q) ./bins/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test || ( echo test chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_simple_ssl_fullstack_graceful_server_shutdown_test" + $(Q) ./bins/$(CONFIG)/chttp2_simple_ssl_fullstack_graceful_server_shutdown_test || ( echo test chttp2_simple_ssl_fullstack_graceful_server_shutdown_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_simple_ssl_fullstack_invoke_large_request_test" $(Q) ./bins/$(CONFIG)/chttp2_simple_ssl_fullstack_invoke_large_request_test || ( echo test chttp2_simple_ssl_fullstack_invoke_large_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_simple_ssl_fullstack_max_concurrent_streams_test" @@ -766,6 +832,8 @@ test_c: buildtests_c $(Q) ./bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test || ( echo test chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test" $(Q) ./bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test || ( echo test chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_test" + $(Q) ./bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_test || ( echo test chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test" $(Q) ./bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test || ( echo test chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test" @@ -808,6 +876,8 @@ test_c: buildtests_c $(Q) ./bins/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test || ( echo test chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_early_server_shutdown_finishes_tags_test" $(Q) ./bins/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_tags_test || ( echo test chttp2_socket_pair_early_server_shutdown_finishes_tags_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_graceful_server_shutdown_test" + $(Q) ./bins/$(CONFIG)/chttp2_socket_pair_graceful_server_shutdown_test || ( echo test chttp2_socket_pair_graceful_server_shutdown_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_invoke_large_request_test" $(Q) ./bins/$(CONFIG)/chttp2_socket_pair_invoke_large_request_test || ( echo test chttp2_socket_pair_invoke_large_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_max_concurrent_streams_test" @@ -850,6 +920,8 @@ test_c: buildtests_c $(Q) ./bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test || ( echo test chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test" $(Q) ./bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test || ( echo test chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test failed ; exit 1 ) + $(E) "[RUN] Testing chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_test" + $(Q) ./bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_test || ( echo test chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test" $(Q) ./bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test || ( echo test chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test" @@ -877,28 +949,26 @@ test_c: buildtests_c test_cxx: buildtests_cxx - $(E) "[RUN] Testing thread_pool_test" - $(Q) ./bins/$(CONFIG)/thread_pool_test || ( echo test thread_pool_test failed ; exit 1 ) - $(E) "[RUN] Testing status_test" - $(Q) ./bins/$(CONFIG)/status_test || ( echo test status_test failed ; exit 1 ) - $(E) "[RUN] Testing sync_client_async_server_test" - $(Q) ./bins/$(CONFIG)/sync_client_async_server_test || ( echo test sync_client_async_server_test failed ; exit 1 ) - $(E) "[RUN] Testing qps_client" - $(Q) ./bins/$(CONFIG)/qps_client || ( echo test qps_client failed ; exit 1 ) - $(E) "[RUN] Testing qps_server" - $(Q) ./bins/$(CONFIG)/qps_server || ( echo test qps_server failed ; exit 1 ) - $(E) "[RUN] Testing end2end_test" - $(Q) ./bins/$(CONFIG)/end2end_test || ( echo test end2end_test failed ; exit 1 ) $(E) "[RUN] Testing channel_arguments_test" $(Q) ./bins/$(CONFIG)/channel_arguments_test || ( echo test channel_arguments_test failed ; exit 1 ) $(E) "[RUN] Testing credentials_test" $(Q) ./bins/$(CONFIG)/credentials_test || ( echo test credentials_test failed ; exit 1 ) + $(E) "[RUN] Testing end2end_test" + $(Q) ./bins/$(CONFIG)/end2end_test || ( echo test end2end_test failed ; exit 1 ) + $(E) "[RUN] Testing qps_client" + $(Q) ./bins/$(CONFIG)/qps_client || ( echo test qps_client failed ; exit 1 ) + $(E) "[RUN] Testing qps_server" + $(Q) ./bins/$(CONFIG)/qps_server || ( echo test qps_server failed ; exit 1 ) + $(E) "[RUN] Testing status_test" + $(Q) ./bins/$(CONFIG)/status_test || ( echo test status_test failed ; exit 1 ) + $(E) "[RUN] Testing sync_client_async_server_test" + $(Q) ./bins/$(CONFIG)/sync_client_async_server_test || ( echo test sync_client_async_server_test failed ; exit 1 ) + $(E) "[RUN] Testing thread_pool_test" + $(Q) ./bins/$(CONFIG)/thread_pool_test || ( echo test thread_pool_test failed ; exit 1 ) tools: privatelibs bins/$(CONFIG)/gen_hpack_tables bins/$(CONFIG)/grpc_fetch_oauth2 -protoc_plugins: bins/$(CONFIG)/cpp_plugin bins/$(CONFIG)/ruby_plugin bins/$(CONFIG)/go_plugin - buildbenchmarks: privatelibs bins/$(CONFIG)/grpc_completion_queue_benchmark bins/$(CONFIG)/low_level_ping_pong_benchmark benchmarks: buildbenchmarks @@ -909,6 +979,11 @@ strip-static: strip-static_c strip-static_cxx strip-shared: strip-shared_c strip-shared_cxx + +# TODO(nnoble): the strip target is stripping in-place, instead +# of copying files in a temporary folder. +# This prevents proper debugging after running make install. + strip-static_c: static_c $(E) "[STRIP] Stripping libgpr.a" $(Q) $(STRIP) libs/$(CONFIG)/libgpr.a @@ -933,100 +1008,62 @@ strip-shared_cxx: shared_cxx $(E) "[STRIP] Stripping libgrpc++.so" $(Q) $(STRIP) libs/$(CONFIG)/libgrpc++.$(SHARED_EXT) -deps/$(CONFIG)/gens/test/cpp/interop/empty.pb.dep: - $(Q) mkdir -p `dirname $@` - $(Q) touch $@ - -gens/test/cpp/interop/empty.pb.cc: test/cpp/interop/empty.proto protoc_plugins +gens/test/cpp/interop/empty.pb.cc: test/cpp/interop/empty.proto $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=gens --grpc_out=gens --plugin=protoc-gen-grpc=bins/$(CONFIG)/cpp_plugin $< -deps/$(CONFIG)/gens/test/cpp/interop/messages.pb.dep: - $(Q) mkdir -p `dirname $@` - $(Q) touch $@ - -gens/test/cpp/interop/messages.pb.cc: test/cpp/interop/messages.proto protoc_plugins +gens/test/cpp/interop/messages.pb.cc: test/cpp/interop/messages.proto $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=gens --grpc_out=gens --plugin=protoc-gen-grpc=bins/$(CONFIG)/cpp_plugin $< -deps/$(CONFIG)/gens/test/cpp/interop/test.pb.dep: - $(Q) mkdir -p `dirname $@` - $(Q) touch $@ - -gens/test/cpp/interop/test.pb.cc: test/cpp/interop/test.proto protoc_plugins +gens/test/cpp/interop/test.pb.cc: test/cpp/interop/test.proto $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=gens --grpc_out=gens --plugin=protoc-gen-grpc=bins/$(CONFIG)/cpp_plugin $< -deps/$(CONFIG)/gens/test/cpp/util/echo.pb.dep: - $(Q) mkdir -p `dirname $@` - $(Q) touch $@ - -gens/test/cpp/util/echo.pb.cc: test/cpp/util/echo.proto protoc_plugins +gens/test/cpp/qps/qpstest.pb.cc: test/cpp/qps/qpstest.proto $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=gens --grpc_out=gens --plugin=protoc-gen-grpc=bins/$(CONFIG)/cpp_plugin $< -deps/$(CONFIG)/gens/test/cpp/util/echo_duplicate.pb.dep: - $(Q) mkdir -p `dirname $@` - $(Q) touch $@ - -gens/test/cpp/util/echo_duplicate.pb.cc: test/cpp/util/echo_duplicate.proto protoc_plugins +gens/test/cpp/util/echo.pb.cc: test/cpp/util/echo.proto $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=gens --grpc_out=gens --plugin=protoc-gen-grpc=bins/$(CONFIG)/cpp_plugin $< -deps/$(CONFIG)/gens/test/cpp/util/messages.pb.dep: - $(Q) mkdir -p `dirname $@` - $(Q) touch $@ - -gens/test/cpp/util/messages.pb.cc: test/cpp/util/messages.proto protoc_plugins +gens/test/cpp/util/echo_duplicate.pb.cc: test/cpp/util/echo_duplicate.proto $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=gens --grpc_out=gens --plugin=protoc-gen-grpc=bins/$(CONFIG)/cpp_plugin $< - -deps/$(CONFIG)/%.dep : %.c - $(E) "[DEP] Generating dependencies for $<" +gens/test/cpp/util/messages.pb.cc: test/cpp/util/messages.proto $(PROTOC_PLUGINS) + $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(CC) $(CFLAGS) $(CPPFLAGS_NO_ARCH) -MG -M $< > $@ + $(Q) $(PROTOC) --cpp_out=gens --grpc_out=gens --plugin=protoc-gen-grpc=bins/$(CONFIG)/cpp_plugin $< -deps/$(CONFIG)/%.dep : %.cc - $(E) "[DEP] Generating dependencies for $<" - $(Q) mkdir -p `dirname $@` - $(Q) $(CXX) $(CXXFLAGS) $(CPPFLAGS_NO_ARCH) -MG -M $< > $@ objs/$(CONFIG)/%.o : %.c $(E) "[C] Compiling $<" $(Q) mkdir -p `dirname $@` - $(Q) $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + $(Q) $(CC) $(CFLAGS) $(CPPFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $< objs/$(CONFIG)/%.o : gens/%.pb.cc $(E) "[CXX] Compiling $<" $(Q) mkdir -p `dirname $@` - $(Q) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< + $(Q) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $< objs/$(CONFIG)/src/compiler/%.o : src/compiler/%.cc $(E) "[HOSTCXX] Compiling $<" $(Q) mkdir -p `dirname $@` - $(Q) $(HOST_CXX) $(HOST_CXXFLAGS) $(HOST_CPPFLAGS) -c -o $@ $< + $(Q) $(HOST_CXX) $(HOST_CXXFLAGS) $(HOST_CPPFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $< objs/$(CONFIG)/%.o : %.cc $(E) "[CXX] Compiling $<" $(Q) mkdir -p `dirname $@` - $(Q) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< - -dep: dep_c dep_cxx - -dep_c: deps_libgpr deps_libgrpc deps_libgrpc_unsecure deps_libgpr_test_util deps_libgrpc_test_util deps_libend2end_fixture_chttp2_fake_security deps_libend2end_fixture_chttp2_fullstack deps_libend2end_fixture_chttp2_simple_ssl_fullstack deps_libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack deps_libend2end_fixture_chttp2_socket_pair deps_libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time deps_libend2end_test_cancel_after_accept deps_libend2end_test_cancel_after_accept_and_writes_closed deps_libend2end_test_cancel_after_invoke deps_libend2end_test_cancel_before_invoke deps_libend2end_test_cancel_in_a_vacuum deps_libend2end_test_census_simple_request deps_libend2end_test_disappearing_server deps_libend2end_test_early_server_shutdown_finishes_inflight_calls deps_libend2end_test_early_server_shutdown_finishes_tags deps_libend2end_test_invoke_large_request deps_libend2end_test_max_concurrent_streams deps_libend2end_test_no_op deps_libend2end_test_ping_pong_streaming deps_libend2end_test_request_response_with_binary_metadata_and_payload deps_libend2end_test_request_response_with_metadata_and_payload deps_libend2end_test_request_response_with_payload deps_libend2end_test_request_response_with_trailing_metadata_and_payload deps_libend2end_test_simple_delayed_request deps_libend2end_test_simple_request deps_libend2end_test_thread_stress deps_libend2end_test_writes_done_hangs_with_pending_read deps_libend2end_certs + $(Q) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $< -bins_dep_c: deps_gen_hpack_tables deps_grpc_byte_buffer_reader_test deps_gpr_cancellable_test deps_gpr_log_test deps_gpr_useful_test deps_gpr_cmdline_test deps_gpr_histogram_test deps_gpr_host_port_test deps_gpr_slice_buffer_test deps_gpr_slice_test deps_gpr_string_test deps_gpr_sync_test deps_gpr_thd_test deps_gpr_time_test deps_murmur_hash_test deps_grpc_stream_op_test deps_alpn_test deps_time_averaged_stats_test deps_chttp2_stream_encoder_test deps_hpack_table_test deps_chttp2_stream_map_test deps_hpack_parser_test deps_transport_metadata_test deps_chttp2_status_conversion_test deps_chttp2_transport_end2end_test deps_tcp_posix_test deps_dualstack_socket_test deps_no_server_test deps_resolve_address_test deps_sockaddr_utils_test deps_tcp_server_posix_test deps_tcp_client_posix_test deps_grpc_channel_stack_test deps_metadata_buffer_test deps_grpc_completion_queue_test deps_grpc_completion_queue_benchmark deps_census_trace_store_test deps_census_stats_store_test deps_census_window_stats_test deps_census_statistics_quick_test deps_census_statistics_small_log_test deps_census_statistics_performance_test deps_census_statistics_multiple_writers_test deps_census_statistics_multiple_writers_circular_buffer_test deps_census_stub_test deps_census_hash_table_test deps_fling_server deps_fling_client deps_fling_test deps_echo_server deps_echo_client deps_echo_test deps_low_level_ping_pong_benchmark deps_message_compress_test deps_bin_encoder_test deps_secure_endpoint_test deps_httpcli_format_request_test deps_httpcli_parser_test deps_httpcli_test deps_grpc_credentials_test deps_grpc_fetch_oauth2 deps_grpc_base64_test deps_grpc_json_token_test deps_timeout_encoding_test deps_fd_posix_test deps_fling_stream_test deps_lame_client_test deps_alarm_test deps_alarm_list_test deps_alarm_heap_test deps_time_test deps_chttp2_fake_security_cancel_after_accept_test deps_chttp2_fake_security_cancel_after_accept_and_writes_closed_test deps_chttp2_fake_security_cancel_after_invoke_test deps_chttp2_fake_security_cancel_before_invoke_test deps_chttp2_fake_security_cancel_in_a_vacuum_test deps_chttp2_fake_security_census_simple_request_test deps_chttp2_fake_security_disappearing_server_test deps_chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_fake_security_early_server_shutdown_finishes_tags_test deps_chttp2_fake_security_invoke_large_request_test deps_chttp2_fake_security_max_concurrent_streams_test deps_chttp2_fake_security_no_op_test deps_chttp2_fake_security_ping_pong_streaming_test deps_chttp2_fake_security_request_response_with_binary_metadata_and_payload_test deps_chttp2_fake_security_request_response_with_metadata_and_payload_test deps_chttp2_fake_security_request_response_with_payload_test deps_chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test deps_chttp2_fake_security_simple_delayed_request_test deps_chttp2_fake_security_simple_request_test deps_chttp2_fake_security_thread_stress_test deps_chttp2_fake_security_writes_done_hangs_with_pending_read_test deps_chttp2_fullstack_cancel_after_accept_test deps_chttp2_fullstack_cancel_after_accept_and_writes_closed_test deps_chttp2_fullstack_cancel_after_invoke_test deps_chttp2_fullstack_cancel_before_invoke_test deps_chttp2_fullstack_cancel_in_a_vacuum_test deps_chttp2_fullstack_census_simple_request_test deps_chttp2_fullstack_disappearing_server_test deps_chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_fullstack_early_server_shutdown_finishes_tags_test deps_chttp2_fullstack_invoke_large_request_test deps_chttp2_fullstack_max_concurrent_streams_test deps_chttp2_fullstack_no_op_test deps_chttp2_fullstack_ping_pong_streaming_test deps_chttp2_fullstack_request_response_with_binary_metadata_and_payload_test deps_chttp2_fullstack_request_response_with_metadata_and_payload_test deps_chttp2_fullstack_request_response_with_payload_test deps_chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test deps_chttp2_fullstack_simple_delayed_request_test deps_chttp2_fullstack_simple_request_test deps_chttp2_fullstack_thread_stress_test deps_chttp2_fullstack_writes_done_hangs_with_pending_read_test deps_chttp2_simple_ssl_fullstack_cancel_after_accept_test deps_chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test deps_chttp2_simple_ssl_fullstack_cancel_after_invoke_test deps_chttp2_simple_ssl_fullstack_cancel_before_invoke_test deps_chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test deps_chttp2_simple_ssl_fullstack_census_simple_request_test deps_chttp2_simple_ssl_fullstack_disappearing_server_test deps_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test deps_chttp2_simple_ssl_fullstack_invoke_large_request_test deps_chttp2_simple_ssl_fullstack_max_concurrent_streams_test deps_chttp2_simple_ssl_fullstack_no_op_test deps_chttp2_simple_ssl_fullstack_ping_pong_streaming_test deps_chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test deps_chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test deps_chttp2_simple_ssl_fullstack_request_response_with_payload_test deps_chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test deps_chttp2_simple_ssl_fullstack_simple_delayed_request_test deps_chttp2_simple_ssl_fullstack_simple_request_test deps_chttp2_simple_ssl_fullstack_thread_stress_test deps_chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test deps_chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test deps_chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test deps_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test deps_chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test deps_chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test deps_chttp2_simple_ssl_with_oauth2_fullstack_no_op_test deps_chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test deps_chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test deps_chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test deps_chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test deps_chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test deps_chttp2_socket_pair_cancel_after_accept_test deps_chttp2_socket_pair_cancel_after_accept_and_writes_closed_test deps_chttp2_socket_pair_cancel_after_invoke_test deps_chttp2_socket_pair_cancel_before_invoke_test deps_chttp2_socket_pair_cancel_in_a_vacuum_test deps_chttp2_socket_pair_census_simple_request_test deps_chttp2_socket_pair_disappearing_server_test deps_chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_socket_pair_early_server_shutdown_finishes_tags_test deps_chttp2_socket_pair_invoke_large_request_test deps_chttp2_socket_pair_max_concurrent_streams_test deps_chttp2_socket_pair_no_op_test deps_chttp2_socket_pair_ping_pong_streaming_test deps_chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test deps_chttp2_socket_pair_request_response_with_metadata_and_payload_test deps_chttp2_socket_pair_request_response_with_payload_test deps_chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test deps_chttp2_socket_pair_simple_delayed_request_test deps_chttp2_socket_pair_simple_request_test deps_chttp2_socket_pair_thread_stress_test deps_chttp2_socket_pair_writes_done_hangs_with_pending_read_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test deps_chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test deps_chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test deps_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test deps_chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test deps_chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test deps_chttp2_socket_pair_one_byte_at_a_time_no_op_test deps_chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test deps_chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test deps_chttp2_socket_pair_one_byte_at_a_time_simple_request_test deps_chttp2_socket_pair_one_byte_at_a_time_thread_stress_test deps_chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test - -dep_cxx: deps_libgrpc++ deps_libgrpc++_test_util - -bins_dep_cxx: deps_cpp_plugin deps_ruby_plugin deps_go_plugin deps_thread_pool_test deps_status_test deps_sync_client_async_server_test deps_qps_client deps_qps_server deps_interop_server deps_interop_client deps_end2end_test deps_channel_arguments_test deps_credentials_test install: install_c install_cxx @@ -1116,8 +1153,8 @@ ifneq ($(SYSTEM),Darwin) endif endif -clean: clean_libgpr clean_libgrpc clean_libgrpc_unsecure clean_libgpr_test_util clean_libgrpc_test_util clean_libgrpc++ clean_libgrpc++_test_util clean_libend2end_fixture_chttp2_fake_security clean_libend2end_fixture_chttp2_fullstack clean_libend2end_fixture_chttp2_simple_ssl_fullstack clean_libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack clean_libend2end_fixture_chttp2_socket_pair clean_libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time clean_libend2end_test_cancel_after_accept clean_libend2end_test_cancel_after_accept_and_writes_closed clean_libend2end_test_cancel_after_invoke clean_libend2end_test_cancel_before_invoke clean_libend2end_test_cancel_in_a_vacuum clean_libend2end_test_census_simple_request clean_libend2end_test_disappearing_server clean_libend2end_test_early_server_shutdown_finishes_inflight_calls clean_libend2end_test_early_server_shutdown_finishes_tags clean_libend2end_test_invoke_large_request clean_libend2end_test_max_concurrent_streams clean_libend2end_test_no_op clean_libend2end_test_ping_pong_streaming clean_libend2end_test_request_response_with_binary_metadata_and_payload clean_libend2end_test_request_response_with_metadata_and_payload clean_libend2end_test_request_response_with_payload clean_libend2end_test_request_response_with_trailing_metadata_and_payload clean_libend2end_test_simple_delayed_request clean_libend2end_test_simple_request clean_libend2end_test_thread_stress clean_libend2end_test_writes_done_hangs_with_pending_read clean_libend2end_certs clean_gen_hpack_tables clean_cpp_plugin clean_ruby_plugin clean_go_plugin clean_grpc_byte_buffer_reader_test clean_gpr_cancellable_test clean_gpr_log_test clean_gpr_useful_test clean_gpr_cmdline_test clean_gpr_histogram_test clean_gpr_host_port_test clean_gpr_slice_buffer_test clean_gpr_slice_test clean_gpr_string_test clean_gpr_sync_test clean_gpr_thd_test clean_gpr_time_test clean_murmur_hash_test clean_grpc_stream_op_test clean_alpn_test clean_time_averaged_stats_test clean_chttp2_stream_encoder_test clean_hpack_table_test clean_chttp2_stream_map_test clean_hpack_parser_test clean_transport_metadata_test clean_chttp2_status_conversion_test clean_chttp2_transport_end2end_test clean_tcp_posix_test clean_dualstack_socket_test clean_no_server_test clean_resolve_address_test clean_sockaddr_utils_test clean_tcp_server_posix_test clean_tcp_client_posix_test clean_grpc_channel_stack_test clean_metadata_buffer_test clean_grpc_completion_queue_test clean_grpc_completion_queue_benchmark clean_census_trace_store_test clean_census_stats_store_test clean_census_window_stats_test clean_census_statistics_quick_test clean_census_statistics_small_log_test clean_census_statistics_performance_test clean_census_statistics_multiple_writers_test clean_census_statistics_multiple_writers_circular_buffer_test clean_census_stub_test clean_census_hash_table_test clean_fling_server clean_fling_client clean_fling_test clean_echo_server clean_echo_client clean_echo_test clean_low_level_ping_pong_benchmark clean_message_compress_test clean_bin_encoder_test clean_secure_endpoint_test clean_httpcli_format_request_test clean_httpcli_parser_test clean_httpcli_test clean_grpc_credentials_test clean_grpc_fetch_oauth2 clean_grpc_base64_test clean_grpc_json_token_test clean_timeout_encoding_test clean_fd_posix_test clean_fling_stream_test clean_lame_client_test clean_thread_pool_test clean_status_test clean_sync_client_async_server_test clean_qps_client clean_qps_server clean_interop_server clean_interop_client clean_end2end_test clean_channel_arguments_test clean_credentials_test clean_alarm_test clean_alarm_list_test clean_alarm_heap_test clean_time_test clean_chttp2_fake_security_cancel_after_accept_test clean_chttp2_fake_security_cancel_after_accept_and_writes_closed_test clean_chttp2_fake_security_cancel_after_invoke_test clean_chttp2_fake_security_cancel_before_invoke_test clean_chttp2_fake_security_cancel_in_a_vacuum_test clean_chttp2_fake_security_census_simple_request_test clean_chttp2_fake_security_disappearing_server_test clean_chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_fake_security_early_server_shutdown_finishes_tags_test clean_chttp2_fake_security_invoke_large_request_test clean_chttp2_fake_security_max_concurrent_streams_test clean_chttp2_fake_security_no_op_test clean_chttp2_fake_security_ping_pong_streaming_test clean_chttp2_fake_security_request_response_with_binary_metadata_and_payload_test clean_chttp2_fake_security_request_response_with_metadata_and_payload_test clean_chttp2_fake_security_request_response_with_payload_test clean_chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test clean_chttp2_fake_security_simple_delayed_request_test clean_chttp2_fake_security_simple_request_test clean_chttp2_fake_security_thread_stress_test clean_chttp2_fake_security_writes_done_hangs_with_pending_read_test clean_chttp2_fullstack_cancel_after_accept_test clean_chttp2_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_fullstack_cancel_after_invoke_test clean_chttp2_fullstack_cancel_before_invoke_test clean_chttp2_fullstack_cancel_in_a_vacuum_test clean_chttp2_fullstack_census_simple_request_test clean_chttp2_fullstack_disappearing_server_test clean_chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_fullstack_invoke_large_request_test clean_chttp2_fullstack_max_concurrent_streams_test clean_chttp2_fullstack_no_op_test clean_chttp2_fullstack_ping_pong_streaming_test clean_chttp2_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_fullstack_request_response_with_payload_test clean_chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_fullstack_simple_delayed_request_test clean_chttp2_fullstack_simple_request_test clean_chttp2_fullstack_thread_stress_test clean_chttp2_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_simple_ssl_fullstack_cancel_after_accept_test clean_chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_simple_ssl_fullstack_cancel_after_invoke_test clean_chttp2_simple_ssl_fullstack_cancel_before_invoke_test clean_chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test clean_chttp2_simple_ssl_fullstack_census_simple_request_test clean_chttp2_simple_ssl_fullstack_disappearing_server_test clean_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_simple_ssl_fullstack_invoke_large_request_test clean_chttp2_simple_ssl_fullstack_max_concurrent_streams_test clean_chttp2_simple_ssl_fullstack_no_op_test clean_chttp2_simple_ssl_fullstack_ping_pong_streaming_test clean_chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_simple_delayed_request_test clean_chttp2_simple_ssl_fullstack_simple_request_test clean_chttp2_simple_ssl_fullstack_thread_stress_test clean_chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test clean_chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test clean_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test clean_chttp2_simple_ssl_with_oauth2_fullstack_no_op_test clean_chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test clean_chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_socket_pair_cancel_after_accept_test clean_chttp2_socket_pair_cancel_after_accept_and_writes_closed_test clean_chttp2_socket_pair_cancel_after_invoke_test clean_chttp2_socket_pair_cancel_before_invoke_test clean_chttp2_socket_pair_cancel_in_a_vacuum_test clean_chttp2_socket_pair_census_simple_request_test clean_chttp2_socket_pair_disappearing_server_test clean_chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_socket_pair_early_server_shutdown_finishes_tags_test clean_chttp2_socket_pair_invoke_large_request_test clean_chttp2_socket_pair_max_concurrent_streams_test clean_chttp2_socket_pair_no_op_test clean_chttp2_socket_pair_ping_pong_streaming_test clean_chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test clean_chttp2_socket_pair_request_response_with_metadata_and_payload_test clean_chttp2_socket_pair_request_response_with_payload_test clean_chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test clean_chttp2_socket_pair_simple_delayed_request_test clean_chttp2_socket_pair_simple_request_test clean_chttp2_socket_pair_thread_stress_test clean_chttp2_socket_pair_writes_done_hangs_with_pending_read_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test clean_chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test clean_chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test clean_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test clean_chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test clean_chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test clean_chttp2_socket_pair_one_byte_at_a_time_no_op_test clean_chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test clean_chttp2_socket_pair_one_byte_at_a_time_simple_request_test clean_chttp2_socket_pair_one_byte_at_a_time_thread_stress_test clean_chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test - $(Q) $(RM) -r deps objs libs bins gens +clean: + $(Q) $(RM) -rf objs libs bins gens # The various libraries @@ -1131,14 +1168,14 @@ LIBGPR_SRC = \ src/core/support/cpu_posix.c \ src/core/support/histogram.c \ src/core/support/host_port.c \ - src/core/support/log_android.c \ src/core/support/log.c \ + src/core/support/log_android.c \ src/core/support/log_linux.c \ src/core/support/log_posix.c \ src/core/support/log_win32.c \ src/core/support/murmur_hash.c \ - src/core/support/slice_buffer.c \ src/core/support/slice.c \ + src/core/support/slice_buffer.c \ src/core/support/string.c \ src/core/support/string_posix.c \ src/core/support/string_win32.c \ @@ -1153,9 +1190,9 @@ LIBGPR_SRC = \ PUBLIC_HEADERS_C += \ include/grpc/support/alloc.h \ + include/grpc/support/atm.h \ include/grpc/support/atm_gcc_atomic.h \ include/grpc/support/atm_gcc_sync.h \ - include/grpc/support/atm.h \ include/grpc/support/atm_win32.h \ include/grpc/support/cancellable_platform.h \ include/grpc/support/cmdline.h \ @@ -1163,11 +1200,11 @@ PUBLIC_HEADERS_C += \ include/grpc/support/host_port.h \ include/grpc/support/log.h \ include/grpc/support/port_platform.h \ - include/grpc/support/slice_buffer.h \ include/grpc/support/slice.h \ + include/grpc/support/slice_buffer.h \ include/grpc/support/string.h \ - include/grpc/support/sync_generic.h \ include/grpc/support/sync.h \ + include/grpc/support/sync_generic.h \ include/grpc/support/sync_posix.h \ include/grpc/support/sync_win32.h \ include/grpc/support/thd.h \ @@ -1179,9 +1216,8 @@ PUBLIC_HEADERS_C += \ include/grpc/support/useful.h \ LIBGPR_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGPR_SRC)))) -LIBGPR_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBGPR_SRC)))) -libs/$(CONFIG)/libgpr.a: $(LIBGPR_OBJS) +libs/$(CONFIG)/libgpr.a: $(ZLIB_DEP) $(LIBGPR_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libgpr.a $(LIBGPR_OBJS) @@ -1189,12 +1225,12 @@ libs/$(CONFIG)/libgpr.a: $(LIBGPR_OBJS) ifeq ($(SYSTEM),MINGW32) -libs/$(CONFIG)/gpr.$(SHARED_EXT): $(LIBGPR_OBJS) +libs/$(CONFIG)/gpr.$(SHARED_EXT): $(LIBGPR_OBJS) $(ZLIB_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LD) $(LDFLAGS) -Llibs/$(CONFIG) -shared -Wl,--output-def=libs/$(CONFIG)/gpr.def -Wl,--out-implib=libs/$(CONFIG)/libgpr-imp.a -o libs/$(CONFIG)/gpr.$(SHARED_EXT) $(LIBGPR_OBJS) $(LDLIBS) else -libs/$(CONFIG)/libgpr.$(SHARED_EXT): $(LIBGPR_OBJS) +libs/$(CONFIG)/libgpr.$(SHARED_EXT): $(LIBGPR_OBJS) $(ZLIB_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) @@ -1206,18 +1242,75 @@ endif endif -deps_libgpr: $(LIBGPR_DEPS) +ifneq ($(NO_DEPS),true) +-include $(LIBGPR_OBJS:.o=.dep) +endif + +objs/$(CONFIG)/src/core/support/alloc.o: +objs/$(CONFIG)/src/core/support/cancellable.o: +objs/$(CONFIG)/src/core/support/cmdline.o: +objs/$(CONFIG)/src/core/support/cpu_linux.o: +objs/$(CONFIG)/src/core/support/cpu_posix.o: +objs/$(CONFIG)/src/core/support/histogram.o: +objs/$(CONFIG)/src/core/support/host_port.o: +objs/$(CONFIG)/src/core/support/log.o: +objs/$(CONFIG)/src/core/support/log_android.o: +objs/$(CONFIG)/src/core/support/log_linux.o: +objs/$(CONFIG)/src/core/support/log_posix.o: +objs/$(CONFIG)/src/core/support/log_win32.o: +objs/$(CONFIG)/src/core/support/murmur_hash.o: +objs/$(CONFIG)/src/core/support/slice.o: +objs/$(CONFIG)/src/core/support/slice_buffer.o: +objs/$(CONFIG)/src/core/support/string.o: +objs/$(CONFIG)/src/core/support/string_posix.o: +objs/$(CONFIG)/src/core/support/string_win32.o: +objs/$(CONFIG)/src/core/support/sync.o: +objs/$(CONFIG)/src/core/support/sync_posix.o: +objs/$(CONFIG)/src/core/support/sync_win32.o: +objs/$(CONFIG)/src/core/support/thd_posix.o: +objs/$(CONFIG)/src/core/support/thd_win32.o: +objs/$(CONFIG)/src/core/support/time.o: +objs/$(CONFIG)/src/core/support/time_posix.o: +objs/$(CONFIG)/src/core/support/time_win32.o: + + +LIBGPR_TEST_UTIL_SRC = \ + test/core/util/test_config.c \ + + +LIBGPR_TEST_UTIL_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGPR_TEST_UTIL_SRC)))) + +ifeq ($(NO_SECURE),true) + +# You can't build secure libraries if you don't have OpenSSL with ALPN. + +libs/$(CONFIG)/libgpr_test_util.a: openssl_dep_error + + +else + +ifneq ($(OPENSSL_DEP),) +test/core/util/test_config.c: $(OPENSSL_DEP) +endif + +libs/$(CONFIG)/libgpr_test_util.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBGPR_TEST_UTIL_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(AR) rcs libs/$(CONFIG)/libgpr_test_util.a $(LIBGPR_TEST_UTIL_OBJS) + + + + +endif + +ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(LIBGPR_DEPS) +-include $(LIBGPR_TEST_UTIL_OBJS:.o=.dep) +endif endif -clean_libgpr: - $(E) "[CLEAN] Cleaning libgpr files" - $(Q) $(RM) $(LIBGPR_OBJS) - $(Q) $(RM) $(LIBGPR_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libgpr.a - $(Q) $(RM) libs/$(CONFIG)/libgpr.$(SHARED_EXT) +objs/$(CONFIG)/test/core/util/test_config.o: LIBGRPC_SRC = \ @@ -1260,6 +1353,7 @@ LIBGRPC_SRC = \ src/core/iomgr/fd_posix.c \ src/core/iomgr/iomgr.c \ src/core/iomgr/iomgr_posix.c \ + src/core/iomgr/pollset_kick_posix.c \ src/core/iomgr/pollset_multipoller_with_poll_posix.c \ src/core/iomgr/pollset_posix.c \ src/core/iomgr/resolve_address_posix.c \ @@ -1322,10 +1416,11 @@ PUBLIC_HEADERS_C += \ include/grpc/status.h \ LIBGRPC_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_SRC)))) -LIBGRPC_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBGRPC_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure libraries if you don't have OpenSSL with ALPN. + libs/$(CONFIG)/libgrpc.a: openssl_dep_error ifeq ($(SYSTEM),MINGW32) @@ -1336,10 +1431,107 @@ endif else -libs/$(CONFIG)/libgrpc.a: $(OPENSSL_DEP) $(LIBGRPC_OBJS) +ifneq ($(OPENSSL_DEP),) +src/core/security/auth.c: $(OPENSSL_DEP) +src/core/security/base64.c: $(OPENSSL_DEP) +src/core/security/credentials.c: $(OPENSSL_DEP) +src/core/security/factories.c: $(OPENSSL_DEP) +src/core/security/google_root_certs.c: $(OPENSSL_DEP) +src/core/security/json_token.c: $(OPENSSL_DEP) +src/core/security/secure_endpoint.c: $(OPENSSL_DEP) +src/core/security/secure_transport_setup.c: $(OPENSSL_DEP) +src/core/security/security_context.c: $(OPENSSL_DEP) +src/core/security/server_secure_chttp2.c: $(OPENSSL_DEP) +src/core/tsi/fake_transport_security.c: $(OPENSSL_DEP) +src/core/tsi/ssl_transport_security.c: $(OPENSSL_DEP) +src/core/tsi/transport_security.c: $(OPENSSL_DEP) +src/core/channel/call_op_string.c: $(OPENSSL_DEP) +src/core/channel/census_filter.c: $(OPENSSL_DEP) +src/core/channel/channel_args.c: $(OPENSSL_DEP) +src/core/channel/channel_stack.c: $(OPENSSL_DEP) +src/core/channel/child_channel.c: $(OPENSSL_DEP) +src/core/channel/client_channel.c: $(OPENSSL_DEP) +src/core/channel/client_setup.c: $(OPENSSL_DEP) +src/core/channel/connected_channel.c: $(OPENSSL_DEP) +src/core/channel/http_client_filter.c: $(OPENSSL_DEP) +src/core/channel/http_filter.c: $(OPENSSL_DEP) +src/core/channel/http_server_filter.c: $(OPENSSL_DEP) +src/core/channel/metadata_buffer.c: $(OPENSSL_DEP) +src/core/channel/noop_filter.c: $(OPENSSL_DEP) +src/core/compression/algorithm.c: $(OPENSSL_DEP) +src/core/compression/message_compress.c: $(OPENSSL_DEP) +src/core/httpcli/format_request.c: $(OPENSSL_DEP) +src/core/httpcli/httpcli.c: $(OPENSSL_DEP) +src/core/httpcli/httpcli_security_context.c: $(OPENSSL_DEP) +src/core/httpcli/parser.c: $(OPENSSL_DEP) +src/core/iomgr/alarm.c: $(OPENSSL_DEP) +src/core/iomgr/alarm_heap.c: $(OPENSSL_DEP) +src/core/iomgr/endpoint.c: $(OPENSSL_DEP) +src/core/iomgr/endpoint_pair_posix.c: $(OPENSSL_DEP) +src/core/iomgr/fd_posix.c: $(OPENSSL_DEP) +src/core/iomgr/iomgr.c: $(OPENSSL_DEP) +src/core/iomgr/iomgr_posix.c: $(OPENSSL_DEP) +src/core/iomgr/pollset_kick_posix.c: $(OPENSSL_DEP) +src/core/iomgr/pollset_multipoller_with_poll_posix.c: $(OPENSSL_DEP) +src/core/iomgr/pollset_posix.c: $(OPENSSL_DEP) +src/core/iomgr/resolve_address_posix.c: $(OPENSSL_DEP) +src/core/iomgr/sockaddr_utils.c: $(OPENSSL_DEP) +src/core/iomgr/socket_utils_common_posix.c: $(OPENSSL_DEP) +src/core/iomgr/socket_utils_linux.c: $(OPENSSL_DEP) +src/core/iomgr/socket_utils_posix.c: $(OPENSSL_DEP) +src/core/iomgr/tcp_client_posix.c: $(OPENSSL_DEP) +src/core/iomgr/tcp_posix.c: $(OPENSSL_DEP) +src/core/iomgr/tcp_server_posix.c: $(OPENSSL_DEP) +src/core/iomgr/time_averaged_stats.c: $(OPENSSL_DEP) +src/core/statistics/census_init.c: $(OPENSSL_DEP) +src/core/statistics/census_log.c: $(OPENSSL_DEP) +src/core/statistics/census_rpc_stats.c: $(OPENSSL_DEP) +src/core/statistics/census_tracing.c: $(OPENSSL_DEP) +src/core/statistics/hash_table.c: $(OPENSSL_DEP) +src/core/statistics/window_stats.c: $(OPENSSL_DEP) +src/core/surface/byte_buffer.c: $(OPENSSL_DEP) +src/core/surface/byte_buffer_reader.c: $(OPENSSL_DEP) +src/core/surface/call.c: $(OPENSSL_DEP) +src/core/surface/channel.c: $(OPENSSL_DEP) +src/core/surface/channel_create.c: $(OPENSSL_DEP) +src/core/surface/client.c: $(OPENSSL_DEP) +src/core/surface/completion_queue.c: $(OPENSSL_DEP) +src/core/surface/event_string.c: $(OPENSSL_DEP) +src/core/surface/init.c: $(OPENSSL_DEP) +src/core/surface/lame_client.c: $(OPENSSL_DEP) +src/core/surface/secure_channel_create.c: $(OPENSSL_DEP) +src/core/surface/secure_server_create.c: $(OPENSSL_DEP) +src/core/surface/server.c: $(OPENSSL_DEP) +src/core/surface/server_chttp2.c: $(OPENSSL_DEP) +src/core/surface/server_create.c: $(OPENSSL_DEP) +src/core/transport/chttp2/alpn.c: $(OPENSSL_DEP) +src/core/transport/chttp2/bin_encoder.c: $(OPENSSL_DEP) +src/core/transport/chttp2/frame_data.c: $(OPENSSL_DEP) +src/core/transport/chttp2/frame_goaway.c: $(OPENSSL_DEP) +src/core/transport/chttp2/frame_ping.c: $(OPENSSL_DEP) +src/core/transport/chttp2/frame_rst_stream.c: $(OPENSSL_DEP) +src/core/transport/chttp2/frame_settings.c: $(OPENSSL_DEP) +src/core/transport/chttp2/frame_window_update.c: $(OPENSSL_DEP) +src/core/transport/chttp2/hpack_parser.c: $(OPENSSL_DEP) +src/core/transport/chttp2/hpack_table.c: $(OPENSSL_DEP) +src/core/transport/chttp2/huffsyms.c: $(OPENSSL_DEP) +src/core/transport/chttp2/status_conversion.c: $(OPENSSL_DEP) +src/core/transport/chttp2/stream_encoder.c: $(OPENSSL_DEP) +src/core/transport/chttp2/stream_map.c: $(OPENSSL_DEP) +src/core/transport/chttp2/timeout_encoding.c: $(OPENSSL_DEP) +src/core/transport/chttp2/varint.c: $(OPENSSL_DEP) +src/core/transport/chttp2_transport.c: $(OPENSSL_DEP) +src/core/transport/metadata.c: $(OPENSSL_DEP) +src/core/transport/stream_op.c: $(OPENSSL_DEP) +src/core/transport/transport.c: $(OPENSSL_DEP) +third_party/cJSON/cJSON.c: $(OPENSSL_DEP) +endif + +libs/$(CONFIG)/libgrpc.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBGRPC_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libgrpc.a $(LIBGRPC_OBJS) + $(Q) rm -rf tmp-merge $(Q) mkdir tmp-merge $(Q) ( cd tmp-merge ; $(AR) x ../libs/$(CONFIG)/libgrpc.a ) $(Q) for l in $(OPENSSL_MERGE_LIBS) ; do ( cd tmp-merge ; ar x ../$${l} ) ; done @@ -1350,12 +1542,12 @@ libs/$(CONFIG)/libgrpc.a: $(OPENSSL_DEP) $(LIBGRPC_OBJS) ifeq ($(SYSTEM),MINGW32) -libs/$(CONFIG)/grpc.$(SHARED_EXT): $(LIBGRPC_OBJS) libs/$(CONFIG)/gpr.$(SHARED_EXT) $(OPENSSL_DEP) +libs/$(CONFIG)/grpc.$(SHARED_EXT): $(LIBGRPC_OBJS) $(ZLIB_DEP)libs/$(CONFIG)/gpr.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LD) $(LDFLAGS) -Llibs/$(CONFIG) -shared -Wl,--output-def=libs/$(CONFIG)/grpc.def -Wl,--out-implib=libs/$(CONFIG)/libgrpc-imp.a -o libs/$(CONFIG)/grpc.$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LDLIBS_SECURE) $(OPENSSL_MERGE_LIBS) -lgpr-imp else -libs/$(CONFIG)/libgrpc.$(SHARED_EXT): $(LIBGRPC_OBJS) libs/$(CONFIG)/libgpr.$(SHARED_EXT) $(OPENSSL_DEP) +libs/$(CONFIG)/libgrpc.$(SHARED_EXT): $(LIBGRPC_OBJS) $(ZLIB_DEP) libs/$(CONFIG)/libgpr.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) @@ -1369,20 +1561,177 @@ endif endif -deps_libgrpc: $(LIBGRPC_DEPS) +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(LIBGRPC_OBJS:.o=.dep) +endif +endif + +objs/$(CONFIG)/src/core/security/auth.o: +objs/$(CONFIG)/src/core/security/base64.o: +objs/$(CONFIG)/src/core/security/credentials.o: +objs/$(CONFIG)/src/core/security/factories.o: +objs/$(CONFIG)/src/core/security/google_root_certs.o: +objs/$(CONFIG)/src/core/security/json_token.o: +objs/$(CONFIG)/src/core/security/secure_endpoint.o: +objs/$(CONFIG)/src/core/security/secure_transport_setup.o: +objs/$(CONFIG)/src/core/security/security_context.o: +objs/$(CONFIG)/src/core/security/server_secure_chttp2.o: +objs/$(CONFIG)/src/core/tsi/fake_transport_security.o: +objs/$(CONFIG)/src/core/tsi/ssl_transport_security.o: +objs/$(CONFIG)/src/core/tsi/transport_security.o: +objs/$(CONFIG)/src/core/channel/call_op_string.o: +objs/$(CONFIG)/src/core/channel/census_filter.o: +objs/$(CONFIG)/src/core/channel/channel_args.o: +objs/$(CONFIG)/src/core/channel/channel_stack.o: +objs/$(CONFIG)/src/core/channel/child_channel.o: +objs/$(CONFIG)/src/core/channel/client_channel.o: +objs/$(CONFIG)/src/core/channel/client_setup.o: +objs/$(CONFIG)/src/core/channel/connected_channel.o: +objs/$(CONFIG)/src/core/channel/http_client_filter.o: +objs/$(CONFIG)/src/core/channel/http_filter.o: +objs/$(CONFIG)/src/core/channel/http_server_filter.o: +objs/$(CONFIG)/src/core/channel/metadata_buffer.o: +objs/$(CONFIG)/src/core/channel/noop_filter.o: +objs/$(CONFIG)/src/core/compression/algorithm.o: +objs/$(CONFIG)/src/core/compression/message_compress.o: +objs/$(CONFIG)/src/core/httpcli/format_request.o: +objs/$(CONFIG)/src/core/httpcli/httpcli.o: +objs/$(CONFIG)/src/core/httpcli/httpcli_security_context.o: +objs/$(CONFIG)/src/core/httpcli/parser.o: +objs/$(CONFIG)/src/core/iomgr/alarm.o: +objs/$(CONFIG)/src/core/iomgr/alarm_heap.o: +objs/$(CONFIG)/src/core/iomgr/endpoint.o: +objs/$(CONFIG)/src/core/iomgr/endpoint_pair_posix.o: +objs/$(CONFIG)/src/core/iomgr/fd_posix.o: +objs/$(CONFIG)/src/core/iomgr/iomgr.o: +objs/$(CONFIG)/src/core/iomgr/iomgr_posix.o: +objs/$(CONFIG)/src/core/iomgr/pollset_kick_posix.o: +objs/$(CONFIG)/src/core/iomgr/pollset_multipoller_with_poll_posix.o: +objs/$(CONFIG)/src/core/iomgr/pollset_posix.o: +objs/$(CONFIG)/src/core/iomgr/resolve_address_posix.o: +objs/$(CONFIG)/src/core/iomgr/sockaddr_utils.o: +objs/$(CONFIG)/src/core/iomgr/socket_utils_common_posix.o: +objs/$(CONFIG)/src/core/iomgr/socket_utils_linux.o: +objs/$(CONFIG)/src/core/iomgr/socket_utils_posix.o: +objs/$(CONFIG)/src/core/iomgr/tcp_client_posix.o: +objs/$(CONFIG)/src/core/iomgr/tcp_posix.o: +objs/$(CONFIG)/src/core/iomgr/tcp_server_posix.o: +objs/$(CONFIG)/src/core/iomgr/time_averaged_stats.o: +objs/$(CONFIG)/src/core/statistics/census_init.o: +objs/$(CONFIG)/src/core/statistics/census_log.o: +objs/$(CONFIG)/src/core/statistics/census_rpc_stats.o: +objs/$(CONFIG)/src/core/statistics/census_tracing.o: +objs/$(CONFIG)/src/core/statistics/hash_table.o: +objs/$(CONFIG)/src/core/statistics/window_stats.o: +objs/$(CONFIG)/src/core/surface/byte_buffer.o: +objs/$(CONFIG)/src/core/surface/byte_buffer_reader.o: +objs/$(CONFIG)/src/core/surface/call.o: +objs/$(CONFIG)/src/core/surface/channel.o: +objs/$(CONFIG)/src/core/surface/channel_create.o: +objs/$(CONFIG)/src/core/surface/client.o: +objs/$(CONFIG)/src/core/surface/completion_queue.o: +objs/$(CONFIG)/src/core/surface/event_string.o: +objs/$(CONFIG)/src/core/surface/init.o: +objs/$(CONFIG)/src/core/surface/lame_client.o: +objs/$(CONFIG)/src/core/surface/secure_channel_create.o: +objs/$(CONFIG)/src/core/surface/secure_server_create.o: +objs/$(CONFIG)/src/core/surface/server.o: +objs/$(CONFIG)/src/core/surface/server_chttp2.o: +objs/$(CONFIG)/src/core/surface/server_create.o: +objs/$(CONFIG)/src/core/transport/chttp2/alpn.o: +objs/$(CONFIG)/src/core/transport/chttp2/bin_encoder.o: +objs/$(CONFIG)/src/core/transport/chttp2/frame_data.o: +objs/$(CONFIG)/src/core/transport/chttp2/frame_goaway.o: +objs/$(CONFIG)/src/core/transport/chttp2/frame_ping.o: +objs/$(CONFIG)/src/core/transport/chttp2/frame_rst_stream.o: +objs/$(CONFIG)/src/core/transport/chttp2/frame_settings.o: +objs/$(CONFIG)/src/core/transport/chttp2/frame_window_update.o: +objs/$(CONFIG)/src/core/transport/chttp2/hpack_parser.o: +objs/$(CONFIG)/src/core/transport/chttp2/hpack_table.o: +objs/$(CONFIG)/src/core/transport/chttp2/huffsyms.o: +objs/$(CONFIG)/src/core/transport/chttp2/status_conversion.o: +objs/$(CONFIG)/src/core/transport/chttp2/stream_encoder.o: +objs/$(CONFIG)/src/core/transport/chttp2/stream_map.o: +objs/$(CONFIG)/src/core/transport/chttp2/timeout_encoding.o: +objs/$(CONFIG)/src/core/transport/chttp2/varint.o: +objs/$(CONFIG)/src/core/transport/chttp2_transport.o: +objs/$(CONFIG)/src/core/transport/metadata.o: +objs/$(CONFIG)/src/core/transport/stream_op.o: +objs/$(CONFIG)/src/core/transport/transport.o: +objs/$(CONFIG)/third_party/cJSON/cJSON.o: + + +LIBGRPC_TEST_UTIL_SRC = \ + test/core/end2end/cq_verifier.c \ + test/core/end2end/data/prod_roots_certs.c \ + test/core/end2end/data/server1_cert.c \ + test/core/end2end/data/server1_key.c \ + test/core/end2end/data/test_root_cert.c \ + test/core/iomgr/endpoint_tests.c \ + test/core/statistics/census_log_tests.c \ + test/core/transport/transport_end2end_tests.c \ + test/core/util/grpc_profiler.c \ + test/core/util/parse_hexstring.c \ + test/core/util/port_posix.c \ + test/core/util/slice_splitter.c \ + + +LIBGRPC_TEST_UTIL_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_TEST_UTIL_SRC)))) + +ifeq ($(NO_SECURE),true) + +# You can't build secure libraries if you don't have OpenSSL with ALPN. + +libs/$(CONFIG)/libgrpc_test_util.a: openssl_dep_error + + +else + +ifneq ($(OPENSSL_DEP),) +test/core/end2end/cq_verifier.c: $(OPENSSL_DEP) +test/core/end2end/data/prod_roots_certs.c: $(OPENSSL_DEP) +test/core/end2end/data/server1_cert.c: $(OPENSSL_DEP) +test/core/end2end/data/server1_key.c: $(OPENSSL_DEP) +test/core/end2end/data/test_root_cert.c: $(OPENSSL_DEP) +test/core/iomgr/endpoint_tests.c: $(OPENSSL_DEP) +test/core/statistics/census_log_tests.c: $(OPENSSL_DEP) +test/core/transport/transport_end2end_tests.c: $(OPENSSL_DEP) +test/core/util/grpc_profiler.c: $(OPENSSL_DEP) +test/core/util/parse_hexstring.c: $(OPENSSL_DEP) +test/core/util/port_posix.c: $(OPENSSL_DEP) +test/core/util/slice_splitter.c: $(OPENSSL_DEP) +endif + +libs/$(CONFIG)/libgrpc_test_util.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBGRPC_TEST_UTIL_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(AR) rcs libs/$(CONFIG)/libgrpc_test_util.a $(LIBGRPC_TEST_UTIL_OBJS) + + + + + +endif ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(LIBGRPC_DEPS) +-include $(LIBGRPC_TEST_UTIL_OBJS:.o=.dep) endif endif -clean_libgrpc: - $(E) "[CLEAN] Cleaning libgrpc files" - $(Q) $(RM) $(LIBGRPC_OBJS) - $(Q) $(RM) $(LIBGRPC_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libgrpc.a - $(Q) $(RM) libs/$(CONFIG)/libgrpc.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/cq_verifier.o: +objs/$(CONFIG)/test/core/end2end/data/prod_roots_certs.o: +objs/$(CONFIG)/test/core/end2end/data/server1_cert.o: +objs/$(CONFIG)/test/core/end2end/data/server1_key.o: +objs/$(CONFIG)/test/core/end2end/data/test_root_cert.o: +objs/$(CONFIG)/test/core/iomgr/endpoint_tests.o: +objs/$(CONFIG)/test/core/statistics/census_log_tests.o: +objs/$(CONFIG)/test/core/transport/transport_end2end_tests.o: +objs/$(CONFIG)/test/core/util/grpc_profiler.o: +objs/$(CONFIG)/test/core/util/parse_hexstring.o: +objs/$(CONFIG)/test/core/util/port_posix.o: +objs/$(CONFIG)/test/core/util/slice_splitter.o: LIBGRPC_UNSECURE_SRC = \ @@ -1412,6 +1761,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/iomgr/fd_posix.c \ src/core/iomgr/iomgr.c \ src/core/iomgr/iomgr_posix.c \ + src/core/iomgr/pollset_kick_posix.c \ src/core/iomgr/pollset_multipoller_with_poll_posix.c \ src/core/iomgr/pollset_posix.c \ src/core/iomgr/resolve_address_posix.c \ @@ -1473,9 +1823,8 @@ PUBLIC_HEADERS_C += \ include/grpc/status.h \ LIBGRPC_UNSECURE_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_UNSECURE_SRC)))) -LIBGRPC_UNSECURE_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBGRPC_UNSECURE_SRC)))) -libs/$(CONFIG)/libgrpc_unsecure.a: $(LIBGRPC_UNSECURE_OBJS) +libs/$(CONFIG)/libgrpc_unsecure.a: $(ZLIB_DEP) $(LIBGRPC_UNSECURE_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libgrpc_unsecure.a $(LIBGRPC_UNSECURE_OBJS) @@ -1483,12 +1832,12 @@ libs/$(CONFIG)/libgrpc_unsecure.a: $(LIBGRPC_UNSECURE_OBJS) ifeq ($(SYSTEM),MINGW32) -libs/$(CONFIG)/grpc_unsecure.$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) libs/$(CONFIG)/gpr.$(SHARED_EXT) +libs/$(CONFIG)/grpc_unsecure.$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP)libs/$(CONFIG)/gpr.$(SHARED_EXT) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LD) $(LDFLAGS) -Llibs/$(CONFIG) -shared -Wl,--output-def=libs/$(CONFIG)/grpc_unsecure.def -Wl,--out-implib=libs/$(CONFIG)/libgrpc_unsecure-imp.a -o libs/$(CONFIG)/grpc_unsecure.$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) -lgpr-imp else -libs/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) libs/$(CONFIG)/libgpr.$(SHARED_EXT) +libs/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) libs/$(CONFIG)/libgpr.$(SHARED_EXT) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) @@ -1500,185 +1849,188 @@ endif endif -deps_libgrpc_unsecure: $(LIBGRPC_UNSECURE_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBGRPC_UNSECURE_DEPS) -endif +-include $(LIBGRPC_UNSECURE_OBJS:.o=.dep) +endif + +objs/$(CONFIG)/src/core/channel/call_op_string.o: +objs/$(CONFIG)/src/core/channel/census_filter.o: +objs/$(CONFIG)/src/core/channel/channel_args.o: +objs/$(CONFIG)/src/core/channel/channel_stack.o: +objs/$(CONFIG)/src/core/channel/child_channel.o: +objs/$(CONFIG)/src/core/channel/client_channel.o: +objs/$(CONFIG)/src/core/channel/client_setup.o: +objs/$(CONFIG)/src/core/channel/connected_channel.o: +objs/$(CONFIG)/src/core/channel/http_client_filter.o: +objs/$(CONFIG)/src/core/channel/http_filter.o: +objs/$(CONFIG)/src/core/channel/http_server_filter.o: +objs/$(CONFIG)/src/core/channel/metadata_buffer.o: +objs/$(CONFIG)/src/core/channel/noop_filter.o: +objs/$(CONFIG)/src/core/compression/algorithm.o: +objs/$(CONFIG)/src/core/compression/message_compress.o: +objs/$(CONFIG)/src/core/httpcli/format_request.o: +objs/$(CONFIG)/src/core/httpcli/httpcli.o: +objs/$(CONFIG)/src/core/httpcli/httpcli_security_context.o: +objs/$(CONFIG)/src/core/httpcli/parser.o: +objs/$(CONFIG)/src/core/iomgr/alarm.o: +objs/$(CONFIG)/src/core/iomgr/alarm_heap.o: +objs/$(CONFIG)/src/core/iomgr/endpoint.o: +objs/$(CONFIG)/src/core/iomgr/endpoint_pair_posix.o: +objs/$(CONFIG)/src/core/iomgr/fd_posix.o: +objs/$(CONFIG)/src/core/iomgr/iomgr.o: +objs/$(CONFIG)/src/core/iomgr/iomgr_posix.o: +objs/$(CONFIG)/src/core/iomgr/pollset_kick_posix.o: +objs/$(CONFIG)/src/core/iomgr/pollset_multipoller_with_poll_posix.o: +objs/$(CONFIG)/src/core/iomgr/pollset_posix.o: +objs/$(CONFIG)/src/core/iomgr/resolve_address_posix.o: +objs/$(CONFIG)/src/core/iomgr/sockaddr_utils.o: +objs/$(CONFIG)/src/core/iomgr/socket_utils_common_posix.o: +objs/$(CONFIG)/src/core/iomgr/socket_utils_linux.o: +objs/$(CONFIG)/src/core/iomgr/socket_utils_posix.o: +objs/$(CONFIG)/src/core/iomgr/tcp_client_posix.o: +objs/$(CONFIG)/src/core/iomgr/tcp_posix.o: +objs/$(CONFIG)/src/core/iomgr/tcp_server_posix.o: +objs/$(CONFIG)/src/core/iomgr/time_averaged_stats.o: +objs/$(CONFIG)/src/core/statistics/census_init.o: +objs/$(CONFIG)/src/core/statistics/census_log.o: +objs/$(CONFIG)/src/core/statistics/census_rpc_stats.o: +objs/$(CONFIG)/src/core/statistics/census_tracing.o: +objs/$(CONFIG)/src/core/statistics/hash_table.o: +objs/$(CONFIG)/src/core/statistics/window_stats.o: +objs/$(CONFIG)/src/core/surface/byte_buffer.o: +objs/$(CONFIG)/src/core/surface/byte_buffer_reader.o: +objs/$(CONFIG)/src/core/surface/call.o: +objs/$(CONFIG)/src/core/surface/channel.o: +objs/$(CONFIG)/src/core/surface/channel_create.o: +objs/$(CONFIG)/src/core/surface/client.o: +objs/$(CONFIG)/src/core/surface/completion_queue.o: +objs/$(CONFIG)/src/core/surface/event_string.o: +objs/$(CONFIG)/src/core/surface/init.o: +objs/$(CONFIG)/src/core/surface/lame_client.o: +objs/$(CONFIG)/src/core/surface/secure_channel_create.o: +objs/$(CONFIG)/src/core/surface/secure_server_create.o: +objs/$(CONFIG)/src/core/surface/server.o: +objs/$(CONFIG)/src/core/surface/server_chttp2.o: +objs/$(CONFIG)/src/core/surface/server_create.o: +objs/$(CONFIG)/src/core/transport/chttp2/alpn.o: +objs/$(CONFIG)/src/core/transport/chttp2/bin_encoder.o: +objs/$(CONFIG)/src/core/transport/chttp2/frame_data.o: +objs/$(CONFIG)/src/core/transport/chttp2/frame_goaway.o: +objs/$(CONFIG)/src/core/transport/chttp2/frame_ping.o: +objs/$(CONFIG)/src/core/transport/chttp2/frame_rst_stream.o: +objs/$(CONFIG)/src/core/transport/chttp2/frame_settings.o: +objs/$(CONFIG)/src/core/transport/chttp2/frame_window_update.o: +objs/$(CONFIG)/src/core/transport/chttp2/hpack_parser.o: +objs/$(CONFIG)/src/core/transport/chttp2/hpack_table.o: +objs/$(CONFIG)/src/core/transport/chttp2/huffsyms.o: +objs/$(CONFIG)/src/core/transport/chttp2/status_conversion.o: +objs/$(CONFIG)/src/core/transport/chttp2/stream_encoder.o: +objs/$(CONFIG)/src/core/transport/chttp2/stream_map.o: +objs/$(CONFIG)/src/core/transport/chttp2/timeout_encoding.o: +objs/$(CONFIG)/src/core/transport/chttp2/varint.o: +objs/$(CONFIG)/src/core/transport/chttp2_transport.o: +objs/$(CONFIG)/src/core/transport/metadata.o: +objs/$(CONFIG)/src/core/transport/stream_op.o: +objs/$(CONFIG)/src/core/transport/transport.o: +objs/$(CONFIG)/third_party/cJSON/cJSON.o: -clean_libgrpc_unsecure: - $(E) "[CLEAN] Cleaning libgrpc_unsecure files" - $(Q) $(RM) $(LIBGRPC_UNSECURE_OBJS) - $(Q) $(RM) $(LIBGRPC_UNSECURE_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libgrpc_unsecure.a - $(Q) $(RM) libs/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT) +LIBGRPC++_SRC = \ + src/cpp/client/channel.cc \ + src/cpp/client/channel_arguments.cc \ + src/cpp/client/client_context.cc \ + src/cpp/client/create_channel.cc \ + src/cpp/client/credentials.cc \ + src/cpp/client/internal_stub.cc \ + src/cpp/common/rpc_method.cc \ + src/cpp/proto/proto_utils.cc \ + src/cpp/server/async_server.cc \ + src/cpp/server/async_server_context.cc \ + src/cpp/server/completion_queue.cc \ + src/cpp/server/server.cc \ + src/cpp/server/server_builder.cc \ + src/cpp/server/server_context_impl.cc \ + src/cpp/server/server_credentials.cc \ + src/cpp/server/server_rpc_handler.cc \ + src/cpp/server/thread_pool.cc \ + src/cpp/stream/stream_context.cc \ + src/cpp/util/status.cc \ + src/cpp/util/time.cc \ -LIBGPR_TEST_UTIL_SRC = \ - test/core/util/test_config.c \ - +PUBLIC_HEADERS_CXX += \ + include/grpc++/async_server.h \ + include/grpc++/async_server_context.h \ + include/grpc++/channel_arguments.h \ + include/grpc++/channel_interface.h \ + include/grpc++/client_context.h \ + include/grpc++/completion_queue.h \ + include/grpc++/config.h \ + include/grpc++/create_channel.h \ + include/grpc++/credentials.h \ + include/grpc++/impl/internal_stub.h \ + include/grpc++/impl/rpc_method.h \ + include/grpc++/impl/rpc_service_method.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++/stream_context_interface.h \ -LIBGPR_TEST_UTIL_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGPR_TEST_UTIL_SRC)))) -LIBGPR_TEST_UTIL_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBGPR_TEST_UTIL_SRC)))) +LIBGRPC++_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_SRC)))) ifeq ($(NO_SECURE),true) -libs/$(CONFIG)/libgpr_test_util.a: openssl_dep_error +# You can't build secure libraries if you don't have OpenSSL with ALPN. + +libs/$(CONFIG)/libgrpc++.a: openssl_dep_error +ifeq ($(SYSTEM),MINGW32) +libs/$(CONFIG)/grpc++.$(SHARED_EXT): openssl_dep_error +else +libs/$(CONFIG)/libgrpc++.$(SHARED_EXT): openssl_dep_error +endif else -libs/$(CONFIG)/libgpr_test_util.a: $(OPENSSL_DEP) $(LIBGPR_TEST_UTIL_OBJS) +ifneq ($(OPENSSL_DEP),) +src/cpp/client/channel.cc: $(OPENSSL_DEP) +src/cpp/client/channel_arguments.cc: $(OPENSSL_DEP) +src/cpp/client/client_context.cc: $(OPENSSL_DEP) +src/cpp/client/create_channel.cc: $(OPENSSL_DEP) +src/cpp/client/credentials.cc: $(OPENSSL_DEP) +src/cpp/client/internal_stub.cc: $(OPENSSL_DEP) +src/cpp/common/rpc_method.cc: $(OPENSSL_DEP) +src/cpp/proto/proto_utils.cc: $(OPENSSL_DEP) +src/cpp/server/async_server.cc: $(OPENSSL_DEP) +src/cpp/server/async_server_context.cc: $(OPENSSL_DEP) +src/cpp/server/completion_queue.cc: $(OPENSSL_DEP) +src/cpp/server/server.cc: $(OPENSSL_DEP) +src/cpp/server/server_builder.cc: $(OPENSSL_DEP) +src/cpp/server/server_context_impl.cc: $(OPENSSL_DEP) +src/cpp/server/server_credentials.cc: $(OPENSSL_DEP) +src/cpp/server/server_rpc_handler.cc: $(OPENSSL_DEP) +src/cpp/server/thread_pool.cc: $(OPENSSL_DEP) +src/cpp/stream/stream_context.cc: $(OPENSSL_DEP) +src/cpp/util/status.cc: $(OPENSSL_DEP) +src/cpp/util/time.cc: $(OPENSSL_DEP) +endif + +libs/$(CONFIG)/libgrpc++.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBGRPC++_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` - $(Q) $(AR) rcs libs/$(CONFIG)/libgpr_test_util.a $(LIBGPR_TEST_UTIL_OBJS) - - - - - -endif - -deps_libgpr_test_util: $(LIBGPR_TEST_UTIL_DEPS) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(LIBGPR_TEST_UTIL_DEPS) -endif -endif - -clean_libgpr_test_util: - $(E) "[CLEAN] Cleaning libgpr_test_util files" - $(Q) $(RM) $(LIBGPR_TEST_UTIL_OBJS) - $(Q) $(RM) $(LIBGPR_TEST_UTIL_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libgpr_test_util.a - $(Q) $(RM) libs/$(CONFIG)/libgpr_test_util.$(SHARED_EXT) - - -LIBGRPC_TEST_UTIL_SRC = \ - test/core/end2end/cq_verifier.c \ - test/core/end2end/data/test_root_cert.c \ - test/core/end2end/data/prod_roots_certs.c \ - test/core/end2end/data/server1_cert.c \ - test/core/end2end/data/server1_key.c \ - test/core/iomgr/endpoint_tests.c \ - test/core/statistics/census_log_tests.c \ - test/core/transport/transport_end2end_tests.c \ - test/core/util/grpc_profiler.c \ - test/core/util/port_posix.c \ - test/core/util/parse_hexstring.c \ - test/core/util/slice_splitter.c \ - - -LIBGRPC_TEST_UTIL_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_TEST_UTIL_SRC)))) -LIBGRPC_TEST_UTIL_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBGRPC_TEST_UTIL_SRC)))) - -ifeq ($(NO_SECURE),true) - -libs/$(CONFIG)/libgrpc_test_util.a: openssl_dep_error - - -else - -libs/$(CONFIG)/libgrpc_test_util.a: $(OPENSSL_DEP) $(LIBGRPC_TEST_UTIL_OBJS) - $(E) "[AR] Creating $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(AR) rcs libs/$(CONFIG)/libgrpc_test_util.a $(LIBGRPC_TEST_UTIL_OBJS) - - - - - -endif - -deps_libgrpc_test_util: $(LIBGRPC_TEST_UTIL_DEPS) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(LIBGRPC_TEST_UTIL_DEPS) -endif -endif - -clean_libgrpc_test_util: - $(E) "[CLEAN] Cleaning libgrpc_test_util files" - $(Q) $(RM) $(LIBGRPC_TEST_UTIL_OBJS) - $(Q) $(RM) $(LIBGRPC_TEST_UTIL_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libgrpc_test_util.a - $(Q) $(RM) libs/$(CONFIG)/libgrpc_test_util.$(SHARED_EXT) - - -LIBGRPC++_SRC = \ - src/cpp/client/channel.cc \ - src/cpp/client/channel_arguments.cc \ - src/cpp/client/client_context.cc \ - src/cpp/client/create_channel.cc \ - src/cpp/client/credentials.cc \ - src/cpp/client/internal_stub.cc \ - src/cpp/proto/proto_utils.cc \ - src/cpp/common/rpc_method.cc \ - src/cpp/server/async_server.cc \ - src/cpp/server/async_server_context.cc \ - src/cpp/server/completion_queue.cc \ - src/cpp/server/server_builder.cc \ - src/cpp/server/server_context_impl.cc \ - src/cpp/server/server.cc \ - src/cpp/server/server_rpc_handler.cc \ - src/cpp/server/server_credentials.cc \ - src/cpp/server/thread_pool.cc \ - src/cpp/stream/stream_context.cc \ - src/cpp/util/status.cc \ - src/cpp/util/time.cc \ - -PUBLIC_HEADERS_CXX += \ - include/grpc++/async_server_context.h \ - include/grpc++/async_server.h \ - include/grpc++/channel_arguments.h \ - include/grpc++/channel_interface.h \ - include/grpc++/client_context.h \ - include/grpc++/completion_queue.h \ - include/grpc++/config.h \ - include/grpc++/create_channel.h \ - include/grpc++/credentials.h \ - include/grpc++/impl/internal_stub.h \ - include/grpc++/impl/rpc_method.h \ - include/grpc++/impl/rpc_service_method.h \ - include/grpc++/server_builder.h \ - include/grpc++/server_context.h \ - include/grpc++/server_credentials.h \ - include/grpc++/server.h \ - include/grpc++/status.h \ - include/grpc++/stream_context_interface.h \ - include/grpc++/stream.h \ - -LIBGRPC++_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_SRC)))) -LIBGRPC++_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBGRPC++_SRC)))) - -ifeq ($(NO_SECURE),true) - -libs/$(CONFIG)/libgrpc++.a: openssl_dep_error - -ifeq ($(SYSTEM),MINGW32) -libs/$(CONFIG)/grpc++.$(SHARED_EXT): openssl_dep_error -else -libs/$(CONFIG)/libgrpc++.$(SHARED_EXT): openssl_dep_error -endif - -else - -libs/$(CONFIG)/libgrpc++.a: $(OPENSSL_DEP) $(LIBGRPC++_OBJS) - $(E) "[AR] Creating $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(AR) rcs libs/$(CONFIG)/libgrpc++.a $(LIBGRPC++_OBJS) + $(Q) $(AR) rcs libs/$(CONFIG)/libgrpc++.a $(LIBGRPC++_OBJS) ifeq ($(SYSTEM),MINGW32) -libs/$(CONFIG)/grpc++.$(SHARED_EXT): $(LIBGRPC++_OBJS) libs/$(CONFIG)/grpc.$(SHARED_EXT) $(OPENSSL_DEP) +libs/$(CONFIG)/grpc++.$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP)libs/$(CONFIG)/grpc.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LDXX) $(LDFLAGS) -Llibs/$(CONFIG) -shared -Wl,--output-def=libs/$(CONFIG)/grpc++.def -Wl,--out-implib=libs/$(CONFIG)/libgrpc++-imp.a -o libs/$(CONFIG)/grpc++.$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(LDLIBS_SECURE) $(OPENSSL_MERGE_LIBS) -lgrpc-imp else -libs/$(CONFIG)/libgrpc++.$(SHARED_EXT): $(LIBGRPC++_OBJS) libs/$(CONFIG)/libgrpc.$(SHARED_EXT) $(OPENSSL_DEP) +libs/$(CONFIG)/libgrpc++.$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) libs/$(CONFIG)/libgrpc.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) @@ -1692,41 +2044,62 @@ endif endif -deps_libgrpc++: $(LIBGRPC++_DEPS) - ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(LIBGRPC++_DEPS) +-include $(LIBGRPC++_OBJS:.o=.dep) endif endif -clean_libgrpc++: - $(E) "[CLEAN] Cleaning libgrpc++ files" - $(Q) $(RM) $(LIBGRPC++_OBJS) - $(Q) $(RM) $(LIBGRPC++_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libgrpc++.a - $(Q) $(RM) libs/$(CONFIG)/libgrpc++.$(SHARED_EXT) +objs/$(CONFIG)/src/cpp/client/channel.o: +objs/$(CONFIG)/src/cpp/client/channel_arguments.o: +objs/$(CONFIG)/src/cpp/client/client_context.o: +objs/$(CONFIG)/src/cpp/client/create_channel.o: +objs/$(CONFIG)/src/cpp/client/credentials.o: +objs/$(CONFIG)/src/cpp/client/internal_stub.o: +objs/$(CONFIG)/src/cpp/common/rpc_method.o: +objs/$(CONFIG)/src/cpp/proto/proto_utils.o: +objs/$(CONFIG)/src/cpp/server/async_server.o: +objs/$(CONFIG)/src/cpp/server/async_server_context.o: +objs/$(CONFIG)/src/cpp/server/completion_queue.o: +objs/$(CONFIG)/src/cpp/server/server.o: +objs/$(CONFIG)/src/cpp/server/server_builder.o: +objs/$(CONFIG)/src/cpp/server/server_context_impl.o: +objs/$(CONFIG)/src/cpp/server/server_credentials.o: +objs/$(CONFIG)/src/cpp/server/server_rpc_handler.o: +objs/$(CONFIG)/src/cpp/server/thread_pool.o: +objs/$(CONFIG)/src/cpp/stream/stream_context.o: +objs/$(CONFIG)/src/cpp/util/status.o: +objs/$(CONFIG)/src/cpp/util/time.o: LIBGRPC++_TEST_UTIL_SRC = \ - gens/test/cpp/util/messages.pb.cc \ gens/test/cpp/util/echo.pb.cc \ gens/test/cpp/util/echo_duplicate.pb.cc \ - test/cpp/util/create_test_channel.cc \ + gens/test/cpp/util/messages.pb.cc \ test/cpp/end2end/async_test_server.cc \ + test/cpp/util/create_test_channel.cc \ LIBGRPC++_TEST_UTIL_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_TEST_UTIL_SRC)))) -LIBGRPC++_TEST_UTIL_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBGRPC++_TEST_UTIL_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure libraries if you don't have OpenSSL with ALPN. + libs/$(CONFIG)/libgrpc++_test_util.a: openssl_dep_error else -libs/$(CONFIG)/libgrpc++_test_util.a: $(OPENSSL_DEP) $(LIBGRPC++_TEST_UTIL_OBJS) +ifneq ($(OPENSSL_DEP),) +test/cpp/util/echo.proto: $(OPENSSL_DEP) +test/cpp/util/echo_duplicate.proto: $(OPENSSL_DEP) +test/cpp/util/messages.proto: $(OPENSSL_DEP) +test/cpp/end2end/async_test_server.cc: $(OPENSSL_DEP) +test/cpp/util/create_test_channel.cc: $(OPENSSL_DEP) +endif + +libs/$(CONFIG)/libgrpc++_test_util.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBGRPC++_TEST_UTIL_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libgrpc++_test_util.a $(LIBGRPC++_TEST_UTIL_OBJS) @@ -1737,20 +2110,17 @@ libs/$(CONFIG)/libgrpc++_test_util.a: $(OPENSSL_DEP) $(LIBGRPC++_TEST_UTIL_OBJS) endif -deps_libgrpc++_test_util: $(LIBGRPC++_TEST_UTIL_DEPS) - ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(LIBGRPC++_TEST_UTIL_DEPS) +-include $(LIBGRPC++_TEST_UTIL_OBJS:.o=.dep) endif endif -clean_libgrpc++_test_util: - $(E) "[CLEAN] Cleaning libgrpc++_test_util files" - $(Q) $(RM) $(LIBGRPC++_TEST_UTIL_OBJS) - $(Q) $(RM) $(LIBGRPC++_TEST_UTIL_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libgrpc++_test_util.a - $(Q) $(RM) libs/$(CONFIG)/libgrpc++_test_util.$(SHARED_EXT) + + + +objs/$(CONFIG)/test/cpp/end2end/async_test_server.o: gens/test/cpp/util/echo.pb.cc gens/test/cpp/util/echo_duplicate.pb.cc gens/test/cpp/util/messages.pb.cc +objs/$(CONFIG)/test/cpp/util/create_test_channel.o: gens/test/cpp/util/echo.pb.cc gens/test/cpp/util/echo_duplicate.pb.cc gens/test/cpp/util/messages.pb.cc LIBEND2END_FIXTURE_CHTTP2_FAKE_SECURITY_SRC = \ @@ -1758,16 +2128,21 @@ LIBEND2END_FIXTURE_CHTTP2_FAKE_SECURITY_SRC = \ LIBEND2END_FIXTURE_CHTTP2_FAKE_SECURITY_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_FIXTURE_CHTTP2_FAKE_SECURITY_SRC)))) -LIBEND2END_FIXTURE_CHTTP2_FAKE_SECURITY_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_FIXTURE_CHTTP2_FAKE_SECURITY_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure libraries if you don't have OpenSSL with ALPN. + libs/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a: openssl_dep_error else -libs/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a: $(OPENSSL_DEP) $(LIBEND2END_FIXTURE_CHTTP2_FAKE_SECURITY_OBJS) +ifneq ($(OPENSSL_DEP),) +test/core/end2end/fixtures/chttp2_fake_security.c: $(OPENSSL_DEP) +endif + +libs/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBEND2END_FIXTURE_CHTTP2_FAKE_SECURITY_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a $(LIBEND2END_FIXTURE_CHTTP2_FAKE_SECURITY_OBJS) @@ -1778,20 +2153,13 @@ libs/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a: $(OPENSSL_DEP) $(LIBEN endif -deps_libend2end_fixture_chttp2_fake_security: $(LIBEND2END_FIXTURE_CHTTP2_FAKE_SECURITY_DEPS) - ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(LIBEND2END_FIXTURE_CHTTP2_FAKE_SECURITY_DEPS) +-include $(LIBEND2END_FIXTURE_CHTTP2_FAKE_SECURITY_OBJS:.o=.dep) endif endif -clean_libend2end_fixture_chttp2_fake_security: - $(E) "[CLEAN] Cleaning libend2end_fixture_chttp2_fake_security files" - $(Q) $(RM) $(LIBEND2END_FIXTURE_CHTTP2_FAKE_SECURITY_OBJS) - $(Q) $(RM) $(LIBEND2END_FIXTURE_CHTTP2_FAKE_SECURITY_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_fixture_chttp2_fake_security.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/fixtures/chttp2_fake_security.o: LIBEND2END_FIXTURE_CHTTP2_FULLSTACK_SRC = \ @@ -1799,16 +2167,21 @@ LIBEND2END_FIXTURE_CHTTP2_FULLSTACK_SRC = \ LIBEND2END_FIXTURE_CHTTP2_FULLSTACK_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_FIXTURE_CHTTP2_FULLSTACK_SRC)))) -LIBEND2END_FIXTURE_CHTTP2_FULLSTACK_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_FIXTURE_CHTTP2_FULLSTACK_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure libraries if you don't have OpenSSL with ALPN. + libs/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a: openssl_dep_error else -libs/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a: $(OPENSSL_DEP) $(LIBEND2END_FIXTURE_CHTTP2_FULLSTACK_OBJS) +ifneq ($(OPENSSL_DEP),) +test/core/end2end/fixtures/chttp2_fullstack.c: $(OPENSSL_DEP) +endif + +libs/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBEND2END_FIXTURE_CHTTP2_FULLSTACK_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a $(LIBEND2END_FIXTURE_CHTTP2_FULLSTACK_OBJS) @@ -1819,20 +2192,13 @@ libs/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a: $(OPENSSL_DEP) $(LIBEND2EN endif -deps_libend2end_fixture_chttp2_fullstack: $(LIBEND2END_FIXTURE_CHTTP2_FULLSTACK_DEPS) - ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(LIBEND2END_FIXTURE_CHTTP2_FULLSTACK_DEPS) +-include $(LIBEND2END_FIXTURE_CHTTP2_FULLSTACK_OBJS:.o=.dep) endif endif -clean_libend2end_fixture_chttp2_fullstack: - $(E) "[CLEAN] Cleaning libend2end_fixture_chttp2_fullstack files" - $(Q) $(RM) $(LIBEND2END_FIXTURE_CHTTP2_FULLSTACK_OBJS) - $(Q) $(RM) $(LIBEND2END_FIXTURE_CHTTP2_FULLSTACK_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_fixture_chttp2_fullstack.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/fixtures/chttp2_fullstack.o: LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_FULLSTACK_SRC = \ @@ -1840,16 +2206,21 @@ LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_FULLSTACK_SRC = \ LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_FULLSTACK_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_FULLSTACK_SRC)))) -LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_FULLSTACK_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_FULLSTACK_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure libraries if you don't have OpenSSL with ALPN. + libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a: openssl_dep_error else -libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a: $(OPENSSL_DEP) $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_FULLSTACK_OBJS) +ifneq ($(OPENSSL_DEP),) +test/core/end2end/fixtures/chttp2_simple_ssl_fullstack.c: $(OPENSSL_DEP) +endif + +libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_FULLSTACK_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_FULLSTACK_OBJS) @@ -1860,20 +2231,13 @@ libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a: $(OPENSSL_DEP) endif -deps_libend2end_fixture_chttp2_simple_ssl_fullstack: $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_FULLSTACK_DEPS) - ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_FULLSTACK_DEPS) +-include $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_FULLSTACK_OBJS:.o=.dep) endif endif -clean_libend2end_fixture_chttp2_simple_ssl_fullstack: - $(E) "[CLEAN] Cleaning libend2end_fixture_chttp2_simple_ssl_fullstack files" - $(Q) $(RM) $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_FULLSTACK_OBJS) - $(Q) $(RM) $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_FULLSTACK_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/fixtures/chttp2_simple_ssl_fullstack.o: LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SRC = \ @@ -1881,16 +2245,21 @@ LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SRC = \ LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SRC)))) -LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure libraries if you don't have OpenSSL with ALPN. + libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a: openssl_dep_error else -libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a: $(OPENSSL_DEP) $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_OBJS) +ifneq ($(OPENSSL_DEP),) +test/core/end2end/fixtures/chttp2_simple_ssl_with_oauth2_fullstack.c: $(OPENSSL_DEP) +endif + +libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_OBJS) @@ -1901,20 +2270,13 @@ libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a: $(O endif -deps_libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack: $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_DEPS) - ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_DEPS) +-include $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_OBJS:.o=.dep) endif endif -clean_libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack: - $(E) "[CLEAN] Cleaning libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack files" - $(Q) $(RM) $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_OBJS) - $(Q) $(RM) $(LIBEND2END_FIXTURE_CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/fixtures/chttp2_simple_ssl_with_oauth2_fullstack.o: LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_SRC = \ @@ -1922,16 +2284,21 @@ LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_SRC = \ LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_SRC)))) -LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure libraries if you don't have OpenSSL with ALPN. + libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a: openssl_dep_error else -libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a: $(OPENSSL_DEP) $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_OBJS) +ifneq ($(OPENSSL_DEP),) +test/core/end2end/fixtures/chttp2_socket_pair.c: $(OPENSSL_DEP) +endif + +libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_OBJS) @@ -1942,20 +2309,13 @@ libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a: $(OPENSSL_DEP) $(LIBEND2 endif -deps_libend2end_fixture_chttp2_socket_pair: $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_DEPS) - ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_DEPS) +-include $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_OBJS:.o=.dep) endif endif -clean_libend2end_fixture_chttp2_socket_pair: - $(E) "[CLEAN] Cleaning libend2end_fixture_chttp2_socket_pair files" - $(Q) $(RM) $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_OBJS) - $(Q) $(RM) $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/fixtures/chttp2_socket_pair.o: LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SRC = \ @@ -1963,16 +2323,21 @@ LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SRC = \ LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SRC)))) -LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure libraries if you don't have OpenSSL with ALPN. + libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a: openssl_dep_error else -libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a: $(OPENSSL_DEP) $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_OBJS) +ifneq ($(OPENSSL_DEP),) +test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c: $(OPENSSL_DEP) +endif + +libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_OBJS) @@ -1983,20 +2348,13 @@ libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a: $(OPE endif -deps_libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time: $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_DEPS) - ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_DEPS) +-include $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_OBJS:.o=.dep) endif endif -clean_libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time: - $(E) "[CLEAN] Cleaning libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time files" - $(Q) $(RM) $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_OBJS) - $(Q) $(RM) $(LIBEND2END_FIXTURE_CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.o: LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_SRC = \ @@ -2004,9 +2362,8 @@ LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_SRC = \ LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_SRC)))) -LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_SRC)))) -libs/$(CONFIG)/libend2end_test_cancel_after_accept.a: $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_OBJS) +libs/$(CONFIG)/libend2end_test_cancel_after_accept.a: $(ZLIB_DEP) $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_cancel_after_accept.a $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_OBJS) @@ -2015,18 +2372,11 @@ libs/$(CONFIG)/libend2end_test_cancel_after_accept.a: $(LIBEND2END_TEST_CANCEL_A -deps_libend2end_test_cancel_after_accept: $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_DEPS) +-include $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_OBJS:.o=.dep) endif -clean_libend2end_test_cancel_after_accept: - $(E) "[CLEAN] Cleaning libend2end_test_cancel_after_accept files" - $(Q) $(RM) $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_cancel_after_accept.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_cancel_after_accept.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/cancel_after_accept.o: LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_SRC = \ @@ -2034,9 +2384,8 @@ LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_SRC = \ LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_SRC)))) -LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_SRC)))) -libs/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a: $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_OBJS) +libs/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a: $(ZLIB_DEP) $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_OBJS) @@ -2045,18 +2394,11 @@ libs/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a: $(LIBEND -deps_libend2end_test_cancel_after_accept_and_writes_closed: $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_DEPS) +-include $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_OBJS:.o=.dep) endif -clean_libend2end_test_cancel_after_accept_and_writes_closed: - $(E) "[CLEAN] Cleaning libend2end_test_cancel_after_accept_and_writes_closed files" - $(Q) $(RM) $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/cancel_after_accept_and_writes_closed.o: LIBEND2END_TEST_CANCEL_AFTER_INVOKE_SRC = \ @@ -2064,9 +2406,8 @@ LIBEND2END_TEST_CANCEL_AFTER_INVOKE_SRC = \ LIBEND2END_TEST_CANCEL_AFTER_INVOKE_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_CANCEL_AFTER_INVOKE_SRC)))) -LIBEND2END_TEST_CANCEL_AFTER_INVOKE_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_CANCEL_AFTER_INVOKE_SRC)))) -libs/$(CONFIG)/libend2end_test_cancel_after_invoke.a: $(LIBEND2END_TEST_CANCEL_AFTER_INVOKE_OBJS) +libs/$(CONFIG)/libend2end_test_cancel_after_invoke.a: $(ZLIB_DEP) $(LIBEND2END_TEST_CANCEL_AFTER_INVOKE_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_cancel_after_invoke.a $(LIBEND2END_TEST_CANCEL_AFTER_INVOKE_OBJS) @@ -2075,18 +2416,11 @@ libs/$(CONFIG)/libend2end_test_cancel_after_invoke.a: $(LIBEND2END_TEST_CANCEL_A -deps_libend2end_test_cancel_after_invoke: $(LIBEND2END_TEST_CANCEL_AFTER_INVOKE_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_CANCEL_AFTER_INVOKE_DEPS) +-include $(LIBEND2END_TEST_CANCEL_AFTER_INVOKE_OBJS:.o=.dep) endif -clean_libend2end_test_cancel_after_invoke: - $(E) "[CLEAN] Cleaning libend2end_test_cancel_after_invoke files" - $(Q) $(RM) $(LIBEND2END_TEST_CANCEL_AFTER_INVOKE_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_CANCEL_AFTER_INVOKE_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_cancel_after_invoke.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_cancel_after_invoke.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/cancel_after_invoke.o: LIBEND2END_TEST_CANCEL_BEFORE_INVOKE_SRC = \ @@ -2094,9 +2428,8 @@ LIBEND2END_TEST_CANCEL_BEFORE_INVOKE_SRC = \ LIBEND2END_TEST_CANCEL_BEFORE_INVOKE_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_CANCEL_BEFORE_INVOKE_SRC)))) -LIBEND2END_TEST_CANCEL_BEFORE_INVOKE_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_CANCEL_BEFORE_INVOKE_SRC)))) -libs/$(CONFIG)/libend2end_test_cancel_before_invoke.a: $(LIBEND2END_TEST_CANCEL_BEFORE_INVOKE_OBJS) +libs/$(CONFIG)/libend2end_test_cancel_before_invoke.a: $(ZLIB_DEP) $(LIBEND2END_TEST_CANCEL_BEFORE_INVOKE_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_cancel_before_invoke.a $(LIBEND2END_TEST_CANCEL_BEFORE_INVOKE_OBJS) @@ -2105,18 +2438,11 @@ libs/$(CONFIG)/libend2end_test_cancel_before_invoke.a: $(LIBEND2END_TEST_CANCEL_ -deps_libend2end_test_cancel_before_invoke: $(LIBEND2END_TEST_CANCEL_BEFORE_INVOKE_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_CANCEL_BEFORE_INVOKE_DEPS) +-include $(LIBEND2END_TEST_CANCEL_BEFORE_INVOKE_OBJS:.o=.dep) endif -clean_libend2end_test_cancel_before_invoke: - $(E) "[CLEAN] Cleaning libend2end_test_cancel_before_invoke files" - $(Q) $(RM) $(LIBEND2END_TEST_CANCEL_BEFORE_INVOKE_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_CANCEL_BEFORE_INVOKE_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_cancel_before_invoke.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_cancel_before_invoke.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/cancel_before_invoke.o: LIBEND2END_TEST_CANCEL_IN_A_VACUUM_SRC = \ @@ -2124,9 +2450,8 @@ LIBEND2END_TEST_CANCEL_IN_A_VACUUM_SRC = \ LIBEND2END_TEST_CANCEL_IN_A_VACUUM_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_CANCEL_IN_A_VACUUM_SRC)))) -LIBEND2END_TEST_CANCEL_IN_A_VACUUM_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_CANCEL_IN_A_VACUUM_SRC)))) -libs/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a: $(LIBEND2END_TEST_CANCEL_IN_A_VACUUM_OBJS) +libs/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a: $(ZLIB_DEP) $(LIBEND2END_TEST_CANCEL_IN_A_VACUUM_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a $(LIBEND2END_TEST_CANCEL_IN_A_VACUUM_OBJS) @@ -2135,18 +2460,11 @@ libs/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a: $(LIBEND2END_TEST_CANCEL_IN -deps_libend2end_test_cancel_in_a_vacuum: $(LIBEND2END_TEST_CANCEL_IN_A_VACUUM_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_CANCEL_IN_A_VACUUM_DEPS) +-include $(LIBEND2END_TEST_CANCEL_IN_A_VACUUM_OBJS:.o=.dep) endif -clean_libend2end_test_cancel_in_a_vacuum: - $(E) "[CLEAN] Cleaning libend2end_test_cancel_in_a_vacuum files" - $(Q) $(RM) $(LIBEND2END_TEST_CANCEL_IN_A_VACUUM_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_CANCEL_IN_A_VACUUM_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/cancel_in_a_vacuum.o: LIBEND2END_TEST_CENSUS_SIMPLE_REQUEST_SRC = \ @@ -2154,9 +2472,8 @@ LIBEND2END_TEST_CENSUS_SIMPLE_REQUEST_SRC = \ LIBEND2END_TEST_CENSUS_SIMPLE_REQUEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_CENSUS_SIMPLE_REQUEST_SRC)))) -LIBEND2END_TEST_CENSUS_SIMPLE_REQUEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_CENSUS_SIMPLE_REQUEST_SRC)))) -libs/$(CONFIG)/libend2end_test_census_simple_request.a: $(LIBEND2END_TEST_CENSUS_SIMPLE_REQUEST_OBJS) +libs/$(CONFIG)/libend2end_test_census_simple_request.a: $(ZLIB_DEP) $(LIBEND2END_TEST_CENSUS_SIMPLE_REQUEST_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_census_simple_request.a $(LIBEND2END_TEST_CENSUS_SIMPLE_REQUEST_OBJS) @@ -2165,18 +2482,11 @@ libs/$(CONFIG)/libend2end_test_census_simple_request.a: $(LIBEND2END_TEST_CENSUS -deps_libend2end_test_census_simple_request: $(LIBEND2END_TEST_CENSUS_SIMPLE_REQUEST_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_CENSUS_SIMPLE_REQUEST_DEPS) +-include $(LIBEND2END_TEST_CENSUS_SIMPLE_REQUEST_OBJS:.o=.dep) endif -clean_libend2end_test_census_simple_request: - $(E) "[CLEAN] Cleaning libend2end_test_census_simple_request files" - $(Q) $(RM) $(LIBEND2END_TEST_CENSUS_SIMPLE_REQUEST_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_CENSUS_SIMPLE_REQUEST_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_census_simple_request.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_census_simple_request.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/census_simple_request.o: LIBEND2END_TEST_DISAPPEARING_SERVER_SRC = \ @@ -2184,9 +2494,8 @@ LIBEND2END_TEST_DISAPPEARING_SERVER_SRC = \ LIBEND2END_TEST_DISAPPEARING_SERVER_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_DISAPPEARING_SERVER_SRC)))) -LIBEND2END_TEST_DISAPPEARING_SERVER_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_DISAPPEARING_SERVER_SRC)))) -libs/$(CONFIG)/libend2end_test_disappearing_server.a: $(LIBEND2END_TEST_DISAPPEARING_SERVER_OBJS) +libs/$(CONFIG)/libend2end_test_disappearing_server.a: $(ZLIB_DEP) $(LIBEND2END_TEST_DISAPPEARING_SERVER_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_disappearing_server.a $(LIBEND2END_TEST_DISAPPEARING_SERVER_OBJS) @@ -2195,18 +2504,11 @@ libs/$(CONFIG)/libend2end_test_disappearing_server.a: $(LIBEND2END_TEST_DISAPPEA -deps_libend2end_test_disappearing_server: $(LIBEND2END_TEST_DISAPPEARING_SERVER_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_DISAPPEARING_SERVER_DEPS) +-include $(LIBEND2END_TEST_DISAPPEARING_SERVER_OBJS:.o=.dep) endif -clean_libend2end_test_disappearing_server: - $(E) "[CLEAN] Cleaning libend2end_test_disappearing_server files" - $(Q) $(RM) $(LIBEND2END_TEST_DISAPPEARING_SERVER_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_DISAPPEARING_SERVER_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_disappearing_server.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_disappearing_server.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/disappearing_server.o: LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_SRC = \ @@ -2214,9 +2516,8 @@ LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_SRC = \ LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_SRC)))) -LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_SRC)))) -libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a: $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_OBJS) +libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a: $(ZLIB_DEP) $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_OBJS) @@ -2225,18 +2526,11 @@ libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a: -deps_libend2end_test_early_server_shutdown_finishes_inflight_calls: $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_DEPS) +-include $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_OBJS:.o=.dep) endif -clean_libend2end_test_early_server_shutdown_finishes_inflight_calls: - $(E) "[CLEAN] Cleaning libend2end_test_early_server_shutdown_finishes_inflight_calls files" - $(Q) $(RM) $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.o: LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_SRC = \ @@ -2244,9 +2538,8 @@ LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_SRC = \ LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_SRC)))) -LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_SRC)))) -libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a: $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_OBJS) +libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a: $(ZLIB_DEP) $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_OBJS) @@ -2255,18 +2548,33 @@ libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a: $(LIBEND2E -deps_libend2end_test_early_server_shutdown_finishes_tags: $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_DEPS) +ifneq ($(NO_DEPS),true) +-include $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_OBJS:.o=.dep) +endif + +objs/$(CONFIG)/test/core/end2end/tests/early_server_shutdown_finishes_tags.o: + + +LIBEND2END_TEST_GRACEFUL_SERVER_SHUTDOWN_SRC = \ + test/core/end2end/tests/graceful_server_shutdown.c \ + + +LIBEND2END_TEST_GRACEFUL_SERVER_SHUTDOWN_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_GRACEFUL_SERVER_SHUTDOWN_SRC)))) + +libs/$(CONFIG)/libend2end_test_graceful_server_shutdown.a: $(ZLIB_DEP) $(LIBEND2END_TEST_GRACEFUL_SERVER_SHUTDOWN_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_graceful_server_shutdown.a $(LIBEND2END_TEST_GRACEFUL_SERVER_SHUTDOWN_OBJS) + + + + ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_DEPS) +-include $(LIBEND2END_TEST_GRACEFUL_SERVER_SHUTDOWN_OBJS:.o=.dep) endif -clean_libend2end_test_early_server_shutdown_finishes_tags: - $(E) "[CLEAN] Cleaning libend2end_test_early_server_shutdown_finishes_tags files" - $(Q) $(RM) $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/graceful_server_shutdown.o: LIBEND2END_TEST_INVOKE_LARGE_REQUEST_SRC = \ @@ -2274,9 +2582,8 @@ LIBEND2END_TEST_INVOKE_LARGE_REQUEST_SRC = \ LIBEND2END_TEST_INVOKE_LARGE_REQUEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_INVOKE_LARGE_REQUEST_SRC)))) -LIBEND2END_TEST_INVOKE_LARGE_REQUEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_INVOKE_LARGE_REQUEST_SRC)))) -libs/$(CONFIG)/libend2end_test_invoke_large_request.a: $(LIBEND2END_TEST_INVOKE_LARGE_REQUEST_OBJS) +libs/$(CONFIG)/libend2end_test_invoke_large_request.a: $(ZLIB_DEP) $(LIBEND2END_TEST_INVOKE_LARGE_REQUEST_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_invoke_large_request.a $(LIBEND2END_TEST_INVOKE_LARGE_REQUEST_OBJS) @@ -2285,18 +2592,11 @@ libs/$(CONFIG)/libend2end_test_invoke_large_request.a: $(LIBEND2END_TEST_INVOKE_ -deps_libend2end_test_invoke_large_request: $(LIBEND2END_TEST_INVOKE_LARGE_REQUEST_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_INVOKE_LARGE_REQUEST_DEPS) +-include $(LIBEND2END_TEST_INVOKE_LARGE_REQUEST_OBJS:.o=.dep) endif -clean_libend2end_test_invoke_large_request: - $(E) "[CLEAN] Cleaning libend2end_test_invoke_large_request files" - $(Q) $(RM) $(LIBEND2END_TEST_INVOKE_LARGE_REQUEST_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_INVOKE_LARGE_REQUEST_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_invoke_large_request.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_invoke_large_request.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/invoke_large_request.o: LIBEND2END_TEST_MAX_CONCURRENT_STREAMS_SRC = \ @@ -2304,9 +2604,8 @@ LIBEND2END_TEST_MAX_CONCURRENT_STREAMS_SRC = \ LIBEND2END_TEST_MAX_CONCURRENT_STREAMS_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_MAX_CONCURRENT_STREAMS_SRC)))) -LIBEND2END_TEST_MAX_CONCURRENT_STREAMS_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_MAX_CONCURRENT_STREAMS_SRC)))) -libs/$(CONFIG)/libend2end_test_max_concurrent_streams.a: $(LIBEND2END_TEST_MAX_CONCURRENT_STREAMS_OBJS) +libs/$(CONFIG)/libend2end_test_max_concurrent_streams.a: $(ZLIB_DEP) $(LIBEND2END_TEST_MAX_CONCURRENT_STREAMS_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_max_concurrent_streams.a $(LIBEND2END_TEST_MAX_CONCURRENT_STREAMS_OBJS) @@ -2315,18 +2614,11 @@ libs/$(CONFIG)/libend2end_test_max_concurrent_streams.a: $(LIBEND2END_TEST_MAX_C -deps_libend2end_test_max_concurrent_streams: $(LIBEND2END_TEST_MAX_CONCURRENT_STREAMS_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_MAX_CONCURRENT_STREAMS_DEPS) +-include $(LIBEND2END_TEST_MAX_CONCURRENT_STREAMS_OBJS:.o=.dep) endif -clean_libend2end_test_max_concurrent_streams: - $(E) "[CLEAN] Cleaning libend2end_test_max_concurrent_streams files" - $(Q) $(RM) $(LIBEND2END_TEST_MAX_CONCURRENT_STREAMS_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_MAX_CONCURRENT_STREAMS_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_max_concurrent_streams.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_max_concurrent_streams.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/max_concurrent_streams.o: LIBEND2END_TEST_NO_OP_SRC = \ @@ -2334,9 +2626,8 @@ LIBEND2END_TEST_NO_OP_SRC = \ LIBEND2END_TEST_NO_OP_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_NO_OP_SRC)))) -LIBEND2END_TEST_NO_OP_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_NO_OP_SRC)))) -libs/$(CONFIG)/libend2end_test_no_op.a: $(LIBEND2END_TEST_NO_OP_OBJS) +libs/$(CONFIG)/libend2end_test_no_op.a: $(ZLIB_DEP) $(LIBEND2END_TEST_NO_OP_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_no_op.a $(LIBEND2END_TEST_NO_OP_OBJS) @@ -2345,18 +2636,11 @@ libs/$(CONFIG)/libend2end_test_no_op.a: $(LIBEND2END_TEST_NO_OP_OBJS) -deps_libend2end_test_no_op: $(LIBEND2END_TEST_NO_OP_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_NO_OP_DEPS) +-include $(LIBEND2END_TEST_NO_OP_OBJS:.o=.dep) endif -clean_libend2end_test_no_op: - $(E) "[CLEAN] Cleaning libend2end_test_no_op files" - $(Q) $(RM) $(LIBEND2END_TEST_NO_OP_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_NO_OP_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_no_op.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_no_op.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/no_op.o: LIBEND2END_TEST_PING_PONG_STREAMING_SRC = \ @@ -2364,9 +2648,8 @@ LIBEND2END_TEST_PING_PONG_STREAMING_SRC = \ LIBEND2END_TEST_PING_PONG_STREAMING_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_PING_PONG_STREAMING_SRC)))) -LIBEND2END_TEST_PING_PONG_STREAMING_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_PING_PONG_STREAMING_SRC)))) -libs/$(CONFIG)/libend2end_test_ping_pong_streaming.a: $(LIBEND2END_TEST_PING_PONG_STREAMING_OBJS) +libs/$(CONFIG)/libend2end_test_ping_pong_streaming.a: $(ZLIB_DEP) $(LIBEND2END_TEST_PING_PONG_STREAMING_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_ping_pong_streaming.a $(LIBEND2END_TEST_PING_PONG_STREAMING_OBJS) @@ -2375,18 +2658,11 @@ libs/$(CONFIG)/libend2end_test_ping_pong_streaming.a: $(LIBEND2END_TEST_PING_PON -deps_libend2end_test_ping_pong_streaming: $(LIBEND2END_TEST_PING_PONG_STREAMING_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_PING_PONG_STREAMING_DEPS) +-include $(LIBEND2END_TEST_PING_PONG_STREAMING_OBJS:.o=.dep) endif -clean_libend2end_test_ping_pong_streaming: - $(E) "[CLEAN] Cleaning libend2end_test_ping_pong_streaming files" - $(Q) $(RM) $(LIBEND2END_TEST_PING_PONG_STREAMING_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_PING_PONG_STREAMING_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_ping_pong_streaming.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_ping_pong_streaming.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/ping_pong_streaming.o: LIBEND2END_TEST_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_SRC = \ @@ -2394,9 +2670,8 @@ LIBEND2END_TEST_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_SRC = \ LIBEND2END_TEST_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_SRC)))) -LIBEND2END_TEST_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_SRC)))) -libs/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.a: $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_OBJS) +libs/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.a: $(ZLIB_DEP) $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.a $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_OBJS) @@ -2405,18 +2680,11 @@ libs/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload -deps_libend2end_test_request_response_with_binary_metadata_and_payload: $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_DEPS) +-include $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_OBJS:.o=.dep) endif -clean_libend2end_test_request_response_with_binary_metadata_and_payload: - $(E) "[CLEAN] Cleaning libend2end_test_request_response_with_binary_metadata_and_payload files" - $(Q) $(RM) $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.o: LIBEND2END_TEST_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_SRC = \ @@ -2424,9 +2692,8 @@ LIBEND2END_TEST_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_SRC = \ LIBEND2END_TEST_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_SRC)))) -LIBEND2END_TEST_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_SRC)))) -libs/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a: $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_OBJS) +libs/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a: $(ZLIB_DEP) $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_OBJS) @@ -2435,18 +2702,11 @@ libs/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a: $(L -deps_libend2end_test_request_response_with_metadata_and_payload: $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_DEPS) +-include $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_OBJS:.o=.dep) endif -clean_libend2end_test_request_response_with_metadata_and_payload: - $(E) "[CLEAN] Cleaning libend2end_test_request_response_with_metadata_and_payload files" - $(Q) $(RM) $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/request_response_with_metadata_and_payload.o: LIBEND2END_TEST_REQUEST_RESPONSE_WITH_PAYLOAD_SRC = \ @@ -2454,9 +2714,8 @@ LIBEND2END_TEST_REQUEST_RESPONSE_WITH_PAYLOAD_SRC = \ LIBEND2END_TEST_REQUEST_RESPONSE_WITH_PAYLOAD_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_PAYLOAD_SRC)))) -LIBEND2END_TEST_REQUEST_RESPONSE_WITH_PAYLOAD_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_PAYLOAD_SRC)))) -libs/$(CONFIG)/libend2end_test_request_response_with_payload.a: $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_PAYLOAD_OBJS) +libs/$(CONFIG)/libend2end_test_request_response_with_payload.a: $(ZLIB_DEP) $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_PAYLOAD_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_request_response_with_payload.a $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_PAYLOAD_OBJS) @@ -2465,18 +2724,11 @@ libs/$(CONFIG)/libend2end_test_request_response_with_payload.a: $(LIBEND2END_TES -deps_libend2end_test_request_response_with_payload: $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_PAYLOAD_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_PAYLOAD_DEPS) +-include $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_PAYLOAD_OBJS:.o=.dep) endif -clean_libend2end_test_request_response_with_payload: - $(E) "[CLEAN] Cleaning libend2end_test_request_response_with_payload files" - $(Q) $(RM) $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_PAYLOAD_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_PAYLOAD_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_request_response_with_payload.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_request_response_with_payload.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/request_response_with_payload.o: LIBEND2END_TEST_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_SRC = \ @@ -2484,9 +2736,8 @@ LIBEND2END_TEST_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_SRC = \ LIBEND2END_TEST_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_SRC)))) -LIBEND2END_TEST_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_SRC)))) -libs/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.a: $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_OBJS) +libs/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.a: $(ZLIB_DEP) $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.a $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_OBJS) @@ -2495,18 +2746,11 @@ libs/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_paylo -deps_libend2end_test_request_response_with_trailing_metadata_and_payload: $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_DEPS) +-include $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_OBJS:.o=.dep) endif -clean_libend2end_test_request_response_with_trailing_metadata_and_payload: - $(E) "[CLEAN] Cleaning libend2end_test_request_response_with_trailing_metadata_and_payload files" - $(Q) $(RM) $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.o: LIBEND2END_TEST_SIMPLE_DELAYED_REQUEST_SRC = \ @@ -2514,9 +2758,8 @@ LIBEND2END_TEST_SIMPLE_DELAYED_REQUEST_SRC = \ LIBEND2END_TEST_SIMPLE_DELAYED_REQUEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_SIMPLE_DELAYED_REQUEST_SRC)))) -LIBEND2END_TEST_SIMPLE_DELAYED_REQUEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_SIMPLE_DELAYED_REQUEST_SRC)))) -libs/$(CONFIG)/libend2end_test_simple_delayed_request.a: $(LIBEND2END_TEST_SIMPLE_DELAYED_REQUEST_OBJS) +libs/$(CONFIG)/libend2end_test_simple_delayed_request.a: $(ZLIB_DEP) $(LIBEND2END_TEST_SIMPLE_DELAYED_REQUEST_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_simple_delayed_request.a $(LIBEND2END_TEST_SIMPLE_DELAYED_REQUEST_OBJS) @@ -2525,18 +2768,11 @@ libs/$(CONFIG)/libend2end_test_simple_delayed_request.a: $(LIBEND2END_TEST_SIMPL -deps_libend2end_test_simple_delayed_request: $(LIBEND2END_TEST_SIMPLE_DELAYED_REQUEST_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_SIMPLE_DELAYED_REQUEST_DEPS) +-include $(LIBEND2END_TEST_SIMPLE_DELAYED_REQUEST_OBJS:.o=.dep) endif -clean_libend2end_test_simple_delayed_request: - $(E) "[CLEAN] Cleaning libend2end_test_simple_delayed_request files" - $(Q) $(RM) $(LIBEND2END_TEST_SIMPLE_DELAYED_REQUEST_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_SIMPLE_DELAYED_REQUEST_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_simple_delayed_request.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_simple_delayed_request.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/simple_delayed_request.o: LIBEND2END_TEST_SIMPLE_REQUEST_SRC = \ @@ -2544,9 +2780,8 @@ LIBEND2END_TEST_SIMPLE_REQUEST_SRC = \ LIBEND2END_TEST_SIMPLE_REQUEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_SIMPLE_REQUEST_SRC)))) -LIBEND2END_TEST_SIMPLE_REQUEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_SIMPLE_REQUEST_SRC)))) -libs/$(CONFIG)/libend2end_test_simple_request.a: $(LIBEND2END_TEST_SIMPLE_REQUEST_OBJS) +libs/$(CONFIG)/libend2end_test_simple_request.a: $(ZLIB_DEP) $(LIBEND2END_TEST_SIMPLE_REQUEST_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_simple_request.a $(LIBEND2END_TEST_SIMPLE_REQUEST_OBJS) @@ -2555,18 +2790,11 @@ libs/$(CONFIG)/libend2end_test_simple_request.a: $(LIBEND2END_TEST_SIMPLE_REQUES -deps_libend2end_test_simple_request: $(LIBEND2END_TEST_SIMPLE_REQUEST_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_SIMPLE_REQUEST_DEPS) +-include $(LIBEND2END_TEST_SIMPLE_REQUEST_OBJS:.o=.dep) endif -clean_libend2end_test_simple_request: - $(E) "[CLEAN] Cleaning libend2end_test_simple_request files" - $(Q) $(RM) $(LIBEND2END_TEST_SIMPLE_REQUEST_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_SIMPLE_REQUEST_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_simple_request.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_simple_request.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/simple_request.o: LIBEND2END_TEST_THREAD_STRESS_SRC = \ @@ -2574,9 +2802,8 @@ LIBEND2END_TEST_THREAD_STRESS_SRC = \ LIBEND2END_TEST_THREAD_STRESS_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_THREAD_STRESS_SRC)))) -LIBEND2END_TEST_THREAD_STRESS_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_THREAD_STRESS_SRC)))) -libs/$(CONFIG)/libend2end_test_thread_stress.a: $(LIBEND2END_TEST_THREAD_STRESS_OBJS) +libs/$(CONFIG)/libend2end_test_thread_stress.a: $(ZLIB_DEP) $(LIBEND2END_TEST_THREAD_STRESS_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_thread_stress.a $(LIBEND2END_TEST_THREAD_STRESS_OBJS) @@ -2585,18 +2812,11 @@ libs/$(CONFIG)/libend2end_test_thread_stress.a: $(LIBEND2END_TEST_THREAD_STRESS_ -deps_libend2end_test_thread_stress: $(LIBEND2END_TEST_THREAD_STRESS_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_THREAD_STRESS_DEPS) +-include $(LIBEND2END_TEST_THREAD_STRESS_OBJS:.o=.dep) endif -clean_libend2end_test_thread_stress: - $(E) "[CLEAN] Cleaning libend2end_test_thread_stress files" - $(Q) $(RM) $(LIBEND2END_TEST_THREAD_STRESS_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_THREAD_STRESS_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_thread_stress.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_thread_stress.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/thread_stress.o: LIBEND2END_TEST_WRITES_DONE_HANGS_WITH_PENDING_READ_SRC = \ @@ -2604,9 +2824,8 @@ LIBEND2END_TEST_WRITES_DONE_HANGS_WITH_PENDING_READ_SRC = \ LIBEND2END_TEST_WRITES_DONE_HANGS_WITH_PENDING_READ_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TEST_WRITES_DONE_HANGS_WITH_PENDING_READ_SRC)))) -LIBEND2END_TEST_WRITES_DONE_HANGS_WITH_PENDING_READ_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_TEST_WRITES_DONE_HANGS_WITH_PENDING_READ_SRC)))) -libs/$(CONFIG)/libend2end_test_writes_done_hangs_with_pending_read.a: $(LIBEND2END_TEST_WRITES_DONE_HANGS_WITH_PENDING_READ_OBJS) +libs/$(CONFIG)/libend2end_test_writes_done_hangs_with_pending_read.a: $(ZLIB_DEP) $(LIBEND2END_TEST_WRITES_DONE_HANGS_WITH_PENDING_READ_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_test_writes_done_hangs_with_pending_read.a $(LIBEND2END_TEST_WRITES_DONE_HANGS_WITH_PENDING_READ_OBJS) @@ -2615,18 +2834,11 @@ libs/$(CONFIG)/libend2end_test_writes_done_hangs_with_pending_read.a: $(LIBEND2E -deps_libend2end_test_writes_done_hangs_with_pending_read: $(LIBEND2END_TEST_WRITES_DONE_HANGS_WITH_PENDING_READ_DEPS) - ifneq ($(NO_DEPS),true) --include $(LIBEND2END_TEST_WRITES_DONE_HANGS_WITH_PENDING_READ_DEPS) +-include $(LIBEND2END_TEST_WRITES_DONE_HANGS_WITH_PENDING_READ_OBJS:.o=.dep) endif -clean_libend2end_test_writes_done_hangs_with_pending_read: - $(E) "[CLEAN] Cleaning libend2end_test_writes_done_hangs_with_pending_read files" - $(Q) $(RM) $(LIBEND2END_TEST_WRITES_DONE_HANGS_WITH_PENDING_READ_OBJS) - $(Q) $(RM) $(LIBEND2END_TEST_WRITES_DONE_HANGS_WITH_PENDING_READ_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_writes_done_hangs_with_pending_read.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_test_writes_done_hangs_with_pending_read.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/tests/writes_done_hangs_with_pending_read.o: LIBEND2END_CERTS_SRC = \ @@ -2637,16 +2849,24 @@ LIBEND2END_CERTS_SRC = \ LIBEND2END_CERTS_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_CERTS_SRC)))) -LIBEND2END_CERTS_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LIBEND2END_CERTS_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure libraries if you don't have OpenSSL with ALPN. + libs/$(CONFIG)/libend2end_certs.a: openssl_dep_error else -libs/$(CONFIG)/libend2end_certs.a: $(OPENSSL_DEP) $(LIBEND2END_CERTS_OBJS) +ifneq ($(OPENSSL_DEP),) +test/core/end2end/data/test_root_cert.c: $(OPENSSL_DEP) +test/core/end2end/data/prod_roots_certs.c: $(OPENSSL_DEP) +test/core/end2end/data/server1_cert.c: $(OPENSSL_DEP) +test/core/end2end/data/server1_key.c: $(OPENSSL_DEP) +endif + +libs/$(CONFIG)/libend2end_certs.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBEND2END_CERTS_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) $(AR) rcs libs/$(CONFIG)/libend2end_certs.a $(LIBEND2END_CERTS_OBJS) @@ -2657,2874 +2877,2630 @@ libs/$(CONFIG)/libend2end_certs.a: $(OPENSSL_DEP) $(LIBEND2END_CERTS_OBJS) endif -deps_libend2end_certs: $(LIBEND2END_CERTS_DEPS) - ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(LIBEND2END_CERTS_DEPS) +-include $(LIBEND2END_CERTS_OBJS:.o=.dep) endif endif -clean_libend2end_certs: - $(E) "[CLEAN] Cleaning libend2end_certs files" - $(Q) $(RM) $(LIBEND2END_CERTS_OBJS) - $(Q) $(RM) $(LIBEND2END_CERTS_DEPS) - $(Q) $(RM) libs/$(CONFIG)/libend2end_certs.a - $(Q) $(RM) libs/$(CONFIG)/libend2end_certs.$(SHARED_EXT) +objs/$(CONFIG)/test/core/end2end/data/test_root_cert.o: +objs/$(CONFIG)/test/core/end2end/data/prod_roots_certs.o: +objs/$(CONFIG)/test/core/end2end/data/server1_cert.o: +objs/$(CONFIG)/test/core/end2end/data/server1_key.o: # All of the test targets, and protoc plugins -GEN_HPACK_TABLES_SRC = \ - src/core/transport/chttp2/gen_hpack_tables.c \ +ALARM_HEAP_TEST_SRC = \ + test/core/iomgr/alarm_heap_test.c \ -GEN_HPACK_TABLES_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GEN_HPACK_TABLES_SRC)))) -GEN_HPACK_TABLES_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GEN_HPACK_TABLES_SRC)))) +ALARM_HEAP_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(ALARM_HEAP_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/gen_hpack_tables: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/alarm_heap_test: openssl_dep_error else -bins/$(CONFIG)/gen_hpack_tables: $(GEN_HPACK_TABLES_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgpr.a libs/$(CONFIG)/libgrpc.a +bins/$(CONFIG)/alarm_heap_test: $(ALARM_HEAP_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GEN_HPACK_TABLES_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgpr.a libs/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gen_hpack_tables + $(Q) $(LD) $(LDFLAGS) $(ALARM_HEAP_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/alarm_heap_test endif -deps_gen_hpack_tables: $(GEN_HPACK_TABLES_DEPS) +objs/$(CONFIG)/test/core/iomgr/alarm_heap_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_alarm_heap_test: $(ALARM_HEAP_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GEN_HPACK_TABLES_DEPS) +-include $(ALARM_HEAP_TEST_OBJS:.o=.dep) endif endif -clean_gen_hpack_tables: - $(E) "[CLEAN] Cleaning gen_hpack_tables files" - $(Q) $(RM) $(GEN_HPACK_TABLES_OBJS) - $(Q) $(RM) $(GEN_HPACK_TABLES_DEPS) - $(Q) $(RM) bins/$(CONFIG)/gen_hpack_tables - - -CPP_PLUGIN_SRC = \ - src/compiler/cpp_plugin.cpp \ - src/compiler/cpp_generator.cpp \ - -CPP_PLUGIN_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CPP_PLUGIN_SRC)))) -CPP_PLUGIN_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CPP_PLUGIN_SRC)))) - -bins/$(CONFIG)/cpp_plugin: $(CPP_PLUGIN_OBJS) - $(E) "[HOSTLD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(HOST_LDXX) $(HOST_LDFLAGS) $(CPP_PLUGIN_OBJS) $(HOST_LDLIBSXX) $(HOST_LDLIBS) $(HOST_LDLIBS_PROTOC) -o bins/$(CONFIG)/cpp_plugin -deps_cpp_plugin: $(CPP_PLUGIN_DEPS) +ALARM_LIST_TEST_SRC = \ + test/core/iomgr/alarm_list_test.c \ -ifneq ($(NO_DEPS),true) --include $(CPP_PLUGIN_DEPS) -endif +ALARM_LIST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(ALARM_LIST_TEST_SRC)))) -clean_cpp_plugin: - $(E) "[CLEAN] Cleaning cpp_plugin files" - $(Q) $(RM) $(CPP_PLUGIN_OBJS) - $(Q) $(RM) $(CPP_PLUGIN_DEPS) - $(Q) $(RM) bins/$(CONFIG)/cpp_plugin +ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. -RUBY_PLUGIN_SRC = \ - src/compiler/ruby_plugin.cpp \ - src/compiler/ruby_generator.cpp \ +bins/$(CONFIG)/alarm_list_test: openssl_dep_error -RUBY_PLUGIN_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(RUBY_PLUGIN_SRC)))) -RUBY_PLUGIN_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(RUBY_PLUGIN_SRC)))) +else -bins/$(CONFIG)/ruby_plugin: $(RUBY_PLUGIN_OBJS) - $(E) "[HOSTLD] Linking $@" +bins/$(CONFIG)/alarm_list_test: $(ALARM_LIST_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(HOST_LDXX) $(HOST_LDFLAGS) $(RUBY_PLUGIN_OBJS) $(HOST_LDLIBSXX) $(HOST_LDLIBS) $(HOST_LDLIBS_PROTOC) -o bins/$(CONFIG)/ruby_plugin - -deps_ruby_plugin: $(RUBY_PLUGIN_DEPS) + $(Q) $(LD) $(LDFLAGS) $(ALARM_LIST_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/alarm_list_test -ifneq ($(NO_DEPS),true) --include $(RUBY_PLUGIN_DEPS) endif -clean_ruby_plugin: - $(E) "[CLEAN] Cleaning ruby_plugin files" - $(Q) $(RM) $(RUBY_PLUGIN_OBJS) - $(Q) $(RM) $(RUBY_PLUGIN_DEPS) - $(Q) $(RM) bins/$(CONFIG)/ruby_plugin - - -GO_PLUGIN_SRC = \ - src/compiler/go_plugin.cpp \ - src/compiler/go_generator.cpp \ - -GO_PLUGIN_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GO_PLUGIN_SRC)))) -GO_PLUGIN_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GO_PLUGIN_SRC)))) +objs/$(CONFIG)/test/core/iomgr/alarm_list_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a -bins/$(CONFIG)/go_plugin: $(GO_PLUGIN_OBJS) - $(E) "[HOSTLD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(HOST_LDXX) $(HOST_LDFLAGS) $(GO_PLUGIN_OBJS) $(HOST_LDLIBSXX) $(HOST_LDLIBS) $(HOST_LDLIBS_PROTOC) -o bins/$(CONFIG)/go_plugin - -deps_go_plugin: $(GO_PLUGIN_DEPS) +deps_alarm_list_test: $(ALARM_LIST_TEST_OBJS:.o=.dep) +ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GO_PLUGIN_DEPS) +-include $(ALARM_LIST_TEST_OBJS:.o=.dep) +endif endif - -clean_go_plugin: - $(E) "[CLEAN] Cleaning go_plugin files" - $(Q) $(RM) $(GO_PLUGIN_OBJS) - $(Q) $(RM) $(GO_PLUGIN_DEPS) - $(Q) $(RM) bins/$(CONFIG)/go_plugin -GRPC_BYTE_BUFFER_READER_TEST_SRC = \ - test/core/surface/byte_buffer_reader_test.c \ +ALARM_TEST_SRC = \ + test/core/iomgr/alarm_test.c \ -GRPC_BYTE_BUFFER_READER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_BYTE_BUFFER_READER_TEST_SRC)))) -GRPC_BYTE_BUFFER_READER_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GRPC_BYTE_BUFFER_READER_TEST_SRC)))) +ALARM_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(ALARM_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/grpc_byte_buffer_reader_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/alarm_test: openssl_dep_error else -bins/$(CONFIG)/grpc_byte_buffer_reader_test: $(GRPC_BYTE_BUFFER_READER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/alarm_test: $(ALARM_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_BYTE_BUFFER_READER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_byte_buffer_reader_test + $(Q) $(LD) $(LDFLAGS) $(ALARM_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/alarm_test endif -deps_grpc_byte_buffer_reader_test: $(GRPC_BYTE_BUFFER_READER_TEST_DEPS) +objs/$(CONFIG)/test/core/iomgr/alarm_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_alarm_test: $(ALARM_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GRPC_BYTE_BUFFER_READER_TEST_DEPS) +-include $(ALARM_TEST_OBJS:.o=.dep) endif endif -clean_grpc_byte_buffer_reader_test: - $(E) "[CLEAN] Cleaning grpc_byte_buffer_reader_test files" - $(Q) $(RM) $(GRPC_BYTE_BUFFER_READER_TEST_OBJS) - $(Q) $(RM) $(GRPC_BYTE_BUFFER_READER_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/grpc_byte_buffer_reader_test +ALPN_TEST_SRC = \ + test/core/transport/chttp2/alpn_test.c \ -GPR_CANCELLABLE_TEST_SRC = \ - test/core/support/cancellable_test.c \ - -GPR_CANCELLABLE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_CANCELLABLE_TEST_SRC)))) -GPR_CANCELLABLE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GPR_CANCELLABLE_TEST_SRC)))) +ALPN_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(ALPN_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/gpr_cancellable_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/alpn_test: openssl_dep_error else -bins/$(CONFIG)/gpr_cancellable_test: $(GPR_CANCELLABLE_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/alpn_test: $(ALPN_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_CANCELLABLE_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_cancellable_test + $(Q) $(LD) $(LDFLAGS) $(ALPN_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/alpn_test endif -deps_gpr_cancellable_test: $(GPR_CANCELLABLE_TEST_DEPS) +objs/$(CONFIG)/test/core/transport/chttp2/alpn_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_alpn_test: $(ALPN_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GPR_CANCELLABLE_TEST_DEPS) +-include $(ALPN_TEST_OBJS:.o=.dep) endif endif -clean_gpr_cancellable_test: - $(E) "[CLEAN] Cleaning gpr_cancellable_test files" - $(Q) $(RM) $(GPR_CANCELLABLE_TEST_OBJS) - $(Q) $(RM) $(GPR_CANCELLABLE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/gpr_cancellable_test - -GPR_LOG_TEST_SRC = \ - test/core/support/log_test.c \ +BIN_ENCODER_TEST_SRC = \ + test/core/transport/chttp2/bin_encoder_test.c \ -GPR_LOG_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_LOG_TEST_SRC)))) -GPR_LOG_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GPR_LOG_TEST_SRC)))) +BIN_ENCODER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(BIN_ENCODER_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/gpr_log_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/bin_encoder_test: openssl_dep_error else -bins/$(CONFIG)/gpr_log_test: $(GPR_LOG_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/bin_encoder_test: $(BIN_ENCODER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_LOG_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_log_test + $(Q) $(LD) $(LDFLAGS) $(BIN_ENCODER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/bin_encoder_test endif -deps_gpr_log_test: $(GPR_LOG_TEST_DEPS) +objs/$(CONFIG)/test/core/transport/chttp2/bin_encoder_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_bin_encoder_test: $(BIN_ENCODER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GPR_LOG_TEST_DEPS) +-include $(BIN_ENCODER_TEST_OBJS:.o=.dep) endif endif -clean_gpr_log_test: - $(E) "[CLEAN] Cleaning gpr_log_test files" - $(Q) $(RM) $(GPR_LOG_TEST_OBJS) - $(Q) $(RM) $(GPR_LOG_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/gpr_log_test +CENSUS_HASH_TABLE_TEST_SRC = \ + test/core/statistics/hash_table_test.c \ -GPR_USEFUL_TEST_SRC = \ - test/core/support/useful_test.c \ - -GPR_USEFUL_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_USEFUL_TEST_SRC)))) -GPR_USEFUL_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GPR_USEFUL_TEST_SRC)))) +CENSUS_HASH_TABLE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_HASH_TABLE_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/gpr_useful_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/census_hash_table_test: openssl_dep_error else -bins/$(CONFIG)/gpr_useful_test: $(GPR_USEFUL_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/census_hash_table_test: $(CENSUS_HASH_TABLE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_USEFUL_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_useful_test + $(Q) $(LD) $(LDFLAGS) $(CENSUS_HASH_TABLE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_hash_table_test endif -deps_gpr_useful_test: $(GPR_USEFUL_TEST_DEPS) +objs/$(CONFIG)/test/core/statistics/hash_table_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_census_hash_table_test: $(CENSUS_HASH_TABLE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GPR_USEFUL_TEST_DEPS) +-include $(CENSUS_HASH_TABLE_TEST_OBJS:.o=.dep) endif endif -clean_gpr_useful_test: - $(E) "[CLEAN] Cleaning gpr_useful_test files" - $(Q) $(RM) $(GPR_USEFUL_TEST_OBJS) - $(Q) $(RM) $(GPR_USEFUL_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/gpr_useful_test - -GPR_CMDLINE_TEST_SRC = \ - test/core/support/cmdline_test.c \ +CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_SRC = \ + test/core/statistics/multiple_writers_circular_buffer_test.c \ -GPR_CMDLINE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_CMDLINE_TEST_SRC)))) -GPR_CMDLINE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GPR_CMDLINE_TEST_SRC)))) +CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/gpr_cmdline_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/census_statistics_multiple_writers_circular_buffer_test: openssl_dep_error else -bins/$(CONFIG)/gpr_cmdline_test: $(GPR_CMDLINE_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/census_statistics_multiple_writers_circular_buffer_test: $(CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_CMDLINE_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_cmdline_test + $(Q) $(LD) $(LDFLAGS) $(CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_statistics_multiple_writers_circular_buffer_test endif -deps_gpr_cmdline_test: $(GPR_CMDLINE_TEST_DEPS) +objs/$(CONFIG)/test/core/statistics/multiple_writers_circular_buffer_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_census_statistics_multiple_writers_circular_buffer_test: $(CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GPR_CMDLINE_TEST_DEPS) +-include $(CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_OBJS:.o=.dep) endif endif -clean_gpr_cmdline_test: - $(E) "[CLEAN] Cleaning gpr_cmdline_test files" - $(Q) $(RM) $(GPR_CMDLINE_TEST_OBJS) - $(Q) $(RM) $(GPR_CMDLINE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/gpr_cmdline_test +CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_SRC = \ + test/core/statistics/multiple_writers_test.c \ -GPR_HISTOGRAM_TEST_SRC = \ - test/core/support/histogram_test.c \ - -GPR_HISTOGRAM_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_HISTOGRAM_TEST_SRC)))) -GPR_HISTOGRAM_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GPR_HISTOGRAM_TEST_SRC)))) +CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/gpr_histogram_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/census_statistics_multiple_writers_test: openssl_dep_error else -bins/$(CONFIG)/gpr_histogram_test: $(GPR_HISTOGRAM_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/census_statistics_multiple_writers_test: $(CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_HISTOGRAM_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_histogram_test + $(Q) $(LD) $(LDFLAGS) $(CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_statistics_multiple_writers_test endif -deps_gpr_histogram_test: $(GPR_HISTOGRAM_TEST_DEPS) +objs/$(CONFIG)/test/core/statistics/multiple_writers_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_census_statistics_multiple_writers_test: $(CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GPR_HISTOGRAM_TEST_DEPS) +-include $(CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_OBJS:.o=.dep) endif endif -clean_gpr_histogram_test: - $(E) "[CLEAN] Cleaning gpr_histogram_test files" - $(Q) $(RM) $(GPR_HISTOGRAM_TEST_OBJS) - $(Q) $(RM) $(GPR_HISTOGRAM_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/gpr_histogram_test - -GPR_HOST_PORT_TEST_SRC = \ - test/core/support/host_port_test.c \ +CENSUS_STATISTICS_PERFORMANCE_TEST_SRC = \ + test/core/statistics/performance_test.c \ -GPR_HOST_PORT_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_HOST_PORT_TEST_SRC)))) -GPR_HOST_PORT_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GPR_HOST_PORT_TEST_SRC)))) +CENSUS_STATISTICS_PERFORMANCE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_STATISTICS_PERFORMANCE_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/gpr_host_port_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/census_statistics_performance_test: openssl_dep_error else -bins/$(CONFIG)/gpr_host_port_test: $(GPR_HOST_PORT_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/census_statistics_performance_test: $(CENSUS_STATISTICS_PERFORMANCE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_HOST_PORT_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_host_port_test + $(Q) $(LD) $(LDFLAGS) $(CENSUS_STATISTICS_PERFORMANCE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_statistics_performance_test endif -deps_gpr_host_port_test: $(GPR_HOST_PORT_TEST_DEPS) +objs/$(CONFIG)/test/core/statistics/performance_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_census_statistics_performance_test: $(CENSUS_STATISTICS_PERFORMANCE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GPR_HOST_PORT_TEST_DEPS) +-include $(CENSUS_STATISTICS_PERFORMANCE_TEST_OBJS:.o=.dep) endif endif -clean_gpr_host_port_test: - $(E) "[CLEAN] Cleaning gpr_host_port_test files" - $(Q) $(RM) $(GPR_HOST_PORT_TEST_OBJS) - $(Q) $(RM) $(GPR_HOST_PORT_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/gpr_host_port_test +CENSUS_STATISTICS_QUICK_TEST_SRC = \ + test/core/statistics/quick_test.c \ -GPR_SLICE_BUFFER_TEST_SRC = \ - test/core/support/slice_buffer_test.c \ - -GPR_SLICE_BUFFER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_SLICE_BUFFER_TEST_SRC)))) -GPR_SLICE_BUFFER_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GPR_SLICE_BUFFER_TEST_SRC)))) +CENSUS_STATISTICS_QUICK_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_STATISTICS_QUICK_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/gpr_slice_buffer_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/census_statistics_quick_test: openssl_dep_error else -bins/$(CONFIG)/gpr_slice_buffer_test: $(GPR_SLICE_BUFFER_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/census_statistics_quick_test: $(CENSUS_STATISTICS_QUICK_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_SLICE_BUFFER_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_slice_buffer_test + $(Q) $(LD) $(LDFLAGS) $(CENSUS_STATISTICS_QUICK_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_statistics_quick_test endif -deps_gpr_slice_buffer_test: $(GPR_SLICE_BUFFER_TEST_DEPS) +objs/$(CONFIG)/test/core/statistics/quick_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_census_statistics_quick_test: $(CENSUS_STATISTICS_QUICK_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GPR_SLICE_BUFFER_TEST_DEPS) +-include $(CENSUS_STATISTICS_QUICK_TEST_OBJS:.o=.dep) endif endif -clean_gpr_slice_buffer_test: - $(E) "[CLEAN] Cleaning gpr_slice_buffer_test files" - $(Q) $(RM) $(GPR_SLICE_BUFFER_TEST_OBJS) - $(Q) $(RM) $(GPR_SLICE_BUFFER_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/gpr_slice_buffer_test - -GPR_SLICE_TEST_SRC = \ - test/core/support/slice_test.c \ +CENSUS_STATISTICS_SMALL_LOG_TEST_SRC = \ + test/core/statistics/small_log_test.c \ -GPR_SLICE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_SLICE_TEST_SRC)))) -GPR_SLICE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GPR_SLICE_TEST_SRC)))) +CENSUS_STATISTICS_SMALL_LOG_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_STATISTICS_SMALL_LOG_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/gpr_slice_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/census_statistics_small_log_test: openssl_dep_error else -bins/$(CONFIG)/gpr_slice_test: $(GPR_SLICE_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/census_statistics_small_log_test: $(CENSUS_STATISTICS_SMALL_LOG_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_SLICE_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_slice_test + $(Q) $(LD) $(LDFLAGS) $(CENSUS_STATISTICS_SMALL_LOG_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_statistics_small_log_test endif -deps_gpr_slice_test: $(GPR_SLICE_TEST_DEPS) +objs/$(CONFIG)/test/core/statistics/small_log_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_census_statistics_small_log_test: $(CENSUS_STATISTICS_SMALL_LOG_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GPR_SLICE_TEST_DEPS) +-include $(CENSUS_STATISTICS_SMALL_LOG_TEST_OBJS:.o=.dep) endif endif -clean_gpr_slice_test: - $(E) "[CLEAN] Cleaning gpr_slice_test files" - $(Q) $(RM) $(GPR_SLICE_TEST_OBJS) - $(Q) $(RM) $(GPR_SLICE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/gpr_slice_test +CENSUS_STATS_STORE_TEST_SRC = \ + test/core/statistics/rpc_stats_test.c \ -GPR_STRING_TEST_SRC = \ - test/core/support/string_test.c \ - -GPR_STRING_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_STRING_TEST_SRC)))) -GPR_STRING_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GPR_STRING_TEST_SRC)))) +CENSUS_STATS_STORE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_STATS_STORE_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/gpr_string_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/census_stats_store_test: openssl_dep_error else -bins/$(CONFIG)/gpr_string_test: $(GPR_STRING_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/census_stats_store_test: $(CENSUS_STATS_STORE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_STRING_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_string_test + $(Q) $(LD) $(LDFLAGS) $(CENSUS_STATS_STORE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_stats_store_test endif -deps_gpr_string_test: $(GPR_STRING_TEST_DEPS) +objs/$(CONFIG)/test/core/statistics/rpc_stats_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_census_stats_store_test: $(CENSUS_STATS_STORE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GPR_STRING_TEST_DEPS) +-include $(CENSUS_STATS_STORE_TEST_OBJS:.o=.dep) endif endif -clean_gpr_string_test: - $(E) "[CLEAN] Cleaning gpr_string_test files" - $(Q) $(RM) $(GPR_STRING_TEST_OBJS) - $(Q) $(RM) $(GPR_STRING_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/gpr_string_test - -GPR_SYNC_TEST_SRC = \ - test/core/support/sync_test.c \ +CENSUS_STUB_TEST_SRC = \ + test/core/statistics/census_stub_test.c \ -GPR_SYNC_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_SYNC_TEST_SRC)))) -GPR_SYNC_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GPR_SYNC_TEST_SRC)))) +CENSUS_STUB_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_STUB_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/gpr_sync_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/census_stub_test: openssl_dep_error else -bins/$(CONFIG)/gpr_sync_test: $(GPR_SYNC_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/census_stub_test: $(CENSUS_STUB_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_SYNC_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_sync_test + $(Q) $(LD) $(LDFLAGS) $(CENSUS_STUB_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_stub_test endif -deps_gpr_sync_test: $(GPR_SYNC_TEST_DEPS) +objs/$(CONFIG)/test/core/statistics/census_stub_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_census_stub_test: $(CENSUS_STUB_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GPR_SYNC_TEST_DEPS) +-include $(CENSUS_STUB_TEST_OBJS:.o=.dep) endif endif -clean_gpr_sync_test: - $(E) "[CLEAN] Cleaning gpr_sync_test files" - $(Q) $(RM) $(GPR_SYNC_TEST_OBJS) - $(Q) $(RM) $(GPR_SYNC_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/gpr_sync_test +CENSUS_TRACE_STORE_TEST_SRC = \ + test/core/statistics/trace_test.c \ -GPR_THD_TEST_SRC = \ - test/core/support/thd_test.c \ - -GPR_THD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_THD_TEST_SRC)))) -GPR_THD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GPR_THD_TEST_SRC)))) +CENSUS_TRACE_STORE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_TRACE_STORE_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/gpr_thd_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/census_trace_store_test: openssl_dep_error else -bins/$(CONFIG)/gpr_thd_test: $(GPR_THD_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/census_trace_store_test: $(CENSUS_TRACE_STORE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_THD_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_thd_test + $(Q) $(LD) $(LDFLAGS) $(CENSUS_TRACE_STORE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_trace_store_test endif -deps_gpr_thd_test: $(GPR_THD_TEST_DEPS) +objs/$(CONFIG)/test/core/statistics/trace_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_census_trace_store_test: $(CENSUS_TRACE_STORE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GPR_THD_TEST_DEPS) +-include $(CENSUS_TRACE_STORE_TEST_OBJS:.o=.dep) endif endif -clean_gpr_thd_test: - $(E) "[CLEAN] Cleaning gpr_thd_test files" - $(Q) $(RM) $(GPR_THD_TEST_OBJS) - $(Q) $(RM) $(GPR_THD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/gpr_thd_test - -GPR_TIME_TEST_SRC = \ - test/core/support/time_test.c \ +CENSUS_WINDOW_STATS_TEST_SRC = \ + test/core/statistics/window_stats_test.c \ -GPR_TIME_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_TIME_TEST_SRC)))) -GPR_TIME_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GPR_TIME_TEST_SRC)))) +CENSUS_WINDOW_STATS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_WINDOW_STATS_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/gpr_time_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/census_window_stats_test: openssl_dep_error else -bins/$(CONFIG)/gpr_time_test: $(GPR_TIME_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/census_window_stats_test: $(CENSUS_WINDOW_STATS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_TIME_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_time_test + $(Q) $(LD) $(LDFLAGS) $(CENSUS_WINDOW_STATS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_window_stats_test endif -deps_gpr_time_test: $(GPR_TIME_TEST_DEPS) +objs/$(CONFIG)/test/core/statistics/window_stats_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_census_window_stats_test: $(CENSUS_WINDOW_STATS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GPR_TIME_TEST_DEPS) +-include $(CENSUS_WINDOW_STATS_TEST_OBJS:.o=.dep) endif endif -clean_gpr_time_test: - $(E) "[CLEAN] Cleaning gpr_time_test files" - $(Q) $(RM) $(GPR_TIME_TEST_OBJS) - $(Q) $(RM) $(GPR_TIME_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/gpr_time_test +CHTTP2_STATUS_CONVERSION_TEST_SRC = \ + test/core/transport/chttp2/status_conversion_test.c \ -MURMUR_HASH_TEST_SRC = \ - test/core/support/murmur_hash_test.c \ - -MURMUR_HASH_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(MURMUR_HASH_TEST_SRC)))) -MURMUR_HASH_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(MURMUR_HASH_TEST_SRC)))) +CHTTP2_STATUS_CONVERSION_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_STATUS_CONVERSION_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/murmur_hash_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/chttp2_status_conversion_test: openssl_dep_error else -bins/$(CONFIG)/murmur_hash_test: $(MURMUR_HASH_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/chttp2_status_conversion_test: $(CHTTP2_STATUS_CONVERSION_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(MURMUR_HASH_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/murmur_hash_test + $(Q) $(LD) $(LDFLAGS) $(CHTTP2_STATUS_CONVERSION_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/chttp2_status_conversion_test endif -deps_murmur_hash_test: $(MURMUR_HASH_TEST_DEPS) +objs/$(CONFIG)/test/core/transport/chttp2/status_conversion_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_chttp2_status_conversion_test: $(CHTTP2_STATUS_CONVERSION_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(MURMUR_HASH_TEST_DEPS) +-include $(CHTTP2_STATUS_CONVERSION_TEST_OBJS:.o=.dep) endif endif -clean_murmur_hash_test: - $(E) "[CLEAN] Cleaning murmur_hash_test files" - $(Q) $(RM) $(MURMUR_HASH_TEST_OBJS) - $(Q) $(RM) $(MURMUR_HASH_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/murmur_hash_test - -GRPC_STREAM_OP_TEST_SRC = \ - test/core/transport/stream_op_test.c \ +CHTTP2_STREAM_ENCODER_TEST_SRC = \ + test/core/transport/chttp2/stream_encoder_test.c \ -GRPC_STREAM_OP_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_STREAM_OP_TEST_SRC)))) -GRPC_STREAM_OP_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GRPC_STREAM_OP_TEST_SRC)))) +CHTTP2_STREAM_ENCODER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_STREAM_ENCODER_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/grpc_stream_op_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/chttp2_stream_encoder_test: openssl_dep_error else -bins/$(CONFIG)/grpc_stream_op_test: $(GRPC_STREAM_OP_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/chttp2_stream_encoder_test: $(CHTTP2_STREAM_ENCODER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_STREAM_OP_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_stream_op_test + $(Q) $(LD) $(LDFLAGS) $(CHTTP2_STREAM_ENCODER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/chttp2_stream_encoder_test endif -deps_grpc_stream_op_test: $(GRPC_STREAM_OP_TEST_DEPS) +objs/$(CONFIG)/test/core/transport/chttp2/stream_encoder_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_chttp2_stream_encoder_test: $(CHTTP2_STREAM_ENCODER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GRPC_STREAM_OP_TEST_DEPS) +-include $(CHTTP2_STREAM_ENCODER_TEST_OBJS:.o=.dep) endif endif -clean_grpc_stream_op_test: - $(E) "[CLEAN] Cleaning grpc_stream_op_test files" - $(Q) $(RM) $(GRPC_STREAM_OP_TEST_OBJS) - $(Q) $(RM) $(GRPC_STREAM_OP_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/grpc_stream_op_test +CHTTP2_STREAM_MAP_TEST_SRC = \ + test/core/transport/chttp2/stream_map_test.c \ -ALPN_TEST_SRC = \ - test/core/transport/chttp2/alpn_test.c \ - -ALPN_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(ALPN_TEST_SRC)))) -ALPN_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(ALPN_TEST_SRC)))) +CHTTP2_STREAM_MAP_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_STREAM_MAP_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/alpn_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/chttp2_stream_map_test: openssl_dep_error else -bins/$(CONFIG)/alpn_test: $(ALPN_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/chttp2_stream_map_test: $(CHTTP2_STREAM_MAP_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(ALPN_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/alpn_test + $(Q) $(LD) $(LDFLAGS) $(CHTTP2_STREAM_MAP_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/chttp2_stream_map_test endif -deps_alpn_test: $(ALPN_TEST_DEPS) +objs/$(CONFIG)/test/core/transport/chttp2/stream_map_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_chttp2_stream_map_test: $(CHTTP2_STREAM_MAP_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(ALPN_TEST_DEPS) +-include $(CHTTP2_STREAM_MAP_TEST_OBJS:.o=.dep) endif endif -clean_alpn_test: - $(E) "[CLEAN] Cleaning alpn_test files" - $(Q) $(RM) $(ALPN_TEST_OBJS) - $(Q) $(RM) $(ALPN_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/alpn_test - -TIME_AVERAGED_STATS_TEST_SRC = \ - test/core/iomgr/time_averaged_stats_test.c \ +CHTTP2_TRANSPORT_END2END_TEST_SRC = \ + test/core/transport/chttp2_transport_end2end_test.c \ -TIME_AVERAGED_STATS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(TIME_AVERAGED_STATS_TEST_SRC)))) -TIME_AVERAGED_STATS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(TIME_AVERAGED_STATS_TEST_SRC)))) +CHTTP2_TRANSPORT_END2END_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_TRANSPORT_END2END_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/time_averaged_stats_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/chttp2_transport_end2end_test: openssl_dep_error else -bins/$(CONFIG)/time_averaged_stats_test: $(TIME_AVERAGED_STATS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/chttp2_transport_end2end_test: $(CHTTP2_TRANSPORT_END2END_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TIME_AVERAGED_STATS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/time_averaged_stats_test + $(Q) $(LD) $(LDFLAGS) $(CHTTP2_TRANSPORT_END2END_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/chttp2_transport_end2end_test endif -deps_time_averaged_stats_test: $(TIME_AVERAGED_STATS_TEST_DEPS) +objs/$(CONFIG)/test/core/transport/chttp2_transport_end2end_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_chttp2_transport_end2end_test: $(CHTTP2_TRANSPORT_END2END_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(TIME_AVERAGED_STATS_TEST_DEPS) +-include $(CHTTP2_TRANSPORT_END2END_TEST_OBJS:.o=.dep) endif endif -clean_time_averaged_stats_test: - $(E) "[CLEAN] Cleaning time_averaged_stats_test files" - $(Q) $(RM) $(TIME_AVERAGED_STATS_TEST_OBJS) - $(Q) $(RM) $(TIME_AVERAGED_STATS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/time_averaged_stats_test +DUALSTACK_SOCKET_TEST_SRC = \ + test/core/end2end/dualstack_socket_test.c \ -CHTTP2_STREAM_ENCODER_TEST_SRC = \ - test/core/transport/chttp2/stream_encoder_test.c \ - -CHTTP2_STREAM_ENCODER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_STREAM_ENCODER_TEST_SRC)))) -CHTTP2_STREAM_ENCODER_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_STREAM_ENCODER_TEST_SRC)))) +DUALSTACK_SOCKET_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(DUALSTACK_SOCKET_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/chttp2_stream_encoder_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/dualstack_socket_test: openssl_dep_error else -bins/$(CONFIG)/chttp2_stream_encoder_test: $(CHTTP2_STREAM_ENCODER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/dualstack_socket_test: $(DUALSTACK_SOCKET_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CHTTP2_STREAM_ENCODER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/chttp2_stream_encoder_test + $(Q) $(LD) $(LDFLAGS) $(DUALSTACK_SOCKET_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/dualstack_socket_test endif -deps_chttp2_stream_encoder_test: $(CHTTP2_STREAM_ENCODER_TEST_DEPS) +objs/$(CONFIG)/test/core/end2end/dualstack_socket_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_dualstack_socket_test: $(DUALSTACK_SOCKET_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_STREAM_ENCODER_TEST_DEPS) +-include $(DUALSTACK_SOCKET_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_stream_encoder_test: - $(E) "[CLEAN] Cleaning chttp2_stream_encoder_test files" - $(Q) $(RM) $(CHTTP2_STREAM_ENCODER_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_STREAM_ENCODER_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_stream_encoder_test - -HPACK_TABLE_TEST_SRC = \ - test/core/transport/chttp2/hpack_table_test.c \ +ECHO_CLIENT_SRC = \ + test/core/echo/client.c \ -HPACK_TABLE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(HPACK_TABLE_TEST_SRC)))) -HPACK_TABLE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(HPACK_TABLE_TEST_SRC)))) +ECHO_CLIENT_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(ECHO_CLIENT_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/hpack_table_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. -else +bins/$(CONFIG)/echo_client: openssl_dep_error -bins/$(CONFIG)/hpack_table_test: $(HPACK_TABLE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +else + +bins/$(CONFIG)/echo_client: $(ECHO_CLIENT_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HPACK_TABLE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/hpack_table_test + $(Q) $(LD) $(LDFLAGS) $(ECHO_CLIENT_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/echo_client endif -deps_hpack_table_test: $(HPACK_TABLE_TEST_DEPS) +objs/$(CONFIG)/test/core/echo/client.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_echo_client: $(ECHO_CLIENT_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(HPACK_TABLE_TEST_DEPS) +-include $(ECHO_CLIENT_OBJS:.o=.dep) endif endif -clean_hpack_table_test: - $(E) "[CLEAN] Cleaning hpack_table_test files" - $(Q) $(RM) $(HPACK_TABLE_TEST_OBJS) - $(Q) $(RM) $(HPACK_TABLE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/hpack_table_test +ECHO_SERVER_SRC = \ + test/core/echo/server.c \ -CHTTP2_STREAM_MAP_TEST_SRC = \ - test/core/transport/chttp2/stream_map_test.c \ - -CHTTP2_STREAM_MAP_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_STREAM_MAP_TEST_SRC)))) -CHTTP2_STREAM_MAP_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_STREAM_MAP_TEST_SRC)))) +ECHO_SERVER_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(ECHO_SERVER_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/chttp2_stream_map_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/echo_server: openssl_dep_error else -bins/$(CONFIG)/chttp2_stream_map_test: $(CHTTP2_STREAM_MAP_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/echo_server: $(ECHO_SERVER_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CHTTP2_STREAM_MAP_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/chttp2_stream_map_test + $(Q) $(LD) $(LDFLAGS) $(ECHO_SERVER_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/echo_server endif -deps_chttp2_stream_map_test: $(CHTTP2_STREAM_MAP_TEST_DEPS) +objs/$(CONFIG)/test/core/echo/server.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_echo_server: $(ECHO_SERVER_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_STREAM_MAP_TEST_DEPS) +-include $(ECHO_SERVER_OBJS:.o=.dep) endif endif -clean_chttp2_stream_map_test: - $(E) "[CLEAN] Cleaning chttp2_stream_map_test files" - $(Q) $(RM) $(CHTTP2_STREAM_MAP_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_STREAM_MAP_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_stream_map_test - -HPACK_PARSER_TEST_SRC = \ - test/core/transport/chttp2/hpack_parser_test.c \ +ECHO_TEST_SRC = \ + test/core/echo/echo_test.c \ -HPACK_PARSER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(HPACK_PARSER_TEST_SRC)))) -HPACK_PARSER_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(HPACK_PARSER_TEST_SRC)))) +ECHO_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(ECHO_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/hpack_parser_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/echo_test: openssl_dep_error else -bins/$(CONFIG)/hpack_parser_test: $(HPACK_PARSER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/echo_test: $(ECHO_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HPACK_PARSER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/hpack_parser_test + $(Q) $(LD) $(LDFLAGS) $(ECHO_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/echo_test endif -deps_hpack_parser_test: $(HPACK_PARSER_TEST_DEPS) +objs/$(CONFIG)/test/core/echo/echo_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_echo_test: $(ECHO_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(HPACK_PARSER_TEST_DEPS) +-include $(ECHO_TEST_OBJS:.o=.dep) endif endif -clean_hpack_parser_test: - $(E) "[CLEAN] Cleaning hpack_parser_test files" - $(Q) $(RM) $(HPACK_PARSER_TEST_OBJS) - $(Q) $(RM) $(HPACK_PARSER_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/hpack_parser_test +FD_POSIX_TEST_SRC = \ + test/core/iomgr/fd_posix_test.c \ -TRANSPORT_METADATA_TEST_SRC = \ - test/core/transport/metadata_test.c \ - -TRANSPORT_METADATA_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(TRANSPORT_METADATA_TEST_SRC)))) -TRANSPORT_METADATA_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(TRANSPORT_METADATA_TEST_SRC)))) +FD_POSIX_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(FD_POSIX_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/transport_metadata_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/fd_posix_test: openssl_dep_error else -bins/$(CONFIG)/transport_metadata_test: $(TRANSPORT_METADATA_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/fd_posix_test: $(FD_POSIX_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TRANSPORT_METADATA_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/transport_metadata_test + $(Q) $(LD) $(LDFLAGS) $(FD_POSIX_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/fd_posix_test endif -deps_transport_metadata_test: $(TRANSPORT_METADATA_TEST_DEPS) +objs/$(CONFIG)/test/core/iomgr/fd_posix_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_fd_posix_test: $(FD_POSIX_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(TRANSPORT_METADATA_TEST_DEPS) +-include $(FD_POSIX_TEST_OBJS:.o=.dep) endif endif -clean_transport_metadata_test: - $(E) "[CLEAN] Cleaning transport_metadata_test files" - $(Q) $(RM) $(TRANSPORT_METADATA_TEST_OBJS) - $(Q) $(RM) $(TRANSPORT_METADATA_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/transport_metadata_test - -CHTTP2_STATUS_CONVERSION_TEST_SRC = \ - test/core/transport/chttp2/status_conversion_test.c \ +FLING_CLIENT_SRC = \ + test/core/fling/client.c \ -CHTTP2_STATUS_CONVERSION_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_STATUS_CONVERSION_TEST_SRC)))) -CHTTP2_STATUS_CONVERSION_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_STATUS_CONVERSION_TEST_SRC)))) +FLING_CLIENT_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(FLING_CLIENT_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/chttp2_status_conversion_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/fling_client: openssl_dep_error else -bins/$(CONFIG)/chttp2_status_conversion_test: $(CHTTP2_STATUS_CONVERSION_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/fling_client: $(FLING_CLIENT_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CHTTP2_STATUS_CONVERSION_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/chttp2_status_conversion_test + $(Q) $(LD) $(LDFLAGS) $(FLING_CLIENT_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/fling_client endif -deps_chttp2_status_conversion_test: $(CHTTP2_STATUS_CONVERSION_TEST_DEPS) +objs/$(CONFIG)/test/core/fling/client.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_fling_client: $(FLING_CLIENT_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_STATUS_CONVERSION_TEST_DEPS) +-include $(FLING_CLIENT_OBJS:.o=.dep) endif endif -clean_chttp2_status_conversion_test: - $(E) "[CLEAN] Cleaning chttp2_status_conversion_test files" - $(Q) $(RM) $(CHTTP2_STATUS_CONVERSION_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_STATUS_CONVERSION_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_status_conversion_test +FLING_SERVER_SRC = \ + test/core/fling/server.c \ -CHTTP2_TRANSPORT_END2END_TEST_SRC = \ - test/core/transport/chttp2_transport_end2end_test.c \ - -CHTTP2_TRANSPORT_END2END_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_TRANSPORT_END2END_TEST_SRC)))) -CHTTP2_TRANSPORT_END2END_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_TRANSPORT_END2END_TEST_SRC)))) +FLING_SERVER_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(FLING_SERVER_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/chttp2_transport_end2end_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/fling_server: openssl_dep_error else -bins/$(CONFIG)/chttp2_transport_end2end_test: $(CHTTP2_TRANSPORT_END2END_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/fling_server: $(FLING_SERVER_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CHTTP2_TRANSPORT_END2END_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/chttp2_transport_end2end_test + $(Q) $(LD) $(LDFLAGS) $(FLING_SERVER_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/fling_server endif -deps_chttp2_transport_end2end_test: $(CHTTP2_TRANSPORT_END2END_TEST_DEPS) +objs/$(CONFIG)/test/core/fling/server.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_fling_server: $(FLING_SERVER_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_TRANSPORT_END2END_TEST_DEPS) +-include $(FLING_SERVER_OBJS:.o=.dep) endif endif -clean_chttp2_transport_end2end_test: - $(E) "[CLEAN] Cleaning chttp2_transport_end2end_test files" - $(Q) $(RM) $(CHTTP2_TRANSPORT_END2END_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_TRANSPORT_END2END_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_transport_end2end_test - -TCP_POSIX_TEST_SRC = \ - test/core/iomgr/tcp_posix_test.c \ +FLING_STREAM_TEST_SRC = \ + test/core/fling/fling_stream_test.c \ -TCP_POSIX_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(TCP_POSIX_TEST_SRC)))) -TCP_POSIX_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(TCP_POSIX_TEST_SRC)))) +FLING_STREAM_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(FLING_STREAM_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/tcp_posix_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/fling_stream_test: openssl_dep_error else -bins/$(CONFIG)/tcp_posix_test: $(TCP_POSIX_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/fling_stream_test: $(FLING_STREAM_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TCP_POSIX_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/tcp_posix_test + $(Q) $(LD) $(LDFLAGS) $(FLING_STREAM_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/fling_stream_test endif -deps_tcp_posix_test: $(TCP_POSIX_TEST_DEPS) +objs/$(CONFIG)/test/core/fling/fling_stream_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_fling_stream_test: $(FLING_STREAM_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(TCP_POSIX_TEST_DEPS) +-include $(FLING_STREAM_TEST_OBJS:.o=.dep) endif endif -clean_tcp_posix_test: - $(E) "[CLEAN] Cleaning tcp_posix_test files" - $(Q) $(RM) $(TCP_POSIX_TEST_OBJS) - $(Q) $(RM) $(TCP_POSIX_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/tcp_posix_test +FLING_TEST_SRC = \ + test/core/fling/fling_test.c \ -DUALSTACK_SOCKET_TEST_SRC = \ - test/core/end2end/dualstack_socket_test.c \ - -DUALSTACK_SOCKET_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(DUALSTACK_SOCKET_TEST_SRC)))) -DUALSTACK_SOCKET_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(DUALSTACK_SOCKET_TEST_SRC)))) +FLING_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(FLING_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/dualstack_socket_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/fling_test: openssl_dep_error else -bins/$(CONFIG)/dualstack_socket_test: $(DUALSTACK_SOCKET_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/fling_test: $(FLING_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(DUALSTACK_SOCKET_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/dualstack_socket_test + $(Q) $(LD) $(LDFLAGS) $(FLING_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/fling_test endif -deps_dualstack_socket_test: $(DUALSTACK_SOCKET_TEST_DEPS) +objs/$(CONFIG)/test/core/fling/fling_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_fling_test: $(FLING_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(DUALSTACK_SOCKET_TEST_DEPS) +-include $(FLING_TEST_OBJS:.o=.dep) endif endif -clean_dualstack_socket_test: - $(E) "[CLEAN] Cleaning dualstack_socket_test files" - $(Q) $(RM) $(DUALSTACK_SOCKET_TEST_OBJS) - $(Q) $(RM) $(DUALSTACK_SOCKET_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/dualstack_socket_test - -NO_SERVER_TEST_SRC = \ - test/core/end2end/no_server_test.c \ +GEN_HPACK_TABLES_SRC = \ + src/core/transport/chttp2/gen_hpack_tables.c \ -NO_SERVER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(NO_SERVER_TEST_SRC)))) -NO_SERVER_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(NO_SERVER_TEST_SRC)))) +GEN_HPACK_TABLES_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GEN_HPACK_TABLES_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/no_server_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/gen_hpack_tables: openssl_dep_error else -bins/$(CONFIG)/no_server_test: $(NO_SERVER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/gen_hpack_tables: $(GEN_HPACK_TABLES_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgpr.a libs/$(CONFIG)/libgrpc.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(NO_SERVER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/no_server_test + $(Q) $(LD) $(LDFLAGS) $(GEN_HPACK_TABLES_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgpr.a libs/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gen_hpack_tables endif -deps_no_server_test: $(NO_SERVER_TEST_DEPS) +objs/$(CONFIG)/src/core/transport/chttp2/gen_hpack_tables.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgpr.a libs/$(CONFIG)/libgrpc.a + +deps_gen_hpack_tables: $(GEN_HPACK_TABLES_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(NO_SERVER_TEST_DEPS) +-include $(GEN_HPACK_TABLES_OBJS:.o=.dep) endif endif -clean_no_server_test: - $(E) "[CLEAN] Cleaning no_server_test files" - $(Q) $(RM) $(NO_SERVER_TEST_OBJS) - $(Q) $(RM) $(NO_SERVER_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/no_server_test +GPR_CANCELLABLE_TEST_SRC = \ + test/core/support/cancellable_test.c \ -RESOLVE_ADDRESS_TEST_SRC = \ - test/core/iomgr/resolve_address_test.c \ - -RESOLVE_ADDRESS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(RESOLVE_ADDRESS_TEST_SRC)))) -RESOLVE_ADDRESS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(RESOLVE_ADDRESS_TEST_SRC)))) +GPR_CANCELLABLE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_CANCELLABLE_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/resolve_address_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/gpr_cancellable_test: openssl_dep_error else -bins/$(CONFIG)/resolve_address_test: $(RESOLVE_ADDRESS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/gpr_cancellable_test: $(GPR_CANCELLABLE_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(RESOLVE_ADDRESS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/resolve_address_test + $(Q) $(LD) $(LDFLAGS) $(GPR_CANCELLABLE_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_cancellable_test endif -deps_resolve_address_test: $(RESOLVE_ADDRESS_TEST_DEPS) +objs/$(CONFIG)/test/core/support/cancellable_test.o: libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_gpr_cancellable_test: $(GPR_CANCELLABLE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(RESOLVE_ADDRESS_TEST_DEPS) +-include $(GPR_CANCELLABLE_TEST_OBJS:.o=.dep) endif endif -clean_resolve_address_test: - $(E) "[CLEAN] Cleaning resolve_address_test files" - $(Q) $(RM) $(RESOLVE_ADDRESS_TEST_OBJS) - $(Q) $(RM) $(RESOLVE_ADDRESS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/resolve_address_test - -SOCKADDR_UTILS_TEST_SRC = \ - test/core/iomgr/sockaddr_utils_test.c \ +GPR_CMDLINE_TEST_SRC = \ + test/core/support/cmdline_test.c \ -SOCKADDR_UTILS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(SOCKADDR_UTILS_TEST_SRC)))) -SOCKADDR_UTILS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(SOCKADDR_UTILS_TEST_SRC)))) +GPR_CMDLINE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_CMDLINE_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/sockaddr_utils_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/gpr_cmdline_test: openssl_dep_error else -bins/$(CONFIG)/sockaddr_utils_test: $(SOCKADDR_UTILS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/gpr_cmdline_test: $(GPR_CMDLINE_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SOCKADDR_UTILS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/sockaddr_utils_test + $(Q) $(LD) $(LDFLAGS) $(GPR_CMDLINE_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_cmdline_test endif -deps_sockaddr_utils_test: $(SOCKADDR_UTILS_TEST_DEPS) +objs/$(CONFIG)/test/core/support/cmdline_test.o: libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_gpr_cmdline_test: $(GPR_CMDLINE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(SOCKADDR_UTILS_TEST_DEPS) +-include $(GPR_CMDLINE_TEST_OBJS:.o=.dep) endif endif -clean_sockaddr_utils_test: - $(E) "[CLEAN] Cleaning sockaddr_utils_test files" - $(Q) $(RM) $(SOCKADDR_UTILS_TEST_OBJS) - $(Q) $(RM) $(SOCKADDR_UTILS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/sockaddr_utils_test +GPR_HISTOGRAM_TEST_SRC = \ + test/core/support/histogram_test.c \ -TCP_SERVER_POSIX_TEST_SRC = \ - test/core/iomgr/tcp_server_posix_test.c \ - -TCP_SERVER_POSIX_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(TCP_SERVER_POSIX_TEST_SRC)))) -TCP_SERVER_POSIX_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(TCP_SERVER_POSIX_TEST_SRC)))) +GPR_HISTOGRAM_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_HISTOGRAM_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/tcp_server_posix_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/gpr_histogram_test: openssl_dep_error else -bins/$(CONFIG)/tcp_server_posix_test: $(TCP_SERVER_POSIX_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/gpr_histogram_test: $(GPR_HISTOGRAM_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TCP_SERVER_POSIX_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/tcp_server_posix_test + $(Q) $(LD) $(LDFLAGS) $(GPR_HISTOGRAM_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_histogram_test endif -deps_tcp_server_posix_test: $(TCP_SERVER_POSIX_TEST_DEPS) +objs/$(CONFIG)/test/core/support/histogram_test.o: libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_gpr_histogram_test: $(GPR_HISTOGRAM_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(TCP_SERVER_POSIX_TEST_DEPS) +-include $(GPR_HISTOGRAM_TEST_OBJS:.o=.dep) endif endif -clean_tcp_server_posix_test: - $(E) "[CLEAN] Cleaning tcp_server_posix_test files" - $(Q) $(RM) $(TCP_SERVER_POSIX_TEST_OBJS) - $(Q) $(RM) $(TCP_SERVER_POSIX_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/tcp_server_posix_test - -TCP_CLIENT_POSIX_TEST_SRC = \ - test/core/iomgr/tcp_client_posix_test.c \ +GPR_HOST_PORT_TEST_SRC = \ + test/core/support/host_port_test.c \ -TCP_CLIENT_POSIX_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(TCP_CLIENT_POSIX_TEST_SRC)))) -TCP_CLIENT_POSIX_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(TCP_CLIENT_POSIX_TEST_SRC)))) +GPR_HOST_PORT_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_HOST_PORT_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/tcp_client_posix_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/gpr_host_port_test: openssl_dep_error else -bins/$(CONFIG)/tcp_client_posix_test: $(TCP_CLIENT_POSIX_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/gpr_host_port_test: $(GPR_HOST_PORT_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TCP_CLIENT_POSIX_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/tcp_client_posix_test + $(Q) $(LD) $(LDFLAGS) $(GPR_HOST_PORT_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_host_port_test endif -deps_tcp_client_posix_test: $(TCP_CLIENT_POSIX_TEST_DEPS) +objs/$(CONFIG)/test/core/support/host_port_test.o: libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_gpr_host_port_test: $(GPR_HOST_PORT_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(TCP_CLIENT_POSIX_TEST_DEPS) +-include $(GPR_HOST_PORT_TEST_OBJS:.o=.dep) endif endif -clean_tcp_client_posix_test: - $(E) "[CLEAN] Cleaning tcp_client_posix_test files" - $(Q) $(RM) $(TCP_CLIENT_POSIX_TEST_OBJS) - $(Q) $(RM) $(TCP_CLIENT_POSIX_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/tcp_client_posix_test +GPR_LOG_TEST_SRC = \ + test/core/support/log_test.c \ -GRPC_CHANNEL_STACK_TEST_SRC = \ - test/core/channel/channel_stack_test.c \ - -GRPC_CHANNEL_STACK_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_CHANNEL_STACK_TEST_SRC)))) -GRPC_CHANNEL_STACK_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GRPC_CHANNEL_STACK_TEST_SRC)))) +GPR_LOG_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_LOG_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/grpc_channel_stack_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/gpr_log_test: openssl_dep_error else -bins/$(CONFIG)/grpc_channel_stack_test: $(GRPC_CHANNEL_STACK_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/gpr_log_test: $(GPR_LOG_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_CHANNEL_STACK_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_channel_stack_test + $(Q) $(LD) $(LDFLAGS) $(GPR_LOG_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_log_test endif -deps_grpc_channel_stack_test: $(GRPC_CHANNEL_STACK_TEST_DEPS) +objs/$(CONFIG)/test/core/support/log_test.o: libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_gpr_log_test: $(GPR_LOG_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GRPC_CHANNEL_STACK_TEST_DEPS) +-include $(GPR_LOG_TEST_OBJS:.o=.dep) endif endif -clean_grpc_channel_stack_test: - $(E) "[CLEAN] Cleaning grpc_channel_stack_test files" - $(Q) $(RM) $(GRPC_CHANNEL_STACK_TEST_OBJS) - $(Q) $(RM) $(GRPC_CHANNEL_STACK_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/grpc_channel_stack_test - -METADATA_BUFFER_TEST_SRC = \ - test/core/channel/metadata_buffer_test.c \ +GPR_SLICE_BUFFER_TEST_SRC = \ + test/core/support/slice_buffer_test.c \ -METADATA_BUFFER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(METADATA_BUFFER_TEST_SRC)))) -METADATA_BUFFER_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(METADATA_BUFFER_TEST_SRC)))) +GPR_SLICE_BUFFER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_SLICE_BUFFER_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/metadata_buffer_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/gpr_slice_buffer_test: openssl_dep_error else -bins/$(CONFIG)/metadata_buffer_test: $(METADATA_BUFFER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/gpr_slice_buffer_test: $(GPR_SLICE_BUFFER_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(METADATA_BUFFER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/metadata_buffer_test + $(Q) $(LD) $(LDFLAGS) $(GPR_SLICE_BUFFER_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_slice_buffer_test endif -deps_metadata_buffer_test: $(METADATA_BUFFER_TEST_DEPS) +objs/$(CONFIG)/test/core/support/slice_buffer_test.o: libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_gpr_slice_buffer_test: $(GPR_SLICE_BUFFER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(METADATA_BUFFER_TEST_DEPS) +-include $(GPR_SLICE_BUFFER_TEST_OBJS:.o=.dep) endif endif -clean_metadata_buffer_test: - $(E) "[CLEAN] Cleaning metadata_buffer_test files" - $(Q) $(RM) $(METADATA_BUFFER_TEST_OBJS) - $(Q) $(RM) $(METADATA_BUFFER_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/metadata_buffer_test +GPR_SLICE_TEST_SRC = \ + test/core/support/slice_test.c \ -GRPC_COMPLETION_QUEUE_TEST_SRC = \ - test/core/surface/completion_queue_test.c \ - -GRPC_COMPLETION_QUEUE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_COMPLETION_QUEUE_TEST_SRC)))) -GRPC_COMPLETION_QUEUE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GRPC_COMPLETION_QUEUE_TEST_SRC)))) +GPR_SLICE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_SLICE_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/grpc_completion_queue_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/gpr_slice_test: openssl_dep_error else -bins/$(CONFIG)/grpc_completion_queue_test: $(GRPC_COMPLETION_QUEUE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/gpr_slice_test: $(GPR_SLICE_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_COMPLETION_QUEUE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_completion_queue_test + $(Q) $(LD) $(LDFLAGS) $(GPR_SLICE_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_slice_test endif -deps_grpc_completion_queue_test: $(GRPC_COMPLETION_QUEUE_TEST_DEPS) +objs/$(CONFIG)/test/core/support/slice_test.o: libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_gpr_slice_test: $(GPR_SLICE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GRPC_COMPLETION_QUEUE_TEST_DEPS) +-include $(GPR_SLICE_TEST_OBJS:.o=.dep) endif endif -clean_grpc_completion_queue_test: - $(E) "[CLEAN] Cleaning grpc_completion_queue_test files" - $(Q) $(RM) $(GRPC_COMPLETION_QUEUE_TEST_OBJS) - $(Q) $(RM) $(GRPC_COMPLETION_QUEUE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/grpc_completion_queue_test - -GRPC_COMPLETION_QUEUE_BENCHMARK_SRC = \ - test/core/surface/completion_queue_benchmark.c \ +GPR_STRING_TEST_SRC = \ + test/core/support/string_test.c \ -GRPC_COMPLETION_QUEUE_BENCHMARK_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_COMPLETION_QUEUE_BENCHMARK_SRC)))) -GRPC_COMPLETION_QUEUE_BENCHMARK_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GRPC_COMPLETION_QUEUE_BENCHMARK_SRC)))) +GPR_STRING_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_STRING_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/grpc_completion_queue_benchmark: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/gpr_string_test: openssl_dep_error else -bins/$(CONFIG)/grpc_completion_queue_benchmark: $(GRPC_COMPLETION_QUEUE_BENCHMARK_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/gpr_string_test: $(GPR_STRING_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_COMPLETION_QUEUE_BENCHMARK_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_completion_queue_benchmark + $(Q) $(LD) $(LDFLAGS) $(GPR_STRING_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_string_test endif -deps_grpc_completion_queue_benchmark: $(GRPC_COMPLETION_QUEUE_BENCHMARK_DEPS) +objs/$(CONFIG)/test/core/support/string_test.o: libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_gpr_string_test: $(GPR_STRING_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GRPC_COMPLETION_QUEUE_BENCHMARK_DEPS) +-include $(GPR_STRING_TEST_OBJS:.o=.dep) endif endif -clean_grpc_completion_queue_benchmark: - $(E) "[CLEAN] Cleaning grpc_completion_queue_benchmark files" - $(Q) $(RM) $(GRPC_COMPLETION_QUEUE_BENCHMARK_OBJS) - $(Q) $(RM) $(GRPC_COMPLETION_QUEUE_BENCHMARK_DEPS) - $(Q) $(RM) bins/$(CONFIG)/grpc_completion_queue_benchmark +GPR_SYNC_TEST_SRC = \ + test/core/support/sync_test.c \ -CENSUS_TRACE_STORE_TEST_SRC = \ - test/core/statistics/trace_test.c \ - -CENSUS_TRACE_STORE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_TRACE_STORE_TEST_SRC)))) -CENSUS_TRACE_STORE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CENSUS_TRACE_STORE_TEST_SRC)))) +GPR_SYNC_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_SYNC_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/census_trace_store_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/gpr_sync_test: openssl_dep_error else -bins/$(CONFIG)/census_trace_store_test: $(CENSUS_TRACE_STORE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/gpr_sync_test: $(GPR_SYNC_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CENSUS_TRACE_STORE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_trace_store_test + $(Q) $(LD) $(LDFLAGS) $(GPR_SYNC_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_sync_test endif -deps_census_trace_store_test: $(CENSUS_TRACE_STORE_TEST_DEPS) +objs/$(CONFIG)/test/core/support/sync_test.o: libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_gpr_sync_test: $(GPR_SYNC_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CENSUS_TRACE_STORE_TEST_DEPS) +-include $(GPR_SYNC_TEST_OBJS:.o=.dep) endif endif -clean_census_trace_store_test: - $(E) "[CLEAN] Cleaning census_trace_store_test files" - $(Q) $(RM) $(CENSUS_TRACE_STORE_TEST_OBJS) - $(Q) $(RM) $(CENSUS_TRACE_STORE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/census_trace_store_test - -CENSUS_STATS_STORE_TEST_SRC = \ - test/core/statistics/rpc_stats_test.c \ +GPR_THD_TEST_SRC = \ + test/core/support/thd_test.c \ -CENSUS_STATS_STORE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_STATS_STORE_TEST_SRC)))) -CENSUS_STATS_STORE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CENSUS_STATS_STORE_TEST_SRC)))) +GPR_THD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_THD_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/census_stats_store_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/gpr_thd_test: openssl_dep_error else -bins/$(CONFIG)/census_stats_store_test: $(CENSUS_STATS_STORE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/gpr_thd_test: $(GPR_THD_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CENSUS_STATS_STORE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_stats_store_test + $(Q) $(LD) $(LDFLAGS) $(GPR_THD_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_thd_test endif -deps_census_stats_store_test: $(CENSUS_STATS_STORE_TEST_DEPS) +objs/$(CONFIG)/test/core/support/thd_test.o: libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_gpr_thd_test: $(GPR_THD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CENSUS_STATS_STORE_TEST_DEPS) +-include $(GPR_THD_TEST_OBJS:.o=.dep) endif endif -clean_census_stats_store_test: - $(E) "[CLEAN] Cleaning census_stats_store_test files" - $(Q) $(RM) $(CENSUS_STATS_STORE_TEST_OBJS) - $(Q) $(RM) $(CENSUS_STATS_STORE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/census_stats_store_test +GPR_TIME_TEST_SRC = \ + test/core/support/time_test.c \ -CENSUS_WINDOW_STATS_TEST_SRC = \ - test/core/statistics/window_stats_test.c \ - -CENSUS_WINDOW_STATS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_WINDOW_STATS_TEST_SRC)))) -CENSUS_WINDOW_STATS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CENSUS_WINDOW_STATS_TEST_SRC)))) +GPR_TIME_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_TIME_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/census_window_stats_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/gpr_time_test: openssl_dep_error else -bins/$(CONFIG)/census_window_stats_test: $(CENSUS_WINDOW_STATS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/gpr_time_test: $(GPR_TIME_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CENSUS_WINDOW_STATS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_window_stats_test + $(Q) $(LD) $(LDFLAGS) $(GPR_TIME_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_time_test endif -deps_census_window_stats_test: $(CENSUS_WINDOW_STATS_TEST_DEPS) +objs/$(CONFIG)/test/core/support/time_test.o: libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_gpr_time_test: $(GPR_TIME_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CENSUS_WINDOW_STATS_TEST_DEPS) +-include $(GPR_TIME_TEST_OBJS:.o=.dep) endif endif -clean_census_window_stats_test: - $(E) "[CLEAN] Cleaning census_window_stats_test files" - $(Q) $(RM) $(CENSUS_WINDOW_STATS_TEST_OBJS) - $(Q) $(RM) $(CENSUS_WINDOW_STATS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/census_window_stats_test - -CENSUS_STATISTICS_QUICK_TEST_SRC = \ - test/core/statistics/quick_test.c \ +GPR_USEFUL_TEST_SRC = \ + test/core/support/useful_test.c \ -CENSUS_STATISTICS_QUICK_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_STATISTICS_QUICK_TEST_SRC)))) -CENSUS_STATISTICS_QUICK_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CENSUS_STATISTICS_QUICK_TEST_SRC)))) +GPR_USEFUL_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_USEFUL_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/census_statistics_quick_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/gpr_useful_test: openssl_dep_error else -bins/$(CONFIG)/census_statistics_quick_test: $(CENSUS_STATISTICS_QUICK_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/gpr_useful_test: $(GPR_USEFUL_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CENSUS_STATISTICS_QUICK_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_statistics_quick_test + $(Q) $(LD) $(LDFLAGS) $(GPR_USEFUL_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/gpr_useful_test endif -deps_census_statistics_quick_test: $(CENSUS_STATISTICS_QUICK_TEST_DEPS) +objs/$(CONFIG)/test/core/support/useful_test.o: libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_gpr_useful_test: $(GPR_USEFUL_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CENSUS_STATISTICS_QUICK_TEST_DEPS) +-include $(GPR_USEFUL_TEST_OBJS:.o=.dep) endif endif -clean_census_statistics_quick_test: - $(E) "[CLEAN] Cleaning census_statistics_quick_test files" - $(Q) $(RM) $(CENSUS_STATISTICS_QUICK_TEST_OBJS) - $(Q) $(RM) $(CENSUS_STATISTICS_QUICK_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/census_statistics_quick_test +GRPC_BASE64_TEST_SRC = \ + test/core/security/base64_test.c \ -CENSUS_STATISTICS_SMALL_LOG_TEST_SRC = \ - test/core/statistics/small_log_test.c \ - -CENSUS_STATISTICS_SMALL_LOG_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_STATISTICS_SMALL_LOG_TEST_SRC)))) -CENSUS_STATISTICS_SMALL_LOG_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CENSUS_STATISTICS_SMALL_LOG_TEST_SRC)))) +GRPC_BASE64_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_BASE64_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/census_statistics_small_log_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/grpc_base64_test: openssl_dep_error else -bins/$(CONFIG)/census_statistics_small_log_test: $(CENSUS_STATISTICS_SMALL_LOG_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/grpc_base64_test: $(GRPC_BASE64_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CENSUS_STATISTICS_SMALL_LOG_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_statistics_small_log_test + $(Q) $(LD) $(LDFLAGS) $(GRPC_BASE64_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_base64_test endif -deps_census_statistics_small_log_test: $(CENSUS_STATISTICS_SMALL_LOG_TEST_DEPS) +objs/$(CONFIG)/test/core/security/base64_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_grpc_base64_test: $(GRPC_BASE64_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CENSUS_STATISTICS_SMALL_LOG_TEST_DEPS) +-include $(GRPC_BASE64_TEST_OBJS:.o=.dep) endif endif -clean_census_statistics_small_log_test: - $(E) "[CLEAN] Cleaning census_statistics_small_log_test files" - $(Q) $(RM) $(CENSUS_STATISTICS_SMALL_LOG_TEST_OBJS) - $(Q) $(RM) $(CENSUS_STATISTICS_SMALL_LOG_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/census_statistics_small_log_test - -CENSUS_STATISTICS_PERFORMANCE_TEST_SRC = \ - test/core/statistics/performance_test.c \ +GRPC_BYTE_BUFFER_READER_TEST_SRC = \ + test/core/surface/byte_buffer_reader_test.c \ -CENSUS_STATISTICS_PERFORMANCE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_STATISTICS_PERFORMANCE_TEST_SRC)))) -CENSUS_STATISTICS_PERFORMANCE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CENSUS_STATISTICS_PERFORMANCE_TEST_SRC)))) +GRPC_BYTE_BUFFER_READER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_BYTE_BUFFER_READER_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/census_statistics_performance_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/grpc_byte_buffer_reader_test: openssl_dep_error else -bins/$(CONFIG)/census_statistics_performance_test: $(CENSUS_STATISTICS_PERFORMANCE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/grpc_byte_buffer_reader_test: $(GRPC_BYTE_BUFFER_READER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CENSUS_STATISTICS_PERFORMANCE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_statistics_performance_test + $(Q) $(LD) $(LDFLAGS) $(GRPC_BYTE_BUFFER_READER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_byte_buffer_reader_test endif -deps_census_statistics_performance_test: $(CENSUS_STATISTICS_PERFORMANCE_TEST_DEPS) +objs/$(CONFIG)/test/core/surface/byte_buffer_reader_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_grpc_byte_buffer_reader_test: $(GRPC_BYTE_BUFFER_READER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CENSUS_STATISTICS_PERFORMANCE_TEST_DEPS) +-include $(GRPC_BYTE_BUFFER_READER_TEST_OBJS:.o=.dep) endif endif -clean_census_statistics_performance_test: - $(E) "[CLEAN] Cleaning census_statistics_performance_test files" - $(Q) $(RM) $(CENSUS_STATISTICS_PERFORMANCE_TEST_OBJS) - $(Q) $(RM) $(CENSUS_STATISTICS_PERFORMANCE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/census_statistics_performance_test +GRPC_CHANNEL_STACK_TEST_SRC = \ + test/core/channel/channel_stack_test.c \ -CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_SRC = \ - test/core/statistics/multiple_writers_test.c \ - -CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_SRC)))) -CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_SRC)))) +GRPC_CHANNEL_STACK_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_CHANNEL_STACK_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/census_statistics_multiple_writers_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/grpc_channel_stack_test: openssl_dep_error else -bins/$(CONFIG)/census_statistics_multiple_writers_test: $(CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/grpc_channel_stack_test: $(GRPC_CHANNEL_STACK_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_statistics_multiple_writers_test + $(Q) $(LD) $(LDFLAGS) $(GRPC_CHANNEL_STACK_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_channel_stack_test endif -deps_census_statistics_multiple_writers_test: $(CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_DEPS) +objs/$(CONFIG)/test/core/channel/channel_stack_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_grpc_channel_stack_test: $(GRPC_CHANNEL_STACK_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_DEPS) +-include $(GRPC_CHANNEL_STACK_TEST_OBJS:.o=.dep) endif endif -clean_census_statistics_multiple_writers_test: - $(E) "[CLEAN] Cleaning census_statistics_multiple_writers_test files" - $(Q) $(RM) $(CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_OBJS) - $(Q) $(RM) $(CENSUS_STATISTICS_MULTIPLE_WRITERS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/census_statistics_multiple_writers_test - -CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_SRC = \ - test/core/statistics/multiple_writers_circular_buffer_test.c \ +GRPC_COMPLETION_QUEUE_BENCHMARK_SRC = \ + test/core/surface/completion_queue_benchmark.c \ -CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_SRC)))) -CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_SRC)))) +GRPC_COMPLETION_QUEUE_BENCHMARK_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_COMPLETION_QUEUE_BENCHMARK_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/census_statistics_multiple_writers_circular_buffer_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/grpc_completion_queue_benchmark: openssl_dep_error else -bins/$(CONFIG)/census_statistics_multiple_writers_circular_buffer_test: $(CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/grpc_completion_queue_benchmark: $(GRPC_COMPLETION_QUEUE_BENCHMARK_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_statistics_multiple_writers_circular_buffer_test + $(Q) $(LD) $(LDFLAGS) $(GRPC_COMPLETION_QUEUE_BENCHMARK_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_completion_queue_benchmark endif -deps_census_statistics_multiple_writers_circular_buffer_test: $(CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_DEPS) +objs/$(CONFIG)/test/core/surface/completion_queue_benchmark.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_grpc_completion_queue_benchmark: $(GRPC_COMPLETION_QUEUE_BENCHMARK_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_DEPS) +-include $(GRPC_COMPLETION_QUEUE_BENCHMARK_OBJS:.o=.dep) endif endif -clean_census_statistics_multiple_writers_circular_buffer_test: - $(E) "[CLEAN] Cleaning census_statistics_multiple_writers_circular_buffer_test files" - $(Q) $(RM) $(CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_OBJS) - $(Q) $(RM) $(CENSUS_STATISTICS_MULTIPLE_WRITERS_CIRCULAR_BUFFER_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/census_statistics_multiple_writers_circular_buffer_test +GRPC_COMPLETION_QUEUE_TEST_SRC = \ + test/core/surface/completion_queue_test.c \ -CENSUS_STUB_TEST_SRC = \ - test/core/statistics/census_stub_test.c \ - -CENSUS_STUB_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_STUB_TEST_SRC)))) -CENSUS_STUB_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CENSUS_STUB_TEST_SRC)))) +GRPC_COMPLETION_QUEUE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_COMPLETION_QUEUE_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/census_stub_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/grpc_completion_queue_test: openssl_dep_error else -bins/$(CONFIG)/census_stub_test: $(CENSUS_STUB_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/grpc_completion_queue_test: $(GRPC_COMPLETION_QUEUE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CENSUS_STUB_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_stub_test + $(Q) $(LD) $(LDFLAGS) $(GRPC_COMPLETION_QUEUE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_completion_queue_test endif -deps_census_stub_test: $(CENSUS_STUB_TEST_DEPS) +objs/$(CONFIG)/test/core/surface/completion_queue_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_grpc_completion_queue_test: $(GRPC_COMPLETION_QUEUE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CENSUS_STUB_TEST_DEPS) +-include $(GRPC_COMPLETION_QUEUE_TEST_OBJS:.o=.dep) endif endif -clean_census_stub_test: - $(E) "[CLEAN] Cleaning census_stub_test files" - $(Q) $(RM) $(CENSUS_STUB_TEST_OBJS) - $(Q) $(RM) $(CENSUS_STUB_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/census_stub_test - -CENSUS_HASH_TABLE_TEST_SRC = \ - test/core/statistics/hash_table_test.c \ +GRPC_CREDENTIALS_TEST_SRC = \ + test/core/security/credentials_test.c \ -CENSUS_HASH_TABLE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_HASH_TABLE_TEST_SRC)))) -CENSUS_HASH_TABLE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CENSUS_HASH_TABLE_TEST_SRC)))) +GRPC_CREDENTIALS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_CREDENTIALS_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/census_hash_table_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/grpc_credentials_test: openssl_dep_error else -bins/$(CONFIG)/census_hash_table_test: $(CENSUS_HASH_TABLE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/grpc_credentials_test: $(GRPC_CREDENTIALS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CENSUS_HASH_TABLE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/census_hash_table_test + $(Q) $(LD) $(LDFLAGS) $(GRPC_CREDENTIALS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_credentials_test endif -deps_census_hash_table_test: $(CENSUS_HASH_TABLE_TEST_DEPS) +objs/$(CONFIG)/test/core/security/credentials_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_grpc_credentials_test: $(GRPC_CREDENTIALS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CENSUS_HASH_TABLE_TEST_DEPS) +-include $(GRPC_CREDENTIALS_TEST_OBJS:.o=.dep) endif endif -clean_census_hash_table_test: - $(E) "[CLEAN] Cleaning census_hash_table_test files" - $(Q) $(RM) $(CENSUS_HASH_TABLE_TEST_OBJS) - $(Q) $(RM) $(CENSUS_HASH_TABLE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/census_hash_table_test +GRPC_FETCH_OAUTH2_SRC = \ + test/core/security/fetch_oauth2.c \ -FLING_SERVER_SRC = \ - test/core/fling/server.c \ - -FLING_SERVER_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(FLING_SERVER_SRC)))) -FLING_SERVER_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(FLING_SERVER_SRC)))) +GRPC_FETCH_OAUTH2_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_FETCH_OAUTH2_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/fling_server: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/grpc_fetch_oauth2: openssl_dep_error else -bins/$(CONFIG)/fling_server: $(FLING_SERVER_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/grpc_fetch_oauth2: $(GRPC_FETCH_OAUTH2_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(FLING_SERVER_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/fling_server + $(Q) $(LD) $(LDFLAGS) $(GRPC_FETCH_OAUTH2_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_fetch_oauth2 endif -deps_fling_server: $(FLING_SERVER_DEPS) +objs/$(CONFIG)/test/core/security/fetch_oauth2.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_grpc_fetch_oauth2: $(GRPC_FETCH_OAUTH2_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(FLING_SERVER_DEPS) +-include $(GRPC_FETCH_OAUTH2_OBJS:.o=.dep) endif endif -clean_fling_server: - $(E) "[CLEAN] Cleaning fling_server files" - $(Q) $(RM) $(FLING_SERVER_OBJS) - $(Q) $(RM) $(FLING_SERVER_DEPS) - $(Q) $(RM) bins/$(CONFIG)/fling_server - -FLING_CLIENT_SRC = \ - test/core/fling/client.c \ +GRPC_JSON_TOKEN_TEST_SRC = \ + test/core/security/json_token_test.c \ -FLING_CLIENT_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(FLING_CLIENT_SRC)))) -FLING_CLIENT_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(FLING_CLIENT_SRC)))) +GRPC_JSON_TOKEN_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_JSON_TOKEN_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/fling_client: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/grpc_json_token_test: openssl_dep_error else -bins/$(CONFIG)/fling_client: $(FLING_CLIENT_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/grpc_json_token_test: $(GRPC_JSON_TOKEN_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(FLING_CLIENT_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/fling_client + $(Q) $(LD) $(LDFLAGS) $(GRPC_JSON_TOKEN_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_json_token_test endif -deps_fling_client: $(FLING_CLIENT_DEPS) +objs/$(CONFIG)/test/core/security/json_token_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_grpc_json_token_test: $(GRPC_JSON_TOKEN_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(FLING_CLIENT_DEPS) +-include $(GRPC_JSON_TOKEN_TEST_OBJS:.o=.dep) endif endif -clean_fling_client: - $(E) "[CLEAN] Cleaning fling_client files" - $(Q) $(RM) $(FLING_CLIENT_OBJS) - $(Q) $(RM) $(FLING_CLIENT_DEPS) - $(Q) $(RM) bins/$(CONFIG)/fling_client +GRPC_STREAM_OP_TEST_SRC = \ + test/core/transport/stream_op_test.c \ -FLING_TEST_SRC = \ - test/core/fling/fling_test.c \ - -FLING_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(FLING_TEST_SRC)))) -FLING_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(FLING_TEST_SRC)))) +GRPC_STREAM_OP_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_STREAM_OP_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/fling_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/grpc_stream_op_test: openssl_dep_error else -bins/$(CONFIG)/fling_test: $(FLING_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/grpc_stream_op_test: $(GRPC_STREAM_OP_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(FLING_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/fling_test + $(Q) $(LD) $(LDFLAGS) $(GRPC_STREAM_OP_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_stream_op_test endif -deps_fling_test: $(FLING_TEST_DEPS) +objs/$(CONFIG)/test/core/transport/stream_op_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_grpc_stream_op_test: $(GRPC_STREAM_OP_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(FLING_TEST_DEPS) +-include $(GRPC_STREAM_OP_TEST_OBJS:.o=.dep) endif endif -clean_fling_test: - $(E) "[CLEAN] Cleaning fling_test files" - $(Q) $(RM) $(FLING_TEST_OBJS) - $(Q) $(RM) $(FLING_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/fling_test - -ECHO_SERVER_SRC = \ - test/core/echo/server.c \ +HPACK_PARSER_TEST_SRC = \ + test/core/transport/chttp2/hpack_parser_test.c \ -ECHO_SERVER_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(ECHO_SERVER_SRC)))) -ECHO_SERVER_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(ECHO_SERVER_SRC)))) +HPACK_PARSER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(HPACK_PARSER_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/echo_server: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/hpack_parser_test: openssl_dep_error else -bins/$(CONFIG)/echo_server: $(ECHO_SERVER_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/hpack_parser_test: $(HPACK_PARSER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(ECHO_SERVER_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/echo_server + $(Q) $(LD) $(LDFLAGS) $(HPACK_PARSER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/hpack_parser_test endif -deps_echo_server: $(ECHO_SERVER_DEPS) +objs/$(CONFIG)/test/core/transport/chttp2/hpack_parser_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_hpack_parser_test: $(HPACK_PARSER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(ECHO_SERVER_DEPS) +-include $(HPACK_PARSER_TEST_OBJS:.o=.dep) endif endif -clean_echo_server: - $(E) "[CLEAN] Cleaning echo_server files" - $(Q) $(RM) $(ECHO_SERVER_OBJS) - $(Q) $(RM) $(ECHO_SERVER_DEPS) - $(Q) $(RM) bins/$(CONFIG)/echo_server +HPACK_TABLE_TEST_SRC = \ + test/core/transport/chttp2/hpack_table_test.c \ -ECHO_CLIENT_SRC = \ - test/core/echo/client.c \ - -ECHO_CLIENT_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(ECHO_CLIENT_SRC)))) -ECHO_CLIENT_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(ECHO_CLIENT_SRC)))) +HPACK_TABLE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(HPACK_TABLE_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/echo_client: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/hpack_table_test: openssl_dep_error else -bins/$(CONFIG)/echo_client: $(ECHO_CLIENT_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/hpack_table_test: $(HPACK_TABLE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(ECHO_CLIENT_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/echo_client + $(Q) $(LD) $(LDFLAGS) $(HPACK_TABLE_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/hpack_table_test endif -deps_echo_client: $(ECHO_CLIENT_DEPS) +objs/$(CONFIG)/test/core/transport/chttp2/hpack_table_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_hpack_table_test: $(HPACK_TABLE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(ECHO_CLIENT_DEPS) +-include $(HPACK_TABLE_TEST_OBJS:.o=.dep) endif endif -clean_echo_client: - $(E) "[CLEAN] Cleaning echo_client files" - $(Q) $(RM) $(ECHO_CLIENT_OBJS) - $(Q) $(RM) $(ECHO_CLIENT_DEPS) - $(Q) $(RM) bins/$(CONFIG)/echo_client - -ECHO_TEST_SRC = \ - test/core/echo/echo_test.c \ +HTTPCLI_FORMAT_REQUEST_TEST_SRC = \ + test/core/httpcli/format_request_test.c \ -ECHO_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(ECHO_TEST_SRC)))) -ECHO_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(ECHO_TEST_SRC)))) +HTTPCLI_FORMAT_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTPCLI_FORMAT_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/echo_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/httpcli_format_request_test: openssl_dep_error else -bins/$(CONFIG)/echo_test: $(ECHO_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/httpcli_format_request_test: $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(ECHO_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/echo_test + $(Q) $(LD) $(LDFLAGS) $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/httpcli_format_request_test endif -deps_echo_test: $(ECHO_TEST_DEPS) +objs/$(CONFIG)/test/core/httpcli/format_request_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_httpcli_format_request_test: $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(ECHO_TEST_DEPS) +-include $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_echo_test: - $(E) "[CLEAN] Cleaning echo_test files" - $(Q) $(RM) $(ECHO_TEST_OBJS) - $(Q) $(RM) $(ECHO_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/echo_test +HTTPCLI_PARSER_TEST_SRC = \ + test/core/httpcli/parser_test.c \ -LOW_LEVEL_PING_PONG_BENCHMARK_SRC = \ - test/core/network_benchmarks/low_level_ping_pong.c \ - -LOW_LEVEL_PING_PONG_BENCHMARK_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LOW_LEVEL_PING_PONG_BENCHMARK_SRC)))) -LOW_LEVEL_PING_PONG_BENCHMARK_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LOW_LEVEL_PING_PONG_BENCHMARK_SRC)))) +HTTPCLI_PARSER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTPCLI_PARSER_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/low_level_ping_pong_benchmark: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/httpcli_parser_test: openssl_dep_error else -bins/$(CONFIG)/low_level_ping_pong_benchmark: $(LOW_LEVEL_PING_PONG_BENCHMARK_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/httpcli_parser_test: $(HTTPCLI_PARSER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(LOW_LEVEL_PING_PONG_BENCHMARK_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/low_level_ping_pong_benchmark + $(Q) $(LD) $(LDFLAGS) $(HTTPCLI_PARSER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/httpcli_parser_test endif -deps_low_level_ping_pong_benchmark: $(LOW_LEVEL_PING_PONG_BENCHMARK_DEPS) +objs/$(CONFIG)/test/core/httpcli/parser_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_httpcli_parser_test: $(HTTPCLI_PARSER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(LOW_LEVEL_PING_PONG_BENCHMARK_DEPS) +-include $(HTTPCLI_PARSER_TEST_OBJS:.o=.dep) endif endif -clean_low_level_ping_pong_benchmark: - $(E) "[CLEAN] Cleaning low_level_ping_pong_benchmark files" - $(Q) $(RM) $(LOW_LEVEL_PING_PONG_BENCHMARK_OBJS) - $(Q) $(RM) $(LOW_LEVEL_PING_PONG_BENCHMARK_DEPS) - $(Q) $(RM) bins/$(CONFIG)/low_level_ping_pong_benchmark - -MESSAGE_COMPRESS_TEST_SRC = \ - test/core/compression/message_compress_test.c \ +HTTPCLI_TEST_SRC = \ + test/core/httpcli/httpcli_test.c \ -MESSAGE_COMPRESS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(MESSAGE_COMPRESS_TEST_SRC)))) -MESSAGE_COMPRESS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(MESSAGE_COMPRESS_TEST_SRC)))) +HTTPCLI_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTPCLI_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/message_compress_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. -else +bins/$(CONFIG)/httpcli_test: openssl_dep_error -bins/$(CONFIG)/message_compress_test: $(MESSAGE_COMPRESS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +else + +bins/$(CONFIG)/httpcli_test: $(HTTPCLI_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(MESSAGE_COMPRESS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/message_compress_test + $(Q) $(LD) $(LDFLAGS) $(HTTPCLI_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/httpcli_test endif -deps_message_compress_test: $(MESSAGE_COMPRESS_TEST_DEPS) +objs/$(CONFIG)/test/core/httpcli/httpcli_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_httpcli_test: $(HTTPCLI_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(MESSAGE_COMPRESS_TEST_DEPS) +-include $(HTTPCLI_TEST_OBJS:.o=.dep) endif endif -clean_message_compress_test: - $(E) "[CLEAN] Cleaning message_compress_test files" - $(Q) $(RM) $(MESSAGE_COMPRESS_TEST_OBJS) - $(Q) $(RM) $(MESSAGE_COMPRESS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/message_compress_test - -BIN_ENCODER_TEST_SRC = \ - test/core/transport/chttp2/bin_encoder_test.c \ +LAME_CLIENT_TEST_SRC = \ + test/core/surface/lame_client_test.c \ -BIN_ENCODER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(BIN_ENCODER_TEST_SRC)))) -BIN_ENCODER_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(BIN_ENCODER_TEST_SRC)))) +LAME_CLIENT_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LAME_CLIENT_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/bin_encoder_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/lame_client_test: openssl_dep_error else -bins/$(CONFIG)/bin_encoder_test: $(BIN_ENCODER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/lame_client_test: $(LAME_CLIENT_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(BIN_ENCODER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/bin_encoder_test + $(Q) $(LD) $(LDFLAGS) $(LAME_CLIENT_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/lame_client_test endif -deps_bin_encoder_test: $(BIN_ENCODER_TEST_DEPS) +objs/$(CONFIG)/test/core/surface/lame_client_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_lame_client_test: $(LAME_CLIENT_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(BIN_ENCODER_TEST_DEPS) +-include $(LAME_CLIENT_TEST_OBJS:.o=.dep) endif endif -clean_bin_encoder_test: - $(E) "[CLEAN] Cleaning bin_encoder_test files" - $(Q) $(RM) $(BIN_ENCODER_TEST_OBJS) - $(Q) $(RM) $(BIN_ENCODER_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/bin_encoder_test - -SECURE_ENDPOINT_TEST_SRC = \ - test/core/security/secure_endpoint_test.c \ +LOW_LEVEL_PING_PONG_BENCHMARK_SRC = \ + test/core/network_benchmarks/low_level_ping_pong.c \ -SECURE_ENDPOINT_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(SECURE_ENDPOINT_TEST_SRC)))) -SECURE_ENDPOINT_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(SECURE_ENDPOINT_TEST_SRC)))) +LOW_LEVEL_PING_PONG_BENCHMARK_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LOW_LEVEL_PING_PONG_BENCHMARK_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/secure_endpoint_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/low_level_ping_pong_benchmark: openssl_dep_error else -bins/$(CONFIG)/secure_endpoint_test: $(SECURE_ENDPOINT_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/low_level_ping_pong_benchmark: $(LOW_LEVEL_PING_PONG_BENCHMARK_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SECURE_ENDPOINT_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/secure_endpoint_test + $(Q) $(LD) $(LDFLAGS) $(LOW_LEVEL_PING_PONG_BENCHMARK_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/low_level_ping_pong_benchmark endif -deps_secure_endpoint_test: $(SECURE_ENDPOINT_TEST_DEPS) +objs/$(CONFIG)/test/core/network_benchmarks/low_level_ping_pong.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_low_level_ping_pong_benchmark: $(LOW_LEVEL_PING_PONG_BENCHMARK_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(SECURE_ENDPOINT_TEST_DEPS) +-include $(LOW_LEVEL_PING_PONG_BENCHMARK_OBJS:.o=.dep) endif endif -clean_secure_endpoint_test: - $(E) "[CLEAN] Cleaning secure_endpoint_test files" - $(Q) $(RM) $(SECURE_ENDPOINT_TEST_OBJS) - $(Q) $(RM) $(SECURE_ENDPOINT_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/secure_endpoint_test - -HTTPCLI_FORMAT_REQUEST_TEST_SRC = \ - test/core/httpcli/format_request_test.c \ +MESSAGE_COMPRESS_TEST_SRC = \ + test/core/compression/message_compress_test.c \ -HTTPCLI_FORMAT_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTPCLI_FORMAT_REQUEST_TEST_SRC)))) -HTTPCLI_FORMAT_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(HTTPCLI_FORMAT_REQUEST_TEST_SRC)))) +MESSAGE_COMPRESS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(MESSAGE_COMPRESS_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/httpcli_format_request_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/message_compress_test: openssl_dep_error else -bins/$(CONFIG)/httpcli_format_request_test: $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/message_compress_test: $(MESSAGE_COMPRESS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/httpcli_format_request_test + $(Q) $(LD) $(LDFLAGS) $(MESSAGE_COMPRESS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/message_compress_test endif -deps_httpcli_format_request_test: $(HTTPCLI_FORMAT_REQUEST_TEST_DEPS) +objs/$(CONFIG)/test/core/compression/message_compress_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_message_compress_test: $(MESSAGE_COMPRESS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(HTTPCLI_FORMAT_REQUEST_TEST_DEPS) +-include $(MESSAGE_COMPRESS_TEST_OBJS:.o=.dep) endif endif -clean_httpcli_format_request_test: - $(E) "[CLEAN] Cleaning httpcli_format_request_test files" - $(Q) $(RM) $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS) - $(Q) $(RM) $(HTTPCLI_FORMAT_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/httpcli_format_request_test +METADATA_BUFFER_TEST_SRC = \ + test/core/channel/metadata_buffer_test.c \ -HTTPCLI_PARSER_TEST_SRC = \ - test/core/httpcli/parser_test.c \ - -HTTPCLI_PARSER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTPCLI_PARSER_TEST_SRC)))) -HTTPCLI_PARSER_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(HTTPCLI_PARSER_TEST_SRC)))) +METADATA_BUFFER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(METADATA_BUFFER_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/httpcli_parser_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/metadata_buffer_test: openssl_dep_error else -bins/$(CONFIG)/httpcli_parser_test: $(HTTPCLI_PARSER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/metadata_buffer_test: $(METADATA_BUFFER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HTTPCLI_PARSER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/httpcli_parser_test + $(Q) $(LD) $(LDFLAGS) $(METADATA_BUFFER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/metadata_buffer_test endif -deps_httpcli_parser_test: $(HTTPCLI_PARSER_TEST_DEPS) +objs/$(CONFIG)/test/core/channel/metadata_buffer_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_metadata_buffer_test: $(METADATA_BUFFER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(HTTPCLI_PARSER_TEST_DEPS) +-include $(METADATA_BUFFER_TEST_OBJS:.o=.dep) endif endif -clean_httpcli_parser_test: - $(E) "[CLEAN] Cleaning httpcli_parser_test files" - $(Q) $(RM) $(HTTPCLI_PARSER_TEST_OBJS) - $(Q) $(RM) $(HTTPCLI_PARSER_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/httpcli_parser_test +MURMUR_HASH_TEST_SRC = \ + test/core/support/murmur_hash_test.c \ -HTTPCLI_TEST_SRC = \ - test/core/httpcli/httpcli_test.c \ - -HTTPCLI_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTPCLI_TEST_SRC)))) -HTTPCLI_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(HTTPCLI_TEST_SRC)))) +MURMUR_HASH_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(MURMUR_HASH_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/httpcli_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/murmur_hash_test: openssl_dep_error else -bins/$(CONFIG)/httpcli_test: $(HTTPCLI_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/murmur_hash_test: $(MURMUR_HASH_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HTTPCLI_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/httpcli_test + $(Q) $(LD) $(LDFLAGS) $(MURMUR_HASH_TEST_OBJS) libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/murmur_hash_test endif -deps_httpcli_test: $(HTTPCLI_TEST_DEPS) +objs/$(CONFIG)/test/core/support/murmur_hash_test.o: libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_murmur_hash_test: $(MURMUR_HASH_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(HTTPCLI_TEST_DEPS) +-include $(MURMUR_HASH_TEST_OBJS:.o=.dep) endif endif -clean_httpcli_test: - $(E) "[CLEAN] Cleaning httpcli_test files" - $(Q) $(RM) $(HTTPCLI_TEST_OBJS) - $(Q) $(RM) $(HTTPCLI_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/httpcli_test +NO_SERVER_TEST_SRC = \ + test/core/end2end/no_server_test.c \ -GRPC_CREDENTIALS_TEST_SRC = \ - test/core/security/credentials_test.c \ - -GRPC_CREDENTIALS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_CREDENTIALS_TEST_SRC)))) -GRPC_CREDENTIALS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GRPC_CREDENTIALS_TEST_SRC)))) +NO_SERVER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(NO_SERVER_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/grpc_credentials_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/no_server_test: openssl_dep_error else -bins/$(CONFIG)/grpc_credentials_test: $(GRPC_CREDENTIALS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/no_server_test: $(NO_SERVER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_CREDENTIALS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_credentials_test + $(Q) $(LD) $(LDFLAGS) $(NO_SERVER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/no_server_test endif -deps_grpc_credentials_test: $(GRPC_CREDENTIALS_TEST_DEPS) +objs/$(CONFIG)/test/core/end2end/no_server_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_no_server_test: $(NO_SERVER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GRPC_CREDENTIALS_TEST_DEPS) +-include $(NO_SERVER_TEST_OBJS:.o=.dep) endif endif -clean_grpc_credentials_test: - $(E) "[CLEAN] Cleaning grpc_credentials_test files" - $(Q) $(RM) $(GRPC_CREDENTIALS_TEST_OBJS) - $(Q) $(RM) $(GRPC_CREDENTIALS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/grpc_credentials_test +POLL_KICK_TEST_SRC = \ + test/core/iomgr/poll_kick_test.c \ -GRPC_FETCH_OAUTH2_SRC = \ - test/core/security/fetch_oauth2.c \ - -GRPC_FETCH_OAUTH2_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_FETCH_OAUTH2_SRC)))) -GRPC_FETCH_OAUTH2_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GRPC_FETCH_OAUTH2_SRC)))) +POLL_KICK_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(POLL_KICK_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/grpc_fetch_oauth2: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/poll_kick_test: openssl_dep_error else -bins/$(CONFIG)/grpc_fetch_oauth2: $(GRPC_FETCH_OAUTH2_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/poll_kick_test: $(POLL_KICK_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_FETCH_OAUTH2_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_fetch_oauth2 + $(Q) $(LD) $(LDFLAGS) $(POLL_KICK_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/poll_kick_test endif -deps_grpc_fetch_oauth2: $(GRPC_FETCH_OAUTH2_DEPS) +objs/$(CONFIG)/test/core/iomgr/poll_kick_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_poll_kick_test: $(POLL_KICK_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GRPC_FETCH_OAUTH2_DEPS) +-include $(POLL_KICK_TEST_OBJS:.o=.dep) endif endif -clean_grpc_fetch_oauth2: - $(E) "[CLEAN] Cleaning grpc_fetch_oauth2 files" - $(Q) $(RM) $(GRPC_FETCH_OAUTH2_OBJS) - $(Q) $(RM) $(GRPC_FETCH_OAUTH2_DEPS) - $(Q) $(RM) bins/$(CONFIG)/grpc_fetch_oauth2 +RESOLVE_ADDRESS_TEST_SRC = \ + test/core/iomgr/resolve_address_test.c \ -GRPC_BASE64_TEST_SRC = \ - test/core/security/base64_test.c \ - -GRPC_BASE64_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_BASE64_TEST_SRC)))) -GRPC_BASE64_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GRPC_BASE64_TEST_SRC)))) +RESOLVE_ADDRESS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(RESOLVE_ADDRESS_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/grpc_base64_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/resolve_address_test: openssl_dep_error else -bins/$(CONFIG)/grpc_base64_test: $(GRPC_BASE64_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/resolve_address_test: $(RESOLVE_ADDRESS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_BASE64_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_base64_test + $(Q) $(LD) $(LDFLAGS) $(RESOLVE_ADDRESS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/resolve_address_test endif -deps_grpc_base64_test: $(GRPC_BASE64_TEST_DEPS) +objs/$(CONFIG)/test/core/iomgr/resolve_address_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_resolve_address_test: $(RESOLVE_ADDRESS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GRPC_BASE64_TEST_DEPS) +-include $(RESOLVE_ADDRESS_TEST_OBJS:.o=.dep) endif endif -clean_grpc_base64_test: - $(E) "[CLEAN] Cleaning grpc_base64_test files" - $(Q) $(RM) $(GRPC_BASE64_TEST_OBJS) - $(Q) $(RM) $(GRPC_BASE64_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/grpc_base64_test - -GRPC_JSON_TOKEN_TEST_SRC = \ - test/core/security/json_token_test.c \ +SECURE_ENDPOINT_TEST_SRC = \ + test/core/security/secure_endpoint_test.c \ -GRPC_JSON_TOKEN_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_JSON_TOKEN_TEST_SRC)))) -GRPC_JSON_TOKEN_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GRPC_JSON_TOKEN_TEST_SRC)))) +SECURE_ENDPOINT_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(SECURE_ENDPOINT_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/grpc_json_token_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/secure_endpoint_test: openssl_dep_error else -bins/$(CONFIG)/grpc_json_token_test: $(GRPC_JSON_TOKEN_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/secure_endpoint_test: $(SECURE_ENDPOINT_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_JSON_TOKEN_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/grpc_json_token_test + $(Q) $(LD) $(LDFLAGS) $(SECURE_ENDPOINT_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/secure_endpoint_test endif -deps_grpc_json_token_test: $(GRPC_JSON_TOKEN_TEST_DEPS) +objs/$(CONFIG)/test/core/security/secure_endpoint_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_secure_endpoint_test: $(SECURE_ENDPOINT_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(GRPC_JSON_TOKEN_TEST_DEPS) +-include $(SECURE_ENDPOINT_TEST_OBJS:.o=.dep) endif endif -clean_grpc_json_token_test: - $(E) "[CLEAN] Cleaning grpc_json_token_test files" - $(Q) $(RM) $(GRPC_JSON_TOKEN_TEST_OBJS) - $(Q) $(RM) $(GRPC_JSON_TOKEN_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/grpc_json_token_test - -TIMEOUT_ENCODING_TEST_SRC = \ - test/core/transport/chttp2/timeout_encoding_test.c \ +SOCKADDR_UTILS_TEST_SRC = \ + test/core/iomgr/sockaddr_utils_test.c \ -TIMEOUT_ENCODING_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(TIMEOUT_ENCODING_TEST_SRC)))) -TIMEOUT_ENCODING_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(TIMEOUT_ENCODING_TEST_SRC)))) +SOCKADDR_UTILS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(SOCKADDR_UTILS_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/timeout_encoding_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/sockaddr_utils_test: openssl_dep_error else -bins/$(CONFIG)/timeout_encoding_test: $(TIMEOUT_ENCODING_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/sockaddr_utils_test: $(SOCKADDR_UTILS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TIMEOUT_ENCODING_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/timeout_encoding_test + $(Q) $(LD) $(LDFLAGS) $(SOCKADDR_UTILS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/sockaddr_utils_test endif -deps_timeout_encoding_test: $(TIMEOUT_ENCODING_TEST_DEPS) +objs/$(CONFIG)/test/core/iomgr/sockaddr_utils_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_sockaddr_utils_test: $(SOCKADDR_UTILS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(TIMEOUT_ENCODING_TEST_DEPS) +-include $(SOCKADDR_UTILS_TEST_OBJS:.o=.dep) endif endif -clean_timeout_encoding_test: - $(E) "[CLEAN] Cleaning timeout_encoding_test files" - $(Q) $(RM) $(TIMEOUT_ENCODING_TEST_OBJS) - $(Q) $(RM) $(TIMEOUT_ENCODING_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/timeout_encoding_test +TCP_CLIENT_POSIX_TEST_SRC = \ + test/core/iomgr/tcp_client_posix_test.c \ -FD_POSIX_TEST_SRC = \ - test/core/iomgr/fd_posix_test.c \ - -FD_POSIX_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(FD_POSIX_TEST_SRC)))) -FD_POSIX_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(FD_POSIX_TEST_SRC)))) +TCP_CLIENT_POSIX_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(TCP_CLIENT_POSIX_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/fd_posix_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/tcp_client_posix_test: openssl_dep_error else -bins/$(CONFIG)/fd_posix_test: $(FD_POSIX_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/tcp_client_posix_test: $(TCP_CLIENT_POSIX_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(FD_POSIX_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/fd_posix_test + $(Q) $(LD) $(LDFLAGS) $(TCP_CLIENT_POSIX_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/tcp_client_posix_test endif -deps_fd_posix_test: $(FD_POSIX_TEST_DEPS) +objs/$(CONFIG)/test/core/iomgr/tcp_client_posix_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_tcp_client_posix_test: $(TCP_CLIENT_POSIX_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(FD_POSIX_TEST_DEPS) +-include $(TCP_CLIENT_POSIX_TEST_OBJS:.o=.dep) endif endif -clean_fd_posix_test: - $(E) "[CLEAN] Cleaning fd_posix_test files" - $(Q) $(RM) $(FD_POSIX_TEST_OBJS) - $(Q) $(RM) $(FD_POSIX_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/fd_posix_test - -FLING_STREAM_TEST_SRC = \ - test/core/fling/fling_stream_test.c \ +TCP_POSIX_TEST_SRC = \ + test/core/iomgr/tcp_posix_test.c \ -FLING_STREAM_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(FLING_STREAM_TEST_SRC)))) -FLING_STREAM_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(FLING_STREAM_TEST_SRC)))) +TCP_POSIX_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(TCP_POSIX_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/fling_stream_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/tcp_posix_test: openssl_dep_error else -bins/$(CONFIG)/fling_stream_test: $(FLING_STREAM_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/tcp_posix_test: $(TCP_POSIX_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(FLING_STREAM_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/fling_stream_test + $(Q) $(LD) $(LDFLAGS) $(TCP_POSIX_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/tcp_posix_test endif -deps_fling_stream_test: $(FLING_STREAM_TEST_DEPS) +objs/$(CONFIG)/test/core/iomgr/tcp_posix_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_tcp_posix_test: $(TCP_POSIX_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(FLING_STREAM_TEST_DEPS) +-include $(TCP_POSIX_TEST_OBJS:.o=.dep) endif endif -clean_fling_stream_test: - $(E) "[CLEAN] Cleaning fling_stream_test files" - $(Q) $(RM) $(FLING_STREAM_TEST_OBJS) - $(Q) $(RM) $(FLING_STREAM_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/fling_stream_test - -LAME_CLIENT_TEST_SRC = \ - test/core/surface/lame_client_test.c \ +TCP_SERVER_POSIX_TEST_SRC = \ + test/core/iomgr/tcp_server_posix_test.c \ -LAME_CLIENT_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LAME_CLIENT_TEST_SRC)))) -LAME_CLIENT_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(LAME_CLIENT_TEST_SRC)))) +TCP_SERVER_POSIX_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(TCP_SERVER_POSIX_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/lame_client_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/tcp_server_posix_test: openssl_dep_error else -bins/$(CONFIG)/lame_client_test: $(LAME_CLIENT_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/tcp_server_posix_test: $(TCP_SERVER_POSIX_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(LAME_CLIENT_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/lame_client_test + $(Q) $(LD) $(LDFLAGS) $(TCP_SERVER_POSIX_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/tcp_server_posix_test endif -deps_lame_client_test: $(LAME_CLIENT_TEST_DEPS) +objs/$(CONFIG)/test/core/iomgr/tcp_server_posix_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_tcp_server_posix_test: $(TCP_SERVER_POSIX_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(LAME_CLIENT_TEST_DEPS) +-include $(TCP_SERVER_POSIX_TEST_OBJS:.o=.dep) endif endif -clean_lame_client_test: - $(E) "[CLEAN] Cleaning lame_client_test files" - $(Q) $(RM) $(LAME_CLIENT_TEST_OBJS) - $(Q) $(RM) $(LAME_CLIENT_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/lame_client_test +TIME_AVERAGED_STATS_TEST_SRC = \ + test/core/iomgr/time_averaged_stats_test.c \ -THREAD_POOL_TEST_SRC = \ - test/cpp/server/thread_pool_test.cc \ - -THREAD_POOL_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(THREAD_POOL_TEST_SRC)))) -THREAD_POOL_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(THREAD_POOL_TEST_SRC)))) +TIME_AVERAGED_STATS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(TIME_AVERAGED_STATS_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/thread_pool_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/time_averaged_stats_test: openssl_dep_error else -bins/$(CONFIG)/thread_pool_test: $(THREAD_POOL_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/time_averaged_stats_test: $(TIME_AVERAGED_STATS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(THREAD_POOL_TEST_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/thread_pool_test + $(Q) $(LD) $(LDFLAGS) $(TIME_AVERAGED_STATS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/time_averaged_stats_test endif -deps_thread_pool_test: $(THREAD_POOL_TEST_DEPS) +objs/$(CONFIG)/test/core/iomgr/time_averaged_stats_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_time_averaged_stats_test: $(TIME_AVERAGED_STATS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(THREAD_POOL_TEST_DEPS) +-include $(TIME_AVERAGED_STATS_TEST_OBJS:.o=.dep) endif endif -clean_thread_pool_test: - $(E) "[CLEAN] Cleaning thread_pool_test files" - $(Q) $(RM) $(THREAD_POOL_TEST_OBJS) - $(Q) $(RM) $(THREAD_POOL_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/thread_pool_test +TIME_TEST_SRC = \ + test/core/support/time_test.c \ -STATUS_TEST_SRC = \ - test/cpp/util/status_test.cc \ - -STATUS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(STATUS_TEST_SRC)))) -STATUS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(STATUS_TEST_SRC)))) +TIME_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(TIME_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/status_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/time_test: openssl_dep_error else -bins/$(CONFIG)/status_test: $(STATUS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/time_test: $(TIME_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(STATUS_TEST_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/status_test + $(Q) $(LD) $(LDFLAGS) $(TIME_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/time_test endif -deps_status_test: $(STATUS_TEST_DEPS) +objs/$(CONFIG)/test/core/support/time_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_time_test: $(TIME_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(STATUS_TEST_DEPS) +-include $(TIME_TEST_OBJS:.o=.dep) endif endif -clean_status_test: - $(E) "[CLEAN] Cleaning status_test files" - $(Q) $(RM) $(STATUS_TEST_OBJS) - $(Q) $(RM) $(STATUS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/status_test - -SYNC_CLIENT_ASYNC_SERVER_TEST_SRC = \ - test/cpp/end2end/sync_client_async_server_test.cc \ +TIMEOUT_ENCODING_TEST_SRC = \ + test/core/transport/chttp2/timeout_encoding_test.c \ -SYNC_CLIENT_ASYNC_SERVER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(SYNC_CLIENT_ASYNC_SERVER_TEST_SRC)))) -SYNC_CLIENT_ASYNC_SERVER_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(SYNC_CLIENT_ASYNC_SERVER_TEST_SRC)))) +TIMEOUT_ENCODING_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(TIMEOUT_ENCODING_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/sync_client_async_server_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/timeout_encoding_test: openssl_dep_error else -bins/$(CONFIG)/sync_client_async_server_test: $(SYNC_CLIENT_ASYNC_SERVER_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/timeout_encoding_test: $(TIMEOUT_ENCODING_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(SYNC_CLIENT_ASYNC_SERVER_TEST_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/sync_client_async_server_test + $(Q) $(LD) $(LDFLAGS) $(TIMEOUT_ENCODING_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/timeout_encoding_test endif -deps_sync_client_async_server_test: $(SYNC_CLIENT_ASYNC_SERVER_TEST_DEPS) +objs/$(CONFIG)/test/core/transport/chttp2/timeout_encoding_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_timeout_encoding_test: $(TIMEOUT_ENCODING_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(SYNC_CLIENT_ASYNC_SERVER_TEST_DEPS) +-include $(TIMEOUT_ENCODING_TEST_OBJS:.o=.dep) endif endif -clean_sync_client_async_server_test: - $(E) "[CLEAN] Cleaning sync_client_async_server_test files" - $(Q) $(RM) $(SYNC_CLIENT_ASYNC_SERVER_TEST_OBJS) - $(Q) $(RM) $(SYNC_CLIENT_ASYNC_SERVER_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/sync_client_async_server_test - -QPS_CLIENT_SRC = \ - gens/test/cpp/interop/empty.pb.cc \ - gens/test/cpp/interop/messages.pb.cc \ - gens/test/cpp/interop/test.pb.cc \ - test/cpp/qps/client.cc \ +TRANSPORT_METADATA_TEST_SRC = \ + test/core/transport/metadata_test.c \ -QPS_CLIENT_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(QPS_CLIENT_SRC)))) -QPS_CLIENT_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(QPS_CLIENT_SRC)))) +TRANSPORT_METADATA_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(TRANSPORT_METADATA_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/qps_client: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/transport_metadata_test: openssl_dep_error else -bins/$(CONFIG)/qps_client: $(QPS_CLIENT_OBJS) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/transport_metadata_test: $(TRANSPORT_METADATA_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(QPS_CLIENT_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/qps_client + $(Q) $(LD) $(LDFLAGS) $(TRANSPORT_METADATA_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/transport_metadata_test endif -deps_qps_client: $(QPS_CLIENT_DEPS) +objs/$(CONFIG)/test/core/transport/metadata_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_transport_metadata_test: $(TRANSPORT_METADATA_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(QPS_CLIENT_DEPS) +-include $(TRANSPORT_METADATA_TEST_OBJS:.o=.dep) endif endif -clean_qps_client: - $(E) "[CLEAN] Cleaning qps_client files" - $(Q) $(RM) $(QPS_CLIENT_OBJS) - $(Q) $(RM) $(QPS_CLIENT_DEPS) - $(Q) $(RM) bins/$(CONFIG)/qps_client - -QPS_SERVER_SRC = \ - gens/test/cpp/interop/empty.pb.cc \ - gens/test/cpp/interop/messages.pb.cc \ - gens/test/cpp/interop/test.pb.cc \ - test/cpp/qps/server.cc \ +CHANNEL_ARGUMENTS_TEST_SRC = \ + test/cpp/client/channel_arguments_test.cc \ -QPS_SERVER_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(QPS_SERVER_SRC)))) -QPS_SERVER_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(QPS_SERVER_SRC)))) +CHANNEL_ARGUMENTS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHANNEL_ARGUMENTS_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/qps_server: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/channel_arguments_test: openssl_dep_error else -bins/$(CONFIG)/qps_server: $(QPS_SERVER_OBJS) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/channel_arguments_test: $(CHANNEL_ARGUMENTS_TEST_OBJS) libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(QPS_SERVER_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/qps_server + $(Q) $(LDXX) $(LDFLAGS) $(CHANNEL_ARGUMENTS_TEST_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/channel_arguments_test endif -deps_qps_server: $(QPS_SERVER_DEPS) +objs/$(CONFIG)/test/cpp/client/channel_arguments_test.o: libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr.a + +deps_channel_arguments_test: $(CHANNEL_ARGUMENTS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(QPS_SERVER_DEPS) +-include $(CHANNEL_ARGUMENTS_TEST_OBJS:.o=.dep) endif endif -clean_qps_server: - $(E) "[CLEAN] Cleaning qps_server files" - $(Q) $(RM) $(QPS_SERVER_OBJS) - $(Q) $(RM) $(QPS_SERVER_DEPS) - $(Q) $(RM) bins/$(CONFIG)/qps_server +CPP_PLUGIN_SRC = \ + src/compiler/cpp_generator.cc \ + src/compiler/cpp_plugin.cc \ -INTEROP_SERVER_SRC = \ - gens/test/cpp/interop/empty.pb.cc \ - gens/test/cpp/interop/messages.pb.cc \ - gens/test/cpp/interop/test.pb.cc \ - test/cpp/interop/server.cc \ +CPP_PLUGIN_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CPP_PLUGIN_SRC)))) -INTEROP_SERVER_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(INTEROP_SERVER_SRC)))) -INTEROP_SERVER_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(INTEROP_SERVER_SRC)))) +bins/$(CONFIG)/cpp_plugin: $(CPP_PLUGIN_OBJS) + $(E) "[HOSTLD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(HOST_LDXX) $(HOST_LDFLAGS) $(CPP_PLUGIN_OBJS) $(HOST_LDLIBSXX) $(HOST_LDLIBS) $(HOST_LDLIBS_PROTOC) -o bins/$(CONFIG)/cpp_plugin + +objs/$(CONFIG)/src/compiler/cpp_generator.o: +objs/$(CONFIG)/src/compiler/cpp_plugin.o: + +deps_cpp_plugin: $(CPP_PLUGIN_OBJS:.o=.dep) + +ifneq ($(NO_DEPS),true) +-include $(CPP_PLUGIN_OBJS:.o=.dep) +endif + + +CREDENTIALS_TEST_SRC = \ + test/cpp/client/credentials_test.cc \ + +CREDENTIALS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CREDENTIALS_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/interop_server: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/credentials_test: openssl_dep_error else -bins/$(CONFIG)/interop_server: $(INTEROP_SERVER_OBJS) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/credentials_test: $(CREDENTIALS_TEST_OBJS) libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(INTEROP_SERVER_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/interop_server + $(Q) $(LDXX) $(LDFLAGS) $(CREDENTIALS_TEST_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/credentials_test endif -deps_interop_server: $(INTEROP_SERVER_DEPS) +objs/$(CONFIG)/test/cpp/client/credentials_test.o: libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr.a + +deps_credentials_test: $(CREDENTIALS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(INTEROP_SERVER_DEPS) +-include $(CREDENTIALS_TEST_OBJS:.o=.dep) endif endif -clean_interop_server: - $(E) "[CLEAN] Cleaning interop_server files" - $(Q) $(RM) $(INTEROP_SERVER_OBJS) - $(Q) $(RM) $(INTEROP_SERVER_DEPS) - $(Q) $(RM) bins/$(CONFIG)/interop_server - -INTEROP_CLIENT_SRC = \ - gens/test/cpp/interop/empty.pb.cc \ - gens/test/cpp/interop/messages.pb.cc \ - gens/test/cpp/interop/test.pb.cc \ - test/cpp/interop/client.cc \ +END2END_TEST_SRC = \ + test/cpp/end2end/end2end_test.cc \ -INTEROP_CLIENT_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(INTEROP_CLIENT_SRC)))) -INTEROP_CLIENT_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(INTEROP_CLIENT_SRC)))) +END2END_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(END2END_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/interop_client: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/end2end_test: openssl_dep_error else -bins/$(CONFIG)/interop_client: $(INTEROP_CLIENT_OBJS) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/end2end_test: $(END2END_TEST_OBJS) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(INTEROP_CLIENT_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/interop_client + $(Q) $(LDXX) $(LDFLAGS) $(END2END_TEST_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/end2end_test endif -deps_interop_client: $(INTEROP_CLIENT_DEPS) +objs/$(CONFIG)/test/cpp/end2end/end2end_test.o: libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_end2end_test: $(END2END_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(INTEROP_CLIENT_DEPS) +-include $(END2END_TEST_OBJS:.o=.dep) endif endif -clean_interop_client: - $(E) "[CLEAN] Cleaning interop_client files" - $(Q) $(RM) $(INTEROP_CLIENT_OBJS) - $(Q) $(RM) $(INTEROP_CLIENT_DEPS) - $(Q) $(RM) bins/$(CONFIG)/interop_client - -END2END_TEST_SRC = \ - test/cpp/end2end/end2end_test.cc \ +INTEROP_CLIENT_SRC = \ + gens/test/cpp/interop/empty.pb.cc \ + gens/test/cpp/interop/messages.pb.cc \ + gens/test/cpp/interop/test.pb.cc \ + test/cpp/interop/client.cc \ -END2END_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(END2END_TEST_SRC)))) -END2END_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(END2END_TEST_SRC)))) +INTEROP_CLIENT_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(INTEROP_CLIENT_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/end2end_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/interop_client: openssl_dep_error else -bins/$(CONFIG)/end2end_test: $(END2END_TEST_OBJS) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/interop_client: $(INTEROP_CLIENT_OBJS) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(END2END_TEST_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/end2end_test + $(Q) $(LDXX) $(LDFLAGS) $(INTEROP_CLIENT_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/interop_client endif -deps_end2end_test: $(END2END_TEST_DEPS) +objs/$(CONFIG)/test/cpp/interop/empty.o: libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +objs/$(CONFIG)/test/cpp/interop/messages.o: libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +objs/$(CONFIG)/test/cpp/interop/test.o: libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +objs/$(CONFIG)/test/cpp/interop/client.o: libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_interop_client: $(INTEROP_CLIENT_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(END2END_TEST_DEPS) +-include $(INTEROP_CLIENT_OBJS:.o=.dep) endif endif -clean_end2end_test: - $(E) "[CLEAN] Cleaning end2end_test files" - $(Q) $(RM) $(END2END_TEST_OBJS) - $(Q) $(RM) $(END2END_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/end2end_test - -CHANNEL_ARGUMENTS_TEST_SRC = \ - test/cpp/client/channel_arguments_test.cc \ +INTEROP_SERVER_SRC = \ + gens/test/cpp/interop/empty.pb.cc \ + gens/test/cpp/interop/messages.pb.cc \ + gens/test/cpp/interop/test.pb.cc \ + test/cpp/interop/server.cc \ -CHANNEL_ARGUMENTS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHANNEL_ARGUMENTS_TEST_SRC)))) -CHANNEL_ARGUMENTS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHANNEL_ARGUMENTS_TEST_SRC)))) +INTEROP_SERVER_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(INTEROP_SERVER_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/channel_arguments_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/interop_server: openssl_dep_error else -bins/$(CONFIG)/channel_arguments_test: $(CHANNEL_ARGUMENTS_TEST_OBJS) libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a +bins/$(CONFIG)/interop_server: $(INTEROP_SERVER_OBJS) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(CHANNEL_ARGUMENTS_TEST_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/channel_arguments_test + $(Q) $(LDXX) $(LDFLAGS) $(INTEROP_SERVER_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/interop_server endif -deps_channel_arguments_test: $(CHANNEL_ARGUMENTS_TEST_DEPS) +objs/$(CONFIG)/test/cpp/interop/empty.o: libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +objs/$(CONFIG)/test/cpp/interop/messages.o: libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +objs/$(CONFIG)/test/cpp/interop/test.o: libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +objs/$(CONFIG)/test/cpp/interop/server.o: libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_interop_server: $(INTEROP_SERVER_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHANNEL_ARGUMENTS_TEST_DEPS) +-include $(INTEROP_SERVER_OBJS:.o=.dep) endif endif -clean_channel_arguments_test: - $(E) "[CLEAN] Cleaning channel_arguments_test files" - $(Q) $(RM) $(CHANNEL_ARGUMENTS_TEST_OBJS) - $(Q) $(RM) $(CHANNEL_ARGUMENTS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/channel_arguments_test - -CREDENTIALS_TEST_SRC = \ - test/cpp/client/credentials_test.cc \ +QPS_CLIENT_SRC = \ + gens/test/cpp/qps/qpstest.pb.cc \ + test/cpp/qps/client.cc \ -CREDENTIALS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CREDENTIALS_TEST_SRC)))) -CREDENTIALS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CREDENTIALS_TEST_SRC)))) +QPS_CLIENT_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(QPS_CLIENT_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/credentials_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/qps_client: openssl_dep_error else -bins/$(CONFIG)/credentials_test: $(CREDENTIALS_TEST_OBJS) libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a +bins/$(CONFIG)/qps_client: $(QPS_CLIENT_OBJS) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(CREDENTIALS_TEST_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/credentials_test + $(Q) $(LDXX) $(LDFLAGS) $(QPS_CLIENT_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/qps_client endif -deps_credentials_test: $(CREDENTIALS_TEST_DEPS) +objs/$(CONFIG)/test/cpp/qps/qpstest.o: libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +objs/$(CONFIG)/test/cpp/qps/client.o: libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_qps_client: $(QPS_CLIENT_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CREDENTIALS_TEST_DEPS) +-include $(QPS_CLIENT_OBJS:.o=.dep) endif endif -clean_credentials_test: - $(E) "[CLEAN] Cleaning credentials_test files" - $(Q) $(RM) $(CREDENTIALS_TEST_OBJS) - $(Q) $(RM) $(CREDENTIALS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/credentials_test - -ALARM_TEST_SRC = \ - test/core/iomgr/alarm_test.c \ +QPS_SERVER_SRC = \ + gens/test/cpp/qps/qpstest.pb.cc \ + test/cpp/qps/server.cc \ -ALARM_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(ALARM_TEST_SRC)))) -ALARM_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(ALARM_TEST_SRC)))) +QPS_SERVER_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(QPS_SERVER_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/alarm_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/qps_server: openssl_dep_error else -bins/$(CONFIG)/alarm_test: $(ALARM_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/qps_server: $(QPS_SERVER_OBJS) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(ALARM_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/alarm_test + $(Q) $(LDXX) $(LDFLAGS) $(QPS_SERVER_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/qps_server endif -deps_alarm_test: $(ALARM_TEST_DEPS) +objs/$(CONFIG)/test/cpp/qps/qpstest.o: libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +objs/$(CONFIG)/test/cpp/qps/server.o: libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_qps_server: $(QPS_SERVER_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(ALARM_TEST_DEPS) +-include $(QPS_SERVER_OBJS:.o=.dep) endif endif -clean_alarm_test: - $(E) "[CLEAN] Cleaning alarm_test files" - $(Q) $(RM) $(ALARM_TEST_OBJS) - $(Q) $(RM) $(ALARM_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/alarm_test +RUBY_PLUGIN_SRC = \ + src/compiler/ruby_generator.cc \ + src/compiler/ruby_plugin.cc \ -ALARM_LIST_TEST_SRC = \ - test/core/iomgr/alarm_list_test.c \ +RUBY_PLUGIN_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(RUBY_PLUGIN_SRC)))) -ALARM_LIST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(ALARM_LIST_TEST_SRC)))) -ALARM_LIST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(ALARM_LIST_TEST_SRC)))) +bins/$(CONFIG)/ruby_plugin: $(RUBY_PLUGIN_OBJS) + $(E) "[HOSTLD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(HOST_LDXX) $(HOST_LDFLAGS) $(RUBY_PLUGIN_OBJS) $(HOST_LDLIBSXX) $(HOST_LDLIBS) $(HOST_LDLIBS_PROTOC) -o bins/$(CONFIG)/ruby_plugin + +objs/$(CONFIG)/src/compiler/ruby_generator.o: +objs/$(CONFIG)/src/compiler/ruby_plugin.o: + +deps_ruby_plugin: $(RUBY_PLUGIN_OBJS:.o=.dep) + +ifneq ($(NO_DEPS),true) +-include $(RUBY_PLUGIN_OBJS:.o=.dep) +endif + + +STATUS_TEST_SRC = \ + test/cpp/util/status_test.cc \ + +STATUS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(STATUS_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/alarm_list_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/status_test: openssl_dep_error else -bins/$(CONFIG)/alarm_list_test: $(ALARM_LIST_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/status_test: $(STATUS_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(ALARM_LIST_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/alarm_list_test + $(Q) $(LDXX) $(LDFLAGS) $(STATUS_TEST_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/status_test endif -deps_alarm_list_test: $(ALARM_LIST_TEST_DEPS) +objs/$(CONFIG)/test/cpp/util/status_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_status_test: $(STATUS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(ALARM_LIST_TEST_DEPS) +-include $(STATUS_TEST_OBJS:.o=.dep) endif endif -clean_alarm_list_test: - $(E) "[CLEAN] Cleaning alarm_list_test files" - $(Q) $(RM) $(ALARM_LIST_TEST_OBJS) - $(Q) $(RM) $(ALARM_LIST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/alarm_list_test - -ALARM_HEAP_TEST_SRC = \ - test/core/iomgr/alarm_heap_test.c \ +SYNC_CLIENT_ASYNC_SERVER_TEST_SRC = \ + test/cpp/end2end/sync_client_async_server_test.cc \ -ALARM_HEAP_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(ALARM_HEAP_TEST_SRC)))) -ALARM_HEAP_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(ALARM_HEAP_TEST_SRC)))) +SYNC_CLIENT_ASYNC_SERVER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(SYNC_CLIENT_ASYNC_SERVER_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/alarm_heap_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/sync_client_async_server_test: openssl_dep_error else -bins/$(CONFIG)/alarm_heap_test: $(ALARM_HEAP_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/sync_client_async_server_test: $(SYNC_CLIENT_ASYNC_SERVER_TEST_OBJS) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(ALARM_HEAP_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/alarm_heap_test + $(Q) $(LDXX) $(LDFLAGS) $(SYNC_CLIENT_ASYNC_SERVER_TEST_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/sync_client_async_server_test endif -deps_alarm_heap_test: $(ALARM_HEAP_TEST_DEPS) +objs/$(CONFIG)/test/cpp/end2end/sync_client_async_server_test.o: libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_sync_client_async_server_test: $(SYNC_CLIENT_ASYNC_SERVER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(ALARM_HEAP_TEST_DEPS) +-include $(SYNC_CLIENT_ASYNC_SERVER_TEST_OBJS:.o=.dep) endif endif -clean_alarm_heap_test: - $(E) "[CLEAN] Cleaning alarm_heap_test files" - $(Q) $(RM) $(ALARM_HEAP_TEST_OBJS) - $(Q) $(RM) $(ALARM_HEAP_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/alarm_heap_test - -TIME_TEST_SRC = \ - test/core/support/time_test.c \ +THREAD_POOL_TEST_SRC = \ + test/cpp/server/thread_pool_test.cc \ -TIME_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(TIME_TEST_SRC)))) -TIME_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(TIME_TEST_SRC)))) +THREAD_POOL_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(THREAD_POOL_TEST_SRC)))) ifeq ($(NO_SECURE),true) -bins/$(CONFIG)/time_test: openssl_dep_error +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/thread_pool_test: openssl_dep_error else -bins/$(CONFIG)/time_test: $(TIME_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a +bins/$(CONFIG)/thread_pool_test: $(THREAD_POOL_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TIME_TEST_OBJS) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/time_test + $(Q) $(LDXX) $(LDFLAGS) $(THREAD_POOL_TEST_OBJS) $(GTEST_LIB) libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/thread_pool_test endif -deps_time_test: $(TIME_TEST_DEPS) +objs/$(CONFIG)/test/cpp/server/thread_pool_test.o: libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + +deps_thread_pool_test: $(THREAD_POOL_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(TIME_TEST_DEPS) +-include $(THREAD_POOL_TEST_OBJS:.o=.dep) endif endif -clean_time_test: - $(E) "[CLEAN] Cleaning time_test files" - $(Q) $(RM) $(TIME_TEST_OBJS) - $(Q) $(RM) $(TIME_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/time_test - CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_TEST_SRC = \ CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_cancel_after_accept_test: openssl_dep_error else @@ -5536,28 +5512,24 @@ bins/$(CONFIG)/chttp2_fake_security_cancel_after_accept_test: $(CHTTP2_FAKE_SECU endif -deps_chttp2_fake_security_cancel_after_accept_test: $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_TEST_DEPS) + +deps_chttp2_fake_security_cancel_after_accept_test: $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_cancel_after_accept_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_cancel_after_accept_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_cancel_after_accept_test - CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC = \ CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_cancel_after_accept_and_writes_closed_test: openssl_dep_error else @@ -5569,28 +5541,24 @@ bins/$(CONFIG)/chttp2_fake_security_cancel_after_accept_and_writes_closed_test: endif -deps_chttp2_fake_security_cancel_after_accept_and_writes_closed_test: $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) + +deps_chttp2_fake_security_cancel_after_accept_and_writes_closed_test: $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_cancel_after_accept_and_writes_closed_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_cancel_after_accept_and_writes_closed_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_cancel_after_accept_and_writes_closed_test - CHTTP2_FAKE_SECURITY_CANCEL_AFTER_INVOKE_TEST_SRC = \ CHTTP2_FAKE_SECURITY_CANCEL_AFTER_INVOKE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_INVOKE_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_CANCEL_AFTER_INVOKE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_INVOKE_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_cancel_after_invoke_test: openssl_dep_error else @@ -5602,28 +5570,24 @@ bins/$(CONFIG)/chttp2_fake_security_cancel_after_invoke_test: $(CHTTP2_FAKE_SECU endif -deps_chttp2_fake_security_cancel_after_invoke_test: $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_INVOKE_TEST_DEPS) + +deps_chttp2_fake_security_cancel_after_invoke_test: $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_INVOKE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_INVOKE_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_INVOKE_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_cancel_after_invoke_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_cancel_after_invoke_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_INVOKE_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_CANCEL_AFTER_INVOKE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_cancel_after_invoke_test - CHTTP2_FAKE_SECURITY_CANCEL_BEFORE_INVOKE_TEST_SRC = \ CHTTP2_FAKE_SECURITY_CANCEL_BEFORE_INVOKE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_CANCEL_BEFORE_INVOKE_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_CANCEL_BEFORE_INVOKE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_CANCEL_BEFORE_INVOKE_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_cancel_before_invoke_test: openssl_dep_error else @@ -5635,28 +5599,24 @@ bins/$(CONFIG)/chttp2_fake_security_cancel_before_invoke_test: $(CHTTP2_FAKE_SEC endif -deps_chttp2_fake_security_cancel_before_invoke_test: $(CHTTP2_FAKE_SECURITY_CANCEL_BEFORE_INVOKE_TEST_DEPS) + +deps_chttp2_fake_security_cancel_before_invoke_test: $(CHTTP2_FAKE_SECURITY_CANCEL_BEFORE_INVOKE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_CANCEL_BEFORE_INVOKE_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_CANCEL_BEFORE_INVOKE_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_cancel_before_invoke_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_cancel_before_invoke_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_CANCEL_BEFORE_INVOKE_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_CANCEL_BEFORE_INVOKE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_cancel_before_invoke_test - CHTTP2_FAKE_SECURITY_CANCEL_IN_A_VACUUM_TEST_SRC = \ CHTTP2_FAKE_SECURITY_CANCEL_IN_A_VACUUM_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_CANCEL_IN_A_VACUUM_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_CANCEL_IN_A_VACUUM_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_CANCEL_IN_A_VACUUM_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_cancel_in_a_vacuum_test: openssl_dep_error else @@ -5668,28 +5628,24 @@ bins/$(CONFIG)/chttp2_fake_security_cancel_in_a_vacuum_test: $(CHTTP2_FAKE_SECUR endif -deps_chttp2_fake_security_cancel_in_a_vacuum_test: $(CHTTP2_FAKE_SECURITY_CANCEL_IN_A_VACUUM_TEST_DEPS) + +deps_chttp2_fake_security_cancel_in_a_vacuum_test: $(CHTTP2_FAKE_SECURITY_CANCEL_IN_A_VACUUM_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_CANCEL_IN_A_VACUUM_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_CANCEL_IN_A_VACUUM_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_cancel_in_a_vacuum_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_cancel_in_a_vacuum_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_CANCEL_IN_A_VACUUM_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_CANCEL_IN_A_VACUUM_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_cancel_in_a_vacuum_test - CHTTP2_FAKE_SECURITY_CENSUS_SIMPLE_REQUEST_TEST_SRC = \ CHTTP2_FAKE_SECURITY_CENSUS_SIMPLE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_CENSUS_SIMPLE_REQUEST_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_CENSUS_SIMPLE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_CENSUS_SIMPLE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_census_simple_request_test: openssl_dep_error else @@ -5701,28 +5657,24 @@ bins/$(CONFIG)/chttp2_fake_security_census_simple_request_test: $(CHTTP2_FAKE_SE endif -deps_chttp2_fake_security_census_simple_request_test: $(CHTTP2_FAKE_SECURITY_CENSUS_SIMPLE_REQUEST_TEST_DEPS) + +deps_chttp2_fake_security_census_simple_request_test: $(CHTTP2_FAKE_SECURITY_CENSUS_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_CENSUS_SIMPLE_REQUEST_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_CENSUS_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_census_simple_request_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_census_simple_request_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_CENSUS_SIMPLE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_CENSUS_SIMPLE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_census_simple_request_test - CHTTP2_FAKE_SECURITY_DISAPPEARING_SERVER_TEST_SRC = \ CHTTP2_FAKE_SECURITY_DISAPPEARING_SERVER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_DISAPPEARING_SERVER_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_DISAPPEARING_SERVER_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_DISAPPEARING_SERVER_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_disappearing_server_test: openssl_dep_error else @@ -5734,28 +5686,24 @@ bins/$(CONFIG)/chttp2_fake_security_disappearing_server_test: $(CHTTP2_FAKE_SECU endif -deps_chttp2_fake_security_disappearing_server_test: $(CHTTP2_FAKE_SECURITY_DISAPPEARING_SERVER_TEST_DEPS) + +deps_chttp2_fake_security_disappearing_server_test: $(CHTTP2_FAKE_SECURITY_DISAPPEARING_SERVER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_DISAPPEARING_SERVER_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_DISAPPEARING_SERVER_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_disappearing_server_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_disappearing_server_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_DISAPPEARING_SERVER_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_DISAPPEARING_SERVER_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_disappearing_server_test - CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC = \ CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test: openssl_dep_error else @@ -5767,28 +5715,24 @@ bins/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_inflight_call endif -deps_chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test: $(CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) + +deps_chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test: $(CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test - CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC = \ CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_tags_test: openssl_dep_error else @@ -5800,28 +5744,53 @@ bins/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_tags_test: $( endif -deps_chttp2_fake_security_early_server_shutdown_finishes_tags_test: $(CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) + +deps_chttp2_fake_security_early_server_shutdown_finishes_tags_test: $(CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS:.o=.dep) +endif endif + + +CHTTP2_FAKE_SECURITY_GRACEFUL_SERVER_SHUTDOWN_TEST_SRC = \ + +CHTTP2_FAKE_SECURITY_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_GRACEFUL_SERVER_SHUTDOWN_TEST_SRC)))) + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/chttp2_fake_security_graceful_server_shutdown_test: openssl_dep_error + +else + +bins/$(CONFIG)/chttp2_fake_security_graceful_server_shutdown_test: $(CHTTP2_FAKE_SECURITY_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS) libs/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a libs/$(CONFIG)/libend2end_test_graceful_server_shutdown.a libs/$(CONFIG)/libend2end_certs.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(CHTTP2_FAKE_SECURITY_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS) libs/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a libs/$(CONFIG)/libend2end_test_graceful_server_shutdown.a libs/$(CONFIG)/libend2end_certs.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/chttp2_fake_security_graceful_server_shutdown_test + endif -clean_chttp2_fake_security_early_server_shutdown_finishes_tags_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_early_server_shutdown_finishes_tags_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_early_server_shutdown_finishes_tags_test + +deps_chttp2_fake_security_graceful_server_shutdown_test: $(CHTTP2_FAKE_SECURITY_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(CHTTP2_FAKE_SECURITY_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS:.o=.dep) +endif +endif CHTTP2_FAKE_SECURITY_INVOKE_LARGE_REQUEST_TEST_SRC = \ CHTTP2_FAKE_SECURITY_INVOKE_LARGE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_INVOKE_LARGE_REQUEST_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_INVOKE_LARGE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_INVOKE_LARGE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_invoke_large_request_test: openssl_dep_error else @@ -5833,28 +5802,24 @@ bins/$(CONFIG)/chttp2_fake_security_invoke_large_request_test: $(CHTTP2_FAKE_SEC endif -deps_chttp2_fake_security_invoke_large_request_test: $(CHTTP2_FAKE_SECURITY_INVOKE_LARGE_REQUEST_TEST_DEPS) + +deps_chttp2_fake_security_invoke_large_request_test: $(CHTTP2_FAKE_SECURITY_INVOKE_LARGE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_INVOKE_LARGE_REQUEST_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_INVOKE_LARGE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_invoke_large_request_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_invoke_large_request_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_INVOKE_LARGE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_INVOKE_LARGE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_invoke_large_request_test - CHTTP2_FAKE_SECURITY_MAX_CONCURRENT_STREAMS_TEST_SRC = \ CHTTP2_FAKE_SECURITY_MAX_CONCURRENT_STREAMS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_MAX_CONCURRENT_STREAMS_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_MAX_CONCURRENT_STREAMS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_MAX_CONCURRENT_STREAMS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_max_concurrent_streams_test: openssl_dep_error else @@ -5866,28 +5831,24 @@ bins/$(CONFIG)/chttp2_fake_security_max_concurrent_streams_test: $(CHTTP2_FAKE_S endif -deps_chttp2_fake_security_max_concurrent_streams_test: $(CHTTP2_FAKE_SECURITY_MAX_CONCURRENT_STREAMS_TEST_DEPS) + +deps_chttp2_fake_security_max_concurrent_streams_test: $(CHTTP2_FAKE_SECURITY_MAX_CONCURRENT_STREAMS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_MAX_CONCURRENT_STREAMS_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_MAX_CONCURRENT_STREAMS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_max_concurrent_streams_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_max_concurrent_streams_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_MAX_CONCURRENT_STREAMS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_MAX_CONCURRENT_STREAMS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_max_concurrent_streams_test - CHTTP2_FAKE_SECURITY_NO_OP_TEST_SRC = \ CHTTP2_FAKE_SECURITY_NO_OP_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_NO_OP_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_NO_OP_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_NO_OP_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_no_op_test: openssl_dep_error else @@ -5899,28 +5860,24 @@ bins/$(CONFIG)/chttp2_fake_security_no_op_test: $(CHTTP2_FAKE_SECURITY_NO_OP_TES endif -deps_chttp2_fake_security_no_op_test: $(CHTTP2_FAKE_SECURITY_NO_OP_TEST_DEPS) + +deps_chttp2_fake_security_no_op_test: $(CHTTP2_FAKE_SECURITY_NO_OP_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_NO_OP_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_NO_OP_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_no_op_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_no_op_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_NO_OP_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_NO_OP_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_no_op_test - CHTTP2_FAKE_SECURITY_PING_PONG_STREAMING_TEST_SRC = \ CHTTP2_FAKE_SECURITY_PING_PONG_STREAMING_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_PING_PONG_STREAMING_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_PING_PONG_STREAMING_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_PING_PONG_STREAMING_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_ping_pong_streaming_test: openssl_dep_error else @@ -5932,28 +5889,24 @@ bins/$(CONFIG)/chttp2_fake_security_ping_pong_streaming_test: $(CHTTP2_FAKE_SECU endif -deps_chttp2_fake_security_ping_pong_streaming_test: $(CHTTP2_FAKE_SECURITY_PING_PONG_STREAMING_TEST_DEPS) + +deps_chttp2_fake_security_ping_pong_streaming_test: $(CHTTP2_FAKE_SECURITY_PING_PONG_STREAMING_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_PING_PONG_STREAMING_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_PING_PONG_STREAMING_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_ping_pong_streaming_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_ping_pong_streaming_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_PING_PONG_STREAMING_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_PING_PONG_STREAMING_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_ping_pong_streaming_test - CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_request_response_with_binary_metadata_and_payload_test: openssl_dep_error else @@ -5965,28 +5918,24 @@ bins/$(CONFIG)/chttp2_fake_security_request_response_with_binary_metadata_and_pa endif -deps_chttp2_fake_security_request_response_with_binary_metadata_and_payload_test: $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_fake_security_request_response_with_binary_metadata_and_payload_test: $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_request_response_with_binary_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_request_response_with_binary_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_request_response_with_binary_metadata_and_payload_test - CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_request_response_with_metadata_and_payload_test: openssl_dep_error else @@ -5998,28 +5947,24 @@ bins/$(CONFIG)/chttp2_fake_security_request_response_with_metadata_and_payload_t endif -deps_chttp2_fake_security_request_response_with_metadata_and_payload_test: $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_fake_security_request_response_with_metadata_and_payload_test: $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_request_response_with_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_request_response_with_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_request_response_with_metadata_and_payload_test - CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC = \ CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_request_response_with_payload_test: openssl_dep_error else @@ -6031,28 +5976,24 @@ bins/$(CONFIG)/chttp2_fake_security_request_response_with_payload_test: $(CHTTP2 endif -deps_chttp2_fake_security_request_response_with_payload_test: $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) + +deps_chttp2_fake_security_request_response_with_payload_test: $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_request_response_with_payload_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_request_response_with_payload_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_request_response_with_payload_test - CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test: openssl_dep_error else @@ -6064,28 +6005,24 @@ bins/$(CONFIG)/chttp2_fake_security_request_response_with_trailing_metadata_and_ endif -deps_chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test: $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test: $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test - CHTTP2_FAKE_SECURITY_SIMPLE_DELAYED_REQUEST_TEST_SRC = \ CHTTP2_FAKE_SECURITY_SIMPLE_DELAYED_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_SIMPLE_DELAYED_REQUEST_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_SIMPLE_DELAYED_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_SIMPLE_DELAYED_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_simple_delayed_request_test: openssl_dep_error else @@ -6097,28 +6034,24 @@ bins/$(CONFIG)/chttp2_fake_security_simple_delayed_request_test: $(CHTTP2_FAKE_S endif -deps_chttp2_fake_security_simple_delayed_request_test: $(CHTTP2_FAKE_SECURITY_SIMPLE_DELAYED_REQUEST_TEST_DEPS) + +deps_chttp2_fake_security_simple_delayed_request_test: $(CHTTP2_FAKE_SECURITY_SIMPLE_DELAYED_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_SIMPLE_DELAYED_REQUEST_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_SIMPLE_DELAYED_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_simple_delayed_request_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_simple_delayed_request_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_SIMPLE_DELAYED_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_SIMPLE_DELAYED_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_simple_delayed_request_test - CHTTP2_FAKE_SECURITY_SIMPLE_REQUEST_TEST_SRC = \ CHTTP2_FAKE_SECURITY_SIMPLE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_SIMPLE_REQUEST_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_SIMPLE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_SIMPLE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_simple_request_test: openssl_dep_error else @@ -6130,28 +6063,24 @@ bins/$(CONFIG)/chttp2_fake_security_simple_request_test: $(CHTTP2_FAKE_SECURITY_ endif -deps_chttp2_fake_security_simple_request_test: $(CHTTP2_FAKE_SECURITY_SIMPLE_REQUEST_TEST_DEPS) + +deps_chttp2_fake_security_simple_request_test: $(CHTTP2_FAKE_SECURITY_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_SIMPLE_REQUEST_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_simple_request_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_simple_request_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_SIMPLE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_SIMPLE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_simple_request_test - CHTTP2_FAKE_SECURITY_THREAD_STRESS_TEST_SRC = \ CHTTP2_FAKE_SECURITY_THREAD_STRESS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_THREAD_STRESS_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_THREAD_STRESS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_THREAD_STRESS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_thread_stress_test: openssl_dep_error else @@ -6163,28 +6092,24 @@ bins/$(CONFIG)/chttp2_fake_security_thread_stress_test: $(CHTTP2_FAKE_SECURITY_T endif -deps_chttp2_fake_security_thread_stress_test: $(CHTTP2_FAKE_SECURITY_THREAD_STRESS_TEST_DEPS) + +deps_chttp2_fake_security_thread_stress_test: $(CHTTP2_FAKE_SECURITY_THREAD_STRESS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_THREAD_STRESS_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_THREAD_STRESS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_thread_stress_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_thread_stress_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_THREAD_STRESS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_THREAD_STRESS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_thread_stress_test - CHTTP2_FAKE_SECURITY_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC = \ CHTTP2_FAKE_SECURITY_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FAKE_SECURITY_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC)))) -CHTTP2_FAKE_SECURITY_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FAKE_SECURITY_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fake_security_writes_done_hangs_with_pending_read_test: openssl_dep_error else @@ -6196,28 +6121,24 @@ bins/$(CONFIG)/chttp2_fake_security_writes_done_hangs_with_pending_read_test: $( endif -deps_chttp2_fake_security_writes_done_hangs_with_pending_read_test: $(CHTTP2_FAKE_SECURITY_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) + +deps_chttp2_fake_security_writes_done_hangs_with_pending_read_test: $(CHTTP2_FAKE_SECURITY_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FAKE_SECURITY_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) +-include $(CHTTP2_FAKE_SECURITY_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fake_security_writes_done_hangs_with_pending_read_test: - $(E) "[CLEAN] Cleaning chttp2_fake_security_writes_done_hangs_with_pending_read_test files" - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FAKE_SECURITY_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fake_security_writes_done_hangs_with_pending_read_test - CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_SRC = \ CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_SRC)))) -CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_cancel_after_accept_test: openssl_dep_error else @@ -6229,28 +6150,24 @@ bins/$(CONFIG)/chttp2_fullstack_cancel_after_accept_test: $(CHTTP2_FULLSTACK_CAN endif -deps_chttp2_fullstack_cancel_after_accept_test: $(CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_DEPS) + +deps_chttp2_fullstack_cancel_after_accept_test: $(CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_cancel_after_accept_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_cancel_after_accept_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_cancel_after_accept_test - CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC = \ CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC)))) -CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_cancel_after_accept_and_writes_closed_test: openssl_dep_error else @@ -6262,28 +6179,24 @@ bins/$(CONFIG)/chttp2_fullstack_cancel_after_accept_and_writes_closed_test: $(CH endif -deps_chttp2_fullstack_cancel_after_accept_and_writes_closed_test: $(CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) + +deps_chttp2_fullstack_cancel_after_accept_and_writes_closed_test: $(CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_cancel_after_accept_and_writes_closed_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_cancel_after_accept_and_writes_closed_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_cancel_after_accept_and_writes_closed_test - CHTTP2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_SRC = \ CHTTP2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_SRC)))) -CHTTP2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_cancel_after_invoke_test: openssl_dep_error else @@ -6295,28 +6208,24 @@ bins/$(CONFIG)/chttp2_fullstack_cancel_after_invoke_test: $(CHTTP2_FULLSTACK_CAN endif -deps_chttp2_fullstack_cancel_after_invoke_test: $(CHTTP2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_DEPS) + +deps_chttp2_fullstack_cancel_after_invoke_test: $(CHTTP2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_cancel_after_invoke_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_cancel_after_invoke_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_cancel_after_invoke_test - CHTTP2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_SRC = \ CHTTP2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_SRC)))) -CHTTP2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_cancel_before_invoke_test: openssl_dep_error else @@ -6328,28 +6237,24 @@ bins/$(CONFIG)/chttp2_fullstack_cancel_before_invoke_test: $(CHTTP2_FULLSTACK_CA endif -deps_chttp2_fullstack_cancel_before_invoke_test: $(CHTTP2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_DEPS) + +deps_chttp2_fullstack_cancel_before_invoke_test: $(CHTTP2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_cancel_before_invoke_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_cancel_before_invoke_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_cancel_before_invoke_test - CHTTP2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_SRC = \ CHTTP2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_SRC)))) -CHTTP2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_cancel_in_a_vacuum_test: openssl_dep_error else @@ -6361,28 +6266,24 @@ bins/$(CONFIG)/chttp2_fullstack_cancel_in_a_vacuum_test: $(CHTTP2_FULLSTACK_CANC endif -deps_chttp2_fullstack_cancel_in_a_vacuum_test: $(CHTTP2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_DEPS) + +deps_chttp2_fullstack_cancel_in_a_vacuum_test: $(CHTTP2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_cancel_in_a_vacuum_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_cancel_in_a_vacuum_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_cancel_in_a_vacuum_test - CHTTP2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_SRC = \ CHTTP2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_SRC)))) -CHTTP2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_census_simple_request_test: openssl_dep_error else @@ -6394,28 +6295,24 @@ bins/$(CONFIG)/chttp2_fullstack_census_simple_request_test: $(CHTTP2_FULLSTACK_C endif -deps_chttp2_fullstack_census_simple_request_test: $(CHTTP2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_DEPS) + +deps_chttp2_fullstack_census_simple_request_test: $(CHTTP2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_census_simple_request_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_census_simple_request_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_census_simple_request_test - CHTTP2_FULLSTACK_DISAPPEARING_SERVER_TEST_SRC = \ CHTTP2_FULLSTACK_DISAPPEARING_SERVER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_DISAPPEARING_SERVER_TEST_SRC)))) -CHTTP2_FULLSTACK_DISAPPEARING_SERVER_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_DISAPPEARING_SERVER_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_disappearing_server_test: openssl_dep_error else @@ -6427,28 +6324,24 @@ bins/$(CONFIG)/chttp2_fullstack_disappearing_server_test: $(CHTTP2_FULLSTACK_DIS endif -deps_chttp2_fullstack_disappearing_server_test: $(CHTTP2_FULLSTACK_DISAPPEARING_SERVER_TEST_DEPS) + +deps_chttp2_fullstack_disappearing_server_test: $(CHTTP2_FULLSTACK_DISAPPEARING_SERVER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_DISAPPEARING_SERVER_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_DISAPPEARING_SERVER_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_disappearing_server_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_disappearing_server_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_DISAPPEARING_SERVER_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_DISAPPEARING_SERVER_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_disappearing_server_test - CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC = \ CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC)))) -CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test: openssl_dep_error else @@ -6460,28 +6353,24 @@ bins/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_te endif -deps_chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test: $(CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) + +deps_chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test: $(CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test - CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC = \ CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC)))) -CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_tags_test: openssl_dep_error else @@ -6493,28 +6382,53 @@ bins/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_tags_test: $(CHTT endif -deps_chttp2_fullstack_early_server_shutdown_finishes_tags_test: $(CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) + +deps_chttp2_fullstack_early_server_shutdown_finishes_tags_test: $(CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS:.o=.dep) +endif endif + + +CHTTP2_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_SRC = \ + +CHTTP2_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_SRC)))) + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/chttp2_fullstack_graceful_server_shutdown_test: openssl_dep_error + +else + +bins/$(CONFIG)/chttp2_fullstack_graceful_server_shutdown_test: $(CHTTP2_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS) libs/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a libs/$(CONFIG)/libend2end_test_graceful_server_shutdown.a libs/$(CONFIG)/libend2end_certs.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(CHTTP2_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS) libs/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a libs/$(CONFIG)/libend2end_test_graceful_server_shutdown.a libs/$(CONFIG)/libend2end_certs.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/chttp2_fullstack_graceful_server_shutdown_test + endif -clean_chttp2_fullstack_early_server_shutdown_finishes_tags_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_early_server_shutdown_finishes_tags_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_early_server_shutdown_finishes_tags_test + +deps_chttp2_fullstack_graceful_server_shutdown_test: $(CHTTP2_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(CHTTP2_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS:.o=.dep) +endif +endif CHTTP2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_SRC = \ CHTTP2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_SRC)))) -CHTTP2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_invoke_large_request_test: openssl_dep_error else @@ -6526,28 +6440,24 @@ bins/$(CONFIG)/chttp2_fullstack_invoke_large_request_test: $(CHTTP2_FULLSTACK_IN endif -deps_chttp2_fullstack_invoke_large_request_test: $(CHTTP2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_DEPS) + +deps_chttp2_fullstack_invoke_large_request_test: $(CHTTP2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_invoke_large_request_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_invoke_large_request_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_invoke_large_request_test - CHTTP2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_SRC = \ CHTTP2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_SRC)))) -CHTTP2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_max_concurrent_streams_test: openssl_dep_error else @@ -6559,28 +6469,24 @@ bins/$(CONFIG)/chttp2_fullstack_max_concurrent_streams_test: $(CHTTP2_FULLSTACK_ endif -deps_chttp2_fullstack_max_concurrent_streams_test: $(CHTTP2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_DEPS) + +deps_chttp2_fullstack_max_concurrent_streams_test: $(CHTTP2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_max_concurrent_streams_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_max_concurrent_streams_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_max_concurrent_streams_test - CHTTP2_FULLSTACK_NO_OP_TEST_SRC = \ CHTTP2_FULLSTACK_NO_OP_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_NO_OP_TEST_SRC)))) -CHTTP2_FULLSTACK_NO_OP_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_NO_OP_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_no_op_test: openssl_dep_error else @@ -6592,28 +6498,24 @@ bins/$(CONFIG)/chttp2_fullstack_no_op_test: $(CHTTP2_FULLSTACK_NO_OP_TEST_OBJS) endif -deps_chttp2_fullstack_no_op_test: $(CHTTP2_FULLSTACK_NO_OP_TEST_DEPS) + +deps_chttp2_fullstack_no_op_test: $(CHTTP2_FULLSTACK_NO_OP_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_NO_OP_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_NO_OP_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_no_op_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_no_op_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_NO_OP_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_NO_OP_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_no_op_test - CHTTP2_FULLSTACK_PING_PONG_STREAMING_TEST_SRC = \ CHTTP2_FULLSTACK_PING_PONG_STREAMING_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_PING_PONG_STREAMING_TEST_SRC)))) -CHTTP2_FULLSTACK_PING_PONG_STREAMING_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_PING_PONG_STREAMING_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_ping_pong_streaming_test: openssl_dep_error else @@ -6625,28 +6527,24 @@ bins/$(CONFIG)/chttp2_fullstack_ping_pong_streaming_test: $(CHTTP2_FULLSTACK_PIN endif -deps_chttp2_fullstack_ping_pong_streaming_test: $(CHTTP2_FULLSTACK_PING_PONG_STREAMING_TEST_DEPS) + +deps_chttp2_fullstack_ping_pong_streaming_test: $(CHTTP2_FULLSTACK_PING_PONG_STREAMING_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_PING_PONG_STREAMING_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_PING_PONG_STREAMING_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_ping_pong_streaming_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_ping_pong_streaming_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_PING_PONG_STREAMING_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_PING_PONG_STREAMING_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_ping_pong_streaming_test - CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_request_response_with_binary_metadata_and_payload_test: openssl_dep_error else @@ -6658,28 +6556,24 @@ bins/$(CONFIG)/chttp2_fullstack_request_response_with_binary_metadata_and_payloa endif -deps_chttp2_fullstack_request_response_with_binary_metadata_and_payload_test: $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_fullstack_request_response_with_binary_metadata_and_payload_test: $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_request_response_with_binary_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_request_response_with_binary_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_request_response_with_binary_metadata_and_payload_test - CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_request_response_with_metadata_and_payload_test: openssl_dep_error else @@ -6691,28 +6585,24 @@ bins/$(CONFIG)/chttp2_fullstack_request_response_with_metadata_and_payload_test: endif -deps_chttp2_fullstack_request_response_with_metadata_and_payload_test: $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_fullstack_request_response_with_metadata_and_payload_test: $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_request_response_with_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_request_response_with_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_request_response_with_metadata_and_payload_test - CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC = \ CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC)))) -CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_request_response_with_payload_test: openssl_dep_error else @@ -6724,28 +6614,24 @@ bins/$(CONFIG)/chttp2_fullstack_request_response_with_payload_test: $(CHTTP2_FUL endif -deps_chttp2_fullstack_request_response_with_payload_test: $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) + +deps_chttp2_fullstack_request_response_with_payload_test: $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_request_response_with_payload_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_request_response_with_payload_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_request_response_with_payload_test - CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test: openssl_dep_error else @@ -6757,28 +6643,24 @@ bins/$(CONFIG)/chttp2_fullstack_request_response_with_trailing_metadata_and_payl endif -deps_chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test: $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test: $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test - CHTTP2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_SRC = \ CHTTP2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_SRC)))) -CHTTP2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_simple_delayed_request_test: openssl_dep_error else @@ -6790,28 +6672,24 @@ bins/$(CONFIG)/chttp2_fullstack_simple_delayed_request_test: $(CHTTP2_FULLSTACK_ endif -deps_chttp2_fullstack_simple_delayed_request_test: $(CHTTP2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_DEPS) + +deps_chttp2_fullstack_simple_delayed_request_test: $(CHTTP2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_simple_delayed_request_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_simple_delayed_request_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_simple_delayed_request_test - CHTTP2_FULLSTACK_SIMPLE_REQUEST_TEST_SRC = \ CHTTP2_FULLSTACK_SIMPLE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_SIMPLE_REQUEST_TEST_SRC)))) -CHTTP2_FULLSTACK_SIMPLE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_SIMPLE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_simple_request_test: openssl_dep_error else @@ -6823,28 +6701,24 @@ bins/$(CONFIG)/chttp2_fullstack_simple_request_test: $(CHTTP2_FULLSTACK_SIMPLE_R endif -deps_chttp2_fullstack_simple_request_test: $(CHTTP2_FULLSTACK_SIMPLE_REQUEST_TEST_DEPS) + +deps_chttp2_fullstack_simple_request_test: $(CHTTP2_FULLSTACK_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_SIMPLE_REQUEST_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_simple_request_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_simple_request_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_SIMPLE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_SIMPLE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_simple_request_test - CHTTP2_FULLSTACK_THREAD_STRESS_TEST_SRC = \ CHTTP2_FULLSTACK_THREAD_STRESS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_THREAD_STRESS_TEST_SRC)))) -CHTTP2_FULLSTACK_THREAD_STRESS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_THREAD_STRESS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_thread_stress_test: openssl_dep_error else @@ -6856,28 +6730,24 @@ bins/$(CONFIG)/chttp2_fullstack_thread_stress_test: $(CHTTP2_FULLSTACK_THREAD_ST endif -deps_chttp2_fullstack_thread_stress_test: $(CHTTP2_FULLSTACK_THREAD_STRESS_TEST_DEPS) + +deps_chttp2_fullstack_thread_stress_test: $(CHTTP2_FULLSTACK_THREAD_STRESS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_THREAD_STRESS_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_THREAD_STRESS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_thread_stress_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_thread_stress_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_THREAD_STRESS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_THREAD_STRESS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_thread_stress_test - CHTTP2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC = \ CHTTP2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC)))) -CHTTP2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_fullstack_writes_done_hangs_with_pending_read_test: openssl_dep_error else @@ -6889,28 +6759,24 @@ bins/$(CONFIG)/chttp2_fullstack_writes_done_hangs_with_pending_read_test: $(CHTT endif -deps_chttp2_fullstack_writes_done_hangs_with_pending_read_test: $(CHTTP2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) + +deps_chttp2_fullstack_writes_done_hangs_with_pending_read_test: $(CHTTP2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) +-include $(CHTTP2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_fullstack_writes_done_hangs_with_pending_read_test: - $(E) "[CLEAN] Cleaning chttp2_fullstack_writes_done_hangs_with_pending_read_test files" - $(Q) $(RM) $(CHTTP2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_fullstack_writes_done_hangs_with_pending_read_test - CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_accept_test: openssl_dep_error else @@ -6922,28 +6788,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_accept_test: $(CHTTP2_SI endif -deps_chttp2_simple_ssl_fullstack_cancel_after_accept_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_cancel_after_accept_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_cancel_after_accept_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_cancel_after_accept_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_accept_test - CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test: openssl_dep_error else @@ -6955,28 +6817,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed endif -deps_chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test - CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_invoke_test: openssl_dep_error else @@ -6988,28 +6846,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_invoke_test: $(CHTTP2_SI endif -deps_chttp2_simple_ssl_fullstack_cancel_after_invoke_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_cancel_after_invoke_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_cancel_after_invoke_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_cancel_after_invoke_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_after_invoke_test - CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_before_invoke_test: openssl_dep_error else @@ -7021,28 +6875,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_before_invoke_test: $(CHTTP2_S endif -deps_chttp2_simple_ssl_fullstack_cancel_before_invoke_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_cancel_before_invoke_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_cancel_before_invoke_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_cancel_before_invoke_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_before_invoke_test - CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test: openssl_dep_error else @@ -7054,28 +6904,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test: $(CHTTP2_SIM endif -deps_chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test - CHTTP2_SIMPLE_SSL_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_census_simple_request_test: openssl_dep_error else @@ -7087,28 +6933,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_census_simple_request_test: $(CHTTP2_ endif -deps_chttp2_simple_ssl_fullstack_census_simple_request_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_census_simple_request_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_census_simple_request_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_census_simple_request_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_census_simple_request_test - CHTTP2_SIMPLE_SSL_FULLSTACK_DISAPPEARING_SERVER_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_DISAPPEARING_SERVER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_DISAPPEARING_SERVER_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_DISAPPEARING_SERVER_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_DISAPPEARING_SERVER_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_disappearing_server_test: openssl_dep_error else @@ -7120,28 +6962,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_disappearing_server_test: $(CHTTP2_SI endif -deps_chttp2_simple_ssl_fullstack_disappearing_server_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_DISAPPEARING_SERVER_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_disappearing_server_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_DISAPPEARING_SERVER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_DISAPPEARING_SERVER_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_DISAPPEARING_SERVER_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_disappearing_server_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_disappearing_server_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_DISAPPEARING_SERVER_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_DISAPPEARING_SERVER_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_disappearing_server_test - CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test: openssl_dep_error else @@ -7153,28 +6991,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflig endif -deps_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test - CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test: openssl_dep_error else @@ -7186,28 +7020,53 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_t endif -deps_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS:.o=.dep) +endif endif + + +CHTTP2_SIMPLE_SSL_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_SRC = \ + +CHTTP2_SIMPLE_SSL_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_SRC)))) + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/chttp2_simple_ssl_fullstack_graceful_server_shutdown_test: openssl_dep_error + +else + +bins/$(CONFIG)/chttp2_simple_ssl_fullstack_graceful_server_shutdown_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS) libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a libs/$(CONFIG)/libend2end_test_graceful_server_shutdown.a libs/$(CONFIG)/libend2end_certs.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(CHTTP2_SIMPLE_SSL_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS) libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a libs/$(CONFIG)/libend2end_test_graceful_server_shutdown.a libs/$(CONFIG)/libend2end_certs.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/chttp2_simple_ssl_fullstack_graceful_server_shutdown_test + endif -clean_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test + +deps_chttp2_simple_ssl_fullstack_graceful_server_shutdown_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS:.o=.dep) +endif +endif CHTTP2_SIMPLE_SSL_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_invoke_large_request_test: openssl_dep_error else @@ -7219,28 +7078,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_invoke_large_request_test: $(CHTTP2_S endif -deps_chttp2_simple_ssl_fullstack_invoke_large_request_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_invoke_large_request_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_invoke_large_request_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_invoke_large_request_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_invoke_large_request_test - CHTTP2_SIMPLE_SSL_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_max_concurrent_streams_test: openssl_dep_error else @@ -7252,28 +7107,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_max_concurrent_streams_test: $(CHTTP2 endif -deps_chttp2_simple_ssl_fullstack_max_concurrent_streams_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_max_concurrent_streams_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_max_concurrent_streams_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_max_concurrent_streams_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_max_concurrent_streams_test - CHTTP2_SIMPLE_SSL_FULLSTACK_NO_OP_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_NO_OP_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_NO_OP_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_NO_OP_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_NO_OP_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_no_op_test: openssl_dep_error else @@ -7285,28 +7136,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_no_op_test: $(CHTTP2_SIMPLE_SSL_FULLS endif -deps_chttp2_simple_ssl_fullstack_no_op_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_NO_OP_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_no_op_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_NO_OP_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_NO_OP_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_NO_OP_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_no_op_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_no_op_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_NO_OP_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_NO_OP_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_no_op_test - CHTTP2_SIMPLE_SSL_FULLSTACK_PING_PONG_STREAMING_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_PING_PONG_STREAMING_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_PING_PONG_STREAMING_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_PING_PONG_STREAMING_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_PING_PONG_STREAMING_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_ping_pong_streaming_test: openssl_dep_error else @@ -7318,28 +7165,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_ping_pong_streaming_test: $(CHTTP2_SI endif -deps_chttp2_simple_ssl_fullstack_ping_pong_streaming_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_PING_PONG_STREAMING_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_ping_pong_streaming_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_PING_PONG_STREAMING_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_PING_PONG_STREAMING_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_PING_PONG_STREAMING_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_ping_pong_streaming_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_ping_pong_streaming_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_PING_PONG_STREAMING_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_PING_PONG_STREAMING_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_ping_pong_streaming_test - CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test: openssl_dep_error else @@ -7351,28 +7194,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_binary_metadata endif -deps_chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test - CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test: openssl_dep_error else @@ -7384,28 +7223,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_metadata_and_pa endif -deps_chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test - CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_payload_test: openssl_dep_error else @@ -7417,28 +7252,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_payload_test: $ endif -deps_chttp2_simple_ssl_fullstack_request_response_with_payload_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_request_response_with_payload_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_request_response_with_payload_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_request_response_with_payload_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_payload_test - CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test: openssl_dep_error else @@ -7450,28 +7281,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_trailing_metada endif -deps_chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test - CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_delayed_request_test: openssl_dep_error else @@ -7483,28 +7310,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_delayed_request_test: $(CHTTP2 endif -deps_chttp2_simple_ssl_fullstack_simple_delayed_request_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_simple_delayed_request_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_simple_delayed_request_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_simple_delayed_request_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_delayed_request_test - CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_REQUEST_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_REQUEST_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_request_test: openssl_dep_error else @@ -7516,28 +7339,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_request_test: $(CHTTP2_SIMPLE_ endif -deps_chttp2_simple_ssl_fullstack_simple_request_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_REQUEST_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_simple_request_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_REQUEST_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_simple_request_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_simple_request_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_SIMPLE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_simple_request_test - CHTTP2_SIMPLE_SSL_FULLSTACK_THREAD_STRESS_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_THREAD_STRESS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_THREAD_STRESS_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_THREAD_STRESS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_THREAD_STRESS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_thread_stress_test: openssl_dep_error else @@ -7549,28 +7368,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_thread_stress_test: $(CHTTP2_SIMPLE_S endif -deps_chttp2_simple_ssl_fullstack_thread_stress_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_THREAD_STRESS_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_thread_stress_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_THREAD_STRESS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_THREAD_STRESS_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_THREAD_STRESS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_thread_stress_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_thread_stress_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_THREAD_STRESS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_THREAD_STRESS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_thread_stress_test - CHTTP2_SIMPLE_SSL_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC = \ CHTTP2_SIMPLE_SSL_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test: openssl_dep_error else @@ -7582,28 +7397,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_t endif -deps_chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) + +deps_chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test: $(CHTTP2_SIMPLE_SSL_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test: openssl_dep_error else @@ -7615,28 +7426,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test: endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test: openssl_dep_error else @@ -7648,28 +7455,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_w endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test: openssl_dep_error else @@ -7681,28 +7484,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test: endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_AFTER_INVOKE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test: openssl_dep_error else @@ -7714,28 +7513,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_BEFORE_INVOKE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test: openssl_dep_error else @@ -7747,28 +7542,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test: endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CANCEL_IN_A_VACUUM_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test: openssl_dep_error else @@ -7780,28 +7571,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_tes endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_CENSUS_SIMPLE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_DISAPPEARING_SERVER_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_DISAPPEARING_SERVER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_DISAPPEARING_SERVER_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_DISAPPEARING_SERVER_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_DISAPPEARING_SERVER_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test: openssl_dep_error else @@ -7813,28 +7600,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test: endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_DISAPPEARING_SERVER_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_DISAPPEARING_SERVER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_DISAPPEARING_SERVER_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_DISAPPEARING_SERVER_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_DISAPPEARING_SERVER_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_DISAPPEARING_SERVER_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test: openssl_dep_error else @@ -7846,28 +7629,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_fin endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test: openssl_dep_error else @@ -7879,28 +7658,53 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_fin endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS:.o=.dep) +endif endif + + +CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_SRC = \ + +CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_SRC)))) + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_test: openssl_dep_error + +else + +bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS) libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a libs/$(CONFIG)/libend2end_test_graceful_server_shutdown.a libs/$(CONFIG)/libend2end_certs.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS) libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a libs/$(CONFIG)/libend2end_test_graceful_server_shutdown.a libs/$(CONFIG)/libend2end_certs.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_test + endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test + +deps_chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS:.o=.dep) +endif +endif CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test: openssl_dep_error else @@ -7912,28 +7716,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_INVOKE_LARGE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test: openssl_dep_error else @@ -7945,28 +7745,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_te endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_MAX_CONCURRENT_STREAMS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_NO_OP_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_NO_OP_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_NO_OP_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_NO_OP_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_NO_OP_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_no_op_test: openssl_dep_error else @@ -7978,28 +7774,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_no_op_test: $(CHTTP2_SIMP endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_no_op_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_NO_OP_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_no_op_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_NO_OP_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_NO_OP_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_NO_OP_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_no_op_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_no_op_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_NO_OP_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_NO_OP_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_no_op_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_PING_PONG_STREAMING_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_PING_PONG_STREAMING_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_PING_PONG_STREAMING_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_PING_PONG_STREAMING_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_PING_PONG_STREAMING_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test: openssl_dep_error else @@ -8011,28 +7803,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test: endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_PING_PONG_STREAMING_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_PING_PONG_STREAMING_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_PING_PONG_STREAMING_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_PING_PONG_STREAMING_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_PING_PONG_STREAMING_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_PING_PONG_STREAMING_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test: openssl_dep_error else @@ -8044,28 +7832,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_bin endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test: openssl_dep_error else @@ -8077,28 +7861,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_met endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test: openssl_dep_error else @@ -8110,28 +7890,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_pay endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test: openssl_dep_error else @@ -8143,28 +7919,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_tra endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test: openssl_dep_error else @@ -8176,28 +7948,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_te endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_DELAYED_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_REQUEST_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_REQUEST_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test: openssl_dep_error else @@ -8209,28 +7977,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test: $(CH endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_REQUEST_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_REQUEST_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_SIMPLE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_THREAD_STRESS_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_THREAD_STRESS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_THREAD_STRESS_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_THREAD_STRESS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_THREAD_STRESS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test: openssl_dep_error else @@ -8242,28 +8006,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test: $(CHT endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_THREAD_STRESS_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_THREAD_STRESS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_THREAD_STRESS_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_THREAD_STRESS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_THREAD_STRESS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_THREAD_STRESS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test - CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC = \ CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC)))) -CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test: openssl_dep_error else @@ -8275,28 +8035,24 @@ bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pe endif -deps_chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) + +deps_chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test: $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) +-include $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test: - $(E) "[CLEAN] Cleaning chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test files" - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SIMPLE_SSL_WITH_OAUTH2_FULLSTACK_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test - CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_TEST_SRC = \ CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_test: openssl_dep_error else @@ -8308,28 +8064,24 @@ bins/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_test: $(CHTTP2_SOCKET_PAIR endif -deps_chttp2_socket_pair_cancel_after_accept_test: $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_TEST_DEPS) + +deps_chttp2_socket_pair_cancel_after_accept_test: $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_cancel_after_accept_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_cancel_after_accept_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_test - CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC = \ CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_and_writes_closed_test: openssl_dep_error else @@ -8341,28 +8093,24 @@ bins/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_and_writes_closed_test: $( endif -deps_chttp2_socket_pair_cancel_after_accept_and_writes_closed_test: $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) + +deps_chttp2_socket_pair_cancel_after_accept_and_writes_closed_test: $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_cancel_after_accept_and_writes_closed_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_cancel_after_accept_and_writes_closed_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_cancel_after_accept_and_writes_closed_test - CHTTP2_SOCKET_PAIR_CANCEL_AFTER_INVOKE_TEST_SRC = \ CHTTP2_SOCKET_PAIR_CANCEL_AFTER_INVOKE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_INVOKE_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_CANCEL_AFTER_INVOKE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_INVOKE_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_cancel_after_invoke_test: openssl_dep_error else @@ -8374,28 +8122,24 @@ bins/$(CONFIG)/chttp2_socket_pair_cancel_after_invoke_test: $(CHTTP2_SOCKET_PAIR endif -deps_chttp2_socket_pair_cancel_after_invoke_test: $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_INVOKE_TEST_DEPS) + +deps_chttp2_socket_pair_cancel_after_invoke_test: $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_INVOKE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_INVOKE_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_INVOKE_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_cancel_after_invoke_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_cancel_after_invoke_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_INVOKE_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_CANCEL_AFTER_INVOKE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_cancel_after_invoke_test - CHTTP2_SOCKET_PAIR_CANCEL_BEFORE_INVOKE_TEST_SRC = \ CHTTP2_SOCKET_PAIR_CANCEL_BEFORE_INVOKE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_CANCEL_BEFORE_INVOKE_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_CANCEL_BEFORE_INVOKE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_CANCEL_BEFORE_INVOKE_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_cancel_before_invoke_test: openssl_dep_error else @@ -8407,28 +8151,24 @@ bins/$(CONFIG)/chttp2_socket_pair_cancel_before_invoke_test: $(CHTTP2_SOCKET_PAI endif -deps_chttp2_socket_pair_cancel_before_invoke_test: $(CHTTP2_SOCKET_PAIR_CANCEL_BEFORE_INVOKE_TEST_DEPS) + +deps_chttp2_socket_pair_cancel_before_invoke_test: $(CHTTP2_SOCKET_PAIR_CANCEL_BEFORE_INVOKE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_CANCEL_BEFORE_INVOKE_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_CANCEL_BEFORE_INVOKE_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_cancel_before_invoke_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_cancel_before_invoke_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_CANCEL_BEFORE_INVOKE_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_CANCEL_BEFORE_INVOKE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_cancel_before_invoke_test - CHTTP2_SOCKET_PAIR_CANCEL_IN_A_VACUUM_TEST_SRC = \ CHTTP2_SOCKET_PAIR_CANCEL_IN_A_VACUUM_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_CANCEL_IN_A_VACUUM_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_CANCEL_IN_A_VACUUM_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_CANCEL_IN_A_VACUUM_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_cancel_in_a_vacuum_test: openssl_dep_error else @@ -8440,28 +8180,24 @@ bins/$(CONFIG)/chttp2_socket_pair_cancel_in_a_vacuum_test: $(CHTTP2_SOCKET_PAIR_ endif -deps_chttp2_socket_pair_cancel_in_a_vacuum_test: $(CHTTP2_SOCKET_PAIR_CANCEL_IN_A_VACUUM_TEST_DEPS) + +deps_chttp2_socket_pair_cancel_in_a_vacuum_test: $(CHTTP2_SOCKET_PAIR_CANCEL_IN_A_VACUUM_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_CANCEL_IN_A_VACUUM_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_CANCEL_IN_A_VACUUM_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_cancel_in_a_vacuum_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_cancel_in_a_vacuum_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_CANCEL_IN_A_VACUUM_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_CANCEL_IN_A_VACUUM_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_cancel_in_a_vacuum_test - CHTTP2_SOCKET_PAIR_CENSUS_SIMPLE_REQUEST_TEST_SRC = \ CHTTP2_SOCKET_PAIR_CENSUS_SIMPLE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_CENSUS_SIMPLE_REQUEST_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_CENSUS_SIMPLE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_CENSUS_SIMPLE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_census_simple_request_test: openssl_dep_error else @@ -8473,28 +8209,24 @@ bins/$(CONFIG)/chttp2_socket_pair_census_simple_request_test: $(CHTTP2_SOCKET_PA endif -deps_chttp2_socket_pair_census_simple_request_test: $(CHTTP2_SOCKET_PAIR_CENSUS_SIMPLE_REQUEST_TEST_DEPS) + +deps_chttp2_socket_pair_census_simple_request_test: $(CHTTP2_SOCKET_PAIR_CENSUS_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_CENSUS_SIMPLE_REQUEST_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_CENSUS_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_census_simple_request_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_census_simple_request_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_CENSUS_SIMPLE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_CENSUS_SIMPLE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_census_simple_request_test - CHTTP2_SOCKET_PAIR_DISAPPEARING_SERVER_TEST_SRC = \ CHTTP2_SOCKET_PAIR_DISAPPEARING_SERVER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_DISAPPEARING_SERVER_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_DISAPPEARING_SERVER_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_DISAPPEARING_SERVER_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_disappearing_server_test: openssl_dep_error else @@ -8506,28 +8238,24 @@ bins/$(CONFIG)/chttp2_socket_pair_disappearing_server_test: $(CHTTP2_SOCKET_PAIR endif -deps_chttp2_socket_pair_disappearing_server_test: $(CHTTP2_SOCKET_PAIR_DISAPPEARING_SERVER_TEST_DEPS) + +deps_chttp2_socket_pair_disappearing_server_test: $(CHTTP2_SOCKET_PAIR_DISAPPEARING_SERVER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_DISAPPEARING_SERVER_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_DISAPPEARING_SERVER_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_disappearing_server_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_disappearing_server_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_DISAPPEARING_SERVER_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_DISAPPEARING_SERVER_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_disappearing_server_test - CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC = \ CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test: openssl_dep_error else @@ -8539,28 +8267,24 @@ bins/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_ endif -deps_chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test: $(CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) + +deps_chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test: $(CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test - CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC = \ CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_tags_test: openssl_dep_error else @@ -8572,28 +8296,53 @@ bins/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_tags_test: $(CH endif -deps_chttp2_socket_pair_early_server_shutdown_finishes_tags_test: $(CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) + +deps_chttp2_socket_pair_early_server_shutdown_finishes_tags_test: $(CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS:.o=.dep) +endif endif + + +CHTTP2_SOCKET_PAIR_GRACEFUL_SERVER_SHUTDOWN_TEST_SRC = \ + +CHTTP2_SOCKET_PAIR_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_GRACEFUL_SERVER_SHUTDOWN_TEST_SRC)))) + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/chttp2_socket_pair_graceful_server_shutdown_test: openssl_dep_error + +else + +bins/$(CONFIG)/chttp2_socket_pair_graceful_server_shutdown_test: $(CHTTP2_SOCKET_PAIR_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS) libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a libs/$(CONFIG)/libend2end_test_graceful_server_shutdown.a libs/$(CONFIG)/libend2end_certs.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(CHTTP2_SOCKET_PAIR_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS) libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a libs/$(CONFIG)/libend2end_test_graceful_server_shutdown.a libs/$(CONFIG)/libend2end_certs.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/chttp2_socket_pair_graceful_server_shutdown_test + endif -clean_chttp2_socket_pair_early_server_shutdown_finishes_tags_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_early_server_shutdown_finishes_tags_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_early_server_shutdown_finishes_tags_test + +deps_chttp2_socket_pair_graceful_server_shutdown_test: $(CHTTP2_SOCKET_PAIR_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(CHTTP2_SOCKET_PAIR_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS:.o=.dep) +endif +endif CHTTP2_SOCKET_PAIR_INVOKE_LARGE_REQUEST_TEST_SRC = \ CHTTP2_SOCKET_PAIR_INVOKE_LARGE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_INVOKE_LARGE_REQUEST_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_INVOKE_LARGE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_INVOKE_LARGE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_invoke_large_request_test: openssl_dep_error else @@ -8605,28 +8354,24 @@ bins/$(CONFIG)/chttp2_socket_pair_invoke_large_request_test: $(CHTTP2_SOCKET_PAI endif -deps_chttp2_socket_pair_invoke_large_request_test: $(CHTTP2_SOCKET_PAIR_INVOKE_LARGE_REQUEST_TEST_DEPS) + +deps_chttp2_socket_pair_invoke_large_request_test: $(CHTTP2_SOCKET_PAIR_INVOKE_LARGE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_INVOKE_LARGE_REQUEST_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_INVOKE_LARGE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_invoke_large_request_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_invoke_large_request_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_INVOKE_LARGE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_INVOKE_LARGE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_invoke_large_request_test - CHTTP2_SOCKET_PAIR_MAX_CONCURRENT_STREAMS_TEST_SRC = \ CHTTP2_SOCKET_PAIR_MAX_CONCURRENT_STREAMS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_MAX_CONCURRENT_STREAMS_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_MAX_CONCURRENT_STREAMS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_MAX_CONCURRENT_STREAMS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_max_concurrent_streams_test: openssl_dep_error else @@ -8638,28 +8383,24 @@ bins/$(CONFIG)/chttp2_socket_pair_max_concurrent_streams_test: $(CHTTP2_SOCKET_P endif -deps_chttp2_socket_pair_max_concurrent_streams_test: $(CHTTP2_SOCKET_PAIR_MAX_CONCURRENT_STREAMS_TEST_DEPS) + +deps_chttp2_socket_pair_max_concurrent_streams_test: $(CHTTP2_SOCKET_PAIR_MAX_CONCURRENT_STREAMS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_MAX_CONCURRENT_STREAMS_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_MAX_CONCURRENT_STREAMS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_max_concurrent_streams_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_max_concurrent_streams_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_MAX_CONCURRENT_STREAMS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_MAX_CONCURRENT_STREAMS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_max_concurrent_streams_test - CHTTP2_SOCKET_PAIR_NO_OP_TEST_SRC = \ CHTTP2_SOCKET_PAIR_NO_OP_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_NO_OP_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_NO_OP_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_NO_OP_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_no_op_test: openssl_dep_error else @@ -8671,28 +8412,24 @@ bins/$(CONFIG)/chttp2_socket_pair_no_op_test: $(CHTTP2_SOCKET_PAIR_NO_OP_TEST_OB endif -deps_chttp2_socket_pair_no_op_test: $(CHTTP2_SOCKET_PAIR_NO_OP_TEST_DEPS) + +deps_chttp2_socket_pair_no_op_test: $(CHTTP2_SOCKET_PAIR_NO_OP_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_NO_OP_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_NO_OP_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_no_op_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_no_op_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_NO_OP_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_NO_OP_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_no_op_test - CHTTP2_SOCKET_PAIR_PING_PONG_STREAMING_TEST_SRC = \ CHTTP2_SOCKET_PAIR_PING_PONG_STREAMING_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_PING_PONG_STREAMING_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_PING_PONG_STREAMING_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_PING_PONG_STREAMING_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_ping_pong_streaming_test: openssl_dep_error else @@ -8704,28 +8441,24 @@ bins/$(CONFIG)/chttp2_socket_pair_ping_pong_streaming_test: $(CHTTP2_SOCKET_PAIR endif -deps_chttp2_socket_pair_ping_pong_streaming_test: $(CHTTP2_SOCKET_PAIR_PING_PONG_STREAMING_TEST_DEPS) + +deps_chttp2_socket_pair_ping_pong_streaming_test: $(CHTTP2_SOCKET_PAIR_PING_PONG_STREAMING_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_PING_PONG_STREAMING_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_PING_PONG_STREAMING_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_ping_pong_streaming_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_ping_pong_streaming_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_PING_PONG_STREAMING_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_PING_PONG_STREAMING_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_ping_pong_streaming_test - CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test: openssl_dep_error else @@ -8737,28 +8470,24 @@ bins/$(CONFIG)/chttp2_socket_pair_request_response_with_binary_metadata_and_payl endif -deps_chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test: $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test: $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test - CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_request_response_with_metadata_and_payload_test: openssl_dep_error else @@ -8770,28 +8499,24 @@ bins/$(CONFIG)/chttp2_socket_pair_request_response_with_metadata_and_payload_tes endif -deps_chttp2_socket_pair_request_response_with_metadata_and_payload_test: $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_socket_pair_request_response_with_metadata_and_payload_test: $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_request_response_with_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_request_response_with_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_request_response_with_metadata_and_payload_test - CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC = \ CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_request_response_with_payload_test: openssl_dep_error else @@ -8803,28 +8528,24 @@ bins/$(CONFIG)/chttp2_socket_pair_request_response_with_payload_test: $(CHTTP2_S endif -deps_chttp2_socket_pair_request_response_with_payload_test: $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) + +deps_chttp2_socket_pair_request_response_with_payload_test: $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_request_response_with_payload_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_request_response_with_payload_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_request_response_with_payload_test - CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test: openssl_dep_error else @@ -8836,28 +8557,24 @@ bins/$(CONFIG)/chttp2_socket_pair_request_response_with_trailing_metadata_and_pa endif -deps_chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test: $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test: $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test - CHTTP2_SOCKET_PAIR_SIMPLE_DELAYED_REQUEST_TEST_SRC = \ CHTTP2_SOCKET_PAIR_SIMPLE_DELAYED_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_SIMPLE_DELAYED_REQUEST_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_SIMPLE_DELAYED_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_SIMPLE_DELAYED_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_simple_delayed_request_test: openssl_dep_error else @@ -8869,28 +8586,24 @@ bins/$(CONFIG)/chttp2_socket_pair_simple_delayed_request_test: $(CHTTP2_SOCKET_P endif -deps_chttp2_socket_pair_simple_delayed_request_test: $(CHTTP2_SOCKET_PAIR_SIMPLE_DELAYED_REQUEST_TEST_DEPS) + +deps_chttp2_socket_pair_simple_delayed_request_test: $(CHTTP2_SOCKET_PAIR_SIMPLE_DELAYED_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_SIMPLE_DELAYED_REQUEST_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_SIMPLE_DELAYED_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_simple_delayed_request_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_simple_delayed_request_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_SIMPLE_DELAYED_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_SIMPLE_DELAYED_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_simple_delayed_request_test - CHTTP2_SOCKET_PAIR_SIMPLE_REQUEST_TEST_SRC = \ CHTTP2_SOCKET_PAIR_SIMPLE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_SIMPLE_REQUEST_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_SIMPLE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_SIMPLE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_simple_request_test: openssl_dep_error else @@ -8902,28 +8615,24 @@ bins/$(CONFIG)/chttp2_socket_pair_simple_request_test: $(CHTTP2_SOCKET_PAIR_SIMP endif -deps_chttp2_socket_pair_simple_request_test: $(CHTTP2_SOCKET_PAIR_SIMPLE_REQUEST_TEST_DEPS) + +deps_chttp2_socket_pair_simple_request_test: $(CHTTP2_SOCKET_PAIR_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_SIMPLE_REQUEST_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_simple_request_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_simple_request_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_SIMPLE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_SIMPLE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_simple_request_test - CHTTP2_SOCKET_PAIR_THREAD_STRESS_TEST_SRC = \ CHTTP2_SOCKET_PAIR_THREAD_STRESS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_THREAD_STRESS_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_THREAD_STRESS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_THREAD_STRESS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_thread_stress_test: openssl_dep_error else @@ -8935,28 +8644,24 @@ bins/$(CONFIG)/chttp2_socket_pair_thread_stress_test: $(CHTTP2_SOCKET_PAIR_THREA endif -deps_chttp2_socket_pair_thread_stress_test: $(CHTTP2_SOCKET_PAIR_THREAD_STRESS_TEST_DEPS) + +deps_chttp2_socket_pair_thread_stress_test: $(CHTTP2_SOCKET_PAIR_THREAD_STRESS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_THREAD_STRESS_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_THREAD_STRESS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_thread_stress_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_thread_stress_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_THREAD_STRESS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_THREAD_STRESS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_thread_stress_test - CHTTP2_SOCKET_PAIR_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC = \ CHTTP2_SOCKET_PAIR_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_writes_done_hangs_with_pending_read_test: openssl_dep_error else @@ -8968,28 +8673,24 @@ bins/$(CONFIG)/chttp2_socket_pair_writes_done_hangs_with_pending_read_test: $(CH endif -deps_chttp2_socket_pair_writes_done_hangs_with_pending_read_test: $(CHTTP2_SOCKET_PAIR_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) + +deps_chttp2_socket_pair_writes_done_hangs_with_pending_read_test: $(CHTTP2_SOCKET_PAIR_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_writes_done_hangs_with_pending_read_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_writes_done_hangs_with_pending_read_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_writes_done_hangs_with_pending_read_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test: openssl_dep_error else @@ -9001,28 +8702,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test: $ endif -deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test: openssl_dep_error else @@ -9034,28 +8731,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_wri endif -deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_ACCEPT_AND_WRITES_CLOSED_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_INVOKE_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_INVOKE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_INVOKE_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_INVOKE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_INVOKE_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test: openssl_dep_error else @@ -9067,28 +8760,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test: $ endif -deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_INVOKE_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_INVOKE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_INVOKE_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_INVOKE_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_INVOKE_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_AFTER_INVOKE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_BEFORE_INVOKE_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_BEFORE_INVOKE_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_BEFORE_INVOKE_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_BEFORE_INVOKE_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_BEFORE_INVOKE_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test: openssl_dep_error else @@ -9100,28 +8789,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test: endif -deps_chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_BEFORE_INVOKE_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_BEFORE_INVOKE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_BEFORE_INVOKE_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_BEFORE_INVOKE_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_BEFORE_INVOKE_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_BEFORE_INVOKE_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_IN_A_VACUUM_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_IN_A_VACUUM_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_IN_A_VACUUM_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_IN_A_VACUUM_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_IN_A_VACUUM_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test: openssl_dep_error else @@ -9133,28 +8818,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test: $( endif -deps_chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_IN_A_VACUUM_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_IN_A_VACUUM_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_IN_A_VACUUM_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_IN_A_VACUUM_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_IN_A_VACUUM_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CANCEL_IN_A_VACUUM_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CENSUS_SIMPLE_REQUEST_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CENSUS_SIMPLE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CENSUS_SIMPLE_REQUEST_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CENSUS_SIMPLE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CENSUS_SIMPLE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test: openssl_dep_error else @@ -9166,28 +8847,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test: endif -deps_chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CENSUS_SIMPLE_REQUEST_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CENSUS_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CENSUS_SIMPLE_REQUEST_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CENSUS_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CENSUS_SIMPLE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_CENSUS_SIMPLE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_DISAPPEARING_SERVER_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_DISAPPEARING_SERVER_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_DISAPPEARING_SERVER_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_DISAPPEARING_SERVER_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_DISAPPEARING_SERVER_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test: openssl_dep_error else @@ -9199,28 +8876,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test: $ endif -deps_chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_DISAPPEARING_SERVER_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_DISAPPEARING_SERVER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_DISAPPEARING_SERVER_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_DISAPPEARING_SERVER_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_DISAPPEARING_SERVER_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_DISAPPEARING_SERVER_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test: openssl_dep_error else @@ -9232,28 +8905,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finis endif -deps_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_INFLIGHT_CALLS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test: openssl_dep_error else @@ -9265,28 +8934,53 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finis endif -deps_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS:.o=.dep) +endif endif + + +CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_GRACEFUL_SERVER_SHUTDOWN_TEST_SRC = \ + +CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_GRACEFUL_SERVER_SHUTDOWN_TEST_SRC)))) + +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL with ALPN. + +bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_test: openssl_dep_error + +else + +bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS) libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a libs/$(CONFIG)/libend2end_test_graceful_server_shutdown.a libs/$(CONFIG)/libend2end_certs.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS) libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a libs/$(CONFIG)/libend2end_test_graceful_server_shutdown.a libs/$(CONFIG)/libend2end_certs.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc.a libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_test + endif -clean_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_EARLY_SERVER_SHUTDOWN_FINISHES_TAGS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test + +deps_chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_GRACEFUL_SERVER_SHUTDOWN_TEST_OBJS:.o=.dep) +endif +endif CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_INVOKE_LARGE_REQUEST_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_INVOKE_LARGE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_INVOKE_LARGE_REQUEST_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_INVOKE_LARGE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_INVOKE_LARGE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test: openssl_dep_error else @@ -9298,28 +8992,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test: endif -deps_chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_INVOKE_LARGE_REQUEST_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_INVOKE_LARGE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_INVOKE_LARGE_REQUEST_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_INVOKE_LARGE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_INVOKE_LARGE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_INVOKE_LARGE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_MAX_CONCURRENT_STREAMS_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_MAX_CONCURRENT_STREAMS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_MAX_CONCURRENT_STREAMS_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_MAX_CONCURRENT_STREAMS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_MAX_CONCURRENT_STREAMS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test: openssl_dep_error else @@ -9331,28 +9021,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test endif -deps_chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_MAX_CONCURRENT_STREAMS_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_MAX_CONCURRENT_STREAMS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_MAX_CONCURRENT_STREAMS_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_MAX_CONCURRENT_STREAMS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_MAX_CONCURRENT_STREAMS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_MAX_CONCURRENT_STREAMS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_NO_OP_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_NO_OP_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_NO_OP_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_NO_OP_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_NO_OP_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_no_op_test: openssl_dep_error else @@ -9364,28 +9050,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_no_op_test: $(CHTTP2_SOCKET endif -deps_chttp2_socket_pair_one_byte_at_a_time_no_op_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_NO_OP_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_no_op_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_NO_OP_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_NO_OP_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_NO_OP_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_no_op_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_no_op_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_NO_OP_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_NO_OP_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_no_op_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_PING_PONG_STREAMING_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_PING_PONG_STREAMING_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_PING_PONG_STREAMING_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_PING_PONG_STREAMING_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_PING_PONG_STREAMING_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test: openssl_dep_error else @@ -9397,28 +9079,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test: $ endif -deps_chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_PING_PONG_STREAMING_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_PING_PONG_STREAMING_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_PING_PONG_STREAMING_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_PING_PONG_STREAMING_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_PING_PONG_STREAMING_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_PING_PONG_STREAMING_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test: openssl_dep_error else @@ -9430,28 +9108,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_binar endif -deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_BINARY_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test: openssl_dep_error else @@ -9463,28 +9137,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_metad endif -deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test: openssl_dep_error else @@ -9496,28 +9166,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_paylo endif -deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test: openssl_dep_error else @@ -9529,28 +9195,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_request_response_with_trail endif -deps_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_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) + +deps_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_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_REQUEST_RESPONSE_WITH_TRAILING_METADATA_AND_PAYLOAD_TEST_DEPS) - $(Q) $(RM) bins/$(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_SIMPLE_DELAYED_REQUEST_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_DELAYED_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_DELAYED_REQUEST_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_DELAYED_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_DELAYED_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test: openssl_dep_error else @@ -9562,28 +9224,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test endif -deps_chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_DELAYED_REQUEST_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_DELAYED_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_DELAYED_REQUEST_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_DELAYED_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_DELAYED_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_DELAYED_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_REQUEST_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_REQUEST_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_REQUEST_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_REQUEST_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_test: openssl_dep_error else @@ -9595,28 +9253,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_test: $(CHTT endif -deps_chttp2_socket_pair_one_byte_at_a_time_simple_request_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_REQUEST_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_simple_request_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_REQUEST_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_REQUEST_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_simple_request_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_simple_request_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_REQUEST_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_SIMPLE_REQUEST_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_simple_request_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_THREAD_STRESS_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_THREAD_STRESS_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_THREAD_STRESS_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_THREAD_STRESS_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_THREAD_STRESS_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_thread_stress_test: openssl_dep_error else @@ -9628,28 +9282,24 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_thread_stress_test: $(CHTTP endif -deps_chttp2_socket_pair_one_byte_at_a_time_thread_stress_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_THREAD_STRESS_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_thread_stress_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_THREAD_STRESS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_THREAD_STRESS_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_THREAD_STRESS_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_thread_stress_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_thread_stress_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_THREAD_STRESS_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_THREAD_STRESS_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_thread_stress_test - CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC = \ CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC)))) -CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_SRC)))) ifeq ($(NO_SECURE),true) +# You can't build secure targets if you don't have OpenSSL with ALPN. + bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test: openssl_dep_error else @@ -9661,23 +9311,19 @@ bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pend endif -deps_chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) + +deps_chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test: $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) +-include $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS:.o=.dep) endif endif -clean_chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test: - $(E) "[CLEAN] Cleaning chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test files" - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_OBJS) - $(Q) $(RM) $(CHTTP2_SOCKET_PAIR_ONE_BYTE_AT_A_TIME_WRITES_DONE_HANGS_WITH_PENDING_READ_TEST_DEPS) - $(Q) $(RM) bins/$(CONFIG)/chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test +.PHONY: all strip tools dep_error openssl_dep_error openssl_dep_message git_update stop buildtests buildtests_c buildtests_cxx test test_c test_cxx install install_c install_cxx install-headers install-headers_c install-headers_cxx install-shared install-shared_c install-shared_cxx install-static install-static_c install-static_cxx strip strip-shared strip-static strip_c strip-shared_c strip-static_c strip_cxx strip-shared_cxx strip-static_cxx dep_c dep_cxx bins_dep_c bins_dep_cxx clean -.PHONY: all strip tools dep_error openssl_dep_error openssl_dep_message git_update stop buildtests buildtests_c buildtests_cxx test test_c test_cxx install install_c install_cxx install-headers install-headers_c install-headers_cxx install-shared install-shared_c install-shared_cxx install-static install-static_c install-static_cxx strip strip-shared strip-static strip_c strip-shared_c strip-static_c strip_cxx strip-shared_cxx strip-static_cxx clean dep_c dep_cxx bins_dep_c bins_dep_cxx deps_libgpr clean_libgpr deps_libgrpc clean_libgrpc deps_libgrpc_unsecure clean_libgrpc_unsecure deps_libgpr_test_util clean_libgpr_test_util deps_libgrpc_test_util clean_libgrpc_test_util deps_libgrpc++ clean_libgrpc++ deps_libgrpc++_test_util clean_libgrpc++_test_util deps_libend2end_fixture_chttp2_fake_security clean_libend2end_fixture_chttp2_fake_security deps_libend2end_fixture_chttp2_fullstack clean_libend2end_fixture_chttp2_fullstack deps_libend2end_fixture_chttp2_simple_ssl_fullstack clean_libend2end_fixture_chttp2_simple_ssl_fullstack deps_libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack clean_libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack deps_libend2end_fixture_chttp2_socket_pair clean_libend2end_fixture_chttp2_socket_pair deps_libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time clean_libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time deps_libend2end_test_cancel_after_accept clean_libend2end_test_cancel_after_accept deps_libend2end_test_cancel_after_accept_and_writes_closed clean_libend2end_test_cancel_after_accept_and_writes_closed deps_libend2end_test_cancel_after_invoke clean_libend2end_test_cancel_after_invoke deps_libend2end_test_cancel_before_invoke clean_libend2end_test_cancel_before_invoke deps_libend2end_test_cancel_in_a_vacuum clean_libend2end_test_cancel_in_a_vacuum deps_libend2end_test_census_simple_request clean_libend2end_test_census_simple_request deps_libend2end_test_disappearing_server clean_libend2end_test_disappearing_server deps_libend2end_test_early_server_shutdown_finishes_inflight_calls clean_libend2end_test_early_server_shutdown_finishes_inflight_calls deps_libend2end_test_early_server_shutdown_finishes_tags clean_libend2end_test_early_server_shutdown_finishes_tags deps_libend2end_test_invoke_large_request clean_libend2end_test_invoke_large_request deps_libend2end_test_max_concurrent_streams clean_libend2end_test_max_concurrent_streams deps_libend2end_test_no_op clean_libend2end_test_no_op deps_libend2end_test_ping_pong_streaming clean_libend2end_test_ping_pong_streaming deps_libend2end_test_request_response_with_binary_metadata_and_payload clean_libend2end_test_request_response_with_binary_metadata_and_payload deps_libend2end_test_request_response_with_metadata_and_payload clean_libend2end_test_request_response_with_metadata_and_payload deps_libend2end_test_request_response_with_payload clean_libend2end_test_request_response_with_payload deps_libend2end_test_request_response_with_trailing_metadata_and_payload clean_libend2end_test_request_response_with_trailing_metadata_and_payload deps_libend2end_test_simple_delayed_request clean_libend2end_test_simple_delayed_request deps_libend2end_test_simple_request clean_libend2end_test_simple_request deps_libend2end_test_thread_stress clean_libend2end_test_thread_stress deps_libend2end_test_writes_done_hangs_with_pending_read clean_libend2end_test_writes_done_hangs_with_pending_read deps_libend2end_certs clean_libend2end_certs deps_gen_hpack_tables clean_gen_hpack_tables deps_cpp_plugin clean_cpp_plugin deps_ruby_plugin clean_ruby_plugin deps_go_plugin clean_go_plugin deps_grpc_byte_buffer_reader_test clean_grpc_byte_buffer_reader_test deps_gpr_cancellable_test clean_gpr_cancellable_test deps_gpr_log_test clean_gpr_log_test deps_gpr_useful_test clean_gpr_useful_test deps_gpr_cmdline_test clean_gpr_cmdline_test deps_gpr_histogram_test clean_gpr_histogram_test deps_gpr_host_port_test clean_gpr_host_port_test deps_gpr_slice_buffer_test clean_gpr_slice_buffer_test deps_gpr_slice_test clean_gpr_slice_test deps_gpr_string_test clean_gpr_string_test deps_gpr_sync_test clean_gpr_sync_test deps_gpr_thd_test clean_gpr_thd_test deps_gpr_time_test clean_gpr_time_test deps_murmur_hash_test clean_murmur_hash_test deps_grpc_stream_op_test clean_grpc_stream_op_test deps_alpn_test clean_alpn_test deps_time_averaged_stats_test clean_time_averaged_stats_test deps_chttp2_stream_encoder_test clean_chttp2_stream_encoder_test deps_hpack_table_test clean_hpack_table_test deps_chttp2_stream_map_test clean_chttp2_stream_map_test deps_hpack_parser_test clean_hpack_parser_test deps_transport_metadata_test clean_transport_metadata_test deps_chttp2_status_conversion_test clean_chttp2_status_conversion_test deps_chttp2_transport_end2end_test clean_chttp2_transport_end2end_test deps_tcp_posix_test clean_tcp_posix_test deps_dualstack_socket_test clean_dualstack_socket_test deps_no_server_test clean_no_server_test deps_resolve_address_test clean_resolve_address_test deps_sockaddr_utils_test clean_sockaddr_utils_test deps_tcp_server_posix_test clean_tcp_server_posix_test deps_tcp_client_posix_test clean_tcp_client_posix_test deps_grpc_channel_stack_test clean_grpc_channel_stack_test deps_metadata_buffer_test clean_metadata_buffer_test deps_grpc_completion_queue_test clean_grpc_completion_queue_test deps_grpc_completion_queue_benchmark clean_grpc_completion_queue_benchmark deps_census_trace_store_test clean_census_trace_store_test deps_census_stats_store_test clean_census_stats_store_test deps_census_window_stats_test clean_census_window_stats_test deps_census_statistics_quick_test clean_census_statistics_quick_test deps_census_statistics_small_log_test clean_census_statistics_small_log_test deps_census_statistics_performance_test clean_census_statistics_performance_test deps_census_statistics_multiple_writers_test clean_census_statistics_multiple_writers_test deps_census_statistics_multiple_writers_circular_buffer_test clean_census_statistics_multiple_writers_circular_buffer_test deps_census_stub_test clean_census_stub_test deps_census_hash_table_test clean_census_hash_table_test deps_fling_server clean_fling_server deps_fling_client clean_fling_client deps_fling_test clean_fling_test deps_echo_server clean_echo_server deps_echo_client clean_echo_client deps_echo_test clean_echo_test deps_low_level_ping_pong_benchmark clean_low_level_ping_pong_benchmark deps_message_compress_test clean_message_compress_test deps_bin_encoder_test clean_bin_encoder_test deps_secure_endpoint_test clean_secure_endpoint_test deps_httpcli_format_request_test clean_httpcli_format_request_test deps_httpcli_parser_test clean_httpcli_parser_test deps_httpcli_test clean_httpcli_test deps_grpc_credentials_test clean_grpc_credentials_test deps_grpc_fetch_oauth2 clean_grpc_fetch_oauth2 deps_grpc_base64_test clean_grpc_base64_test deps_grpc_json_token_test clean_grpc_json_token_test deps_timeout_encoding_test clean_timeout_encoding_test deps_fd_posix_test clean_fd_posix_test deps_fling_stream_test clean_fling_stream_test deps_lame_client_test clean_lame_client_test deps_thread_pool_test clean_thread_pool_test deps_status_test clean_status_test deps_sync_client_async_server_test clean_sync_client_async_server_test deps_qps_client clean_qps_client deps_qps_server clean_qps_server deps_interop_server clean_interop_server deps_interop_client clean_interop_client deps_end2end_test clean_end2end_test deps_channel_arguments_test clean_channel_arguments_test deps_credentials_test clean_credentials_test deps_alarm_test clean_alarm_test deps_alarm_list_test clean_alarm_list_test deps_alarm_heap_test clean_alarm_heap_test deps_time_test clean_time_test deps_chttp2_fake_security_cancel_after_accept_test clean_chttp2_fake_security_cancel_after_accept_test deps_chttp2_fake_security_cancel_after_accept_and_writes_closed_test clean_chttp2_fake_security_cancel_after_accept_and_writes_closed_test deps_chttp2_fake_security_cancel_after_invoke_test clean_chttp2_fake_security_cancel_after_invoke_test deps_chttp2_fake_security_cancel_before_invoke_test clean_chttp2_fake_security_cancel_before_invoke_test deps_chttp2_fake_security_cancel_in_a_vacuum_test clean_chttp2_fake_security_cancel_in_a_vacuum_test deps_chttp2_fake_security_census_simple_request_test clean_chttp2_fake_security_census_simple_request_test deps_chttp2_fake_security_disappearing_server_test clean_chttp2_fake_security_disappearing_server_test deps_chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_fake_security_early_server_shutdown_finishes_tags_test clean_chttp2_fake_security_early_server_shutdown_finishes_tags_test deps_chttp2_fake_security_invoke_large_request_test clean_chttp2_fake_security_invoke_large_request_test deps_chttp2_fake_security_max_concurrent_streams_test clean_chttp2_fake_security_max_concurrent_streams_test deps_chttp2_fake_security_no_op_test clean_chttp2_fake_security_no_op_test deps_chttp2_fake_security_ping_pong_streaming_test clean_chttp2_fake_security_ping_pong_streaming_test deps_chttp2_fake_security_request_response_with_binary_metadata_and_payload_test clean_chttp2_fake_security_request_response_with_binary_metadata_and_payload_test deps_chttp2_fake_security_request_response_with_metadata_and_payload_test clean_chttp2_fake_security_request_response_with_metadata_and_payload_test deps_chttp2_fake_security_request_response_with_payload_test clean_chttp2_fake_security_request_response_with_payload_test deps_chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test clean_chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test deps_chttp2_fake_security_simple_delayed_request_test clean_chttp2_fake_security_simple_delayed_request_test deps_chttp2_fake_security_simple_request_test clean_chttp2_fake_security_simple_request_test deps_chttp2_fake_security_thread_stress_test clean_chttp2_fake_security_thread_stress_test deps_chttp2_fake_security_writes_done_hangs_with_pending_read_test clean_chttp2_fake_security_writes_done_hangs_with_pending_read_test deps_chttp2_fullstack_cancel_after_accept_test clean_chttp2_fullstack_cancel_after_accept_test deps_chttp2_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_fullstack_cancel_after_accept_and_writes_closed_test deps_chttp2_fullstack_cancel_after_invoke_test clean_chttp2_fullstack_cancel_after_invoke_test deps_chttp2_fullstack_cancel_before_invoke_test clean_chttp2_fullstack_cancel_before_invoke_test deps_chttp2_fullstack_cancel_in_a_vacuum_test clean_chttp2_fullstack_cancel_in_a_vacuum_test deps_chttp2_fullstack_census_simple_request_test clean_chttp2_fullstack_census_simple_request_test deps_chttp2_fullstack_disappearing_server_test clean_chttp2_fullstack_disappearing_server_test deps_chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_fullstack_early_server_shutdown_finishes_tags_test deps_chttp2_fullstack_invoke_large_request_test clean_chttp2_fullstack_invoke_large_request_test deps_chttp2_fullstack_max_concurrent_streams_test clean_chttp2_fullstack_max_concurrent_streams_test deps_chttp2_fullstack_no_op_test clean_chttp2_fullstack_no_op_test deps_chttp2_fullstack_ping_pong_streaming_test clean_chttp2_fullstack_ping_pong_streaming_test deps_chttp2_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_fullstack_request_response_with_binary_metadata_and_payload_test deps_chttp2_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_fullstack_request_response_with_metadata_and_payload_test deps_chttp2_fullstack_request_response_with_payload_test clean_chttp2_fullstack_request_response_with_payload_test deps_chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test deps_chttp2_fullstack_simple_delayed_request_test clean_chttp2_fullstack_simple_delayed_request_test deps_chttp2_fullstack_simple_request_test clean_chttp2_fullstack_simple_request_test deps_chttp2_fullstack_thread_stress_test clean_chttp2_fullstack_thread_stress_test deps_chttp2_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_fullstack_writes_done_hangs_with_pending_read_test deps_chttp2_simple_ssl_fullstack_cancel_after_accept_test clean_chttp2_simple_ssl_fullstack_cancel_after_accept_test deps_chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test deps_chttp2_simple_ssl_fullstack_cancel_after_invoke_test clean_chttp2_simple_ssl_fullstack_cancel_after_invoke_test deps_chttp2_simple_ssl_fullstack_cancel_before_invoke_test clean_chttp2_simple_ssl_fullstack_cancel_before_invoke_test deps_chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test clean_chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test deps_chttp2_simple_ssl_fullstack_census_simple_request_test clean_chttp2_simple_ssl_fullstack_census_simple_request_test deps_chttp2_simple_ssl_fullstack_disappearing_server_test clean_chttp2_simple_ssl_fullstack_disappearing_server_test deps_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test deps_chttp2_simple_ssl_fullstack_invoke_large_request_test clean_chttp2_simple_ssl_fullstack_invoke_large_request_test deps_chttp2_simple_ssl_fullstack_max_concurrent_streams_test clean_chttp2_simple_ssl_fullstack_max_concurrent_streams_test deps_chttp2_simple_ssl_fullstack_no_op_test clean_chttp2_simple_ssl_fullstack_no_op_test deps_chttp2_simple_ssl_fullstack_ping_pong_streaming_test clean_chttp2_simple_ssl_fullstack_ping_pong_streaming_test deps_chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test deps_chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test deps_chttp2_simple_ssl_fullstack_request_response_with_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_payload_test deps_chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test deps_chttp2_simple_ssl_fullstack_simple_delayed_request_test clean_chttp2_simple_ssl_fullstack_simple_delayed_request_test deps_chttp2_simple_ssl_fullstack_simple_request_test clean_chttp2_simple_ssl_fullstack_simple_request_test deps_chttp2_simple_ssl_fullstack_thread_stress_test clean_chttp2_simple_ssl_fullstack_thread_stress_test deps_chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test deps_chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test deps_chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test clean_chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test deps_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test deps_chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test deps_chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test clean_chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test deps_chttp2_simple_ssl_with_oauth2_fullstack_no_op_test clean_chttp2_simple_ssl_with_oauth2_fullstack_no_op_test deps_chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test clean_chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test deps_chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test deps_chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test deps_chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test clean_chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test deps_chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test deps_chttp2_socket_pair_cancel_after_accept_test clean_chttp2_socket_pair_cancel_after_accept_test deps_chttp2_socket_pair_cancel_after_accept_and_writes_closed_test clean_chttp2_socket_pair_cancel_after_accept_and_writes_closed_test deps_chttp2_socket_pair_cancel_after_invoke_test clean_chttp2_socket_pair_cancel_after_invoke_test deps_chttp2_socket_pair_cancel_before_invoke_test clean_chttp2_socket_pair_cancel_before_invoke_test deps_chttp2_socket_pair_cancel_in_a_vacuum_test clean_chttp2_socket_pair_cancel_in_a_vacuum_test deps_chttp2_socket_pair_census_simple_request_test clean_chttp2_socket_pair_census_simple_request_test deps_chttp2_socket_pair_disappearing_server_test clean_chttp2_socket_pair_disappearing_server_test deps_chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_socket_pair_early_server_shutdown_finishes_tags_test clean_chttp2_socket_pair_early_server_shutdown_finishes_tags_test deps_chttp2_socket_pair_invoke_large_request_test clean_chttp2_socket_pair_invoke_large_request_test deps_chttp2_socket_pair_max_concurrent_streams_test clean_chttp2_socket_pair_max_concurrent_streams_test deps_chttp2_socket_pair_no_op_test clean_chttp2_socket_pair_no_op_test deps_chttp2_socket_pair_ping_pong_streaming_test clean_chttp2_socket_pair_ping_pong_streaming_test deps_chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test clean_chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test deps_chttp2_socket_pair_request_response_with_metadata_and_payload_test clean_chttp2_socket_pair_request_response_with_metadata_and_payload_test deps_chttp2_socket_pair_request_response_with_payload_test clean_chttp2_socket_pair_request_response_with_payload_test deps_chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test clean_chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test deps_chttp2_socket_pair_simple_delayed_request_test clean_chttp2_socket_pair_simple_delayed_request_test deps_chttp2_socket_pair_simple_request_test clean_chttp2_socket_pair_simple_request_test deps_chttp2_socket_pair_thread_stress_test clean_chttp2_socket_pair_thread_stress_test deps_chttp2_socket_pair_writes_done_hangs_with_pending_read_test clean_chttp2_socket_pair_writes_done_hangs_with_pending_read_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test deps_chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test clean_chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test deps_chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test clean_chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test deps_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test clean_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test deps_chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test clean_chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test deps_chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test clean_chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test deps_chttp2_socket_pair_one_byte_at_a_time_no_op_test clean_chttp2_socket_pair_one_byte_at_a_time_no_op_test deps_chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test clean_chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test deps_chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test clean_chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test deps_chttp2_socket_pair_one_byte_at_a_time_simple_request_test clean_chttp2_socket_pair_one_byte_at_a_time_simple_request_test deps_chttp2_socket_pair_one_byte_at_a_time_thread_stress_test clean_chttp2_socket_pair_one_byte_at_a_time_thread_stress_test deps_chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test clean_chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test diff --git a/build.json b/build.json index 385e2c9675e..9a5134ecd6a 100644 --- a/build.json +++ b/build.json @@ -11,87 +11,6 @@ "filegroups": [ { "name": "grpc_base", - "src": [ - "src/core/channel/call_op_string.c", - "src/core/channel/census_filter.c", - "src/core/channel/channel_args.c", - "src/core/channel/channel_stack.c", - "src/core/channel/child_channel.c", - "src/core/channel/client_channel.c", - "src/core/channel/client_setup.c", - "src/core/channel/connected_channel.c", - "src/core/channel/http_client_filter.c", - "src/core/channel/http_filter.c", - "src/core/channel/http_server_filter.c", - "src/core/channel/metadata_buffer.c", - "src/core/channel/noop_filter.c", - "src/core/compression/algorithm.c", - "src/core/compression/message_compress.c", - "src/core/httpcli/format_request.c", - "src/core/httpcli/httpcli.c", - "src/core/httpcli/httpcli_security_context.c", - "src/core/httpcli/parser.c", - "src/core/iomgr/alarm.c", - "src/core/iomgr/alarm_heap.c", - "src/core/iomgr/endpoint.c", - "src/core/iomgr/endpoint_pair_posix.c", - "src/core/iomgr/fd_posix.c", - "src/core/iomgr/iomgr.c", - "src/core/iomgr/iomgr_posix.c", - "src/core/iomgr/pollset_multipoller_with_poll_posix.c", - "src/core/iomgr/pollset_posix.c", - "src/core/iomgr/resolve_address_posix.c", - "src/core/iomgr/sockaddr_utils.c", - "src/core/iomgr/socket_utils_common_posix.c", - "src/core/iomgr/socket_utils_linux.c", - "src/core/iomgr/socket_utils_posix.c", - "src/core/iomgr/tcp_client_posix.c", - "src/core/iomgr/tcp_posix.c", - "src/core/iomgr/tcp_server_posix.c", - "src/core/iomgr/time_averaged_stats.c", - "src/core/statistics/census_init.c", - "src/core/statistics/census_log.c", - "src/core/statistics/census_rpc_stats.c", - "src/core/statistics/census_tracing.c", - "src/core/statistics/hash_table.c", - "src/core/statistics/window_stats.c", - "src/core/surface/byte_buffer.c", - "src/core/surface/byte_buffer_reader.c", - "src/core/surface/call.c", - "src/core/surface/channel.c", - "src/core/surface/channel_create.c", - "src/core/surface/client.c", - "src/core/surface/completion_queue.c", - "src/core/surface/event_string.c", - "src/core/surface/init.c", - "src/core/surface/lame_client.c", - "src/core/surface/secure_channel_create.c", - "src/core/surface/secure_server_create.c", - "src/core/surface/server.c", - "src/core/surface/server_chttp2.c", - "src/core/surface/server_create.c", - "src/core/transport/chttp2/alpn.c", - "src/core/transport/chttp2/bin_encoder.c", - "src/core/transport/chttp2/frame_data.c", - "src/core/transport/chttp2/frame_goaway.c", - "src/core/transport/chttp2/frame_ping.c", - "src/core/transport/chttp2/frame_rst_stream.c", - "src/core/transport/chttp2/frame_settings.c", - "src/core/transport/chttp2/frame_window_update.c", - "src/core/transport/chttp2/hpack_parser.c", - "src/core/transport/chttp2/hpack_table.c", - "src/core/transport/chttp2/huffsyms.c", - "src/core/transport/chttp2/status_conversion.c", - "src/core/transport/chttp2/stream_encoder.c", - "src/core/transport/chttp2/stream_map.c", - "src/core/transport/chttp2/timeout_encoding.c", - "src/core/transport/chttp2/varint.c", - "src/core/transport/chttp2_transport.c", - "src/core/transport/metadata.c", - "src/core/transport/stream_op.c", - "src/core/transport/transport.c", - "third_party/cJSON/cJSON.c" - ], "public_headers": [ "include/grpc/byte_buffer.h", "include/grpc/byte_buffer_reader.h", @@ -127,6 +46,8 @@ "src/core/iomgr/iomgr_internal.h", "src/core/iomgr/iomgr_posix.h", "src/core/iomgr/pollset.h", + "src/core/iomgr/pollset_kick.h", + "src/core/iomgr/pollset_kick_posix.h", "src/core/iomgr/pollset_posix.h", "src/core/iomgr/resolve_address.h", "src/core/iomgr/sockaddr.h", @@ -174,6 +95,88 @@ "src/core/transport/stream_op.h", "src/core/transport/transport.h", "src/core/transport/transport_impl.h" + ], + "src": [ + "src/core/channel/call_op_string.c", + "src/core/channel/census_filter.c", + "src/core/channel/channel_args.c", + "src/core/channel/channel_stack.c", + "src/core/channel/child_channel.c", + "src/core/channel/client_channel.c", + "src/core/channel/client_setup.c", + "src/core/channel/connected_channel.c", + "src/core/channel/http_client_filter.c", + "src/core/channel/http_filter.c", + "src/core/channel/http_server_filter.c", + "src/core/channel/metadata_buffer.c", + "src/core/channel/noop_filter.c", + "src/core/compression/algorithm.c", + "src/core/compression/message_compress.c", + "src/core/httpcli/format_request.c", + "src/core/httpcli/httpcli.c", + "src/core/httpcli/httpcli_security_context.c", + "src/core/httpcli/parser.c", + "src/core/iomgr/alarm.c", + "src/core/iomgr/alarm_heap.c", + "src/core/iomgr/endpoint.c", + "src/core/iomgr/endpoint_pair_posix.c", + "src/core/iomgr/fd_posix.c", + "src/core/iomgr/iomgr.c", + "src/core/iomgr/iomgr_posix.c", + "src/core/iomgr/pollset_kick_posix.c", + "src/core/iomgr/pollset_multipoller_with_poll_posix.c", + "src/core/iomgr/pollset_posix.c", + "src/core/iomgr/resolve_address_posix.c", + "src/core/iomgr/sockaddr_utils.c", + "src/core/iomgr/socket_utils_common_posix.c", + "src/core/iomgr/socket_utils_linux.c", + "src/core/iomgr/socket_utils_posix.c", + "src/core/iomgr/tcp_client_posix.c", + "src/core/iomgr/tcp_posix.c", + "src/core/iomgr/tcp_server_posix.c", + "src/core/iomgr/time_averaged_stats.c", + "src/core/statistics/census_init.c", + "src/core/statistics/census_log.c", + "src/core/statistics/census_rpc_stats.c", + "src/core/statistics/census_tracing.c", + "src/core/statistics/hash_table.c", + "src/core/statistics/window_stats.c", + "src/core/surface/byte_buffer.c", + "src/core/surface/byte_buffer_reader.c", + "src/core/surface/call.c", + "src/core/surface/channel.c", + "src/core/surface/channel_create.c", + "src/core/surface/client.c", + "src/core/surface/completion_queue.c", + "src/core/surface/event_string.c", + "src/core/surface/init.c", + "src/core/surface/lame_client.c", + "src/core/surface/secure_channel_create.c", + "src/core/surface/secure_server_create.c", + "src/core/surface/server.c", + "src/core/surface/server_chttp2.c", + "src/core/surface/server_create.c", + "src/core/transport/chttp2/alpn.c", + "src/core/transport/chttp2/bin_encoder.c", + "src/core/transport/chttp2/frame_data.c", + "src/core/transport/chttp2/frame_goaway.c", + "src/core/transport/chttp2/frame_ping.c", + "src/core/transport/chttp2/frame_rst_stream.c", + "src/core/transport/chttp2/frame_settings.c", + "src/core/transport/chttp2/frame_window_update.c", + "src/core/transport/chttp2/hpack_parser.c", + "src/core/transport/chttp2/hpack_table.c", + "src/core/transport/chttp2/huffsyms.c", + "src/core/transport/chttp2/status_conversion.c", + "src/core/transport/chttp2/stream_encoder.c", + "src/core/transport/chttp2/stream_map.c", + "src/core/transport/chttp2/timeout_encoding.c", + "src/core/transport/chttp2/varint.c", + "src/core/transport/chttp2_transport.c", + "src/core/transport/metadata.c", + "src/core/transport/stream_op.c", + "src/core/transport/transport.c", + "third_party/cJSON/cJSON.c" ] } ], @@ -181,41 +184,12 @@ { "name": "gpr", "build": "all", - "secure": false, - "vs_project_guid": "{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}", - "src": [ - "src/core/support/alloc.c", - "src/core/support/cancellable.c", - "src/core/support/cmdline.c", - "src/core/support/cpu_linux.c", - "src/core/support/cpu_posix.c", - "src/core/support/histogram.c", - "src/core/support/host_port.c", - "src/core/support/log_android.c", - "src/core/support/log.c", - "src/core/support/log_linux.c", - "src/core/support/log_posix.c", - "src/core/support/log_win32.c", - "src/core/support/murmur_hash.c", - "src/core/support/slice_buffer.c", - "src/core/support/slice.c", - "src/core/support/string.c", - "src/core/support/string_posix.c", - "src/core/support/string_win32.c", - "src/core/support/sync.c", - "src/core/support/sync_posix.c", - "src/core/support/sync_win32.c", - "src/core/support/thd_posix.c", - "src/core/support/thd_win32.c", - "src/core/support/time.c", - "src/core/support/time_posix.c", - "src/core/support/time_win32.c" - ], + "language": "c", "public_headers": [ "include/grpc/support/alloc.h", + "include/grpc/support/atm.h", "include/grpc/support/atm_gcc_atomic.h", "include/grpc/support/atm_gcc_sync.h", - "include/grpc/support/atm.h", "include/grpc/support/atm_win32.h", "include/grpc/support/cancellable_platform.h", "include/grpc/support/cmdline.h", @@ -223,11 +197,11 @@ "include/grpc/support/host_port.h", "include/grpc/support/log.h", "include/grpc/support/port_platform.h", - "include/grpc/support/slice_buffer.h", "include/grpc/support/slice.h", + "include/grpc/support/slice_buffer.h", "include/grpc/support/string.h", - "include/grpc/support/sync_generic.h", "include/grpc/support/sync.h", + "include/grpc/support/sync_generic.h", "include/grpc/support/sync_posix.h", "include/grpc/support/sync_win32.h", "include/grpc/support/thd.h", @@ -242,32 +216,51 @@ "src/core/support/cpu.h", "src/core/support/murmur_hash.h", "src/core/support/thd_internal.h" - ] + ], + "src": [ + "src/core/support/alloc.c", + "src/core/support/cancellable.c", + "src/core/support/cmdline.c", + "src/core/support/cpu_linux.c", + "src/core/support/cpu_posix.c", + "src/core/support/histogram.c", + "src/core/support/host_port.c", + "src/core/support/log.c", + "src/core/support/log_android.c", + "src/core/support/log_linux.c", + "src/core/support/log_posix.c", + "src/core/support/log_win32.c", + "src/core/support/murmur_hash.c", + "src/core/support/slice.c", + "src/core/support/slice_buffer.c", + "src/core/support/string.c", + "src/core/support/string_posix.c", + "src/core/support/string_win32.c", + "src/core/support/sync.c", + "src/core/support/sync_posix.c", + "src/core/support/sync_win32.c", + "src/core/support/thd_posix.c", + "src/core/support/thd_win32.c", + "src/core/support/time.c", + "src/core/support/time_posix.c", + "src/core/support/time_win32.c" + ], + "secure": false, + "vs_project_guid": "{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}" }, { - "name": "grpc", - "build": "all", - "secure": true, - "vs_project_guid": "{29D16885-7228-4C31-81ED-5F9187C7F2A9}", - "baselib": true, - "filegroups": [ - "grpc_base" - ], + "name": "gpr_test_util", + "build": "private", + "language": "c", "src": [ - "src/core/security/auth.c", - "src/core/security/base64.c", - "src/core/security/credentials.c", - "src/core/security/factories.c", - "src/core/security/google_root_certs.c", - "src/core/security/json_token.c", - "src/core/security/secure_endpoint.c", - "src/core/security/secure_transport_setup.c", - "src/core/security/security_context.c", - "src/core/security/server_secure_chttp2.c", - "src/core/tsi/fake_transport_security.c", - "src/core/tsi/ssl_transport_security.c", - "src/core/tsi/transport_security.c" + "test/core/util/test_config.c" ], + "vs_project_guid": "{EAB0A629-17A9-44DB-B5FF-E91A721FE037}" + }, + { + "name": "grpc", + "build": "all", + "language": "c", "public_headers": [ "include/grpc/grpc_security.h" ], @@ -284,81 +277,72 @@ "src/core/tsi/transport_security.h", "src/core/tsi/transport_security_interface.h" ], + "src": [ + "src/core/security/auth.c", + "src/core/security/base64.c", + "src/core/security/credentials.c", + "src/core/security/factories.c", + "src/core/security/google_root_certs.c", + "src/core/security/json_token.c", + "src/core/security/secure_endpoint.c", + "src/core/security/secure_transport_setup.c", + "src/core/security/security_context.c", + "src/core/security/server_secure_chttp2.c", + "src/core/tsi/fake_transport_security.c", + "src/core/tsi/ssl_transport_security.c", + "src/core/tsi/transport_security.c" + ], "deps": [ "gpr" - ] - }, - { - "name": "grpc_unsecure", - "build": "all", - "secure": false, - "vs_project_guid": "{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}", + ], "baselib": true, "filegroups": [ "grpc_base" ], - "deps": [ - "gpr" - ] - }, - { - "name": "gpr_test_util", - "build": "private", - "vs_project_guid": "{EAB0A629-17A9-44DB-B5FF-E91A721FE037}", - "src": [ - "test/core/util/test_config.c" - ] + "secure": true, + "vs_project_guid": "{29D16885-7228-4C31-81ED-5F9187C7F2A9}" }, { "name": "grpc_test_util", "build": "private", - "vs_project_guid": "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}", + "language": "c", "src": [ "test/core/end2end/cq_verifier.c", - "test/core/end2end/data/test_root_cert.c", "test/core/end2end/data/prod_roots_certs.c", "test/core/end2end/data/server1_cert.c", "test/core/end2end/data/server1_key.c", + "test/core/end2end/data/test_root_cert.c", "test/core/iomgr/endpoint_tests.c", "test/core/statistics/census_log_tests.c", "test/core/transport/transport_end2end_tests.c", "test/core/util/grpc_profiler.c", - "test/core/util/port_posix.c", "test/core/util/parse_hexstring.c", + "test/core/util/port_posix.c", "test/core/util/slice_splitter.c" - ] + ], + "vs_project_guid": "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}" }, { - "name": "grpc++", + "name": "grpc_unsecure", "build": "all", - "c++": true, - "secure": true, - "vs_project_guid": "{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}", - "src": [ - "src/cpp/client/channel.cc", - "src/cpp/client/channel_arguments.cc", - "src/cpp/client/client_context.cc", - "src/cpp/client/create_channel.cc", - "src/cpp/client/credentials.cc", - "src/cpp/client/internal_stub.cc", - "src/cpp/proto/proto_utils.cc", - "src/cpp/common/rpc_method.cc", - "src/cpp/server/async_server.cc", - "src/cpp/server/async_server_context.cc", - "src/cpp/server/completion_queue.cc", - "src/cpp/server/server_builder.cc", - "src/cpp/server/server_context_impl.cc", - "src/cpp/server/server.cc", - "src/cpp/server/server_rpc_handler.cc", - "src/cpp/server/server_credentials.cc", - "src/cpp/server/thread_pool.cc", - "src/cpp/stream/stream_context.cc", - "src/cpp/util/status.cc", - "src/cpp/util/time.cc" + "language": "c", + "deps": [ + "gpr" ], + "baselib": true, + "filegroups": [ + "grpc_base" + ], + "secure": false, + "vs_project_guid": "{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}" + }, + { + "name": "grpc++", + "build": "all", + "language": "c++", "public_headers": [ - "include/grpc++/async_server_context.h", "include/grpc++/async_server.h", + "include/grpc++/async_server_context.h", "include/grpc++/channel_arguments.h", "include/grpc++/channel_interface.h", "include/grpc++/client_context.h", @@ -369,13 +353,13 @@ "include/grpc++/impl/internal_stub.h", "include/grpc++/impl/rpc_method.h", "include/grpc++/impl/rpc_service_method.h", + "include/grpc++/server.h", "include/grpc++/server_builder.h", "include/grpc++/server_context.h", "include/grpc++/server_credentials.h", - "include/grpc++/server.h", "include/grpc++/status.h", - "include/grpc++/stream_context_interface.h", - "include/grpc++/stream.h" + "include/grpc++/stream.h", + "include/grpc++/stream_context_interface.h" ], "headers": [ "src/cpp/client/channel.h", @@ -385,93 +369,110 @@ "src/cpp/stream/stream_context.h", "src/cpp/util/time.h" ], + "src": [ + "src/cpp/client/channel.cc", + "src/cpp/client/channel_arguments.cc", + "src/cpp/client/client_context.cc", + "src/cpp/client/create_channel.cc", + "src/cpp/client/credentials.cc", + "src/cpp/client/internal_stub.cc", + "src/cpp/common/rpc_method.cc", + "src/cpp/proto/proto_utils.cc", + "src/cpp/server/async_server.cc", + "src/cpp/server/async_server_context.cc", + "src/cpp/server/completion_queue.cc", + "src/cpp/server/server.cc", + "src/cpp/server/server_builder.cc", + "src/cpp/server/server_context_impl.cc", + "src/cpp/server/server_credentials.cc", + "src/cpp/server/server_rpc_handler.cc", + "src/cpp/server/thread_pool.cc", + "src/cpp/stream/stream_context.cc", + "src/cpp/util/status.cc", + "src/cpp/util/time.cc" + ], "deps": [ "grpc" - ] + ], + "secure": true, + "vs_project_guid": "{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}" }, { "name": "grpc++_test_util", "build": "private", + "language": "c++", "src": [ - "test/cpp/util/messages.proto", "test/cpp/util/echo.proto", "test/cpp/util/echo_duplicate.proto", - "test/cpp/util/create_test_channel.cc", - "test/cpp/end2end/async_test_server.cc" - ], - "c++": true + "test/cpp/util/messages.proto", + "test/cpp/end2end/async_test_server.cc", + "test/cpp/util/create_test_channel.cc" + ] } ], "targets": [ { - "name": "gen_hpack_tables", - "build": "tool", + "name": "alarm_heap_test", + "build": "test", + "language": "c", "src": [ - "src/core/transport/chttp2/gen_hpack_tables.c" + "test/core/iomgr/alarm_heap_test.c" ], "deps": [ "grpc_test_util", - "gpr", - "grpc" + "grpc", + "gpr_test_util", + "gpr" ] }, - { - "name": "cpp_plugin", - "build": "protoc", - "c++": true, - "secure": false, + "name": "alarm_list_test", + "build": "test", + "language": "c", "src": [ - "src/compiler/cpp_plugin.cpp", - "src/compiler/cpp_generator.cpp" - ], - "headers": [ - "src/compiler/cpp_generator.h", - "src/compiler/cpp_generator_helpers.h" + "test/core/iomgr/alarm_list_test.c" ], - "deps": [] + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] }, { - "name": "ruby_plugin", - "build": "protoc", - "c++": true, - "secure": false, + "name": "alarm_test", + "build": "test", + "language": "c", "src": [ - "src/compiler/ruby_plugin.cpp", - "src/compiler/ruby_generator.cpp" - ], - "headers": [ - "src/compiler/cpp_generator.h", - "src/compiler/cpp_generator_helpers-inl.h", - "src/compiler/cpp_generator_map-inl.h", - "src/compiler/cpp_generator_string-inl.h" + "test/core/iomgr/alarm_test.c" ], - "deps": [] + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] }, - { - "name": "go_plugin", - "build": "protoc", - "c++": true, - "secure": false, + "name": "alpn_test", + "build": "test", + "language": "c", "src": [ - "src/compiler/go_plugin.cpp", - "src/compiler/go_generator.cpp" - ], - "headers": [ - "src/compiler/go_generator.h", - "src/compiler/go_generator_helpers-inl.h", - "src/compiler/go_generator_map-inl.h", - "src/compiler/go_generator_string-inl.h" + "test/core/transport/chttp2/alpn_test.c" ], - "deps": [] + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] }, - { - "name": "grpc_byte_buffer_reader_test", + "name": "bin_encoder_test", "build": "test", + "language": "c", "src": [ - "test/core/surface/byte_buffer_reader_test.c" + "test/core/transport/chttp2/bin_encoder_test.c" ], "deps": [ "grpc_test_util", @@ -481,153 +482,193 @@ ] }, { - "name": "gpr_cancellable_test", + "name": "census_hash_table_test", "build": "test", + "language": "c", "src": [ - "test/core/support/cancellable_test.c" + "test/core/statistics/hash_table_test.c" ], "deps": [ + "grpc_test_util", + "grpc", "gpr_test_util", "gpr" ] }, { - "name": "gpr_log_test", + "name": "census_statistics_multiple_writers_circular_buffer_test", "build": "test", + "language": "c", "src": [ - "test/core/support/log_test.c" + "test/core/statistics/multiple_writers_circular_buffer_test.c" ], "deps": [ + "grpc_test_util", + "grpc", "gpr_test_util", "gpr" ] }, { - "name": "gpr_useful_test", + "name": "census_statistics_multiple_writers_test", "build": "test", + "language": "c", "src": [ - "test/core/support/useful_test.c" + "test/core/statistics/multiple_writers_test.c" ], "deps": [ + "grpc_test_util", + "grpc", "gpr_test_util", "gpr" ] }, { - "name": "gpr_cmdline_test", + "name": "census_statistics_performance_test", "build": "test", + "language": "c", "src": [ - "test/core/support/cmdline_test.c" + "test/core/statistics/performance_test.c" ], "deps": [ + "grpc_test_util", + "grpc", "gpr_test_util", "gpr" ] }, { - "name": "gpr_histogram_test", + "name": "census_statistics_quick_test", "build": "test", + "language": "c", "src": [ - "test/core/support/histogram_test.c" + "test/core/statistics/quick_test.c" ], "deps": [ + "grpc_test_util", + "grpc", "gpr_test_util", "gpr" ] }, { - "name": "gpr_host_port_test", + "name": "census_statistics_small_log_test", "build": "test", + "language": "c", "src": [ - "test/core/support/host_port_test.c" + "test/core/statistics/small_log_test.c" ], "deps": [ + "grpc_test_util", + "grpc", "gpr_test_util", "gpr" ] }, { - "name": "gpr_slice_buffer_test", - "build": "test", + "name": "census_stats_store_test", + "build": "executable", + "language": "c", "src": [ - "test/core/support/slice_buffer_test.c" + "test/core/statistics/rpc_stats_test.c" ], "deps": [ + "grpc_test_util", + "grpc", "gpr_test_util", "gpr" ] }, { - "name": "gpr_slice_test", + "name": "census_stub_test", "build": "test", + "language": "c", "src": [ - "test/core/support/slice_test.c" + "test/core/statistics/census_stub_test.c" ], "deps": [ + "grpc_test_util", + "grpc", "gpr_test_util", "gpr" ] }, { - "name": "gpr_string_test", - "build": "test", + "name": "census_trace_store_test", + "build": "executable", + "language": "c", "src": [ - "test/core/support/string_test.c" + "test/core/statistics/trace_test.c" ], "deps": [ + "grpc_test_util", + "grpc", "gpr_test_util", "gpr" ] }, { - "name": "gpr_sync_test", + "name": "census_window_stats_test", "build": "test", + "language": "c", "src": [ - "test/core/support/sync_test.c" + "test/core/statistics/window_stats_test.c" ], "deps": [ + "grpc_test_util", + "grpc", "gpr_test_util", "gpr" ] }, { - "name": "gpr_thd_test", + "name": "chttp2_status_conversion_test", "build": "test", + "language": "c", "src": [ - "test/core/support/thd_test.c" + "test/core/transport/chttp2/status_conversion_test.c" ], "deps": [ + "grpc_test_util", + "grpc", "gpr_test_util", "gpr" ] }, { - "name": "gpr_time_test", + "name": "chttp2_stream_encoder_test", "build": "test", + "language": "c", "src": [ - "test/core/support/time_test.c" + "test/core/transport/chttp2/stream_encoder_test.c" ], "deps": [ + "grpc_test_util", + "grpc", "gpr_test_util", "gpr" ] }, { - "name": "murmur_hash_test", + "name": "chttp2_stream_map_test", "build": "test", + "language": "c", "src": [ - "test/core/support/murmur_hash_test.c" + "test/core/transport/chttp2/stream_map_test.c" ], "deps": [ + "grpc_test_util", + "grpc", "gpr_test_util", "gpr" ] }, { - "name": "grpc_stream_op_test", + "name": "chttp2_transport_end2end_test", "build": "test", + "language": "c", "src": [ - "test/core/transport/stream_op_test.c" + "test/core/transport/chttp2_transport_end2end_test.c" ], "deps": [ "grpc_test_util", @@ -637,10 +678,11 @@ ] }, { - "name": "alpn_test", + "name": "dualstack_socket_test", "build": "test", + "language": "c", "src": [ - "test/core/transport/chttp2/alpn_test.c" + "test/core/end2end/dualstack_socket_test.c" ], "deps": [ "grpc_test_util", @@ -650,36 +692,41 @@ ] }, { - "name": "time_averaged_stats_test", + "name": "echo_client", "build": "test", + "language": "c", "src": [ - "test/core/iomgr/time_averaged_stats_test.c" + "test/core/echo/client.c" ], "deps": [ "grpc_test_util", "grpc", "gpr_test_util", "gpr" - ] + ], + "run": false }, { - "name": "chttp2_stream_encoder_test", + "name": "echo_server", "build": "test", + "language": "c", "src": [ - "test/core/transport/chttp2/stream_encoder_test.c" + "test/core/echo/server.c" ], "deps": [ "grpc_test_util", "grpc", "gpr_test_util", "gpr" - ] + ], + "run": false }, { - "name": "hpack_table_test", + "name": "echo_test", "build": "test", + "language": "c", "src": [ - "test/core/transport/chttp2/hpack_table_test.c" + "test/core/echo/echo_test.c" ], "deps": [ "grpc_test_util", @@ -689,10 +736,11 @@ ] }, { - "name": "chttp2_stream_map_test", + "name": "fd_posix_test", "build": "test", + "language": "c", "src": [ - "test/core/transport/chttp2/stream_map_test.c" + "test/core/iomgr/fd_posix_test.c" ], "deps": [ "grpc_test_util", @@ -702,36 +750,41 @@ ] }, { - "name": "hpack_parser_test", + "name": "fling_client", "build": "test", + "language": "c", "src": [ - "test/core/transport/chttp2/hpack_parser_test.c" + "test/core/fling/client.c" ], "deps": [ "grpc_test_util", "grpc", "gpr_test_util", "gpr" - ] + ], + "run": false }, { - "name": "transport_metadata_test", + "name": "fling_server", "build": "test", + "language": "c", "src": [ - "test/core/transport/metadata_test.c" + "test/core/fling/server.c" ], "deps": [ "grpc_test_util", "grpc", "gpr_test_util", "gpr" - ] + ], + "run": false }, { - "name": "chttp2_status_conversion_test", + "name": "fling_stream_test", "build": "test", + "language": "c", "src": [ - "test/core/transport/chttp2/status_conversion_test.c" + "test/core/fling/fling_stream_test.c" ], "deps": [ "grpc_test_util", @@ -741,10 +794,11 @@ ] }, { - "name": "chttp2_transport_end2end_test", + "name": "fling_test", "build": "test", + "language": "c", "src": [ - "test/core/transport/chttp2_transport_end2end_test.c" + "test/core/fling/fling_test.c" ], "deps": [ "grpc_test_util", @@ -754,166 +808,168 @@ ] }, { - "name": "tcp_posix_test", - "build": "test", + "name": "gen_hpack_tables", + "build": "tool", + "language": "c", "src": [ - "test/core/iomgr/tcp_posix_test.c" + "src/core/transport/chttp2/gen_hpack_tables.c" ], "deps": [ "grpc_test_util", - "grpc", + "gpr", + "grpc" + ] + }, + { + "name": "gpr_cancellable_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/cancellable_test.c" + ], + "deps": [ "gpr_test_util", "gpr" ] }, { - "name": "dualstack_socket_test", + "name": "gpr_cmdline_test", "build": "test", + "language": "c", "src": [ - "test/core/end2end/dualstack_socket_test.c" + "test/core/support/cmdline_test.c" ], "deps": [ - "grpc_test_util", - "grpc", "gpr_test_util", "gpr" ] }, { - "name": "no_server_test", + "name": "gpr_histogram_test", "build": "test", + "language": "c", "src": [ - "test/core/end2end/no_server_test.c" + "test/core/support/histogram_test.c" ], "deps": [ - "grpc_test_util", - "grpc", "gpr_test_util", "gpr" ] }, { - "name": "resolve_address_test", + "name": "gpr_host_port_test", "build": "test", + "language": "c", "src": [ - "test/core/iomgr/resolve_address_test.c" + "test/core/support/host_port_test.c" ], "deps": [ - "grpc_test_util", - "grpc", "gpr_test_util", "gpr" ] }, { - "name": "sockaddr_utils_test", + "name": "gpr_log_test", "build": "test", + "language": "c", "src": [ - "test/core/iomgr/sockaddr_utils_test.c" + "test/core/support/log_test.c" ], "deps": [ - "grpc_test_util", - "grpc", "gpr_test_util", "gpr" ] }, { - "name": "tcp_server_posix_test", + "name": "gpr_slice_buffer_test", "build": "test", + "language": "c", "src": [ - "test/core/iomgr/tcp_server_posix_test.c" + "test/core/support/slice_buffer_test.c" ], "deps": [ - "grpc_test_util", - "grpc", "gpr_test_util", "gpr" ] }, { - "name": "tcp_client_posix_test", + "name": "gpr_slice_test", "build": "test", + "language": "c", "src": [ - "test/core/iomgr/tcp_client_posix_test.c" + "test/core/support/slice_test.c" ], "deps": [ - "grpc_test_util", - "grpc", "gpr_test_util", "gpr" ] }, { - "name": "grpc_channel_stack_test", + "name": "gpr_string_test", "build": "test", + "language": "c", "src": [ - "test/core/channel/channel_stack_test.c" + "test/core/support/string_test.c" ], - "deps": [ - "grpc_test_util", - "grpc", + "deps": [ "gpr_test_util", "gpr" ] }, { - "name": "metadata_buffer_test", + "name": "gpr_sync_test", "build": "test", + "language": "c", "src": [ - "test/core/channel/metadata_buffer_test.c" + "test/core/support/sync_test.c" ], "deps": [ - "grpc_test_util", - "grpc", "gpr_test_util", "gpr" ] }, { - "name": "grpc_completion_queue_test", + "name": "gpr_thd_test", "build": "test", + "language": "c", "src": [ - "test/core/surface/completion_queue_test.c" + "test/core/support/thd_test.c" ], "deps": [ - "grpc_test_util", - "grpc", "gpr_test_util", "gpr" ] }, { - "name": "grpc_completion_queue_benchmark", - "build": "benchmark", + "name": "gpr_time_test", + "build": "test", + "language": "c", "src": [ - "test/core/surface/completion_queue_benchmark.c" + "test/core/support/time_test.c" ], "deps": [ - "grpc_test_util", - "grpc", "gpr_test_util", "gpr" ] }, { - "name": "census_trace_store_test", - "build": "executable", + "name": "gpr_useful_test", + "build": "test", + "language": "c", "src": [ - "test/core/statistics/trace_test.c" + "test/core/support/useful_test.c" ], - "deps": [ - "grpc_test_util", - "grpc", + "deps": [ "gpr_test_util", "gpr" ] }, { - "name": "census_stats_store_test", - "build": "executable", + "name": "grpc_base64_test", + "build": "test", + "language": "c", "src": [ - "test/core/statistics/rpc_stats_test.c" + "test/core/security/base64_test.c" ], "deps": [ "grpc_test_util", @@ -923,10 +979,11 @@ ] }, { - "name": "census_window_stats_test", + "name": "grpc_byte_buffer_reader_test", "build": "test", + "language": "c", "src": [ - "test/core/statistics/window_stats_test.c" + "test/core/surface/byte_buffer_reader_test.c" ], "deps": [ "grpc_test_util", @@ -936,10 +993,11 @@ ] }, { - "name": "census_statistics_quick_test", + "name": "grpc_channel_stack_test", "build": "test", + "language": "c", "src": [ - "test/core/statistics/quick_test.c" + "test/core/channel/channel_stack_test.c" ], "deps": [ "grpc_test_util", @@ -949,10 +1007,11 @@ ] }, { - "name": "census_statistics_small_log_test", - "build": "test", + "name": "grpc_completion_queue_benchmark", + "build": "benchmark", + "language": "c", "src": [ - "test/core/statistics/small_log_test.c" + "test/core/surface/completion_queue_benchmark.c" ], "deps": [ "grpc_test_util", @@ -962,10 +1021,11 @@ ] }, { - "name": "census_statistics_performance_test", + "name": "grpc_completion_queue_test", "build": "test", + "language": "c", "src": [ - "test/core/statistics/performance_test.c" + "test/core/surface/completion_queue_test.c" ], "deps": [ "grpc_test_util", @@ -975,10 +1035,11 @@ ] }, { - "name": "census_statistics_multiple_writers_test", + "name": "grpc_credentials_test", "build": "test", + "language": "c", "src": [ - "test/core/statistics/multiple_writers_test.c" + "test/core/security/credentials_test.c" ], "deps": [ "grpc_test_util", @@ -988,10 +1049,11 @@ ] }, { - "name": "census_statistics_multiple_writers_circular_buffer_test", - "build": "test", + "name": "grpc_fetch_oauth2", + "build": "tool", + "language": "c", "src": [ - "test/core/statistics/multiple_writers_circular_buffer_test.c" + "test/core/security/fetch_oauth2.c" ], "deps": [ "grpc_test_util", @@ -1001,10 +1063,11 @@ ] }, { - "name": "census_stub_test", + "name": "grpc_json_token_test", "build": "test", + "language": "c", "src": [ - "test/core/statistics/census_stub_test.c" + "test/core/security/json_token_test.c" ], "deps": [ "grpc_test_util", @@ -1014,10 +1077,11 @@ ] }, { - "name": "census_hash_table_test", + "name": "grpc_stream_op_test", "build": "test", + "language": "c", "src": [ - "test/core/statistics/hash_table_test.c" + "test/core/transport/stream_op_test.c" ], "deps": [ "grpc_test_util", @@ -1027,11 +1091,11 @@ ] }, { - "name": "fling_server", + "name": "hpack_parser_test", "build": "test", - "run": false, + "language": "c", "src": [ - "test/core/fling/server.c" + "test/core/transport/chttp2/hpack_parser_test.c" ], "deps": [ "grpc_test_util", @@ -1041,11 +1105,11 @@ ] }, { - "name": "fling_client", + "name": "hpack_table_test", "build": "test", - "run": false, + "language": "c", "src": [ - "test/core/fling/client.c" + "test/core/transport/chttp2/hpack_table_test.c" ], "deps": [ "grpc_test_util", @@ -1055,10 +1119,11 @@ ] }, { - "name": "fling_test", + "name": "httpcli_format_request_test", "build": "test", + "language": "c", "src": [ - "test/core/fling/fling_test.c" + "test/core/httpcli/format_request_test.c" ], "deps": [ "grpc_test_util", @@ -1068,11 +1133,11 @@ ] }, { - "name": "echo_server", + "name": "httpcli_parser_test", "build": "test", - "run": false, + "language": "c", "src": [ - "test/core/echo/server.c" + "test/core/httpcli/parser_test.c" ], "deps": [ "grpc_test_util", @@ -1082,11 +1147,11 @@ ] }, { - "name": "echo_client", + "name": "httpcli_test", "build": "test", - "run": false, + "language": "c", "src": [ - "test/core/echo/client.c" + "test/core/httpcli/httpcli_test.c" ], "deps": [ "grpc_test_util", @@ -1096,10 +1161,11 @@ ] }, { - "name": "echo_test", + "name": "lame_client_test", "build": "test", + "language": "c", "src": [ - "test/core/echo/echo_test.c" + "test/core/surface/lame_client_test.c" ], "deps": [ "grpc_test_util", @@ -1111,6 +1177,7 @@ { "name": "low_level_ping_pong_benchmark", "build": "benchmark", + "language": "c", "src": [ "test/core/network_benchmarks/low_level_ping_pong.c" ], @@ -1124,6 +1191,7 @@ { "name": "message_compress_test", "build": "test", + "language": "c", "src": [ "test/core/compression/message_compress_test.c" ], @@ -1135,10 +1203,11 @@ ] }, { - "name": "bin_encoder_test", + "name": "metadata_buffer_test", "build": "test", + "language": "c", "src": [ - "test/core/transport/chttp2/bin_encoder_test.c" + "test/core/channel/metadata_buffer_test.c" ], "deps": [ "grpc_test_util", @@ -1148,23 +1217,23 @@ ] }, { - "name": "secure_endpoint_test", + "name": "murmur_hash_test", "build": "test", + "language": "c", "src": [ - "test/core/security/secure_endpoint_test.c" + "test/core/support/murmur_hash_test.c" ], "deps": [ - "grpc_test_util", - "grpc", "gpr_test_util", "gpr" ] }, { - "name": "httpcli_format_request_test", + "name": "no_server_test", "build": "test", + "language": "c", "src": [ - "test/core/httpcli/format_request_test.c" + "test/core/end2end/no_server_test.c" ], "deps": [ "grpc_test_util", @@ -1174,10 +1243,11 @@ ] }, { - "name": "httpcli_parser_test", + "name": "poll_kick_test", "build": "test", + "language": "c", "src": [ - "test/core/httpcli/parser_test.c" + "test/core/iomgr/poll_kick_test.c" ], "deps": [ "grpc_test_util", @@ -1187,10 +1257,11 @@ ] }, { - "name": "httpcli_test", + "name": "resolve_address_test", "build": "test", + "language": "c", "src": [ - "test/core/httpcli/httpcli_test.c" + "test/core/iomgr/resolve_address_test.c" ], "deps": [ "grpc_test_util", @@ -1200,10 +1271,11 @@ ] }, { - "name": "grpc_credentials_test", + "name": "secure_endpoint_test", "build": "test", + "language": "c", "src": [ - "test/core/security/credentials_test.c" + "test/core/security/secure_endpoint_test.c" ], "deps": [ "grpc_test_util", @@ -1213,10 +1285,11 @@ ] }, { - "name": "grpc_fetch_oauth2", - "build": "tool", + "name": "sockaddr_utils_test", + "build": "test", + "language": "c", "src": [ - "test/core/security/fetch_oauth2.c" + "test/core/iomgr/sockaddr_utils_test.c" ], "deps": [ "grpc_test_util", @@ -1226,10 +1299,11 @@ ] }, { - "name": "grpc_base64_test", + "name": "tcp_client_posix_test", "build": "test", + "language": "c", "src": [ - "test/core/security/base64_test.c" + "test/core/iomgr/tcp_client_posix_test.c" ], "deps": [ "grpc_test_util", @@ -1239,10 +1313,11 @@ ] }, { - "name": "grpc_json_token_test", + "name": "tcp_posix_test", "build": "test", + "language": "c", "src": [ - "test/core/security/json_token_test.c" + "test/core/iomgr/tcp_posix_test.c" ], "deps": [ "grpc_test_util", @@ -1252,10 +1327,11 @@ ] }, { - "name": "timeout_encoding_test", + "name": "tcp_server_posix_test", "build": "test", + "language": "c", "src": [ - "test/core/transport/chttp2/timeout_encoding_test.c" + "test/core/iomgr/tcp_server_posix_test.c" ], "deps": [ "grpc_test_util", @@ -1265,10 +1341,11 @@ ] }, { - "name": "fd_posix_test", + "name": "time_averaged_stats_test", "build": "test", + "language": "c", "src": [ - "test/core/iomgr/fd_posix_test.c" + "test/core/iomgr/time_averaged_stats_test.c" ], "deps": [ "grpc_test_util", @@ -1278,10 +1355,11 @@ ] }, { - "name": "fling_stream_test", + "name": "time_test", "build": "test", + "language": "c", "src": [ - "test/core/fling/fling_stream_test.c" + "test/core/support/time_test.c" ], "deps": [ "grpc_test_util", @@ -1291,10 +1369,11 @@ ] }, { - "name": "lame_client_test", + "name": "timeout_encoding_test", "build": "test", + "language": "c", "src": [ - "test/core/surface/lame_client_test.c" + "test/core/transport/chttp2/timeout_encoding_test.c" ], "deps": [ "grpc_test_util", @@ -1304,59 +1383,66 @@ ] }, { - "name": "thread_pool_test", + "name": "transport_metadata_test", "build": "test", - "c++": true, + "language": "c", "src": [ - "test/cpp/server/thread_pool_test.cc" + "test/core/transport/metadata_test.c" ], "deps": [ "grpc_test_util", - "grpc++", "grpc", "gpr_test_util", "gpr" ] }, { - "name": "status_test", + "name": "channel_arguments_test", "build": "test", - "c++": true, + "language": "c++", "src": [ - "test/cpp/util/status_test.cc" + "test/cpp/client/channel_arguments_test.cc" ], "deps": [ - "grpc_test_util", "grpc++", "grpc", - "gpr_test_util", "gpr" ] }, { - "name": "sync_client_async_server_test", + "name": "cpp_plugin", + "build": "protoc", + "language": "c++", + "headers": [ + "src/compiler/cpp_generator.h", + "src/compiler/cpp_generator_helpers.h" + ], + "src": [ + "src/compiler/cpp_generator.cc", + "src/compiler/cpp_plugin.cc" + ], + "deps": [], + "secure": false + }, + { + "name": "credentials_test", "build": "test", - "c++": true, + "language": "c++", "src": [ - "test/cpp/end2end/sync_client_async_server_test.cc" + "test/cpp/client/credentials_test.cc" ], "deps": [ - "grpc_test_util", "grpc++", "grpc", - "gpr_test_util", "gpr" ] }, { - "name": "qps_client", + "name": "end2end_test", "build": "test", - "c++": true, + "language": "c++", "src": [ - "test/cpp/interop/empty.proto", - "test/cpp/interop/messages.proto", - "test/cpp/interop/test.proto", - "test/cpp/qps/client.cc" + "test/cpp/end2end/end2end_test.cc" ], "deps": [ "grpc++_test_util", @@ -1368,14 +1454,14 @@ ] }, { - "name": "qps_server", + "name": "interop_client", "build": "test", - "c++": true, + "language": "c++", "src": [ "test/cpp/interop/empty.proto", "test/cpp/interop/messages.proto", "test/cpp/interop/test.proto", - "test/cpp/qps/server.cc" + "test/cpp/interop/client.cc" ], "deps": [ "grpc++_test_util", @@ -1384,13 +1470,13 @@ "grpc", "gpr_test_util", "gpr" - ] + ], + "run": false }, { "name": "interop_server", "build": "test", - "run": false, - "c++": true, + "language": "c++", "src": [ "test/cpp/interop/empty.proto", "test/cpp/interop/messages.proto", @@ -1404,18 +1490,16 @@ "grpc", "gpr_test_util", "gpr" - ] + ], + "run": false }, { - "name": "interop_client", + "name": "qps_client", "build": "test", - "run": false, - "c++": true, + "language": "c++", "src": [ - "test/cpp/interop/empty.proto", - "test/cpp/interop/messages.proto", - "test/cpp/interop/test.proto", - "test/cpp/interop/client.cc" + "test/cpp/qps/qpstest.proto", + "test/cpp/qps/client.cc" ], "deps": [ "grpc++_test_util", @@ -1427,11 +1511,12 @@ ] }, { - "name": "end2end_test", + "name": "qps_server", "build": "test", - "c++": true, + "language": "c++", "src": [ - "test/cpp/end2end/end2end_test.cc" + "test/cpp/qps/qpstest.proto", + "test/cpp/qps/server.cc" ], "deps": [ "grpc++_test_util", @@ -1443,76 +1528,63 @@ ] }, { - "name": "channel_arguments_test", - "build": "test", - "c++": true, - "src": [ - "test/cpp/client/channel_arguments_test.cc" - ], - "deps": [ - "grpc++", - "grpc" - ] - }, - { - "name": "credentials_test", - "build": "test", - "c++": true, - "src": [ - "test/cpp/client/credentials_test.cc" + "name": "ruby_plugin", + "build": "protoc", + "language": "c++", + "headers": [ + "src/compiler/cpp_generator.h", + "src/compiler/cpp_generator_helpers-inl.h", + "src/compiler/cpp_generator_map-inl.h", + "src/compiler/cpp_generator_string-inl.h" ], - "deps": [ - "grpc++", - "grpc" - ] - }, - { - "name": "alarm_test", - "build": "test", "src": [ - "test/core/iomgr/alarm_test.c" + "src/compiler/ruby_generator.cc", + "src/compiler/ruby_plugin.cc" ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] + "deps": [], + "secure": false }, { - "name": "alarm_list_test", + "name": "status_test", "build": "test", + "language": "c++", "src": [ - "test/core/iomgr/alarm_list_test.c" + "test/cpp/util/status_test.cc" ], "deps": [ "grpc_test_util", + "grpc++", "grpc", "gpr_test_util", "gpr" ] }, { - "name": "alarm_heap_test", + "name": "sync_client_async_server_test", "build": "test", + "language": "c++", "src": [ - "test/core/iomgr/alarm_heap_test.c" + "test/cpp/end2end/sync_client_async_server_test.cc" ], "deps": [ + "grpc++_test_util", "grpc_test_util", + "grpc++", "grpc", "gpr_test_util", "gpr" ] }, { - "name": "time_test", + "name": "thread_pool_test", "build": "test", + "language": "c++", "src": [ - "test/core/support/time_test.c" + "test/cpp/server/thread_pool_test.cc" ], "deps": [ "grpc_test_util", + "grpc++", "grpc", "gpr_test_util", "gpr" diff --git a/include/grpc++/async_server_context.h b/include/grpc++/async_server_context.h index 237a6856a49..c038286ac13 100644 --- a/include/grpc++/async_server_context.h +++ b/include/grpc++/async_server_context.h @@ -87,7 +87,7 @@ class AsyncServerContext { system_clock::time_point absolute_deadline_; google::protobuf::Message* request_; // not owned - grpc_call* call_; // owned + grpc_call* call_; // owned }; } // namespace grpc diff --git a/include/grpc++/channel_interface.h b/include/grpc++/channel_interface.h index 4b9d76e0d10..9ed35422b85 100644 --- a/include/grpc++/channel_interface.h +++ b/include/grpc++/channel_interface.h @@ -57,10 +57,10 @@ class ChannelInterface { const google::protobuf::Message& request, google::protobuf::Message* result) = 0; - virtual StreamContextInterface* CreateStream(const RpcMethod& method, - ClientContext* context, - const google::protobuf::Message* request, - google::protobuf::Message* result) = 0; + virtual StreamContextInterface* CreateStream( + const RpcMethod& method, ClientContext* context, + const google::protobuf::Message* request, + google::protobuf::Message* result) = 0; }; } // namespace grpc diff --git a/include/grpc++/config.h b/include/grpc++/config.h index 153b288f0c0..52913fbf0f9 100644 --- a/include/grpc++/config.h +++ b/include/grpc++/config.h @@ -39,7 +39,6 @@ namespace grpc { typedef std::string string; - } #endif // __GRPCPP_CONFIG_H__ diff --git a/include/grpc++/credentials.h b/include/grpc++/credentials.h index a8debbf7cf2..987d890b4f8 100644 --- a/include/grpc++/credentials.h +++ b/include/grpc++/credentials.h @@ -112,7 +112,6 @@ class CredentialsFactory { const grpc::string& authorization_token, const grpc::string& authority_selector); - // Combines two credentials objects into a composite credentials static std::unique_ptr ComposeCredentials( const std::unique_ptr& creds1, diff --git a/include/grpc++/impl/rpc_service_method.h b/include/grpc++/impl/rpc_service_method.h index 15ff9cab1a4..620de5e67fb 100644 --- a/include/grpc++/impl/rpc_service_method.h +++ b/include/grpc++/impl/rpc_service_method.h @@ -55,14 +55,17 @@ class MethodHandler { public: virtual ~MethodHandler() {} struct HandlerParameter { - HandlerParameter(ServerContext* context, const google::protobuf::Message* req, + HandlerParameter(ServerContext* context, + const google::protobuf::Message* req, google::protobuf::Message* resp) : server_context(context), request(req), response(resp), stream_context(nullptr) {} - HandlerParameter(ServerContext* context, const google::protobuf::Message* req, - google::protobuf::Message* resp, StreamContextInterface* stream) + HandlerParameter(ServerContext* context, + const google::protobuf::Message* req, + google::protobuf::Message* resp, + StreamContextInterface* stream) : server_context(context), request(req), response(resp), @@ -171,7 +174,8 @@ class RpcServiceMethod : public RpcMethod { public: // Takes ownership of the handler and two prototype objects. RpcServiceMethod(const char* name, RpcMethod::RpcType type, - MethodHandler* handler, google::protobuf::Message* request_prototype, + MethodHandler* handler, + google::protobuf::Message* request_prototype, google::protobuf::Message* response_prototype) : RpcMethod(name, type), handler_(handler), @@ -180,7 +184,9 @@ class RpcServiceMethod : public RpcMethod { MethodHandler* handler() { return handler_.get(); } - google::protobuf::Message* AllocateRequestProto() { return request_prototype_->New(); } + google::protobuf::Message* AllocateRequestProto() { + return request_prototype_->New(); + } google::protobuf::Message* AllocateResponseProto() { return response_prototype_->New(); } diff --git a/include/grpc++/status_code_enum.h b/include/grpc++/status_code_enum.h index 964420dcc4a..4e0fda13db6 100644 --- a/include/grpc++/status_code_enum.h +++ b/include/grpc++/status_code_enum.h @@ -34,7 +34,6 @@ #ifndef __GRPCPP_STATUS_CODE_ENUM_H__ #define __GRPCPP_STATUS_CODE_ENUM_H__ - namespace grpc { enum StatusCode { diff --git a/include/grpc++/stream.h b/include/grpc++/stream.h index 49f88a6f135..b8982f4d93d 100644 --- a/include/grpc++/stream.h +++ b/include/grpc++/stream.h @@ -96,7 +96,7 @@ class ClientReader : public ClientStreamingInterface, virtual bool Read(R* msg) { return context_->Read(msg); } - virtual void Cancel() { context_->FinishStream(Status::Cancelled, true); } + virtual void Cancel() { context_->Cancel(); } virtual const Status& Wait() { return context_->Wait(); } @@ -122,7 +122,7 @@ class ClientWriter : public ClientStreamingInterface, virtual void WritesDone() { context_->Write(nullptr, true); } - virtual void Cancel() { context_->FinishStream(Status::Cancelled, true); } + virtual void Cancel() { context_->Cancel(); } // Read the final response and wait for the final status. virtual const Status& Wait() { @@ -165,7 +165,7 @@ class ClientReaderWriter : public ClientStreamingInterface, virtual void WritesDone() { context_->Write(nullptr, true); } - virtual void Cancel() { context_->FinishStream(Status::Cancelled, true); } + virtual void Cancel() { context_->Cancel(); } virtual const Status& Wait() { return context_->Wait(); } diff --git a/include/grpc++/stream_context_interface.h b/include/grpc++/stream_context_interface.h index 535c0048e65..a84119800b7 100644 --- a/include/grpc++/stream_context_interface.h +++ b/include/grpc++/stream_context_interface.h @@ -53,7 +53,7 @@ class StreamContextInterface { virtual bool Read(google::protobuf::Message* msg) = 0; virtual bool Write(const google::protobuf::Message* msg, bool is_last) = 0; virtual const Status& Wait() = 0; - virtual void FinishStream(const Status& status, bool send) = 0; + virtual void Cancel() = 0; virtual google::protobuf::Message* request() = 0; virtual google::protobuf::Message* response() = 0; diff --git a/include/grpc/byte_buffer.h b/include/grpc/byte_buffer.h index 27ca63e6fac..094d3016e1e 100644 --- a/include/grpc/byte_buffer.h +++ b/include/grpc/byte_buffer.h @@ -47,4 +47,4 @@ struct grpc_byte_buffer { } data; }; -#endif /* __GRPC_BYTE_BUFFER_H__ */ +#endif /* __GRPC_BYTE_BUFFER_H__ */ diff --git a/include/grpc/byte_buffer_reader.h b/include/grpc/byte_buffer_reader.h index 5f1c160e158..6386db65929 100644 --- a/include/grpc/byte_buffer_reader.h +++ b/include/grpc/byte_buffer_reader.h @@ -46,4 +46,4 @@ struct grpc_byte_buffer_reader { } current; }; -#endif /* __GRPC_BYTE_BUFFER_READER_H__ */ +#endif /* __GRPC_BYTE_BUFFER_READER_H__ */ diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 085393084d2..3c5b0de1956 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -194,6 +194,7 @@ typedef enum grpc_completion_type { GRPC_FINISHED, /* An RPC has finished. The event contains status. On the server this will be OK or Cancelled. */ GRPC_SERVER_RPC_NEW, /* A new RPC has arrived at the server */ + GRPC_SERVER_SHUTDOWN, /* The server has finished shutting down */ GRPC_COMPLETION_DO_NOT_USE /* must be last, forces users to include a default: case */ } grpc_completion_type; @@ -232,12 +233,12 @@ typedef struct grpc_event { } grpc_event; /* Initialize the grpc library */ -void grpc_init(); +void grpc_init(void); /* Shutdown the grpc library */ -void grpc_shutdown(); +void grpc_shutdown(void); -grpc_completion_queue *grpc_completion_queue_create(); +grpc_completion_queue *grpc_completion_queue_create(void); /* Blocks until an event is available, the completion queue is being shutdown, or deadline is reached. Returns NULL on timeout, otherwise the event that @@ -325,22 +326,6 @@ grpc_call_error grpc_call_start_invoke(grpc_call *call, void *metadata_read_tag, void *finished_tag, gpr_uint32 flags); -/* DEPRECATED: users should use grpc_call_server_accept, and - grpc_call_server_end_initial_metadata instead now. - - - Accept an incoming RPC, binding a completion queue to it. - To be called after adding metadata to the call, but before sending - messages. - flags is a bit-field combination of the write flags defined above. - REQUIRES: Can be called at most once per call. - Can only be called on the server. - Produces a GRPC_FINISHED event with finished_tag when the call has been - completed (there may be other events for the call pending at this - time) */ -grpc_call_error grpc_call_accept(grpc_call *call, grpc_completion_queue *cq, - void *finished_tag, gpr_uint32 flags); - /* Accept an incoming RPC, binding a completion queue to it. To be called before sending or receiving messages. REQUIRES: Can be called at most once per call. @@ -365,6 +350,16 @@ grpc_call_error grpc_call_server_end_initial_metadata(grpc_call *call, Can be called multiple times, from any thread. */ grpc_call_error grpc_call_cancel(grpc_call *call); +/* Called by clients to cancel an RPC on the server. + Can be called multiple times, from any thread. + If a status has not been received for the call, set it to the status code + and description passed in. + Importantly, this function does not send status nor description to the + remote endpoint. */ +grpc_call_error grpc_call_cancel_with_status(grpc_call *call, + grpc_status_code status, + const char *description); + /* Queue a byte buffer for writing. flags is a bit-field combination of the write flags defined above. A write with byte_buffer null is allowed, and will not send any bytes on the @@ -445,6 +440,10 @@ void grpc_server_start(grpc_server *server); Existing calls will be allowed to complete. */ void grpc_server_shutdown(grpc_server *server); +/* As per grpc_server_shutdown, but send a GRPC_SERVER_SHUTDOWN event when + there are no more calls being serviced. */ +void grpc_server_shutdown_and_notify(grpc_server *server, void *tag); + /* Destroy a server. Forcefully cancels all existing calls. */ void grpc_server_destroy(grpc_server *server); @@ -453,4 +452,4 @@ void grpc_server_destroy(grpc_server *server); } #endif -#endif /* __GRPC_GRPC_H__ */ +#endif /* __GRPC_GRPC_H__ */ diff --git a/include/grpc/status.h b/include/grpc/status.h index a4ce312bf26..630b7769fd5 100644 --- a/include/grpc/status.h +++ b/include/grpc/status.h @@ -34,7 +34,6 @@ #ifndef __GRPC_STATUS_H__ #define __GRPC_STATUS_H__ - #ifdef __cplusplus extern "C" { #endif @@ -200,4 +199,4 @@ typedef enum { } #endif -#endif /* __GRPC_STATUS_H__ */ +#endif /* __GRPC_STATUS_H__ */ diff --git a/include/grpc/support/alloc.h b/include/grpc/support/alloc.h index d613d856831..fa9cc4bf7c7 100644 --- a/include/grpc/support/alloc.h +++ b/include/grpc/support/alloc.h @@ -55,4 +55,4 @@ void gpr_free_aligned(void *ptr); } #endif -#endif /* __GRPC_SUPPORT_ALLOC_H__ */ +#endif /* __GRPC_SUPPORT_ALLOC_H__ */ diff --git a/include/grpc/support/atm.h b/include/grpc/support/atm.h index d9fd3832096..5e613f1ba98 100644 --- a/include/grpc/support/atm.h +++ b/include/grpc/support/atm.h @@ -89,4 +89,4 @@ #error could not determine platform for atm #endif -#endif /* __GRPC_SUPPORT_ATM_H__ */ +#endif /* __GRPC_SUPPORT_ATM_H__ */ diff --git a/include/grpc/support/atm_gcc_atomic.h b/include/grpc/support/atm_gcc_atomic.h index 4e0a7ab1c6b..896dd842ec2 100644 --- a/include/grpc/support/atm_gcc_atomic.h +++ b/include/grpc/support/atm_gcc_atomic.h @@ -66,4 +66,4 @@ static __inline int gpr_atm_rel_cas(gpr_atm *p, gpr_atm o, gpr_atm n) { __ATOMIC_RELAXED); } -#endif /* __GRPC_SUPPORT_ATM_GCC_ATOMIC_H__ */ +#endif /* __GRPC_SUPPORT_ATM_GCC_ATOMIC_H__ */ diff --git a/include/grpc/support/atm_gcc_sync.h b/include/grpc/support/atm_gcc_sync.h index 976f2977bb5..1a3a10c911b 100644 --- a/include/grpc/support/atm_gcc_sync.h +++ b/include/grpc/support/atm_gcc_sync.h @@ -70,4 +70,4 @@ static __inline void gpr_atm_rel_store(gpr_atm *p, gpr_atm value) { #define gpr_atm_acq_cas(p, o, n) (__sync_bool_compare_and_swap((p), (o), (n))) #define gpr_atm_rel_cas(p, o, n) gpr_atm_acq_cas((p), (o), (n)) -#endif /* __GRPC_SUPPORT_ATM_GCC_SYNC_H__ */ +#endif /* __GRPC_SUPPORT_ATM_GCC_SYNC_H__ */ diff --git a/include/grpc/support/atm_win32.h b/include/grpc/support/atm_win32.h index d32ffd46a29..19881e83ad8 100644 --- a/include/grpc/support/atm_win32.h +++ b/include/grpc/support/atm_win32.h @@ -55,8 +55,8 @@ static __inline void gpr_atm_rel_store(gpr_atm *p, gpr_atm value) { } static __inline int gpr_atm_no_barrier_cas(gpr_atm *p, gpr_atm o, gpr_atm n) { - /* InterlockedCompareExchangePointerNoFence() not available on vista or - windows7 */ +/* InterlockedCompareExchangePointerNoFence() not available on vista or + windows7 */ #ifdef GPR_ARCH_64 return o == (gpr_atm)InterlockedCompareExchangeAcquire64(p, n, o); #else diff --git a/include/grpc/support/cancellable_platform.h b/include/grpc/support/cancellable_platform.h index d67302dd904..db099b83818 100644 --- a/include/grpc/support/cancellable_platform.h +++ b/include/grpc/support/cancellable_platform.h @@ -53,4 +53,4 @@ typedef struct { struct gpr_cancellable_list_ waiters; } gpr_cancellable; -#endif /* __GRPC_SUPPORT_CANCELLABLE_PLATFORM_H__ */ +#endif /* __GRPC_SUPPORT_CANCELLABLE_PLATFORM_H__ */ diff --git a/include/grpc/support/cmdline.h b/include/grpc/support/cmdline.h index 60e8035c754..ba3ffe42cc0 100644 --- a/include/grpc/support/cmdline.h +++ b/include/grpc/support/cmdline.h @@ -92,4 +92,4 @@ void gpr_cmdline_destroy(gpr_cmdline *cl); } #endif -#endif /* __GRPC_SUPPORT_CMDLINE_H__ */ +#endif /* __GRPC_SUPPORT_CMDLINE_H__ */ diff --git a/include/grpc/support/histogram.h b/include/grpc/support/histogram.h index 13dce3bdcde..e67323d5d3d 100644 --- a/include/grpc/support/histogram.h +++ b/include/grpc/support/histogram.h @@ -63,4 +63,4 @@ double gpr_histogram_sum_of_squares(gpr_histogram *histogram); } #endif -#endif /* __GRPC_SUPPORT_HISTOGRAM_H__ */ +#endif /* __GRPC_SUPPORT_HISTOGRAM_H__ */ diff --git a/include/grpc/support/log.h b/include/grpc/support/log.h index f92114a8e3e..1c2857dad38 100644 --- a/include/grpc/support/log.h +++ b/include/grpc/support/log.h @@ -105,4 +105,4 @@ void gpr_set_log_function(gpr_log_func func); } #endif -#endif /* __GRPC_SUPPORT_LOG_H__ */ +#endif /* __GRPC_SUPPORT_LOG_H__ */ diff --git a/include/grpc/support/port_platform.h b/include/grpc/support/port_platform.h index 9c999b9c811..05a5bbe1bc9 100644 --- a/include/grpc/support/port_platform.h +++ b/include/grpc/support/port_platform.h @@ -45,15 +45,16 @@ #if defined(_WIN64) || defined(WIN64) #define GPR_WIN32 1 #define GPR_ARCH_64 1 +#define GPR_GETPID_IN_PROCESS_H 1 #elif defined(_WIN32) || defined(WIN32) #define GPR_ARCH_32 1 #define GPR_WIN32 1 +#define GPR_GETPID_IN_PROCESS_H 1 #elif defined(ANDROID) || defined(__ANDROID__) #define GPR_ANDROID 1 #define GPR_ARCH_32 1 #define GPR_CPU_LINUX 1 #define GPR_GCC_SYNC 1 -#define GPR_LIBEVENT 1 #define GPR_POSIX_MULTIPOLL_WITH_POLL 1 #define GPR_POSIX_SOCKET 1 #define GPR_POSIX_SOCKETADDR 1 @@ -61,10 +62,10 @@ #define GPR_POSIX_STRING 1 #define GPR_POSIX_SYNC 1 #define GPR_POSIX_TIME 1 +#define GPR_GETPID_IN_UNISTD_H 1 #elif defined(__linux__) #define GPR_CPU_LINUX 1 #define GPR_GCC_ATOMIC 1 -#define GPR_LIBEVENT 1 #define GPR_LINUX 1 #define GPR_POSIX_MULTIPOLL_WITH_POLL 1 #define GPR_POSIX_SOCKET 1 @@ -72,6 +73,7 @@ #define GPR_POSIX_STRING 1 #define GPR_POSIX_SYNC 1 #define GPR_POSIX_TIME 1 +#define GPR_GETPID_IN_UNISTD_H 1 #ifdef _LP64 #define GPR_ARCH_64 1 #else /* _LP64 */ @@ -80,7 +82,6 @@ #elif defined(__APPLE__) #define GPR_CPU_POSIX 1 #define GPR_GCC_ATOMIC 1 -#define GPR_LIBEVENT 1 #define GPR_POSIX_LOG 1 #define GPR_POSIX_MULTIPOLL_WITH_POLL 1 #define GPR_POSIX_SOCKET 1 @@ -89,6 +90,7 @@ #define GPR_POSIX_STRING 1 #define GPR_POSIX_SYNC 1 #define GPR_POSIX_TIME 1 +#define GPR_GETPID_IN_UNISTD_H 1 #ifdef _LP64 #define GPR_ARCH_64 1 #else /* _LP64 */ diff --git a/include/grpc/support/slice.h b/include/grpc/support/slice.h index a89073c56a1..7828ccdd13c 100644 --- a/include/grpc/support/slice.h +++ b/include/grpc/support/slice.h @@ -163,7 +163,7 @@ gpr_slice gpr_slice_split_tail(gpr_slice *s, size_t split); Requires s intialized, split <= s.length */ gpr_slice gpr_slice_split_head(gpr_slice *s, size_t split); -gpr_slice gpr_empty_slice(); +gpr_slice gpr_empty_slice(void); /* Returns <0 if a < b, ==0 if a == b, >0 if a > b */ int gpr_slice_cmp(gpr_slice a, gpr_slice b); @@ -173,4 +173,4 @@ int gpr_slice_str_cmp(gpr_slice a, const char *b); } #endif -#endif /* __GRPC_SUPPORT_SLICE_H__ */ +#endif /* __GRPC_SUPPORT_SLICE_H__ */ diff --git a/include/grpc/support/slice_buffer.h b/include/grpc/support/slice_buffer.h index e4d204b8274..0ad735a47a3 100644 --- a/include/grpc/support/slice_buffer.h +++ b/include/grpc/support/slice_buffer.h @@ -81,4 +81,4 @@ void gpr_slice_buffer_reset_and_unref(gpr_slice_buffer *sb); } #endif -#endif /* __GRPC_SUPPORT_SLICE_BUFFER_H__ */ +#endif /* __GRPC_SUPPORT_SLICE_BUFFER_H__ */ diff --git a/include/grpc/support/string.h b/include/grpc/support/string.h index a7acfdab882..68e7452a7fa 100644 --- a/include/grpc/support/string.h +++ b/include/grpc/support/string.h @@ -74,4 +74,4 @@ int gpr_asprintf(char **strp, const char *format, ...); } #endif -#endif /* __GRPC_SUPPORT_STRING_H__ */ +#endif /* __GRPC_SUPPORT_STRING_H__ */ diff --git a/include/grpc/support/sync.h b/include/grpc/support/sync.h index 3e435a6e4c8..6f0f684ae7a 100644 --- a/include/grpc/support/sync.h +++ b/include/grpc/support/sync.h @@ -345,4 +345,4 @@ gpr_intptr gpr_stats_read(const gpr_stats_counter *c); } #endif -#endif /* __GRPC_SUPPORT_SYNC_H__ */ +#endif /* __GRPC_SUPPORT_SYNC_H__ */ diff --git a/include/grpc/support/sync_generic.h b/include/grpc/support/sync_generic.h index 0c8a9924395..1a595e7ffc0 100644 --- a/include/grpc/support/sync_generic.h +++ b/include/grpc/support/sync_generic.h @@ -52,4 +52,4 @@ typedef struct { gpr_atm value; } gpr_stats_counter; #define GPR_STATS_INIT \ { 0 } -#endif /* __GRPC_SUPPORT_SYNC_GENERIC_H__ */ +#endif /* __GRPC_SUPPORT_SYNC_GENERIC_H__ */ diff --git a/include/grpc/support/sync_posix.h b/include/grpc/support/sync_posix.h index 6787695cfb2..d51c268dc98 100644 --- a/include/grpc/support/sync_posix.h +++ b/include/grpc/support/sync_posix.h @@ -45,4 +45,4 @@ typedef pthread_once_t gpr_once; #define GPR_ONCE_INIT PTHREAD_ONCE_INIT -#endif /* __GRPC_SUPPORT_SYNC_POSIX_H__ */ +#endif /* __GRPC_SUPPORT_SYNC_POSIX_H__ */ diff --git a/include/grpc/support/sync_win32.h b/include/grpc/support/sync_win32.h index b3230dcc0df..6e256663501 100644 --- a/include/grpc/support/sync_win32.h +++ b/include/grpc/support/sync_win32.h @@ -49,4 +49,4 @@ typedef CONDITION_VARIABLE gpr_cv; typedef INIT_ONCE gpr_once; #define GPR_ONCE_INIT INIT_ONCE_STATIC_INIT -#endif /* __GRPC_SUPPORT_SYNC_WIN32_H__ */ +#endif /* __GRPC_SUPPORT_SYNC_WIN32_H__ */ diff --git a/include/grpc/support/thd.h b/include/grpc/support/thd.h index 18a1e80d06c..91e0c9f16f5 100644 --- a/include/grpc/support/thd.h +++ b/include/grpc/support/thd.h @@ -76,4 +76,4 @@ gpr_thd_options gpr_thd_options_default(void); } #endif -#endif /* __GRPC_SUPPORT_THD_H__ */ +#endif /* __GRPC_SUPPORT_THD_H__ */ diff --git a/include/grpc/support/thd_posix.h b/include/grpc/support/thd_posix.h index 3cfa5124027..b688e45bc54 100644 --- a/include/grpc/support/thd_posix.h +++ b/include/grpc/support/thd_posix.h @@ -39,4 +39,4 @@ typedef pthread_t gpr_thd_id; -#endif /* __GRPC_SUPPORT_THD_POSIX_H__ */ +#endif /* __GRPC_SUPPORT_THD_POSIX_H__ */ diff --git a/include/grpc/support/thd_win32.h b/include/grpc/support/thd_win32.h index 6fa576e4a4f..b4ab3c7271f 100644 --- a/include/grpc/support/thd_win32.h +++ b/include/grpc/support/thd_win32.h @@ -41,4 +41,4 @@ typedef int gpr_thd_id; -#endif /* __GRPC_SUPPORT_THD_WIN32_H__ */ +#endif /* __GRPC_SUPPORT_THD_WIN32_H__ */ diff --git a/include/grpc/support/time.h b/include/grpc/support/time.h index d5ab9f53052..6327a2cffb6 100644 --- a/include/grpc/support/time.h +++ b/include/grpc/support/time.h @@ -113,4 +113,4 @@ double gpr_timespec_to_micros(gpr_timespec t); } #endif -#endif /* __GRPC_SUPPORT_TIME_H__ */ +#endif /* __GRPC_SUPPORT_TIME_H__ */ diff --git a/include/grpc/support/time_posix.h b/include/grpc/support/time_posix.h index 72ebf5f3fd1..9ff6f7f4933 100644 --- a/include/grpc/support/time_posix.h +++ b/include/grpc/support/time_posix.h @@ -40,4 +40,4 @@ typedef struct timespec gpr_timespec; -#endif /* __GRPC_SUPPORT_TIME_POSIX_H__ */ +#endif /* __GRPC_SUPPORT_TIME_POSIX_H__ */ diff --git a/include/grpc/support/time_win32.h b/include/grpc/support/time_win32.h index 2450550bd6a..e62ad64b8f5 100644 --- a/include/grpc/support/time_win32.h +++ b/include/grpc/support/time_win32.h @@ -43,4 +43,4 @@ typedef struct gpr_timespec { long tv_nsec; } gpr_timespec; -#endif /* __GRPC_SUPPORT_TIME_WIN32_H__ */ +#endif /* __GRPC_SUPPORT_TIME_WIN32_H__ */ diff --git a/include/grpc/support/useful.h b/include/grpc/support/useful.h index c44d8e05a16..c451e9cc83d 100644 --- a/include/grpc/support/useful.h +++ b/include/grpc/support/useful.h @@ -45,4 +45,4 @@ #define GPR_ARRAY_SIZE(array) (sizeof(array) / sizeof(*(array))) -#endif /* __GRPC_SUPPORT_USEFUL_H__ */ +#endif /* __GRPC_SUPPORT_USEFUL_H__ */ diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index 43a04be931d..8724f97e8be 100644 --- a/src/compiler/cpp_generator.cc +++ b/src/compiler/cpp_generator.cc @@ -31,6 +31,9 @@ * */ +#include +#include + #include "src/compiler/cpp_generator.h" #include "src/compiler/cpp_generator_helpers.h" @@ -42,26 +45,23 @@ namespace grpc_cpp_generator { namespace { -bool NoStreaming(const google::protobuf::MethodDescriptor* method) { - return !method->client_streaming() && - !method->server_streaming(); +bool NoStreaming(const google::protobuf::MethodDescriptor *method) { + return !method->client_streaming() && !method->server_streaming(); } -bool ClientOnlyStreaming(const google::protobuf::MethodDescriptor* method) { - return method->client_streaming() && - !method->server_streaming(); +bool ClientOnlyStreaming(const google::protobuf::MethodDescriptor *method) { + return method->client_streaming() && !method->server_streaming(); } -bool ServerOnlyStreaming(const google::protobuf::MethodDescriptor* method) { +bool ServerOnlyStreaming(const google::protobuf::MethodDescriptor *method) { return !method->client_streaming() && method->server_streaming(); } -bool BidiStreaming(const google::protobuf::MethodDescriptor* method) { - return method->client_streaming() && - method->server_streaming(); +bool BidiStreaming(const google::protobuf::MethodDescriptor *method) { + return method->client_streaming() && method->server_streaming(); } -bool HasClientOnlyStreaming(const google::protobuf::FileDescriptor* file) { +bool HasClientOnlyStreaming(const google::protobuf::FileDescriptor *file) { for (int i = 0; i < file->service_count(); i++) { for (int j = 0; j < file->service(i)->method_count(); j++) { if (ClientOnlyStreaming(file->service(i)->method(j))) { @@ -72,7 +72,7 @@ bool HasClientOnlyStreaming(const google::protobuf::FileDescriptor* file) { return false; } -bool HasServerOnlyStreaming(const google::protobuf::FileDescriptor* file) { +bool HasServerOnlyStreaming(const google::protobuf::FileDescriptor *file) { for (int i = 0; i < file->service_count(); i++) { for (int j = 0; j < file->service(i)->method_count(); j++) { if (ServerOnlyStreaming(file->service(i)->method(j))) { @@ -83,7 +83,7 @@ bool HasServerOnlyStreaming(const google::protobuf::FileDescriptor* file) { return false; } -bool HasBidiStreaming(const google::protobuf::FileDescriptor* file) { +bool HasBidiStreaming(const google::protobuf::FileDescriptor *file) { for (int i = 0; i < file->service_count(); i++) { for (int j = 0; j < file->service(i)->method_count(); j++) { if (BidiStreaming(file->service(i)->method(j))) { @@ -95,8 +95,8 @@ bool HasBidiStreaming(const google::protobuf::FileDescriptor* file) { } } // namespace -string GetHeaderIncludes(const google::protobuf::FileDescriptor* file) { - string temp = +std::string GetHeaderIncludes(const google::protobuf::FileDescriptor *file) { + std::string temp = "#include \"grpc++/impl/internal_stub.h\"\n" "#include \"grpc++/status.h\"\n" "\n" @@ -124,16 +124,16 @@ string GetHeaderIncludes(const google::protobuf::FileDescriptor* file) { return temp; } -string GetSourceIncludes() { +std::string GetSourceIncludes() { return "#include \"grpc++/channel_interface.h\"\n" "#include \"grpc++/impl/rpc_method.h\"\n" "#include \"grpc++/impl/rpc_service_method.h\"\n" "#include \"grpc++/stream.h\"\n"; } -void PrintHeaderClientMethod(google::protobuf::io::Printer* printer, - const google::protobuf::MethodDescriptor* method, - map* vars) { +void PrintHeaderClientMethod(google::protobuf::io::Printer *printer, + const google::protobuf::MethodDescriptor *method, + std::map *vars) { (*vars)["Method"] = method->name(); (*vars)["Request"] = grpc_cpp_generator::ClassName(method->input_type(), true); @@ -146,23 +146,23 @@ void PrintHeaderClientMethod(google::protobuf::io::Printer* printer, } else if (ClientOnlyStreaming(method)) { printer->Print( *vars, - "::grpc::ClientWriter<$Request$>* $Method$(" + "::grpc::ClientWriter< $Request$>* $Method$(" "::grpc::ClientContext* context, $Response$* response);\n\n"); } else if (ServerOnlyStreaming(method)) { printer->Print( *vars, - "::grpc::ClientReader<$Response$>* $Method$(" + "::grpc::ClientReader< $Response$>* $Method$(" "::grpc::ClientContext* context, const $Request$* request);\n\n"); } else if (BidiStreaming(method)) { printer->Print(*vars, - "::grpc::ClientReaderWriter<$Request$, $Response$>* " + "::grpc::ClientReaderWriter< $Request$, $Response$>* " "$Method$(::grpc::ClientContext* context);\n\n"); } } -void PrintHeaderServerMethod(google::protobuf::io::Printer* printer, - const google::protobuf::MethodDescriptor* method, - map* vars) { +void PrintHeaderServerMethod(google::protobuf::io::Printer *printer, + const google::protobuf::MethodDescriptor *method, + std::map *vars) { (*vars)["Method"] = method->name(); (*vars)["Request"] = grpc_cpp_generator::ClassName(method->input_type(), true); @@ -177,25 +177,26 @@ void PrintHeaderServerMethod(google::protobuf::io::Printer* printer, printer->Print(*vars, "virtual ::grpc::Status $Method$(" "::grpc::ServerContext* context, " - "::grpc::ServerReader<$Request$>* reader, " + "::grpc::ServerReader< $Request$>* reader, " "$Response$* response);\n"); } else if (ServerOnlyStreaming(method)) { printer->Print(*vars, "virtual ::grpc::Status $Method$(" "::grpc::ServerContext* context, const $Request$* request, " - "::grpc::ServerWriter<$Response$>* writer);\n"); + "::grpc::ServerWriter< $Response$>* writer);\n"); } else if (BidiStreaming(method)) { - printer->Print(*vars, - "virtual ::grpc::Status $Method$(" - "::grpc::ServerContext* context, " - "::grpc::ServerReaderWriter<$Response$, $Request$>* stream);" - "\n"); + printer->Print( + *vars, + "virtual ::grpc::Status $Method$(" + "::grpc::ServerContext* context, " + "::grpc::ServerReaderWriter< $Response$, $Request$>* stream);" + "\n"); } } -void PrintHeaderService(google::protobuf::io::Printer* printer, - const google::protobuf::ServiceDescriptor* service, - map* vars) { +void PrintHeaderService(google::protobuf::io::Printer *printer, + const google::protobuf::ServiceDescriptor *service, + std::map *vars) { (*vars)["Service"] = service->name(); printer->Print(*vars, @@ -204,8 +205,9 @@ void PrintHeaderService(google::protobuf::io::Printer* printer, printer->Indent(); // Client side - printer->Print("class Stub : public ::grpc::InternalStub {\n" - " public:\n"); + printer->Print( + "class Stub : public ::grpc::InternalStub {\n" + " public:\n"); printer->Indent(); for (int i = 0; i < service->method_count(); ++i) { PrintHeaderClientMethod(printer, service->method(i), vars); @@ -213,14 +215,15 @@ void PrintHeaderService(google::protobuf::io::Printer* printer, printer->Outdent(); printer->Print("};\n"); printer->Print( - "static Stub* NewStub(const std::shared_ptr<::grpc::ChannelInterface>& " + "static Stub* NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& " "channel);\n"); printer->Print("\n"); // Server side - printer->Print("class Service {\n" - " public:\n"); + printer->Print( + "class Service {\n" + " public:\n"); printer->Indent(); printer->Print("Service() : service_(nullptr) {}\n"); printer->Print("virtual ~Service();\n"); @@ -229,19 +232,20 @@ void PrintHeaderService(google::protobuf::io::Printer* printer, } printer->Print("::grpc::RpcService* service();\n"); printer->Outdent(); - printer->Print(" private:\n" - " ::grpc::RpcService* service_;\n"); + printer->Print( + " private:\n" + " ::grpc::RpcService* service_;\n"); printer->Print("};\n"); printer->Outdent(); printer->Print("};\n"); } -string GetHeaderServices(const google::protobuf::FileDescriptor* file) { - string output; +std::string GetHeaderServices(const google::protobuf::FileDescriptor *file) { + std::string output; google::protobuf::io::StringOutputStream output_stream(&output); google::protobuf::io::Printer printer(&output_stream, '$'); - map vars; + std::map vars; for (int i = 0; i < file->service_count(); ++i) { PrintHeaderService(&printer, file->service(i), &vars); @@ -250,9 +254,9 @@ string GetHeaderServices(const google::protobuf::FileDescriptor* file) { return output; } -void PrintSourceClientMethod(google::protobuf::io::Printer* printer, - const google::protobuf::MethodDescriptor* method, - map* vars) { +void PrintSourceClientMethod(google::protobuf::io::Printer *printer, + const google::protobuf::MethodDescriptor *method, + std::map *vars) { (*vars)["Method"] = method->name(); (*vars)["Request"] = grpc_cpp_generator::ClassName(method->input_type(), true); @@ -269,11 +273,12 @@ void PrintSourceClientMethod(google::protobuf::io::Printer* printer, "context, request, response);\n" "}\n\n"); } else if (ClientOnlyStreaming(method)) { + printer->Print( + *vars, + "::grpc::ClientWriter< $Request$>* $Service$::Stub::$Method$(" + "::grpc::ClientContext* context, $Response$* response) {\n"); printer->Print(*vars, - "::grpc::ClientWriter<$Request$>* $Service$::Stub::$Method$(" - "::grpc::ClientContext* context, $Response$* response) {\n"); - printer->Print(*vars, - " return new ::grpc::ClientWriter<$Request$>(" + " return new ::grpc::ClientWriter< $Request$>(" "channel()->CreateStream(" "::grpc::RpcMethod(\"/$Package$$Service$/$Method$\", " "::grpc::RpcMethod::RpcType::CLIENT_STREAMING), " @@ -282,10 +287,10 @@ void PrintSourceClientMethod(google::protobuf::io::Printer* printer, } else if (ServerOnlyStreaming(method)) { printer->Print( *vars, - "::grpc::ClientReader<$Response$>* $Service$::Stub::$Method$(" + "::grpc::ClientReader< $Response$>* $Service$::Stub::$Method$(" "::grpc::ClientContext* context, const $Request$* request) {\n"); printer->Print(*vars, - " return new ::grpc::ClientReader<$Response$>(" + " return new ::grpc::ClientReader< $Response$>(" "channel()->CreateStream(" "::grpc::RpcMethod(\"/$Package$$Service$/$Method$\", " "::grpc::RpcMethod::RpcType::SERVER_STREAMING), " @@ -294,11 +299,11 @@ void PrintSourceClientMethod(google::protobuf::io::Printer* printer, } else if (BidiStreaming(method)) { printer->Print( *vars, - "::grpc::ClientReaderWriter<$Request$, $Response$>* " + "::grpc::ClientReaderWriter< $Request$, $Response$>* " "$Service$::Stub::$Method$(::grpc::ClientContext* context) {\n"); printer->Print( *vars, - " return new ::grpc::ClientReaderWriter<$Request$, $Response$>(" + " return new ::grpc::ClientReaderWriter< $Request$, $Response$>(" "channel()->CreateStream(" "::grpc::RpcMethod(\"/$Package$$Service$/$Method$\", " "::grpc::RpcMethod::RpcType::BIDI_STREAMING), " @@ -307,9 +312,9 @@ void PrintSourceClientMethod(google::protobuf::io::Printer* printer, } } -void PrintSourceServerMethod(google::protobuf::io::Printer* printer, - const google::protobuf::MethodDescriptor* method, - map* vars) { +void PrintSourceServerMethod(google::protobuf::io::Printer *printer, + const google::protobuf::MethodDescriptor *method, + std::map *vars) { (*vars)["Method"] = method->name(); (*vars)["Request"] = grpc_cpp_generator::ClassName(method->input_type(), true); @@ -328,7 +333,7 @@ void PrintSourceServerMethod(google::protobuf::io::Printer* printer, printer->Print(*vars, "::grpc::Status $Service$::Service::$Method$(" "::grpc::ServerContext* context, " - "::grpc::ServerReader<$Request$>* reader, " + "::grpc::ServerReader< $Request$>* reader, " "$Response$* response) {\n"); printer->Print( " return ::grpc::Status(" @@ -339,7 +344,7 @@ void PrintSourceServerMethod(google::protobuf::io::Printer* printer, "::grpc::Status $Service$::Service::$Method$(" "::grpc::ServerContext* context, " "const $Request$* request, " - "::grpc::ServerWriter<$Response$>* writer) {\n"); + "::grpc::ServerWriter< $Response$>* writer) {\n"); printer->Print( " return ::grpc::Status(" "::grpc::StatusCode::UNIMPLEMENTED);\n"); @@ -348,7 +353,7 @@ void PrintSourceServerMethod(google::protobuf::io::Printer* printer, printer->Print(*vars, "::grpc::Status $Service$::Service::$Method$(" "::grpc::ServerContext* context, " - "::grpc::ServerReaderWriter<$Response$, $Request$>* " + "::grpc::ServerReaderWriter< $Response$, $Request$>* " "stream) {\n"); printer->Print( " return ::grpc::Status(" @@ -357,13 +362,14 @@ void PrintSourceServerMethod(google::protobuf::io::Printer* printer, } } -void PrintSourceService(google::protobuf::io::Printer* printer, - const google::protobuf::ServiceDescriptor* service, - map* vars) { +void PrintSourceService(google::protobuf::io::Printer *printer, + const google::protobuf::ServiceDescriptor *service, + std::map *vars) { (*vars)["Service"] = service->name(); - printer->Print(*vars, + printer->Print( + *vars, "$Service$::Stub* $Service$::NewStub(" - "const std::shared_ptr<::grpc::ChannelInterface>& channel) {\n" + "const std::shared_ptr< ::grpc::ChannelInterface>& channel) {\n" " $Service$::Stub* stub = new $Service$::Stub();\n" " stub->set_channel(channel);\n" " return stub;\n" @@ -380,14 +386,15 @@ void PrintSourceService(google::protobuf::io::Printer* printer, PrintSourceServerMethod(printer, service->method(i), vars); } printer->Print(*vars, - "::grpc::RpcService* $Service$::Service::service() {\n"); + "::grpc::RpcService* $Service$::Service::service() {\n"); printer->Indent(); - printer->Print("if (service_ != nullptr) {\n" - " return service_;\n" - "}\n"); + printer->Print( + "if (service_ != nullptr) {\n" + " return service_;\n" + "}\n"); printer->Print("service_ = new ::grpc::RpcService();\n"); for (int i = 0; i < service->method_count(); ++i) { - const google::protobuf::MethodDescriptor* method = service->method(i); + const google::protobuf::MethodDescriptor *method = service->method(i); (*vars)["Method"] = method->name(); (*vars)["Request"] = grpc_cpp_generator::ClassName(method->input_type(), true); @@ -399,9 +406,9 @@ void PrintSourceService(google::protobuf::io::Printer* printer, "service_->AddMethod(new ::grpc::RpcServiceMethod(\n" " \"/$Package$$Service$/$Method$\",\n" " ::grpc::RpcMethod::NORMAL_RPC,\n" - " new ::grpc::RpcMethodHandler<$Service$::Service, $Request$, " + " new ::grpc::RpcMethodHandler< $Service$::Service, $Request$, " "$Response$>(\n" - " std::function<::grpc::Status($Service$::Service*, " + " std::function< ::grpc::Status($Service$::Service*, " "::grpc::ServerContext*, const $Request$*, $Response$*)>(" "&$Service$::Service::$Method$), this),\n" " new $Request$, new $Response$));\n"); @@ -411,11 +418,11 @@ void PrintSourceService(google::protobuf::io::Printer* printer, "service_->AddMethod(new ::grpc::RpcServiceMethod(\n" " \"/$Package$$Service$/$Method$\",\n" " ::grpc::RpcMethod::CLIENT_STREAMING,\n" - " new ::grpc::ClientStreamingHandler<" + " new ::grpc::ClientStreamingHandler< " "$Service$::Service, $Request$, $Response$>(\n" - " std::function<::grpc::Status($Service$::Service*, " + " std::function< ::grpc::Status($Service$::Service*, " "::grpc::ServerContext*, " - "::grpc::ServerReader<$Request$>*, $Response$*)>(" + "::grpc::ServerReader< $Request$>*, $Response$*)>(" "&$Service$::Service::$Method$), this),\n" " new $Request$, new $Response$));\n"); } else if (ServerOnlyStreaming(method)) { @@ -424,11 +431,11 @@ void PrintSourceService(google::protobuf::io::Printer* printer, "service_->AddMethod(new ::grpc::RpcServiceMethod(\n" " \"/$Package$$Service$/$Method$\",\n" " ::grpc::RpcMethod::SERVER_STREAMING,\n" - " new ::grpc::ServerStreamingHandler<" + " new ::grpc::ServerStreamingHandler< " "$Service$::Service, $Request$, $Response$>(\n" - " std::function<::grpc::Status($Service$::Service*, " + " std::function< ::grpc::Status($Service$::Service*, " "::grpc::ServerContext*, " - "const $Request$*, ::grpc::ServerWriter<$Response$>*)>(" + "const $Request$*, ::grpc::ServerWriter< $Response$>*)>(" "&$Service$::Service::$Method$), this),\n" " new $Request$, new $Response$));\n"); } else if (BidiStreaming(method)) { @@ -437,11 +444,11 @@ void PrintSourceService(google::protobuf::io::Printer* printer, "service_->AddMethod(new ::grpc::RpcServiceMethod(\n" " \"/$Package$$Service$/$Method$\",\n" " ::grpc::RpcMethod::BIDI_STREAMING,\n" - " new ::grpc::BidiStreamingHandler<" + " new ::grpc::BidiStreamingHandler< " "$Service$::Service, $Request$, $Response$>(\n" - " std::function<::grpc::Status($Service$::Service*, " + " std::function< ::grpc::Status($Service$::Service*, " "::grpc::ServerContext*, " - "::grpc::ServerReaderWriter<$Response$, $Request$>*)>(" + "::grpc::ServerReaderWriter< $Response$, $Request$>*)>(" "&$Service$::Service::$Method$), this),\n" " new $Request$, new $Response$));\n"); } @@ -451,11 +458,11 @@ void PrintSourceService(google::protobuf::io::Printer* printer, printer->Print("}\n\n"); } -string GetSourceServices(const google::protobuf::FileDescriptor* file) { - string output; +std::string GetSourceServices(const google::protobuf::FileDescriptor *file) { + std::string output; google::protobuf::io::StringOutputStream output_stream(&output); google::protobuf::io::Printer printer(&output_stream, '$'); - map vars; + std::map vars; // Package string is empty or ends with a dot. It is used to fully qualify // method names. vars["Package"] = file->package(); diff --git a/src/compiler/cpp_generator.h b/src/compiler/cpp_generator.h index 8bd785f13e8..fe84d08b4c8 100644 --- a/src/compiler/cpp_generator.h +++ b/src/compiler/cpp_generator.h @@ -42,21 +42,19 @@ class FileDescriptor; } // namespace protobuf } // namespace google -using namespace std; - namespace grpc_cpp_generator { // Return the includes needed for generated header file. -string GetHeaderIncludes(const google::protobuf::FileDescriptor* file); +std::string GetHeaderIncludes(const google::protobuf::FileDescriptor *file); // Return the includes needed for generated source file. -string GetSourceIncludes(); +std::string GetSourceIncludes(); // Return the services for generated header file. -string GetHeaderServices(const google::protobuf::FileDescriptor* file); +std::string GetHeaderServices(const google::protobuf::FileDescriptor *file); // Return the services for generated source file. -string GetSourceServices(const google::protobuf::FileDescriptor* file); +std::string GetSourceServices(const google::protobuf::FileDescriptor *file); } // namespace grpc_cpp_generator diff --git a/src/compiler/cpp_generator_helpers.h b/src/compiler/cpp_generator_helpers.h index 8d8b03ea432..54c343866fc 100644 --- a/src/compiler/cpp_generator_helpers.h +++ b/src/compiler/cpp_generator_helpers.h @@ -39,14 +39,12 @@ #include #include -using namespace std; - namespace grpc_cpp_generator { -inline bool StripSuffix(string* filename, const string& suffix) { +inline bool StripSuffix(std::string *filename, const std::string &suffix) { if (filename->length() >= suffix.length()) { size_t suffix_pos = filename->length() - suffix.length(); - if (filename->compare(suffix_pos, string::npos, suffix) == 0) { + if (filename->compare(suffix_pos, std::string::npos, suffix) == 0) { filename->resize(filename->size() - suffix.size()); return true; } @@ -55,19 +53,20 @@ inline bool StripSuffix(string* filename, const string& suffix) { return false; } -inline string StripProto(string filename) { +inline std::string StripProto(std::string filename) { if (!StripSuffix(&filename, ".protodevel")) { StripSuffix(&filename, ".proto"); } return filename; } -inline string StringReplace(string str, const string& from, const string& to) { +inline std::string StringReplace(std::string str, const std::string &from, + const std::string &to) { size_t pos = 0; for (;;) { pos = str.find(from, pos); - if (pos == string::npos) { + if (pos == std::string::npos) { break; } str.replace(pos, from.length(), to); @@ -77,22 +76,23 @@ inline string StringReplace(string str, const string& from, const string& to) { return str; } -inline string DotsToColons(const string& name) { +inline std::string DotsToColons(const std::string &name) { return StringReplace(name, ".", "::"); } -inline string DotsToUnderscores(const string& name) { +inline std::string DotsToUnderscores(const std::string &name) { return StringReplace(name, ".", "_"); } -inline string ClassName(const google::protobuf::Descriptor* descriptor, bool qualified) { +inline std::string ClassName(const google::protobuf::Descriptor *descriptor, + bool qualified) { // Find "outer", the descriptor of the top-level message in which // "descriptor" is embedded. - const google::protobuf::Descriptor* outer = descriptor; + const google::protobuf::Descriptor *outer = descriptor; while (outer->containing_type() != NULL) outer = outer->containing_type(); - const string& outer_name = outer->full_name(); - string inner_name = descriptor->full_name().substr(outer_name.size()); + const std::string &outer_name = outer->full_name(); + std::string inner_name = descriptor->full_name().substr(outer_name.size()); if (qualified) { return "::" + DotsToColons(outer_name) + DotsToUnderscores(inner_name); diff --git a/src/compiler/cpp_plugin.cc b/src/compiler/cpp_plugin.cc index 7aa745a4f17..a7fdb1f093f 100644 --- a/src/compiler/cpp_plugin.cc +++ b/src/compiler/cpp_plugin.cc @@ -35,6 +35,8 @@ // #include +#include + #include "src/compiler/cpp_generator.h" #include "src/compiler/cpp_generator_helpers.h" #include @@ -49,18 +51,19 @@ class CppGrpcGenerator : public google::protobuf::compiler::CodeGenerator { CppGrpcGenerator() {} virtual ~CppGrpcGenerator() {} - virtual bool Generate(const google::protobuf::FileDescriptor* file, - const string& parameter, - google::protobuf::compiler::GeneratorContext* context, - string* error) const { + virtual bool Generate(const google::protobuf::FileDescriptor *file, + const std::string ¶meter, + google::protobuf::compiler::GeneratorContext *context, + std::string *error) const { if (file->options().cc_generic_services()) { - *error = "cpp grpc proto compiler plugin does not work with generic " - "services. To generate cpp grpc APIs, please set \"" - "cc_generic_service = false\"."; + *error = + "cpp grpc proto compiler plugin does not work with generic " + "services. To generate cpp grpc APIs, please set \"" + "cc_generic_service = false\"."; return false; } - string file_name = grpc_cpp_generator::StripProto(file->name()); + std::string file_name = grpc_cpp_generator::StripProto(file->name()); // Generate .pb.h Insert(context, file_name + ".pb.h", "includes", @@ -78,9 +81,9 @@ class CppGrpcGenerator : public google::protobuf::compiler::CodeGenerator { private: // Insert the given code into the given file at the given insertion point. - void Insert(google::protobuf::compiler::GeneratorContext* context, - const string& filename, const string& insertion_point, - const string& code) const { + void Insert(google::protobuf::compiler::GeneratorContext *context, + const std::string &filename, const std::string &insertion_point, + const std::string &code) const { std::unique_ptr output( context->OpenForInsert(filename, insertion_point)); google::protobuf::io::CodedOutputStream coded_out(output.get()); @@ -88,7 +91,7 @@ class CppGrpcGenerator : public google::protobuf::compiler::CodeGenerator { } }; -int main(int argc, char* argv[]) { +int main(int argc, char *argv[]) { CppGrpcGenerator generator; return google::protobuf::compiler::PluginMain(argc, argv, &generator); } diff --git a/src/compiler/go_generator.cc b/src/compiler/go_generator.cc deleted file mode 100644 index 8beae8dcccf..00000000000 --- a/src/compiler/go_generator.cc +++ /dev/null @@ -1,520 +0,0 @@ -/* - * - * Copyright 2014, 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. - * - */ - -using namespace std; - -#include "src/compiler/go_generator.h" - -#include - -#include -#include -#include -#include - -namespace grpc_go_generator { - -bool NoStreaming(const google::protobuf::MethodDescriptor* method) { - return !method->client_streaming() && - !method->server_streaming(); -} - -bool ClientOnlyStreaming(const google::protobuf::MethodDescriptor* method) { - return method->client_streaming() && - !method->server_streaming(); -} - -bool ServerOnlyStreaming(const google::protobuf::MethodDescriptor* method) { - return !method->client_streaming() && - method->server_streaming(); -} - -bool BidiStreaming(const google::protobuf::MethodDescriptor* method) { - return method->client_streaming() && - method->server_streaming(); -} - -bool HasClientOnlyStreaming(const google::protobuf::FileDescriptor* file) { - for (int i = 0; i < file->service_count(); i++) { - for (int j = 0; j < file->service(i)->method_count(); j++) { - if (ClientOnlyStreaming(file->service(i)->method(j))) { - return true; - } - } - } - return false; -} - -string LowerCaseService(const string& service) { - string ret = service; - if (!ret.empty() && ret[0] >= 'A' && ret[0] <= 'Z') { - ret[0] = ret[0] - 'A' + 'a'; - } - return ret; -} - -void PrintClientMethodDef(google::protobuf::io::Printer* printer, - const google::protobuf::MethodDescriptor* method, - map* vars) { - (*vars)["Method"] = method->name(); - (*vars)["Request"] = method->input_type()->name(); - (*vars)["Response"] = method->output_type()->name(); - if (NoStreaming(method)) { - printer->Print(*vars, - "\t$Method$(ctx context.Context, in *$Request$, opts ...rpc.CallOption) " - "(*$Response$, error)\n"); - } else if (BidiStreaming(method)) { - printer->Print(*vars, - "\t$Method$(ctx context.Context, opts ...rpc.CallOption) " - "($Service$_$Method$Client, error)\n"); - } else if (ServerOnlyStreaming(method)) { - printer->Print(*vars, - "\t$Method$(ctx context.Context, m *$Request$, opts ...rpc.CallOption) " - "($Service$_$Method$Client, error)\n"); - } else if (ClientOnlyStreaming(method)) { - printer->Print(*vars, - "\t$Method$(ctx context.Context, opts ...rpc.CallOption) " - "($Service$_$Method$Client, error)\n"); - } -} - -void PrintClientMethodImpl(google::protobuf::io::Printer* printer, - const google::protobuf::MethodDescriptor* method, - map* vars) { - (*vars)["Method"] = method->name(); - (*vars)["Request"] = method->input_type()->name(); - (*vars)["Response"] = method->output_type()->name(); - - if (NoStreaming(method)) { - printer->Print(*vars, - "func (c *$ServiceStruct$Client) $Method$(ctx context.Context, " - "in *$Request$, opts ...rpc.CallOption) (*$Response$, error) {\n"); - printer->Print(*vars, - "\tout := new($Response$)\n"); - printer->Print(*vars, - "\terr := rpc.Invoke(ctx, \"/$Package$$Service$/$Method$\", " - "in, out, c.cc, opts...)\n"); - printer->Print("\tif err != nil {\n"); - printer->Print("\t\treturn nil, err\n"); - printer->Print("\t}\n"); - printer->Print("\treturn out, nil\n"); - printer->Print("}\n\n"); - } else if (BidiStreaming(method)) { - printer->Print( - *vars, - "func (c *$ServiceStruct$Client) $Method$(ctx context.Context, opts " - "...rpc.CallOption) ($Service$_$Method$Client, error) {\n" - "\tstream, err := rpc.NewClientStream(ctx, c.cc, " - "\"/$Package$$Service$/$Method$\", opts...)\n" - "\tif err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\treturn &$ServiceStruct$$Method$Client{stream}, nil\n" - "}\n\n"); - printer->Print(*vars, - "type $Service$_$Method$Client interface {\n" - "\tSend(*$Request$) error\n" - "\tRecv() (*$Response$, error)\n" - "\trpc.ClientStream\n" - "}\n\n"); - printer->Print(*vars, - "type $ServiceStruct$$Method$Client struct {\n" - "\trpc.ClientStream\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Client) Send(m *$Request$) error {\n" - "\treturn x.ClientStream.SendProto(m)\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Client) Recv() (*$Response$, error) " - "{\n" - "\tm := new($Response$)\n" - "\tif err := x.ClientStream.RecvProto(m); err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\treturn m, nil\n" - "}\n\n"); - } else if (ServerOnlyStreaming(method)) { - printer->Print( - *vars, - "func (c *$ServiceStruct$Client) $Method$(ctx context.Context, m " - "*$Request$, " - "opts ...rpc.CallOption) ($Service$_$Method$Client, error) {\n" - "\tstream, err := rpc.NewClientStream(ctx, c.cc, " - "\"/$Package$$Service$/$Method$\", opts...)\n" - "\tif err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\tx := &$ServiceStruct$$Method$Client{stream}\n" - "\tif err := x.ClientStream.SendProto(m); err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\tif err := x.ClientStream.CloseSend(); err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\treturn x, nil\n" - "}\n\n"); - printer->Print(*vars, - "type $Service$_$Method$Client interface {\n" - "\tRecv() (*$Response$, error)\n" - "\trpc.ClientStream\n" - "}\n\n"); - printer->Print(*vars, - "type $ServiceStruct$$Method$Client struct {\n" - "\trpc.ClientStream\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Client) Recv() (*$Response$, error) " - "{\n" - "\tm := new($Response$)\n" - "\tif err := x.ClientStream.RecvProto(m); err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\treturn m, nil\n" - "}\n\n"); - } else if (ClientOnlyStreaming(method)) { - printer->Print( - *vars, - "func (c *$ServiceStruct$Client) $Method$(ctx context.Context, opts " - "...rpc.CallOption) ($Service$_$Method$Client, error) {\n" - "\tstream, err := rpc.NewClientStream(ctx, c.cc, " - "\"/$Package$$Service$/$Method$\", opts...)\n" - "\tif err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\treturn &$ServiceStruct$$Method$Client{stream}, nil\n" - "}\n\n"); - printer->Print(*vars, - "type $Service$_$Method$Client interface {\n" - "\tSend(*$Request$) error\n" - "\tCloseAndRecv() (*$Response$, error)\n" - "\trpc.ClientStream\n" - "}\n\n"); - printer->Print(*vars, - "type $ServiceStruct$$Method$Client struct {\n" - "\trpc.ClientStream\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Client) Send(m *$Request$) error {\n" - "\treturn x.ClientStream.SendProto(m)\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Client) CloseAndRecv() (*$Response$, " - "error) {\n" - "\tif err := x.ClientStream.CloseSend(); err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\tm := new($Response$)\n" - "\tif err := x.ClientStream.RecvProto(m); err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\t// Read EOF.\n" - "\tif err := x.ClientStream.RecvProto(m); err == io.EOF {\n" - "\t\treturn m, io.EOF\n" - "\t}\n" - "\t// gRPC protocol violation.\n" - "\treturn m, fmt.Errorf(\"Violate gRPC client streaming protocol: no " - "EOF after the response.\")\n" - "}\n\n"); - } -} - -void PrintClient(google::protobuf::io::Printer* printer, - const google::protobuf::ServiceDescriptor* service, - map* vars) { - (*vars)["Service"] = service->name(); - (*vars)["ServiceStruct"] = LowerCaseService(service->name()); - printer->Print(*vars, "type $Service$Client interface {\n"); - for (int i = 0; i < service->method_count(); ++i) { - PrintClientMethodDef(printer, service->method(i), vars); - } - printer->Print("}\n\n"); - - printer->Print(*vars, - "type $ServiceStruct$Client struct {\n" - "\tcc *rpc.ClientConn\n" - "}\n\n"); - printer->Print(*vars, - "func New$Service$Client(cc *rpc.ClientConn) $Service$Client {\n" - "\treturn &$ServiceStruct$Client{cc}\n" - "}\n\n"); - for (int i = 0; i < service->method_count(); ++i) { - PrintClientMethodImpl(printer, service->method(i), vars); - } -} - -void PrintServerMethodDef(google::protobuf::io::Printer* printer, - const google::protobuf::MethodDescriptor* method, - map* vars) { - (*vars)["Method"] = method->name(); - (*vars)["Request"] = method->input_type()->name(); - (*vars)["Response"] = method->output_type()->name(); - if (NoStreaming(method)) { - printer->Print(*vars, - "\t$Method$(context.Context, *$Request$) (*$Response$, error)\n"); - } else if (BidiStreaming(method)) { - printer->Print(*vars, - "\t$Method$($Service$_$Method$Server) error\n"); - } else if (ServerOnlyStreaming(method)) { - printer->Print(*vars, - "\t$Method$(*$Request$, $Service$_$Method$Server) error\n"); - } else if (ClientOnlyStreaming(method)) { - printer->Print(*vars, - "\t$Method$($Service$_$Method$Server) error\n"); - } -} - -void PrintServerHandler(google::protobuf::io::Printer* printer, - const google::protobuf::MethodDescriptor* method, - map* vars) { - (*vars)["Method"] = method->name(); - (*vars)["Request"] = method->input_type()->name(); - (*vars)["Response"] = method->output_type()->name(); - if (NoStreaming(method)) { - printer->Print(*vars, - "func _$Service$_$Method$_Handler(srv interface{}, ctx context.Context," - " buf []byte) (proto.Message, error) {\n"); - printer->Print(*vars, - "\tin := new($Request$)\n"); - printer->Print("\tif err := proto.Unmarshal(buf, in); err != nil {\n"); - printer->Print("\t\treturn nil, err\n"); - printer->Print("\t}\n"); - printer->Print(*vars, - "\tout, err := srv.($Service$Server).$Method$(ctx, in)\n"); - printer->Print("\tif err != nil {\n"); - printer->Print("\t\treturn nil, err\n"); - printer->Print("\t}\n"); - printer->Print("\treturn out, nil\n"); - printer->Print("}\n\n"); - } else if (BidiStreaming(method)) { - printer->Print(*vars, - "func _$Service$_$Method$_Handler(srv interface{}, stream rpc.Stream) " - "error {\n" - "\treturn srv.($Service$Server).$Method$(&$ServiceStruct$$Method$Server" - "{stream})\n" - "}\n\n"); - printer->Print(*vars, - "type $Service$_$Method$Server interface {\n" - "\tSend(*$Response$) error\n" - "\tRecv() (*$Request$, error)\n" - "\trpc.Stream\n" - "}\n\n"); - printer->Print(*vars, - "type $ServiceStruct$$Method$Server struct {\n" - "\trpc.Stream\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Server) Send(m *$Response$) error {\n" - "\treturn x.Stream.SendProto(m)\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Server) Recv() (*$Request$, error) " - "{\n" - "\tm := new($Request$)\n" - "\tif err := x.Stream.RecvProto(m); err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\treturn m, nil\n" - "}\n\n"); - } else if (ServerOnlyStreaming(method)) { - printer->Print(*vars, - "func _$Service$_$Method$_Handler(srv interface{}, stream rpc.Stream) " - "error {\n" - "\tm := new($Request$)\n" - "\tif err := stream.RecvProto(m); err != nil {\n" - "\t\treturn err\n" - "\t}\n" - "\treturn srv.($Service$Server).$Method$(m, " - "&$ServiceStruct$$Method$Server{stream})\n" - "}\n\n"); - printer->Print(*vars, - "type $Service$_$Method$Server interface {\n" - "\tSend(*$Response$) error\n" - "\trpc.Stream\n" - "}\n\n"); - printer->Print(*vars, - "type $ServiceStruct$$Method$Server struct {\n" - "\trpc.Stream\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Server) Send(m *$Response$) error {\n" - "\treturn x.Stream.SendProto(m)\n" - "}\n\n"); - } else if (ClientOnlyStreaming(method)) { - printer->Print(*vars, - "func _$Service$_$Method$_Handler(srv interface{}, stream rpc.Stream) " - "error {\n" - "\treturn srv.($Service$Server).$Method$(&$ServiceStruct$$Method$Server" - "{stream})\n" - "}\n\n"); - printer->Print(*vars, - "type $Service$_$Method$Server interface {\n" - "\tSendAndClose(*$Response$) error\n" - "\tRecv() (*$Request$, error)\n" - "\trpc.Stream\n" - "}\n\n"); - printer->Print(*vars, - "type $ServiceStruct$$Method$Server struct {\n" - "\trpc.Stream\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Server) SendAndClose(m *$Response$) " - "error {\n" - "\tif err := x.Stream.SendProto(m); err != nil {\n" - "\t\treturn err\n" - "\t}\n" - "\treturn nil\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Server) Recv() (*$Request$, error) {\n" - "\tm := new($Request$)\n" - "\tif err := x.Stream.RecvProto(m); err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\treturn m, nil\n" - "}\n\n"); - } -} - -void PrintServerMethodDesc(google::protobuf::io::Printer* printer, - const google::protobuf::MethodDescriptor* method, - map* vars) { - (*vars)["Method"] = method->name(); - printer->Print("\t\t{\n"); - printer->Print(*vars, - "\t\t\tMethodName:\t\"$Method$\",\n"); - printer->Print(*vars, - "\t\t\tHandler:\t_$Service$_$Method$_Handler,\n"); - printer->Print("\t\t},\n"); -} - -void PrintServerStreamingMethodDesc(google::protobuf::io::Printer* printer, - const google::protobuf::MethodDescriptor* method, - map* vars) { - (*vars)["Method"] = method->name(); - printer->Print("\t\t{\n"); - printer->Print(*vars, - "\t\t\tStreamName:\t\"$Method$\",\n"); - printer->Print(*vars, - "\t\t\tHandler:\t_$Service$_$Method$_Handler,\n"); - printer->Print("\t\t},\n"); -} - -void PrintServer(google::protobuf::io::Printer* printer, - const google::protobuf::ServiceDescriptor* service, - map* vars) { - (*vars)["Service"] = service->name(); - printer->Print(*vars, "type $Service$Server interface {\n"); - for (int i = 0; i < service->method_count(); ++i) { - PrintServerMethodDef(printer, service->method(i), vars); - } - printer->Print("}\n\n"); - - printer->Print(*vars, - "func RegisterService(s *rpc.Server, srv $Service$Server) {\n" - "\ts.RegisterService(&_$Service$_serviceDesc, srv)\n" - "}\n\n"); - - for (int i = 0; i < service->method_count(); ++i) { - PrintServerHandler(printer, service->method(i), vars); - } - - printer->Print(*vars, - "var _$Service$_serviceDesc = rpc.ServiceDesc{\n" - "\tServiceName: \"$Package$$Service$\",\n" - "\tHandlerType: (*$Service$Server)(nil),\n" - "\tMethods: []rpc.MethodDesc{\n"); - for (int i = 0; i < service->method_count(); ++i) { - if (NoStreaming(service->method(i))) { - PrintServerMethodDesc(printer, service->method(i), vars); - } - } - printer->Print("\t},\n"); - - printer->Print("\tStreams: []rpc.StreamDesc{\n"); - for (int i = 0; i < service->method_count(); ++i) { - if (!NoStreaming(service->method(i))) { - PrintServerStreamingMethodDesc(printer, service->method(i), vars); - } - } - printer->Print("\t},\n" - "}\n\n"); -} - -std::string BadToUnderscore(std::string str) { - for (unsigned i = 0; i < str.size(); ++i) { - if (!std::isalnum(str[i])) { - str[i] = '_'; - } - } - return str; -} - -string GetServices(const google::protobuf::FileDescriptor* file) { - string output; - google::protobuf::io::StringOutputStream output_stream(&output); - google::protobuf::io::Printer printer(&output_stream, '$'); - map vars; - - string package_name = !file->options().go_package().empty() - ? file->options().go_package() - : file->package(); - vars["PackageName"] = BadToUnderscore(package_name); - printer.Print(vars, "package $PackageName$\n\n"); - printer.Print("import (\n"); - if (HasClientOnlyStreaming(file)) { - printer.Print("\t\"fmt\"\n" - "\t\"io\"\n"); - } - printer.Print( - "\t\"google/net/grpc/go/rpc\"\n" - "\tcontext \"google/third_party/golang/go_net/context/context\"\n" - "\tproto \"google/net/proto2/go/proto\"\n" - ")\n\n"); - - // $Package$ is used to fully qualify method names. - vars["Package"] = file->package(); - if (!file->package().empty()) { - vars["Package"].append("."); - } - - for (int i = 0; i < file->service_count(); ++i) { - PrintClient(&printer, file->service(0), &vars); - printer.Print("\n"); - PrintServer(&printer, file->service(0), &vars); - printer.Print("\n"); - } - return output; -} - -} // namespace grpc_go_generator diff --git a/src/compiler/go_plugin.cc b/src/compiler/go_plugin.cc deleted file mode 100644 index f941840815e..00000000000 --- a/src/compiler/go_plugin.cc +++ /dev/null @@ -1,83 +0,0 @@ -/* - * - * Copyright 2014, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -// Generates go gRPC service interface out of Protobuf IDL. -// -// This is a Proto2 compiler plugin. See net/proto2/compiler/proto/plugin.proto -// and net/proto2/compiler/public/plugin.h for more information on plugins. - -#include -#include - -using namespace std; - -#include "src/compiler/go_generator.h" -#include -#include -#include -#include -#include - -class GoGrpcGenerator : public google::protobuf::compiler::CodeGenerator { - public: - GoGrpcGenerator() {} - virtual ~GoGrpcGenerator() {} - - virtual bool Generate(const google::protobuf::FileDescriptor* file, - const string& parameter, - google::protobuf::compiler::GeneratorContext* context, - string* error) const { - // Get output file name. - string file_name; - if (file->name().size() > 6 && - file->name().find_last_of(".proto") == file->name().size() - 1) { - file_name = file->name().substr(0, file->name().size() - 6) + - "_grpc.pb.go"; - } else { - *error = "Invalid proto file name. Proto file must end with .proto"; - return false; - } - - std::unique_ptr output( - context->Open(file_name)); - google::protobuf::io::CodedOutputStream coded_out(output.get()); - string code = grpc_go_generator::GetServices(file); - coded_out.WriteRaw(code.data(), code.size()); - return true; - } -}; - -int main(int argc, char* argv[]) { - GoGrpcGenerator generator; - return google::protobuf::compiler::PluginMain(argc, argv, &generator); -} diff --git a/src/compiler/ruby_generator.cc b/src/compiler/ruby_generator.cc index 20485b47a5f..16632325dcb 100644 --- a/src/compiler/ruby_generator.cc +++ b/src/compiler/ruby_generator.cc @@ -32,6 +32,7 @@ */ #include +#include #include #include @@ -56,41 +57,40 @@ namespace grpc_ruby_generator { namespace { // Prints out the method using the ruby gRPC DSL. -void PrintMethod(const MethodDescriptor* method, const string& package, - Printer* out) { - string input_type = RubyTypeOf(method->input_type()->name(), package); +void PrintMethod(const MethodDescriptor *method, const std::string &package, + Printer *out) { + std::string input_type = RubyTypeOf(method->input_type()->name(), package); if (method->client_streaming()) { input_type = "stream(" + input_type + ")"; } - string output_type = RubyTypeOf(method->output_type()->name(), package); + std::string output_type = RubyTypeOf(method->output_type()->name(), package); if (method->server_streaming()) { output_type = "stream(" + output_type + ")"; } - map method_vars = ListToDict({ - "mth.name", method->name(), - "input.type", input_type, - "output.type", output_type, + std::map method_vars = ListToDict({ + "mth.name", method->name(), "input.type", input_type, "output.type", + output_type, }); out->Print(method_vars, "rpc :$mth.name$, $input.type$, $output.type$\n"); } // Prints out the service using the ruby gRPC DSL. -void PrintService(const ServiceDescriptor* service, const string& package, - Printer* out) { +void PrintService(const ServiceDescriptor *service, const std::string &package, + Printer *out) { if (service->method_count() == 0) { return; } // Begin the service module - map module_vars = ListToDict({ + std::map module_vars = ListToDict({ "module.name", CapitalizeFirst(service->name()), }); out->Print(module_vars, "module $module.name$\n"); out->Indent(); // TODO(temiola): add documentation - string doc = "TODO: add proto service documentation here"; - map template_vars = ListToDict({ + std::string doc = "TODO: add proto service documentation here"; + std::map template_vars = ListToDict({ "Documentation", doc, }); out->Print("\n"); @@ -104,9 +104,8 @@ void PrintService(const ServiceDescriptor* service, const string& package, out->Print("\n"); out->Print("self.marshal_class_method = :encode\n"); out->Print("self.unmarshal_class_method = :decode\n"); - map pkg_vars = ListToDict({ - "service.name", service->name(), - "pkg.name", package, + std::map pkg_vars = ListToDict({ + "service.name", service->name(), "pkg.name", package, }); out->Print(pkg_vars, "self.service_name = '$pkg.name$.$service.name$'\n"); out->Print("\n"); @@ -126,8 +125,8 @@ void PrintService(const ServiceDescriptor* service, const string& package, } // namespace -string GetServices(const FileDescriptor* file) { - string output; +std::string GetServices(const FileDescriptor *file) { + std::string output; StringOutputStream output_stream(&output); Printer out(&output_stream, '$'); @@ -138,10 +137,9 @@ string GetServices(const FileDescriptor* file) { } // Write out a file header. - map header_comment_vars = ListToDict({ - "file.name", file->name(), - "file.package", file->package(), - }); + std::map header_comment_vars = ListToDict({ + "file.name", file->name(), "file.package", file->package(), + }); out.Print("# Generated by the protocol buffer compiler. DO NOT EDIT!\n"); out.Print(header_comment_vars, "# Source: $file.name$ for package '$file.package$'\n"); @@ -151,16 +149,16 @@ string GetServices(const FileDescriptor* file) { // Write out require statemment to import the separately generated file // that defines the messages used by the service. This is generated by the // main ruby plugin. - map dep_vars = ListToDict({ + std::map dep_vars = ListToDict({ "dep.name", MessagesRequireName(file), }); out.Print(dep_vars, "require '$dep.name$'\n"); // Write out services within the modules out.Print("\n"); - vector modules = Split(file->package(), '.'); + std::vector modules = Split(file->package(), '.'); for (size_t i = 0; i < modules.size(); ++i) { - map module_vars = ListToDict({ + std::map module_vars = ListToDict({ "module.name", CapitalizeFirst(modules[i]), }); out.Print(module_vars, "module $module.name$\n"); diff --git a/src/compiler/ruby_generator.h b/src/compiler/ruby_generator.h index 4f13f1a33b0..89d7a0b92a9 100644 --- a/src/compiler/ruby_generator.h +++ b/src/compiler/ruby_generator.h @@ -36,8 +36,6 @@ #include -using namespace std; - namespace google { namespace protobuf { class FileDescriptor; @@ -46,7 +44,7 @@ class FileDescriptor; namespace grpc_ruby_generator { -string GetServices(const google::protobuf::FileDescriptor* file); +std::string GetServices(const google::protobuf::FileDescriptor *file); } // namespace grpc_ruby_generator diff --git a/src/compiler/ruby_generator_helpers-inl.h b/src/compiler/ruby_generator_helpers-inl.h index 67a5eedd09b..0034f5ef569 100644 --- a/src/compiler/ruby_generator_helpers-inl.h +++ b/src/compiler/ruby_generator_helpers-inl.h @@ -41,14 +41,15 @@ namespace grpc_ruby_generator { -inline bool ServicesFilename(const google::protobuf::FileDescriptor* file, - string* file_name_or_error) { +inline bool ServicesFilename(const google::protobuf::FileDescriptor *file, + std::string *file_name_or_error) { // Get output file name. static const unsigned proto_suffix_length = 6; // length of ".proto" if (file->name().size() > proto_suffix_length && file->name().find_last_of(".proto") == file->name().size() - 1) { - *file_name_or_error = file->name().substr( - 0, file->name().size() - proto_suffix_length) + "_services.rb"; + *file_name_or_error = + file->name().substr(0, file->name().size() - proto_suffix_length) + + "_services.rb"; return true; } else { *file_name_or_error = "Invalid proto file name: must end with .proto"; @@ -56,7 +57,8 @@ inline bool ServicesFilename(const google::protobuf::FileDescriptor* file, } } -inline string MessagesRequireName(const google::protobuf::FileDescriptor* file) { +inline std::string MessagesRequireName( + const google::protobuf::FileDescriptor *file) { return Replace(file->name(), ".proto", ""); } diff --git a/src/compiler/ruby_generator_map-inl.h b/src/compiler/ruby_generator_map-inl.h index ea5050652b6..fea9c2e2fac 100644 --- a/src/compiler/ruby_generator_map-inl.h +++ b/src/compiler/ruby_generator_map-inl.h @@ -40,7 +40,6 @@ #include #include - using std::initializer_list; using std::map; using std::vector; @@ -49,16 +48,18 @@ namespace grpc_ruby_generator { // Converts an initializer list of the form { key0, value0, key1, value1, ... } // into a map of key* to value*. Is merely a readability helper for later code. -inline map ListToDict(const initializer_list& values) { +inline std::map ListToDict( + const initializer_list &values) { if (values.size() % 2 != 0) { - // MOE: insert std::cerr << "Not every 'key' has a value in `values`." << std::endl; + // MOE: insert std::cerr << "Not every 'key' has a value in `values`." + // << std::endl; } - map value_map; + std::map value_map; auto value_iter = values.begin(); - for (unsigned i = 0; i < values.size()/2; ++i) { - string key = *value_iter; + for (unsigned i = 0; i < values.size() / 2; ++i) { + std::string key = *value_iter; ++value_iter; - string value = *value_iter; + std::string value = *value_iter; value_map[key] = value; ++value_iter; } diff --git a/src/compiler/ruby_generator_string-inl.h b/src/compiler/ruby_generator_string-inl.h index 85a76fa4215..d24a61b9f5f 100644 --- a/src/compiler/ruby_generator_string-inl.h +++ b/src/compiler/ruby_generator_string-inl.h @@ -45,10 +45,10 @@ using std::transform; namespace grpc_ruby_generator { // Split splits a string using char into elems. -inline vector &Split(const string &s, char delim, - vector* elems) { - stringstream ss(s); - string item; +inline std::vector &Split(const std::string &s, char delim, + std::vector *elems) { + std::stringstream ss(s); + std::string item; while (getline(ss, item, delim)) { elems->push_back(item); } @@ -56,16 +56,17 @@ inline vector &Split(const string &s, char delim, } // Split splits a string using char, returning the result in a vector. -inline vector Split(const string &s, char delim) { - vector elems; +inline std::vector Split(const std::string &s, char delim) { + std::vector elems; Split(s, delim, &elems); return elems; } // Replace replaces from with to in s. -inline string Replace(string s, const string& from, const string& to) { +inline std::string Replace(std::string s, const std::string &from, + const std::string &to) { size_t start_pos = s.find(from); - if (start_pos == string::npos) { + if (start_pos == std::string::npos) { return s; } s.replace(start_pos, from.length(), to); @@ -73,10 +74,10 @@ inline string Replace(string s, const string& from, const string& to) { } // ReplaceAll replaces all instances of search with replace in s. -inline string ReplaceAll(string s, const string& search, - const string& replace) { +inline std::string ReplaceAll(std::string s, const std::string &search, + const std::string &replace) { size_t pos = 0; - while ((pos = s.find(search, pos)) != string::npos) { + while ((pos = s.find(search, pos)) != std::string::npos) { s.replace(pos, search.length(), replace); pos += replace.length(); } @@ -84,9 +85,10 @@ inline string ReplaceAll(string s, const string& search, } // ReplacePrefix replaces from with to in s if search is a prefix of s. -inline bool ReplacePrefix(string* s, const string& from, const string& to) { +inline bool ReplacePrefix(std::string *s, const std::string &from, + const std::string &to) { size_t start_pos = s->find(from); - if (start_pos == string::npos || start_pos != 0) { + if (start_pos == std::string::npos || start_pos != 0) { return false; } s->replace(start_pos, from.length(), to); @@ -94,7 +96,7 @@ inline bool ReplacePrefix(string* s, const string& from, const string& to) { } // CapitalizeFirst capitalizes the first char in a string. -inline string CapitalizeFirst(string s) { +inline std::string CapitalizeFirst(std::string s) { if (s.empty()) { return s; } @@ -103,14 +105,15 @@ inline string CapitalizeFirst(string s) { } // RubyTypeOf updates a proto type to the required ruby equivalent. -inline string RubyTypeOf(const string& a_type, const string& package) { - string res(a_type); +inline std::string RubyTypeOf(const std::string &a_type, + const std::string &package) { + std::string res(a_type); ReplacePrefix(&res, package, ""); // remove the leading package if present - ReplacePrefix(&res, ".", ""); // remove the leading . (no package) - if (res.find('.') == string::npos) { + ReplacePrefix(&res, ".", ""); // remove the leading . (no package) + if (res.find('.') == std::string::npos) { return res; } else { - vector prefixes_and_type = Split(res, '.'); + std::vector prefixes_and_type = Split(res, '.'); for (unsigned int i = 0; i < prefixes_and_type.size(); ++i) { if (i != 0) { res += "::"; // switch '.' to the ruby module delim diff --git a/src/compiler/ruby_plugin.cc b/src/compiler/ruby_plugin.cc index c1748cfaeb0..9397452f55e 100644 --- a/src/compiler/ruby_plugin.cc +++ b/src/compiler/ruby_plugin.cc @@ -37,6 +37,7 @@ // and net/proto2/compiler/public/plugin.h for more information on plugins. #include +#include #include "src/compiler/ruby_generator.h" #include "src/compiler/ruby_generator_helpers-inl.h" @@ -51,17 +52,17 @@ class RubyGrpcGenerator : public google::protobuf::compiler::CodeGenerator { RubyGrpcGenerator() {} ~RubyGrpcGenerator() override {} - bool Generate(const google::protobuf::FileDescriptor* file, - const string& parameter, - google::protobuf::compiler::GeneratorContext* context, - string* error) const override { - string code = grpc_ruby_generator::GetServices(file); + bool Generate(const google::protobuf::FileDescriptor *file, + const std::string ¶meter, + google::protobuf::compiler::GeneratorContext *context, + std::string *error) const override { + std::string code = grpc_ruby_generator::GetServices(file); if (code.size() == 0) { return true; // don't generate a file if there are no services } // Get output file name. - string file_name; + std::string file_name; if (!grpc_ruby_generator::ServicesFilename(file, &file_name)) { return false; } @@ -73,7 +74,7 @@ class RubyGrpcGenerator : public google::protobuf::compiler::CodeGenerator { } }; -int main(int argc, char* argv[]) { +int main(int argc, char *argv[]) { RubyGrpcGenerator generator; return google::protobuf::compiler::PluginMain(argc, argv, &generator); } diff --git a/src/core/channel/census_filter.c b/src/core/channel/census_filter.c index 2799bded8a6..ed60f0a5f6e 100644 --- a/src/core/channel/census_filter.c +++ b/src/core/channel/census_filter.c @@ -178,19 +178,19 @@ static void destroy_channel_elem(grpc_channel_element* elem) { } const grpc_channel_filter grpc_client_census_filter = { - client_call_op, channel_op, + client_call_op, channel_op, - sizeof(call_data), client_init_call_elem, client_destroy_call_elem, + sizeof(call_data), client_init_call_elem, client_destroy_call_elem, - sizeof(channel_data), init_channel_elem, destroy_channel_elem, + sizeof(channel_data), init_channel_elem, destroy_channel_elem, "census-client"}; const grpc_channel_filter grpc_server_census_filter = { - server_call_op, channel_op, + server_call_op, channel_op, - sizeof(call_data), server_init_call_elem, server_destroy_call_elem, + sizeof(call_data), server_init_call_elem, server_destroy_call_elem, - sizeof(channel_data), init_channel_elem, destroy_channel_elem, + sizeof(channel_data), init_channel_elem, destroy_channel_elem, "census-server"}; diff --git a/src/core/channel/channel_args.h b/src/core/channel/channel_args.h index cf38d5d01fa..92280450a14 100644 --- a/src/core/channel/channel_args.h +++ b/src/core/channel/channel_args.h @@ -51,4 +51,4 @@ void grpc_channel_args_destroy(grpc_channel_args *a); is specified in channel args, otherwise returns 0. */ int grpc_channel_args_is_census_enabled(const grpc_channel_args *a); -#endif /* __GRPC_INTERNAL_CHANNEL_CHANNEL_ARGS_H__ */ +#endif /* __GRPC_INTERNAL_CHANNEL_CHANNEL_ARGS_H__ */ diff --git a/src/core/channel/channel_stack.h b/src/core/channel/channel_stack.h index 14e972f5393..eb68102b435 100644 --- a/src/core/channel/channel_stack.h +++ b/src/core/channel/channel_stack.h @@ -302,4 +302,4 @@ void grpc_call_element_send_cancel(grpc_call_element *cur_elem); } while (0) #endif -#endif /* __GRPC_INTERNAL_CHANNEL_CHANNEL_STACK_H__ */ +#endif /* __GRPC_INTERNAL_CHANNEL_CHANNEL_STACK_H__ */ diff --git a/src/core/channel/child_channel.c b/src/core/channel/child_channel.c index 3778f4fb88f..f400e9b6705 100644 --- a/src/core/channel/child_channel.c +++ b/src/core/channel/child_channel.c @@ -165,9 +165,9 @@ static void lb_destroy_channel_elem(grpc_channel_element *elem) { } const grpc_channel_filter grpc_child_channel_top_filter = { - lb_call_op, lb_channel_op, + lb_call_op, lb_channel_op, - sizeof(lb_call_data), lb_init_call_elem, lb_destroy_call_elem, + sizeof(lb_call_data), lb_init_call_elem, lb_destroy_call_elem, sizeof(lb_channel_data), lb_init_channel_elem, lb_destroy_channel_elem, diff --git a/src/core/channel/child_channel.h b/src/core/channel/child_channel.h index 3ba4c1b8a9e..ece0ff99a92 100644 --- a/src/core/channel/child_channel.h +++ b/src/core/channel/child_channel.h @@ -39,7 +39,7 @@ /* helper for filters that need to host child channel stacks... handles lifetime and upwards propagation cleanly */ -const grpc_channel_filter grpc_child_channel_top_filter; +extern const grpc_channel_filter grpc_child_channel_top_filter; typedef grpc_channel_stack grpc_child_channel; typedef grpc_call_stack grpc_child_call; diff --git a/src/core/channel/client_channel.c b/src/core/channel/client_channel.c index 46283835a05..fa75561c78b 100644 --- a/src/core/channel/client_channel.c +++ b/src/core/channel/client_channel.c @@ -450,9 +450,9 @@ static void destroy_channel_elem(grpc_channel_element *elem) { } const grpc_channel_filter grpc_client_channel_filter = { - call_op, channel_op, + call_op, channel_op, - sizeof(call_data), init_call_elem, destroy_call_elem, + sizeof(call_data), init_call_elem, destroy_call_elem, sizeof(channel_data), init_channel_elem, destroy_channel_elem, diff --git a/src/core/channel/client_channel.h b/src/core/channel/client_channel.h index 576af64ec75..6b8a7d95a8a 100644 --- a/src/core/channel/client_channel.h +++ b/src/core/channel/client_channel.h @@ -59,4 +59,4 @@ grpc_transport_setup_result grpc_client_channel_transport_setup_complete( grpc_channel_filter const **channel_filters, size_t num_channel_filters, grpc_mdctx *mdctx); -#endif /* __GRPC_INTERNAL_CHANNEL_CLIENT_CHANNEL_H__ */ +#endif /* __GRPC_INTERNAL_CHANNEL_CLIENT_CHANNEL_H__ */ diff --git a/src/core/channel/client_setup.h b/src/core/channel/client_setup.h index a508785e60b..155a9a5b1a7 100644 --- a/src/core/channel/client_setup.h +++ b/src/core/channel/client_setup.h @@ -64,4 +64,4 @@ gpr_timespec grpc_client_setup_request_deadline(grpc_client_setup_request *r); grpc_mdctx *grpc_client_setup_get_mdctx(grpc_client_setup_request *r); -#endif /* __GRPC_INTERNAL_CHANNEL_CLIENT_SETUP_H__ */ +#endif /* __GRPC_INTERNAL_CHANNEL_CLIENT_SETUP_H__ */ diff --git a/src/core/channel/connected_channel.h b/src/core/channel/connected_channel.h index 660ea7ad89d..9d143fc1359 100644 --- a/src/core/channel/connected_channel.h +++ b/src/core/channel/connected_channel.h @@ -46,4 +46,4 @@ extern const grpc_channel_filter grpc_connected_channel_filter; grpc_transport_setup_result grpc_connected_channel_bind_transport( grpc_channel_stack *channel_stack, grpc_transport *transport); -#endif /* __GRPC_INTERNAL_CHANNEL_CONNECTED_CHANNEL_H__ */ +#endif /* __GRPC_INTERNAL_CHANNEL_CONNECTED_CHANNEL_H__ */ diff --git a/src/core/channel/http_client_filter.c b/src/core/channel/http_client_filter.c index 98e26aa563e..b139b72795f 100644 --- a/src/core/channel/http_client_filter.c +++ b/src/core/channel/http_client_filter.c @@ -32,6 +32,7 @@ */ #include "src/core/channel/http_client_filter.h" +#include #include typedef struct call_data { int sent_headers; } call_data; @@ -130,6 +131,19 @@ static void destroy_call_elem(grpc_call_element *elem) { ignore_unused(channeld); } +static const char *scheme_from_args(const grpc_channel_args *args) { + int i; + if (args != NULL) { + for (i = 0; i < args->num_args; ++i) { + if (args->args[i].type == GRPC_ARG_STRING && + strcmp(args->args[i].key, GRPC_ARG_HTTP2_SCHEME) == 0) { + return args->args[i].value.string; + } + } + } + return "http"; +} + /* Constructor for channel_data */ static void init_channel_elem(grpc_channel_element *elem, const grpc_channel_args *args, grpc_mdctx *mdctx, @@ -146,7 +160,8 @@ static void init_channel_elem(grpc_channel_element *elem, /* initialize members */ channeld->te_trailers = grpc_mdelem_from_strings(mdctx, "te", "trailers"); channeld->method = grpc_mdelem_from_strings(mdctx, ":method", "POST"); - channeld->scheme = grpc_mdelem_from_strings(mdctx, ":scheme", "grpc"); + channeld->scheme = + grpc_mdelem_from_strings(mdctx, ":scheme", scheme_from_args(args)); channeld->content_type = grpc_mdelem_from_strings(mdctx, "content-type", "application/grpc"); } @@ -163,9 +178,9 @@ static void destroy_channel_elem(grpc_channel_element *elem) { } const grpc_channel_filter grpc_http_client_filter = { - call_op, channel_op, + call_op, channel_op, - sizeof(call_data), init_call_elem, destroy_call_elem, + sizeof(call_data), init_call_elem, destroy_call_elem, sizeof(channel_data), init_channel_elem, destroy_channel_elem, diff --git a/src/core/channel/http_client_filter.h b/src/core/channel/http_client_filter.h index f939cbd351f..21cde4877ba 100644 --- a/src/core/channel/http_client_filter.h +++ b/src/core/channel/http_client_filter.h @@ -39,4 +39,6 @@ /* Processes metadata on the client side for HTTP2 transports */ extern const grpc_channel_filter grpc_http_client_filter; +#define GRPC_ARG_HTTP2_SCHEME "grpc.http2_scheme" + #endif /* __GRPC_INTERNAL_CHANNEL_HTTP_CLIENT_FILTER_H__ */ diff --git a/src/core/channel/http_filter.c b/src/core/channel/http_filter.c index 6cfe34695c4..846f7b9713a 100644 --- a/src/core/channel/http_filter.c +++ b/src/core/channel/http_filter.c @@ -132,9 +132,9 @@ static void destroy_channel_elem(grpc_channel_element *elem) { } const grpc_channel_filter grpc_http_filter = { - call_op, channel_op, + call_op, channel_op, - sizeof(call_data), init_call_elem, destroy_call_elem, + sizeof(call_data), init_call_elem, destroy_call_elem, sizeof(channel_data), init_channel_elem, destroy_channel_elem, diff --git a/src/core/channel/http_server_filter.c b/src/core/channel/http_server_filter.c index 44eab43f09d..19b9606b433 100644 --- a/src/core/channel/http_server_filter.c +++ b/src/core/channel/http_server_filter.c @@ -244,9 +244,9 @@ static void destroy_channel_elem(grpc_channel_element *elem) { } const grpc_channel_filter grpc_http_server_filter = { - call_op, channel_op, + call_op, channel_op, - sizeof(call_data), init_call_elem, destroy_call_elem, + sizeof(call_data), init_call_elem, destroy_call_elem, sizeof(channel_data), init_channel_elem, destroy_channel_elem, diff --git a/src/core/channel/metadata_buffer.h b/src/core/channel/metadata_buffer.h index 818b290ce20..011dabed1b1 100644 --- a/src/core/channel/metadata_buffer.h +++ b/src/core/channel/metadata_buffer.h @@ -67,4 +67,4 @@ grpc_metadata *grpc_metadata_buffer_extract_elements( grpc_metadata_buffer *buffer); void grpc_metadata_buffer_cleanup_elements(void *elements, grpc_op_error error); -#endif /* __GRPC_INTERNAL_CHANNEL_METADATA_BUFFER_H__ */ +#endif /* __GRPC_INTERNAL_CHANNEL_METADATA_BUFFER_H__ */ diff --git a/src/core/channel/noop_filter.h b/src/core/channel/noop_filter.h index 4057ff7ac9b..269214f893f 100644 --- a/src/core/channel/noop_filter.h +++ b/src/core/channel/noop_filter.h @@ -41,4 +41,4 @@ customize for their own filters */ extern const grpc_channel_filter grpc_no_op_filter; -#endif /* __GRPC_INTERNAL_CHANNEL_NOOP_FILTER_H__ */ +#endif /* __GRPC_INTERNAL_CHANNEL_NOOP_FILTER_H__ */ diff --git a/src/core/compression/algorithm.h b/src/core/compression/algorithm.h index 05895a889e2..c5ec6d21b68 100644 --- a/src/core/compression/algorithm.h +++ b/src/core/compression/algorithm.h @@ -46,4 +46,4 @@ typedef enum { const char *grpc_compression_algorithm_name( grpc_compression_algorithm algorithm); -#endif /* __GRPC_INTERNAL_COMPRESSION_ALGORITHM_H__ */ +#endif /* __GRPC_INTERNAL_COMPRESSION_ALGORITHM_H__ */ diff --git a/src/core/compression/message_compress.h b/src/core/compression/message_compress.h index af8a0a5d754..564ca69a877 100644 --- a/src/core/compression/message_compress.h +++ b/src/core/compression/message_compress.h @@ -49,4 +49,4 @@ int grpc_msg_compress(grpc_compression_algorithm algorithm, int grpc_msg_decompress(grpc_compression_algorithm algorithm, gpr_slice_buffer *input, gpr_slice_buffer *output); -#endif /* __GRPC_INTERNAL_COMPRESSION_MESSAGE_COMPRESS_H__ */ +#endif /* __GRPC_INTERNAL_COMPRESSION_MESSAGE_COMPRESS_H__ */ diff --git a/src/core/httpcli/format_request.h b/src/core/httpcli/format_request.h index 988f872563d..a82130cb93a 100644 --- a/src/core/httpcli/format_request.h +++ b/src/core/httpcli/format_request.h @@ -42,4 +42,4 @@ gpr_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, const char *body_bytes, size_t body_size); -#endif /* __GRPC_INTERNAL_HTTPCLI_FORMAT_REQUEST_H__ */ +#endif /* __GRPC_INTERNAL_HTTPCLI_FORMAT_REQUEST_H__ */ diff --git a/src/core/httpcli/httpcli.h b/src/core/httpcli/httpcli.h index ef8031354c1..90f89a93664 100644 --- a/src/core/httpcli/httpcli.h +++ b/src/core/httpcli/httpcli.h @@ -115,4 +115,4 @@ typedef int (*grpc_httpcli_post_override)(const grpc_httpcli_request *request, void grpc_httpcli_set_override(grpc_httpcli_get_override get, grpc_httpcli_post_override post); -#endif /* __GRPC_INTERNAL_HTTPCLI_HTTPCLI_H__ */ +#endif /* __GRPC_INTERNAL_HTTPCLI_HTTPCLI_H__ */ diff --git a/src/core/httpcli/httpcli_security_context.h b/src/core/httpcli/httpcli_security_context.h index c267622e601..a73ecca0b37 100644 --- a/src/core/httpcli/httpcli_security_context.h +++ b/src/core/httpcli/httpcli_security_context.h @@ -40,4 +40,4 @@ grpc_security_status grpc_httpcli_ssl_channel_security_context_create( const unsigned char *pem_root_certs, size_t pem_root_certs_size, const char *secure_peer_name, grpc_channel_security_context **ctx); -#endif /* __GRPC_INTERNAL_HTTPCLI_HTTPCLI_SECURITY_CONTEXT_H__ */ +#endif /* __GRPC_INTERNAL_HTTPCLI_HTTPCLI_SECURITY_CONTEXT_H__ */ diff --git a/src/core/httpcli/parser.h b/src/core/httpcli/parser.h index e2c24a9993d..520b16fd020 100644 --- a/src/core/httpcli/parser.h +++ b/src/core/httpcli/parser.h @@ -61,4 +61,4 @@ void grpc_httpcli_parser_destroy(grpc_httpcli_parser *parser); int grpc_httpcli_parser_parse(grpc_httpcli_parser *parser, gpr_slice slice); int grpc_httpcli_parser_eof(grpc_httpcli_parser *parser); -#endif /* __GRPC_INTERNAL_HTTPCLI_PARSER_H__ */ +#endif /* __GRPC_INTERNAL_HTTPCLI_PARSER_H__ */ diff --git a/src/core/iomgr/alarm.c b/src/core/iomgr/alarm.c index 26648793238..5b80368e3a2 100644 --- a/src/core/iomgr/alarm.c +++ b/src/core/iomgr/alarm.c @@ -100,7 +100,7 @@ void grpc_alarm_list_init(gpr_timespec now) { } } -void grpc_alarm_list_shutdown() { +void grpc_alarm_list_shutdown(void) { int i; while (run_some_expired_alarms(NULL, gpr_inf_future, NULL, 0)) ; @@ -360,7 +360,7 @@ int grpc_alarm_check(gpr_mu *drop_mu, gpr_timespec now, gpr_timespec *next) { return run_some_expired_alarms(drop_mu, now, next, 1); } -gpr_timespec grpc_alarm_list_next_timeout() { +gpr_timespec grpc_alarm_list_next_timeout(void) { gpr_timespec out; gpr_mu_lock(&g_mu); out = g_shard_queue[0]->min_deadline; diff --git a/src/core/iomgr/alarm_internal.h b/src/core/iomgr/alarm_internal.h index 12b6ab4286d..5c6b869302e 100644 --- a/src/core/iomgr/alarm_internal.h +++ b/src/core/iomgr/alarm_internal.h @@ -42,12 +42,12 @@ int grpc_alarm_check(gpr_mu *drop_mu, gpr_timespec now, gpr_timespec *next); void grpc_alarm_list_init(gpr_timespec now); -void grpc_alarm_list_shutdown(); +void grpc_alarm_list_shutdown(void); -gpr_timespec grpc_alarm_list_next_timeout(); +gpr_timespec grpc_alarm_list_next_timeout(void); /* the following must be implemented by each iomgr implementation */ -void grpc_kick_poller(); +void grpc_kick_poller(void); #endif /* __GRPC_INTERNAL_IOMGR_ALARM_INTERNAL_H_ */ diff --git a/src/core/iomgr/iomgr.c b/src/core/iomgr/iomgr.c index 03f56a50a32..7f266ab235c 100644 --- a/src/core/iomgr/iomgr.c +++ b/src/core/iomgr/iomgr.c @@ -80,9 +80,9 @@ static void background_callback_executor(void *ignored) { gpr_event_set(&g_background_callback_executor_done, (void *)1); } -void grpc_kick_poller() { gpr_cv_broadcast(&g_cv); } +void grpc_kick_poller(void) { gpr_cv_broadcast(&g_cv); } -void grpc_iomgr_init() { +void grpc_iomgr_init(void) { gpr_thd_id id; gpr_mu_init(&g_mu); gpr_cv_init(&g_cv); @@ -93,7 +93,7 @@ void grpc_iomgr_init() { gpr_thd_new(&id, background_callback_executor, NULL, NULL); } -void grpc_iomgr_shutdown() { +void grpc_iomgr_shutdown(void) { delayed_callback *cb; gpr_timespec shutdown_deadline = gpr_time_add(gpr_now(), gpr_time_from_seconds(10)); @@ -134,13 +134,13 @@ void grpc_iomgr_shutdown() { gpr_cv_destroy(&g_cv); } -void grpc_iomgr_ref() { +void grpc_iomgr_ref(void) { gpr_mu_lock(&g_mu); ++g_refs; gpr_mu_unlock(&g_mu); } -void grpc_iomgr_unref() { +void grpc_iomgr_unref(void) { gpr_mu_lock(&g_mu); if (0 == --g_refs) { gpr_cv_signal(&g_cv); diff --git a/src/core/iomgr/iomgr.h b/src/core/iomgr/iomgr.h index 16991a9b90e..06dc2e5dbfa 100644 --- a/src/core/iomgr/iomgr.h +++ b/src/core/iomgr/iomgr.h @@ -37,8 +37,8 @@ /* gRPC Callback definition */ typedef void (*grpc_iomgr_cb_func)(void *arg, int success); -void grpc_iomgr_init(); -void grpc_iomgr_shutdown(); +void grpc_iomgr_init(void); +void grpc_iomgr_shutdown(void); /* This function is called from within a callback or from anywhere else and causes the invocation of a callback at some point in the future */ diff --git a/src/core/iomgr/iomgr_internal.h b/src/core/iomgr/iomgr_internal.h index 5f72542777d..e9962a0f66b 100644 --- a/src/core/iomgr/iomgr_internal.h +++ b/src/core/iomgr/iomgr_internal.h @@ -42,10 +42,10 @@ int grpc_maybe_call_delayed_callbacks(gpr_mu *drop_mu, int success); void grpc_iomgr_add_delayed_callback(grpc_iomgr_cb_func cb, void *cb_arg, int success); -void grpc_iomgr_ref(); -void grpc_iomgr_unref(); +void grpc_iomgr_ref(void); +void grpc_iomgr_unref(void); -void grpc_iomgr_platform_init(); -void grpc_iomgr_platform_shutdown(); +void grpc_iomgr_platform_init(void); +void grpc_iomgr_platform_shutdown(void); #endif /* __GRPC_INTERNAL_IOMGR_IOMGR_INTERNAL_H_ */ diff --git a/src/core/iomgr/iomgr_posix.c b/src/core/iomgr/iomgr_posix.c index ff9195ec1dc..61fec6bc532 100644 --- a/src/core/iomgr/iomgr_posix.c +++ b/src/core/iomgr/iomgr_posix.c @@ -33,6 +33,6 @@ #include "src/core/iomgr/iomgr_posix.h" -void grpc_iomgr_platform_init() { grpc_pollset_global_init(); } +void grpc_iomgr_platform_init(void) { grpc_pollset_global_init(); } -void grpc_iomgr_platform_shutdown() { grpc_pollset_global_shutdown(); } +void grpc_iomgr_platform_shutdown(void) { grpc_pollset_global_shutdown(); } diff --git a/src/core/iomgr/iomgr_posix.h b/src/core/iomgr/iomgr_posix.h index ca5af3e5276..86973a050dc 100644 --- a/src/core/iomgr/iomgr_posix.h +++ b/src/core/iomgr/iomgr_posix.h @@ -36,7 +36,7 @@ #include "src/core/iomgr/iomgr_internal.h" -void grpc_pollset_global_init(); -void grpc_pollset_global_shutdown(); +void grpc_pollset_global_init(void); +void grpc_pollset_global_shutdown(void); #endif /* __GRPC_INTERNAL_IOMGR_IOMGR_POSIX_H_ */ diff --git a/src/core/iomgr/pollset_kick.h b/src/core/iomgr/pollset_kick.h new file mode 100644 index 00000000000..f088818b9a1 --- /dev/null +++ b/src/core/iomgr/pollset_kick.h @@ -0,0 +1,68 @@ +/* + * + * 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_INTERNAL_IOMGR_POLLSET_KICK_H_ +#define __GRPC_INTERNAL_IOMGR_POLLSET_KICK_H_ + +#include + +/* This is an abstraction around the typical pipe mechanism for waking up a + thread sitting in a poll() style call. */ + +#ifdef GPR_POSIX_SOCKET +#include "src/core/iomgr/pollset_kick_posix.h" +#else +#error "No pollset kick support on platform" +#endif + +void grpc_pollset_kick_global_init(void); +void grpc_pollset_kick_global_destroy(void); + +void grpc_pollset_kick_init(grpc_pollset_kick_state *kick_state); +void grpc_pollset_kick_destroy(grpc_pollset_kick_state *kick_state); + +/* Must be called before entering poll(). If return value is -1, this consumed + an existing kick. Otherwise the return value is an FD to add to the poll set. + */ +int grpc_pollset_kick_pre_poll(grpc_pollset_kick_state *kick_state); + +/* Consume an existing kick. Must be called after poll returns that the fd was + readable, and before calling kick_post_poll. */ +void grpc_pollset_kick_consume(grpc_pollset_kick_state *kick_state); + +/* Must be called after pre_poll, and after consume if applicable */ +void grpc_pollset_kick_post_poll(grpc_pollset_kick_state *kick_state); + +void grpc_pollset_kick_kick(grpc_pollset_kick_state *kick_state); + +#endif /* __GRPC_INTERNAL_IOMGR_POLLSET_KICK_H_ */ diff --git a/src/core/iomgr/pollset_kick_posix.c b/src/core/iomgr/pollset_kick_posix.c new file mode 100644 index 00000000000..d16e49e4595 --- /dev/null +++ b/src/core/iomgr/pollset_kick_posix.c @@ -0,0 +1,161 @@ +/* + * + * 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 "src/core/iomgr/pollset_kick_posix.h" + +#include +#include +#include + +#include "src/core/iomgr/socket_utils_posix.h" +#include +#include + +/* This implementation is based on a freelist of pipes. */ + +typedef struct grpc_kick_pipe_info { + int pipe_read_fd; + int pipe_write_fd; + struct grpc_kick_pipe_info *next; +} grpc_kick_pipe_info; + +static grpc_kick_pipe_info *pipe_freelist = NULL; +static gpr_mu pipe_freelist_mu; + +static grpc_kick_pipe_info *allocate_pipe() { + grpc_kick_pipe_info *info; + gpr_mu_lock(&pipe_freelist_mu); + if (pipe_freelist != NULL) { + info = pipe_freelist; + pipe_freelist = pipe_freelist->next; + } else { + int pipefd[2]; + /* TODO(klempner): Make this nonfatal */ + GPR_ASSERT(0 == pipe(pipefd)); + GPR_ASSERT(grpc_set_socket_nonblocking(pipefd[0], 1)); + GPR_ASSERT(grpc_set_socket_nonblocking(pipefd[1], 1)); + info = gpr_malloc(sizeof(*info)); + info->pipe_read_fd = pipefd[0]; + info->pipe_write_fd = pipefd[1]; + info->next = NULL; + } + gpr_mu_unlock(&pipe_freelist_mu); + return info; +} + +static void free_pipe(grpc_kick_pipe_info *pipe_info) { + /* TODO(klempner): Start closing pipes if the free list gets too large */ + gpr_mu_lock(&pipe_freelist_mu); + pipe_info->next = pipe_freelist; + pipe_freelist = pipe_info; + gpr_mu_unlock(&pipe_freelist_mu); +} + +void grpc_pollset_kick_global_init() { + pipe_freelist = NULL; + gpr_mu_init(&pipe_freelist_mu); +} + +void grpc_pollset_kick_global_destroy() { + while (pipe_freelist != NULL) { + grpc_kick_pipe_info *current = pipe_freelist; + pipe_freelist = pipe_freelist->next; + close(current->pipe_read_fd); + close(current->pipe_write_fd); + gpr_free(current); + } + gpr_mu_destroy(&pipe_freelist_mu); +} + +void grpc_pollset_kick_init(grpc_pollset_kick_state *kick_state) { + gpr_mu_init(&kick_state->mu); + kick_state->kicked = 0; + kick_state->pipe_info = NULL; +} + +void grpc_pollset_kick_destroy(grpc_pollset_kick_state *kick_state) { + gpr_mu_destroy(&kick_state->mu); + GPR_ASSERT(kick_state->pipe_info == NULL); +} + +int grpc_pollset_kick_pre_poll(grpc_pollset_kick_state *kick_state) { + gpr_mu_lock(&kick_state->mu); + if (kick_state->kicked) { + kick_state->kicked = 0; + gpr_mu_unlock(&kick_state->mu); + return -1; + } + kick_state->pipe_info = allocate_pipe(); + gpr_mu_unlock(&kick_state->mu); + return kick_state->pipe_info->pipe_read_fd; +} + +void grpc_pollset_kick_consume(grpc_pollset_kick_state *kick_state) { + char buf[128]; + int r; + + for (;;) { + r = read(kick_state->pipe_info->pipe_read_fd, buf, sizeof(buf)); + if (r > 0) continue; + if (r == 0) return; + switch (errno) { + case EAGAIN: + return; + case EINTR: + continue; + default: + gpr_log(GPR_ERROR, "error reading pipe: %s", strerror(errno)); + return; + } + } +} + +void grpc_pollset_kick_post_poll(grpc_pollset_kick_state *kick_state) { + gpr_mu_lock(&kick_state->mu); + free_pipe(kick_state->pipe_info); + kick_state->pipe_info = NULL; + gpr_mu_unlock(&kick_state->mu); +} + +void grpc_pollset_kick_kick(grpc_pollset_kick_state *kick_state) { + gpr_mu_lock(&kick_state->mu); + if (kick_state->pipe_info != NULL) { + char c = 0; + while (write(kick_state->pipe_info->pipe_write_fd, &c, 1) != 1 && + errno == EINTR) + ; + } else { + kick_state->kicked = 1; + } + gpr_mu_unlock(&kick_state->mu); +} diff --git a/src/core/iomgr/pollset_kick_posix.h b/src/core/iomgr/pollset_kick_posix.h new file mode 100644 index 00000000000..bae3b5923a2 --- /dev/null +++ b/src/core/iomgr/pollset_kick_posix.h @@ -0,0 +1,47 @@ +/* + * + * 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_INTERNAL_IOMGR_POLLSET_KICK_POSIX_H_ +#define __GRPC_INTERNAL_IOMGR_POLLSET_KICK_POSIX_H_ + +#include + +struct grpc_kick_pipe_info; + +typedef struct grpc_pollset_kick_state { + gpr_mu mu; + int kicked; + struct grpc_kick_pipe_info *pipe_info; +} grpc_pollset_kick_state; + +#endif /* __GRPC_INTERNAL_IOMGR_POLLSET_KICK_POSIX_H_ */ diff --git a/src/core/iomgr/pollset_multipoller_with_poll_posix.c b/src/core/iomgr/pollset_multipoller_with_poll_posix.c index e482da94f7c..7c9a9491cb0 100644 --- a/src/core/iomgr/pollset_multipoller_with_poll_posix.c +++ b/src/core/iomgr/pollset_multipoller_with_poll_posix.c @@ -131,7 +131,11 @@ static int multipoll_with_poll_pollset_maybe_work( } nf = 0; np = 1; - h->pfds[0].fd = grpc_kick_read_fd(pollset); + h->pfds[0].fd = grpc_pollset_kick_pre_poll(&pollset->kick_state); + if (h->pfds[0].fd < 0) { + /* Already kicked */ + return 1; + } h->pfds[0].events = POLLIN; h->pfds[0].revents = POLLOUT; for (i = 0; i < h->fd_count; i++) { @@ -173,7 +177,7 @@ static int multipoll_with_poll_pollset_maybe_work( /* do nothing */ } else { if (h->pfds[0].revents & POLLIN) { - grpc_kick_drain(pollset); + grpc_pollset_kick_consume(&pollset->kick_state); } for (i = 1; i < np; i++) { if (h->pfds[i].revents & POLLIN) { @@ -184,6 +188,7 @@ static int multipoll_with_poll_pollset_maybe_work( } } } + grpc_pollset_kick_post_poll(&pollset->kick_state); end_polling(pollset); gpr_mu_lock(&pollset->mu); diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c index ff00e064291..2555322532c 100644 --- a/src/core/iomgr/pollset_posix.c +++ b/src/core/iomgr/pollset_posix.c @@ -48,18 +48,6 @@ #include #include -/* kick pipes: we keep a sharded set of pipes to allow breaking from poll. - Ideally this would be 1:1 with pollsets, but we'd like to avoid associating - full kernel objects with each pollset to keep them lightweight, so instead - keep a sharded set and allow associating a pollset with one of the shards. - - TODO(ctiller): move this out from this file, and allow an eventfd - implementation on linux */ - -#define LOG2_KICK_SHARDS 6 -#define KICK_SHARDS (1 << LOG2_KICK_SHARDS) - -static int g_kick_pipes[KICK_SHARDS][2]; static grpc_pollset g_backup_pollset; static int g_shutdown_backup_poller; static gpr_event g_backup_poller_done; @@ -82,65 +70,22 @@ static void backup_poller(void *p) { gpr_event_set(&g_backup_poller_done, (void *)1); } -static size_t kick_shard(const grpc_pollset *info) { - size_t x = (size_t)info; - return ((x >> 4) ^ (x >> 9) ^ (x >> 14)) & (KICK_SHARDS - 1); -} - -int grpc_kick_read_fd(grpc_pollset *p) { - return g_kick_pipes[kick_shard(p)][0]; -} - -static int grpc_kick_write_fd(grpc_pollset *p) { - return g_kick_pipes[kick_shard(p)][1]; -} - -void grpc_pollset_force_kick(grpc_pollset *p) { - char c = 0; - while (write(grpc_kick_write_fd(p), &c, 1) != 1 && errno == EINTR) - ; -} - void grpc_pollset_kick(grpc_pollset *p) { if (!p->counter) return; - grpc_pollset_force_kick(p); + grpc_pollset_kick_kick(&p->kick_state); } -void grpc_kick_drain(grpc_pollset *p) { - int fd = grpc_kick_read_fd(p); - char buf[128]; - int r; - - for (;;) { - r = read(fd, buf, sizeof(buf)); - if (r > 0) continue; - if (r == 0) return; - switch (errno) { - case EAGAIN: - return; - case EINTR: - continue; - default: - gpr_log(GPR_ERROR, "error reading pipe: %s", strerror(errno)); - return; - } - } -} +void grpc_pollset_force_kick(grpc_pollset *p) { grpc_pollset_kick(p); } /* global state management */ -grpc_pollset *grpc_backup_pollset() { return &g_backup_pollset; } +grpc_pollset *grpc_backup_pollset(void) { return &g_backup_pollset; } -void grpc_pollset_global_init() { - int i; +void grpc_pollset_global_init(void) { gpr_thd_id id; - /* initialize the kick shards */ - for (i = 0; i < KICK_SHARDS; i++) { - GPR_ASSERT(0 == pipe(g_kick_pipes[i])); - GPR_ASSERT(grpc_set_socket_nonblocking(g_kick_pipes[i][0], 1)); - GPR_ASSERT(grpc_set_socket_nonblocking(g_kick_pipes[i][1], 1)); - } + /* Initialize kick fd state */ + grpc_pollset_kick_global_init(); /* initialize the backup pollset */ grpc_pollset_init(&g_backup_pollset); @@ -151,9 +96,7 @@ void grpc_pollset_global_init() { gpr_thd_new(&id, backup_poller, NULL, NULL); } -void grpc_pollset_global_shutdown() { - int i; - +void grpc_pollset_global_shutdown(void) { /* terminate the backup poller thread */ gpr_mu_lock(&g_backup_pollset.mu); g_shutdown_backup_poller = 1; @@ -163,11 +106,8 @@ void grpc_pollset_global_shutdown() { /* destroy the backup pollset */ grpc_pollset_destroy(&g_backup_pollset); - /* destroy the kick shards */ - for (i = 0; i < KICK_SHARDS; i++) { - close(g_kick_pipes[i][0]); - close(g_kick_pipes[i][1]); - } + /* destroy the kick pipes */ + grpc_pollset_kick_global_destroy(); } /* main interface */ @@ -178,6 +118,7 @@ static void become_unary_pollset(grpc_pollset *pollset, grpc_fd *fd); void grpc_pollset_init(grpc_pollset *pollset) { gpr_mu_init(&pollset->mu); gpr_cv_init(&pollset->cv); + grpc_pollset_kick_init(&pollset->kick_state); become_empty_pollset(pollset); } @@ -213,6 +154,7 @@ int grpc_pollset_work(grpc_pollset *pollset, gpr_timespec deadline) { void grpc_pollset_destroy(grpc_pollset *pollset) { pollset->vtable->destroy(pollset); + grpc_pollset_kick_destroy(&pollset->kick_state); gpr_mu_destroy(&pollset->mu); gpr_cv_destroy(&pollset->cv); } @@ -290,7 +232,11 @@ static int unary_poll_pollset_maybe_work(grpc_pollset *pollset, return 1; } } - pfd[0].fd = grpc_kick_read_fd(pollset); + pfd[0].fd = grpc_pollset_kick_pre_poll(&pollset->kick_state); + if (pfd[0].fd < 0) { + /* Already kicked */ + return 1; + } pfd[0].events = POLLIN; pfd[0].revents = 0; pfd[1].fd = fd->fd; @@ -308,7 +254,7 @@ static int unary_poll_pollset_maybe_work(grpc_pollset *pollset, /* do nothing */ } else { if (pfd[0].revents & POLLIN) { - grpc_kick_drain(pollset); + grpc_pollset_kick_consume(&pollset->kick_state); } if (pfd[1].revents & POLLIN) { grpc_fd_become_readable(fd, allow_synchronous_callback); @@ -318,6 +264,8 @@ static int unary_poll_pollset_maybe_work(grpc_pollset *pollset, } } + grpc_pollset_kick_post_poll(&pollset->kick_state); + gpr_mu_lock(&pollset->mu); grpc_fd_end_poll(fd, pollset); pollset->counter = 0; diff --git a/src/core/iomgr/pollset_posix.h b/src/core/iomgr/pollset_posix.h index f051079f5b5..f62433707e7 100644 --- a/src/core/iomgr/pollset_posix.h +++ b/src/core/iomgr/pollset_posix.h @@ -36,6 +36,8 @@ #include +#include "src/core/iomgr/pollset_kick.h" + typedef struct grpc_pollset_vtable grpc_pollset_vtable; /* forward declare only in this file to avoid leaking impl details via @@ -51,6 +53,7 @@ typedef struct grpc_pollset { const grpc_pollset_vtable *vtable; gpr_mu mu; gpr_cv cv; + grpc_pollset_kick_state kick_state; int counter; union { int fd; @@ -86,7 +89,7 @@ void grpc_kick_drain(grpc_pollset *p); regardless of applications listening to events. Relying on this is slow however (the backup pollset only listens every 100ms or so) - so it's not to be relied on. */ -grpc_pollset *grpc_backup_pollset(); +grpc_pollset *grpc_backup_pollset(void); /* turn a pollset into a multipoller: platform specific */ void grpc_platform_become_multipoller(grpc_pollset *pollset, diff --git a/src/core/iomgr/socket_utils_common_posix.c b/src/core/iomgr/socket_utils_common_posix.c index 7f2b43f2cad..d65b025d700 100644 --- a/src/core/iomgr/socket_utils_common_posix.c +++ b/src/core/iomgr/socket_utils_common_posix.c @@ -115,7 +115,7 @@ int grpc_set_socket_low_latency(int fd, int low_latency) { static gpr_once g_probe_ipv6_once = GPR_ONCE_INIT; static int g_ipv6_loopback_available; -static void probe_ipv6_once() { +static void probe_ipv6_once(void) { int fd = socket(AF_INET6, SOCK_STREAM, 0); g_ipv6_loopback_available = 0; if (fd < 0) { @@ -135,7 +135,7 @@ static void probe_ipv6_once() { } } -int grpc_ipv6_loopback_available() { +int grpc_ipv6_loopback_available(void) { gpr_once_init(&g_probe_ipv6_once, probe_ipv6_once); return g_ipv6_loopback_available; } diff --git a/src/core/iomgr/socket_utils_posix.h b/src/core/iomgr/socket_utils_posix.h index 9c5d93c2b4b..a84457f01de 100644 --- a/src/core/iomgr/socket_utils_posix.h +++ b/src/core/iomgr/socket_utils_posix.h @@ -61,7 +61,7 @@ int grpc_set_socket_low_latency(int fd, int low_latency); and bind IPv6 sockets, but cannot connect to a getsockname() of [::]:port without a valid loopback interface. Rather than expose this half-broken state to library users, we turn off IPv6 sockets. */ -int grpc_ipv6_loopback_available(); +int grpc_ipv6_loopback_available(void); /* An enum to keep track of IPv4/IPv6 socket modes. diff --git a/src/core/iomgr/tcp_server.h b/src/core/iomgr/tcp_server.h index d881e146b96..8ffd7d3569e 100644 --- a/src/core/iomgr/tcp_server.h +++ b/src/core/iomgr/tcp_server.h @@ -46,7 +46,7 @@ typedef struct grpc_tcp_server grpc_tcp_server; typedef void (*grpc_tcp_server_cb)(void *arg, grpc_endpoint *ep); /* Create a server, initially not bound to any ports */ -grpc_tcp_server *grpc_tcp_server_create(); +grpc_tcp_server *grpc_tcp_server_create(void); /* Start listening to bound ports */ void grpc_tcp_server_start(grpc_tcp_server *server, grpc_pollset *pollset, diff --git a/src/core/iomgr/tcp_server_posix.c b/src/core/iomgr/tcp_server_posix.c index 753e24c38e5..5762eb8a970 100644 --- a/src/core/iomgr/tcp_server_posix.c +++ b/src/core/iomgr/tcp_server_posix.c @@ -84,7 +84,7 @@ struct grpc_tcp_server { size_t port_capacity; }; -grpc_tcp_server *grpc_tcp_server_create() { +grpc_tcp_server *grpc_tcp_server_create(void) { grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server)); gpr_mu_init(&s->mu); gpr_cv_init(&s->cv); @@ -120,7 +120,7 @@ void grpc_tcp_server_destroy(grpc_tcp_server *s) { } /* get max listen queue size on linux */ -static void init_max_accept_queue_size() { +static void init_max_accept_queue_size(void) { int n = SOMAXCONN; char buf[64]; FILE *fp = fopen("/proc/sys/net/core/somaxconn", "r"); @@ -147,7 +147,7 @@ static void init_max_accept_queue_size() { } } -static int get_max_accept_queue_size() { +static int get_max_accept_queue_size(void) { gpr_once_init(&s_init_max_accept_queue_size, init_max_accept_queue_size); return s_max_accept_queue_size; } diff --git a/src/core/security/auth.h b/src/core/security/auth.h index 0b279f87409..94fa2aba7db 100644 --- a/src/core/security/auth.h +++ b/src/core/security/auth.h @@ -38,4 +38,4 @@ extern const grpc_channel_filter grpc_client_auth_filter; -#endif /* __GRPC_INTERNAL_SECURITY_AUTH_H__ */ +#endif /* __GRPC_INTERNAL_SECURITY_AUTH_H__ */ diff --git a/src/core/security/credentials.c b/src/core/security/credentials.c index d3bba0fb1f6..006d863e27b 100644 --- a/src/core/security/credentials.c +++ b/src/core/security/credentials.c @@ -637,8 +637,8 @@ grpc_credentials *grpc_fake_transport_security_credentials_create(void) { return c; } -grpc_server_credentials * -grpc_fake_transport_security_server_credentials_create() { +grpc_server_credentials *grpc_fake_transport_security_server_credentials_create( + void) { grpc_server_credentials *c = gpr_malloc(sizeof(grpc_server_credentials)); memset(c, 0, sizeof(grpc_server_credentials)); c->type = GRPC_CREDENTIALS_TYPE_FAKE_TRANSPORT_SECURITY; diff --git a/src/core/security/credentials.h b/src/core/security/credentials.h index 8559f239d51..4a2532d7c41 100644 --- a/src/core/security/credentials.h +++ b/src/core/security/credentials.h @@ -143,4 +143,4 @@ struct grpc_server_credentials { const grpc_ssl_config *grpc_ssl_server_credentials_get_config( const grpc_server_credentials *ssl_creds); -#endif /* __GRPC_INTERNAL_SECURITY_CREDENTIALS_H__ */ +#endif /* __GRPC_INTERNAL_SECURITY_CREDENTIALS_H__ */ diff --git a/src/core/security/google_root_certs.h b/src/core/security/google_root_certs.h index 4bcfaddcdb3..30ed16c03bc 100644 --- a/src/core/security/google_root_certs.h +++ b/src/core/security/google_root_certs.h @@ -37,4 +37,4 @@ extern unsigned char grpc_google_root_certs[]; extern unsigned int grpc_google_root_certs_size; -#endif /* __GRPC_INTERNAL_SECURITY_GOOGLE_ROOT_CERTS_H__ */ +#endif /* __GRPC_INTERNAL_SECURITY_GOOGLE_ROOT_CERTS_H__ */ diff --git a/src/core/security/secure_endpoint.c b/src/core/security/secure_endpoint.c index 7f0fdf73c97..e73767c1aad 100644 --- a/src/core/security/secure_endpoint.c +++ b/src/core/security/secure_endpoint.c @@ -126,8 +126,8 @@ static void on_read(void *user_data, gpr_slice *slices, size_t nslices, size_t message_size = GPR_SLICE_LENGTH(encrypted); while (message_size > 0 || keep_looping) { - gpr_uint32 unprotected_buffer_size_written = end - cur; - gpr_uint32 processed_message_size = message_size; + size_t unprotected_buffer_size_written = end - cur; + size_t processed_message_size = message_size; gpr_mu_lock(&ep->protector_mu); result = tsi_frame_protector_unprotect(ep->protector, message_bytes, &processed_message_size, cur, @@ -245,8 +245,8 @@ static grpc_endpoint_write_status endpoint_write(grpc_endpoint *secure_ep, gpr_uint8 *message_bytes = GPR_SLICE_START_PTR(plain); size_t message_size = GPR_SLICE_LENGTH(plain); while (message_size > 0) { - gpr_uint32 protected_buffer_size_to_send = end - cur; - gpr_uint32 processed_message_size = message_size; + size_t protected_buffer_size_to_send = end - cur; + size_t processed_message_size = message_size; gpr_mu_lock(&ep->protector_mu); result = tsi_frame_protector_protect(ep->protector, message_bytes, &processed_message_size, cur, @@ -268,9 +268,9 @@ static grpc_endpoint_write_status endpoint_write(grpc_endpoint *secure_ep, if (result != TSI_OK) break; } if (result == TSI_OK) { - gpr_uint32 still_pending_size; + size_t still_pending_size; do { - gpr_uint32 protected_buffer_size_to_send = end - cur; + size_t protected_buffer_size_to_send = end - cur; gpr_mu_lock(&ep->protector_mu); result = tsi_frame_protector_protect_flush(ep->protector, cur, &protected_buffer_size_to_send, diff --git a/src/core/security/secure_endpoint.h b/src/core/security/secure_endpoint.h index d0f0fa7d5bc..20143150e07 100644 --- a/src/core/security/secure_endpoint.h +++ b/src/core/security/secure_endpoint.h @@ -44,4 +44,4 @@ grpc_endpoint *grpc_secure_endpoint_create( struct tsi_frame_protector *protector, grpc_endpoint *to_wrap, gpr_slice *leftover_slices, size_t leftover_nslices); -#endif /* __GRPC_INTERNAL_ENDPOINT_SECURE_ENDPOINT_H__ */ +#endif /* __GRPC_INTERNAL_ENDPOINT_SECURE_ENDPOINT_H__ */ diff --git a/src/core/security/secure_transport_setup.c b/src/core/security/secure_transport_setup.c index 3df91ed8e7f..50a6987fbf7 100644 --- a/src/core/security/secure_transport_setup.c +++ b/src/core/security/secure_transport_setup.c @@ -131,7 +131,7 @@ static void send_handshake_bytes_to_peer(grpc_secure_transport_setup *s) { grpc_endpoint_write_status write_status; do { - uint32_t to_send_size = s->handshake_buffer_size - offset; + size_t to_send_size = s->handshake_buffer_size - offset; result = tsi_handshaker_get_bytes_to_send_to_peer( s->handshaker, s->handshake_buffer + offset, &to_send_size); offset += to_send_size; @@ -174,7 +174,7 @@ static void on_handshake_data_received_from_peer( void *setup, gpr_slice *slices, size_t nslices, grpc_endpoint_cb_status error) { grpc_secure_transport_setup *s = setup; - uint32_t consumed_slice_size = 0; + size_t consumed_slice_size = 0; tsi_result result = TSI_OK; size_t i; size_t num_left_overs; diff --git a/src/core/security/secure_transport_setup.h b/src/core/security/secure_transport_setup.h index 50f2b08529b..b13d065fbff 100644 --- a/src/core/security/secure_transport_setup.h +++ b/src/core/security/secure_transport_setup.h @@ -50,4 +50,4 @@ void grpc_setup_secure_transport(grpc_security_context *ctx, grpc_secure_transport_setup_done_cb cb, void *user_data); -#endif /* __GRPC_INTERNAL_SECURITY_SECURE_TRANSPORT_SETUP_H__ */ +#endif /* __GRPC_INTERNAL_SECURITY_SECURE_TRANSPORT_SETUP_H__ */ diff --git a/src/core/security/security_context.c b/src/core/security/security_context.c index a0c72e2d699..3a70f44a0a1 100644 --- a/src/core/security/security_context.c +++ b/src/core/security/security_context.c @@ -35,6 +35,8 @@ #include +#include "src/core/channel/channel_args.h" +#include "src/core/channel/http_client_filter.h" #include "src/core/security/credentials.h" #include "src/core/security/secure_endpoint.h" #include "src/core/surface/lame_client.h" @@ -100,8 +102,7 @@ grpc_arg grpc_security_context_to_arg(grpc_security_context *ctx) { return result; } -grpc_security_context *grpc_security_context_from_arg( - const grpc_arg *arg) { +grpc_security_context *grpc_security_context_from_arg(const grpc_arg *arg) { if (strcmp(arg->key, GRPC_SECURITY_CONTEXT_ARG)) return NULL; if (arg->type != GRPC_ARG_POINTER) { gpr_log(GPR_ERROR, "Invalid type %d for arg %s", arg->type, @@ -140,9 +141,7 @@ static void fake_channel_destroy(grpc_security_context *ctx) { gpr_free(ctx); } -static void fake_server_destroy(grpc_security_context *ctx) { - gpr_free(ctx); -} +static void fake_server_destroy(grpc_security_context *ctx) { gpr_free(ctx); } static grpc_security_status fake_channel_create_handshaker( grpc_security_context *ctx, tsi_handshaker **handshaker) { @@ -234,8 +233,7 @@ static void ssl_channel_destroy(grpc_security_context *ctx) { } static void ssl_server_destroy(grpc_security_context *ctx) { - grpc_ssl_server_security_context *c = - (grpc_ssl_server_security_context *)ctx; + grpc_ssl_server_security_context *c = (grpc_ssl_server_security_context *)ctx; if (c->handshaker_factory != NULL) { tsi_ssl_handshaker_factory_destroy(c->handshaker_factory); } @@ -267,8 +265,7 @@ static grpc_security_status ssl_channel_create_handshaker( static grpc_security_status ssl_server_create_handshaker( grpc_security_context *ctx, tsi_handshaker **handshaker) { - grpc_ssl_server_security_context *c = - (grpc_ssl_server_security_context *)ctx; + grpc_ssl_server_security_context *c = (grpc_ssl_server_security_context *)ctx; return ssl_create_handshaker(c->handshaker_factory, 0, NULL, handshaker); } @@ -414,12 +411,12 @@ grpc_security_status grpc_ssl_server_security_context_create( c->base.vtable = &ssl_server_vtable; result = tsi_create_ssl_server_handshaker_factory( (const unsigned char **)&config->pem_private_key, - (const gpr_uint32 *)&config->pem_private_key_size, + &config->pem_private_key_size, (const unsigned char **)&config->pem_cert_chain, - (const gpr_uint32 *)&config->pem_cert_chain_size, 1, - config->pem_root_certs, config->pem_root_certs_size, - GRPC_SSL_CIPHER_SUITES, alpn_protocol_strings, - alpn_protocol_string_lengths, num_alpn_protocols, &c->handshaker_factory); + &config->pem_cert_chain_size, 1, config->pem_root_certs, + config->pem_root_certs_size, GRPC_SSL_CIPHER_SUITES, + alpn_protocol_strings, alpn_protocol_string_lengths, num_alpn_protocols, + &c->handshaker_factory); if (result != TSI_OK) { gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.", tsi_result_to_string(result)); @@ -449,6 +446,8 @@ grpc_channel *grpc_ssl_channel_create(grpc_credentials *ssl_creds, grpc_security_status status = GRPC_SECURITY_OK; size_t i = 0; const char *secure_peer_name = target; + grpc_arg arg; + grpc_channel_args *new_args; for (i = 0; args && i < args->num_args; i++) { grpc_arg *arg = &args->args[i]; @@ -464,8 +463,13 @@ grpc_channel *grpc_ssl_channel_create(grpc_credentials *ssl_creds, if (status != GRPC_SECURITY_OK) { return grpc_lame_client_channel_create(); } - channel = grpc_secure_channel_create_internal(target, args, ctx); + arg.type = GRPC_ARG_STRING; + arg.key = GRPC_ARG_HTTP2_SCHEME; + arg.value.string = "https"; + new_args = grpc_channel_args_copy_and_add(args, &arg); + channel = grpc_secure_channel_create_internal(target, new_args, ctx); grpc_security_context_unref(&ctx->base); + grpc_channel_args_destroy(new_args); return channel; } diff --git a/src/core/security/security_context.h b/src/core/security/security_context.h index 65073abf0cb..9ace7f1ccb9 100644 --- a/src/core/security/security_context.h +++ b/src/core/security/security_context.h @@ -118,7 +118,7 @@ grpc_security_context *grpc_find_security_context_in_args( typedef struct grpc_channel_security_context grpc_channel_security_context; struct grpc_channel_security_context { - grpc_security_context base; /* requires is_client_side to be non 0. */ + grpc_security_context base; /* requires is_client_side to be non 0. */ grpc_credentials *request_metadata_creds; }; diff --git a/src/core/security/server_secure_chttp2.c b/src/core/security/server_secure_chttp2.c index 9d7c0e5e5a8..931fa95651b 100644 --- a/src/core/security/server_secure_chttp2.c +++ b/src/core/security/server_secure_chttp2.c @@ -70,8 +70,7 @@ static void on_accept(void *server, grpc_endpoint *tcp) { const grpc_channel_args *args = grpc_server_get_channel_args(server); grpc_security_context *ctx = grpc_find_security_context_in_args(args); GPR_ASSERT(ctx); - grpc_setup_secure_transport(ctx, tcp, on_secure_transport_setup_done, - server); + grpc_setup_secure_transport(ctx, tcp, on_secure_transport_setup_done, server); } /* Note: the following code is the same with server_chttp2.c */ diff --git a/src/core/statistics/census_init.c b/src/core/statistics/census_init.c index bcb9ff9ad4e..cbf2089f3fa 100644 --- a/src/core/statistics/census_init.c +++ b/src/core/statistics/census_init.c @@ -37,13 +37,13 @@ #include "src/core/statistics/census_rpc_stats.h" #include "src/core/statistics/census_tracing.h" -void census_init() { +void census_init(void) { gpr_log(GPR_INFO, "Initialize census library."); census_tracing_init(); census_stats_store_init(); } -void census_shutdown() { +void census_shutdown(void) { gpr_log(GPR_INFO, "Shutdown census library."); census_stats_store_shutdown(); census_tracing_shutdown(); diff --git a/src/core/statistics/census_interface.h b/src/core/statistics/census_interface.h index 7618387ee2f..8e586382f78 100644 --- a/src/core/statistics/census_interface.h +++ b/src/core/statistics/census_interface.h @@ -49,10 +49,10 @@ typedef struct census_op_id { typedef struct census_rpc_stats census_rpc_stats; /* Initializes Census library. No-op if Census is already initialized. */ -void census_init(); +void census_init(void); /* Shutdown Census Library. */ -void census_shutdown(); +void census_shutdown(void); /* Annotates grpc method name on a census_op_id. The method name has the format of /. Returns 0 iff @@ -68,9 +68,9 @@ int census_add_method_tag(census_op_id op_id, const char* method_name); void census_tracing_print(census_op_id op_id, const char* annotation); /* Starts tracing for an RPC. Returns a locally unique census_op_id */ -census_op_id census_tracing_start_op(); +census_op_id census_tracing_start_op(void); /* Ends tracing. Calling this function will invalidate the input op_id. */ void census_tracing_end_op(census_op_id op_id); -#endif /* __GRPC_INTERNAL_STATISTICS_CENSUS_INTERFACE_H__ */ +#endif /* __GRPC_INTERNAL_STATISTICS_CENSUS_INTERFACE_H__ */ diff --git a/src/core/statistics/census_log.c b/src/core/statistics/census_log.c index 56fa430bbdb..404e92cc621 100644 --- a/src/core/statistics/census_log.c +++ b/src/core/statistics/census_log.c @@ -368,7 +368,7 @@ static void cl_block_end_read(cl_block* block) { /* Allocates a new free block (or recycles an available dirty block if log is configured to discard old records). Returns NULL if out-of-space. */ -static cl_block* cl_allocate_block() { +static cl_block* cl_allocate_block(void) { cl_block* block = cl_block_list_head(&g_log.free_block_list); if (block != NULL) { cl_block_list_remove(&g_log.free_block_list, block); @@ -496,7 +496,7 @@ void census_log_initialize(size_t size_in_mb, int discard_old_records) { g_log.initialized = 1; } -void census_log_shutdown() { +void census_log_shutdown(void) { GPR_ASSERT(g_log.initialized); gpr_mu_destroy(&g_log.lock); gpr_free_aligned(g_log.core_local_blocks); @@ -551,7 +551,7 @@ void census_log_end_write(void* record, size_t bytes_written) { cl_block_end_write(cl_get_block(record), bytes_written); } -void census_log_init_reader() { +void census_log_init_reader(void) { GPR_ASSERT(g_log.initialized); gpr_mu_lock(&g_log.lock); /* If a block is locked for reading unlock it. */ @@ -584,7 +584,7 @@ const void* census_log_read_next(size_t* bytes_available) { return NULL; } -size_t census_log_remaining_space() { +size_t census_log_remaining_space(void) { size_t space; GPR_ASSERT(g_log.initialized); gpr_mu_lock(&g_log.lock); @@ -598,7 +598,7 @@ size_t census_log_remaining_space() { return space; } -int census_log_out_of_space_count() { +int census_log_out_of_space_count(void) { GPR_ASSERT(g_log.initialized); return gpr_atm_acq_load(&g_log.out_of_space_count); } diff --git a/src/core/statistics/census_log.h b/src/core/statistics/census_log.h index fa9229b1221..0d89df79929 100644 --- a/src/core/statistics/census_log.h +++ b/src/core/statistics/census_log.h @@ -53,7 +53,7 @@ void census_log_initialize(size_t size_in_mb, int discard_old_records); - no in progress or future call to any census_log functions - no incomplete records */ -void census_log_shutdown(); +void census_log_shutdown(void); /* Allocates and returns a 'size' bytes record and marks it in use. A subsequent census_log_end_write() marks the record complete. The @@ -74,7 +74,7 @@ void census_log_end_write(void* record, size_t bytes_written); is read. census_log_init_reader() starts the iteration or aborts the current iteration. */ -void census_log_init_reader(); +void census_log_init_reader(void); const void* census_log_read_next(size_t* bytes_available); /* Returns estimated remaining space across all blocks, in bytes. If log is @@ -82,10 +82,10 @@ const void* census_log_read_next(size_t* bytes_available); returns space available in empty blocks (partially filled blocks are treated as full). */ -size_t census_log_remaining_space(); +size_t census_log_remaining_space(void); /* Returns the number of times gprc_stats_log_start_write() failed due to out-of-space. */ -int census_log_out_of_space_count(); +int census_log_out_of_space_count(void); #endif /* __GRPC_INTERNAL_STATISTICS_LOG_H__ */ diff --git a/src/core/statistics/census_rpc_stats.c b/src/core/statistics/census_rpc_stats.c index a1ac2abff3b..39094b5f65a 100644 --- a/src/core/statistics/census_rpc_stats.c +++ b/src/core/statistics/census_rpc_stats.c @@ -59,9 +59,9 @@ static gpr_mu g_mu; static census_ht* g_client_stats_store = NULL; static census_ht* g_server_stats_store = NULL; -static void init_mutex() { gpr_mu_init(&g_mu); } +static void init_mutex(void) { gpr_mu_init(&g_mu); } -static void init_mutex_once() { +static void init_mutex_once(void) { gpr_once_init(&g_stats_store_mu_init, init_mutex); } @@ -85,8 +85,9 @@ static void delete_key(void* key) { gpr_free(key); } static const census_ht_option ht_opt = { CENSUS_HT_POINTER /* key type */, 1999 /* n_of_buckets */, - simple_hash /* hash function */, cmp_str_keys /* key comparator */, - delete_stats /* data deleter */, delete_key /* key deleter */}; + simple_hash /* hash function */, cmp_str_keys /* key comparator */, + delete_stats /* data deleter */, delete_key /* key deleter */ +}; static void init_rpc_stats(void* stats) { memset(stats, 0, sizeof(census_rpc_stats)); @@ -115,7 +116,7 @@ static gpr_timespec min_hour_total_intervals[3] = { static const census_window_stats_stat_info window_stats_settings = { sizeof(census_rpc_stats), init_rpc_stats, stat_add, stat_add_proportion}; -census_rpc_stats* census_rpc_stats_create_empty() { +census_rpc_stats* census_rpc_stats_create_empty(void) { census_rpc_stats* ret = (census_rpc_stats*)gpr_malloc(sizeof(census_rpc_stats)); memset(ret, 0, sizeof(census_rpc_stats)); @@ -220,7 +221,7 @@ void census_get_server_stats(census_aggregated_rpc_stats* data) { get_stats(g_server_stats_store, data); } -void census_stats_store_init() { +void census_stats_store_init(void) { gpr_log(GPR_INFO, "Initialize census stats store."); init_mutex_once(); gpr_mu_lock(&g_mu); @@ -233,7 +234,7 @@ void census_stats_store_init() { gpr_mu_unlock(&g_mu); } -void census_stats_store_shutdown() { +void census_stats_store_shutdown(void) { gpr_log(GPR_INFO, "Shutdown census stats store."); init_mutex_once(); gpr_mu_lock(&g_mu); diff --git a/src/core/statistics/census_rpc_stats.h b/src/core/statistics/census_rpc_stats.h index e1ff3ac31b7..81466907fdc 100644 --- a/src/core/statistics/census_rpc_stats.h +++ b/src/core/statistics/census_rpc_stats.h @@ -53,7 +53,7 @@ struct census_rpc_stats { }; /* Creates an empty rpc stats object on heap. */ -census_rpc_stats* census_rpc_stats_create_empty(); +census_rpc_stats* census_rpc_stats_create_empty(void); typedef struct census_per_method_rpc_stats { const char* method; @@ -91,11 +91,11 @@ void census_get_server_stats(census_aggregated_rpc_stats* data_map); DO NOT CALL from outside of grpc code. */ void census_get_client_stats(census_aggregated_rpc_stats* data_map); -void census_stats_store_init(); -void census_stats_store_shutdown(); +void census_stats_store_init(void); +void census_stats_store_shutdown(void); #ifdef __cplusplus } #endif -#endif /* __GRPC_INTERNAL_STATISTICS_CENSUS_RPC_STATS_H__ */ +#endif /* __GRPC_INTERNAL_STATISTICS_CENSUS_RPC_STATS_H__ */ diff --git a/src/core/statistics/census_tracing.c b/src/core/statistics/census_tracing.c index 45302cd6abe..1e616020715 100644 --- a/src/core/statistics/census_tracing.c +++ b/src/core/statistics/census_tracing.c @@ -76,7 +76,8 @@ static void delete_trace_obj(void* obj) { trace_obj_destroy((trace_obj*)obj); } static const census_ht_option ht_opt = { CENSUS_HT_UINT64 /* key type*/, 571 /* n_of_buckets */, NULL /* hash */, NULL /* compare_keys */, delete_trace_obj /* delete data */, - NULL /* delete key */}; + NULL /* delete key */ +}; static gpr_once g_init_mutex_once = GPR_ONCE_INIT; static gpr_mu g_mu; /* Guards following two static variables. */ @@ -93,11 +94,13 @@ static gpr_uint64 op_id_2_uint64(census_op_id* id) { return ret; } -static void init_mutex() { gpr_mu_init(&g_mu); } +static void init_mutex(void) { gpr_mu_init(&g_mu); } -static void init_mutex_once() { gpr_once_init(&g_init_mutex_once, init_mutex); } +static void init_mutex_once(void) { + gpr_once_init(&g_init_mutex_once, init_mutex); +} -census_op_id census_tracing_start_op() { +census_op_id census_tracing_start_op(void) { gpr_mu_lock(&g_mu); { trace_obj* ret = (trace_obj*)gpr_malloc(sizeof(trace_obj)); @@ -164,7 +167,7 @@ void census_tracing_end_op(census_op_id op_id) { gpr_mu_unlock(&g_mu); } -void census_tracing_init() { +void census_tracing_init(void) { gpr_log(GPR_INFO, "Initialize census trace store."); init_mutex_once(); gpr_mu_lock(&g_mu); @@ -177,7 +180,7 @@ void census_tracing_init() { gpr_mu_unlock(&g_mu); } -void census_tracing_shutdown() { +void census_tracing_shutdown(void) { gpr_log(GPR_INFO, "Shutdown census trace store."); gpr_mu_lock(&g_mu); if (g_trace_store != NULL) { @@ -189,9 +192,9 @@ void census_tracing_shutdown() { gpr_mu_unlock(&g_mu); } -void census_internal_lock_trace_store() { gpr_mu_lock(&g_mu); } +void census_internal_lock_trace_store(void) { gpr_mu_lock(&g_mu); } -void census_internal_unlock_trace_store() { gpr_mu_unlock(&g_mu); } +void census_internal_unlock_trace_store(void) { gpr_mu_unlock(&g_mu); } trace_obj* census_get_trace_obj_locked(census_op_id op_id) { if (g_trace_store == NULL) { diff --git a/src/core/statistics/census_tracing.h b/src/core/statistics/census_tracing.h index 2285a5cd6bd..604096ba543 100644 --- a/src/core/statistics/census_tracing.h +++ b/src/core/statistics/census_tracing.h @@ -38,10 +38,10 @@ typedef struct trace_obj trace_obj; /* Initializes trace store. This function is thread safe. */ -void census_tracing_init(); +void census_tracing_init(void); /* Shutsdown trace store. This function is thread safe. */ -void census_tracing_shutdown(); +void census_tracing_shutdown(void); /* Gets trace obj corresponding to the input op_id. Returns NULL if trace store is not initialized or trace obj is not found. Requires trace store being @@ -50,8 +50,8 @@ trace_obj* census_get_trace_obj_locked(census_op_id op_id); /* The following two functions acquire and release the trace store global lock. They are for census internal use only. */ -void census_internal_lock_trace_store(); -void census_internal_unlock_trace_store(); +void census_internal_lock_trace_store(void); +void census_internal_unlock_trace_store(void); /* Gets method tag name associated with the input trace object. */ const char* census_get_trace_method_name(const trace_obj* trace); diff --git a/src/core/support/alloc.c b/src/core/support/alloc.c index 658408f3341..ddf67897732 100644 --- a/src/core/support/alloc.c +++ b/src/core/support/alloc.c @@ -62,6 +62,4 @@ void *gpr_malloc_aligned(size_t size, size_t alignment) { return (void *)ret; } -void gpr_free_aligned(void *ptr) { - free(((void **)ptr)[-1]); -} +void gpr_free_aligned(void *ptr) { free(((void **)ptr)[-1]); } diff --git a/src/core/support/cpu.h b/src/core/support/cpu.h index 6ac0db35e5e..1c2dde74ee1 100644 --- a/src/core/support/cpu.h +++ b/src/core/support/cpu.h @@ -38,12 +38,12 @@ /* Return the number of CPU cores on the current system. Will return 0 if if information is not available. */ -int gpr_cpu_num_cores(); +int gpr_cpu_num_cores(void); /* Return the CPU on which the current thread is executing; N.B. This should be considered advisory only - it is possible that the thread is switched to a different CPU at any time. Returns a value in range [0, gpr_cpu_num_cores() - 1] */ -int gpr_cpu_current_cpu(); +int gpr_cpu_current_cpu(void); -#endif /* __GRPC_INTERNAL_SUPPORT_CPU_H__ */ +#endif /* __GRPC_INTERNAL_SUPPORT_CPU_H__ */ diff --git a/src/core/support/cpu_linux.c b/src/core/support/cpu_linux.c index 922b61c3c58..d8006288066 100644 --- a/src/core/support/cpu_linux.c +++ b/src/core/support/cpu_linux.c @@ -75,7 +75,7 @@ #include -int gpr_cpu_num_cores() { +int gpr_cpu_num_cores(void) { static int ncpus = 0; if (ncpus == 0) { ncpus = sysconf(_SC_NPROCESSORS_ONLN); @@ -87,7 +87,7 @@ int gpr_cpu_num_cores() { return ncpus; } -int gpr_cpu_current_cpu() { +int gpr_cpu_current_cpu(void) { int cpu = sched_getcpu(); if (cpu < 0) { gpr_log(GPR_ERROR, "Error determining current CPU: %s\n", strerror(errno)); diff --git a/src/core/support/cpu_posix.c b/src/core/support/cpu_posix.c index 3dd1c548b0e..2ea80807fc2 100644 --- a/src/core/support/cpu_posix.c +++ b/src/core/support/cpu_posix.c @@ -45,7 +45,7 @@ static __thread char magic_thread_local; -int gpr_cpu_num_cores() { +int gpr_cpu_num_cores(void) { static int ncpus = 0; if (ncpus == 0) { ncpus = sysconf(_SC_NPROCESSORS_ONLN); @@ -63,7 +63,7 @@ static size_t shard_ptr(const void *info) { return ((x >> 4) ^ (x >> 9) ^ (x >> 14)) % gpr_cpu_num_cores(); } -int gpr_cpu_current_cpu() { +int gpr_cpu_current_cpu(void) { /* NOTE: there's no way I know to return the actual cpu index portably... most code that's using this is using it to shard across work queues though, so here we use thread identity instead to achieve a similar though not diff --git a/src/core/support/log_linux.c b/src/core/support/log_linux.c index 36fb4b5051f..a0307e1a9a4 100644 --- a/src/core/support/log_linux.c +++ b/src/core/support/log_linux.c @@ -47,7 +47,7 @@ #include #include -static long gettid() { return syscall(__NR_gettid); } +static long gettid(void) { return syscall(__NR_gettid); } void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format, ...) { diff --git a/src/core/support/log_posix.c b/src/core/support/log_posix.c index 0420570a3ec..1292c9e8c35 100644 --- a/src/core/support/log_posix.c +++ b/src/core/support/log_posix.c @@ -31,21 +31,26 @@ * */ -#define _POSIX_SOURCE +#ifndef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 200112L +#endif + #define _GNU_SOURCE #include #if defined(GPR_POSIX_LOG) +#include #include #include #include #include #include +#include #include #include -static long gettid() { return pthread_self(); } +static gpr_intptr gettid(void) { return (gpr_intptr)pthread_self(); } void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format, ...) { @@ -55,7 +60,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity, int ret; va_list args; va_start(args, format); - ret = vsnprintf(buf, format, args); + ret = vsnprintf(buf, sizeof(buf), format, args); va_end(args); if (ret < 0) { message = NULL; @@ -64,7 +69,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity, } else { message = allocated = gpr_malloc(ret + 1); va_start(args, format); - vsnprintf(message, format, args); + vsnprintf(message, ret, format, args); va_end(args); } gpr_log_message(file, line, severity, message); @@ -91,7 +96,7 @@ void gpr_default_log(gpr_log_func_args *args) { strcpy(time_buffer, "error:strftime"); } - fprintf(stderr, "%s%s.%09d %7ld %s:%d] %s\n", + fprintf(stderr, "%s%s.%09d %7tu %s:%d] %s\n", gpr_log_severity_string(args->severity), time_buffer, (int)(now.tv_nsec), gettid(), display_file, args->line, args->message); diff --git a/src/core/support/log_win32.c b/src/core/support/log_win32.c index ae5f23a90dc..dc8c1d0785a 100644 --- a/src/core/support/log_win32.c +++ b/src/core/support/log_win32.c @@ -36,12 +36,13 @@ #ifdef GPR_WIN32 #include +#include #include #include void gpr_log(const char *file, int line, gpr_log_severity severity, - const char *message) { - const char *message = NULL; + const char *format, ...) { + char *message = NULL; va_list args; int ret; @@ -53,7 +54,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity, message = NULL; } else { /* Allocate a new buffer, with space for the NUL terminator. */ - strp_buflen = (size_t)ret + 1; + size_t strp_buflen = (size_t)ret + 1; message = gpr_malloc(strp_buflen); /* Print to the buffer. */ @@ -73,7 +74,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity, /* Simple starter implementation */ void gpr_default_log(gpr_log_func_args *args) { - fprintf(stderr, "%s %s:%d: %s\n", gpr_log_severity_string(severity), + fprintf(stderr, "%s %s:%d: %s\n", gpr_log_severity_string(args->severity), args->file, args->line, args->message); } diff --git a/src/core/support/murmur_hash.c b/src/core/support/murmur_hash.c index 5d30263e521..08b1eb80d8f 100644 --- a/src/core/support/murmur_hash.c +++ b/src/core/support/murmur_hash.c @@ -46,8 +46,8 @@ handle aligned reads, do the conversion here */ #define GETBLOCK32(p, i) (p)[(i)] -gpr_uint32 gpr_murmur_hash3(const void* key, size_t len, gpr_uint32 seed) { - const gpr_uint8* data = (const gpr_uint8*)key; +gpr_uint32 gpr_murmur_hash3(const void *key, size_t len, gpr_uint32 seed) { + const gpr_uint8 *data = (const gpr_uint8 *)key; const int nblocks = len / 4; int i; @@ -57,8 +57,8 @@ gpr_uint32 gpr_murmur_hash3(const void* key, size_t len, gpr_uint32 seed) { const gpr_uint32 c1 = 0xcc9e2d51; const gpr_uint32 c2 = 0x1b873593; - const gpr_uint32* blocks = (const uint32_t*)(data + nblocks * 4); - const uint8_t* tail = (const uint8_t*)(data + nblocks * 4); + const gpr_uint32 *blocks = (const uint32_t *)(data + nblocks * 4); + const uint8_t *tail = (const uint8_t *)(data + nblocks * 4); /* body */ for (i = -nblocks; i; i++) { diff --git a/src/core/support/murmur_hash.h b/src/core/support/murmur_hash.h index 5643717cd22..2ebf3e57b1f 100644 --- a/src/core/support/murmur_hash.h +++ b/src/core/support/murmur_hash.h @@ -41,4 +41,4 @@ /* compute the hash of key (length len) */ gpr_uint32 gpr_murmur_hash3(const void *key, size_t len, gpr_uint32 seed); -#endif /* __GRPC_INTERNAL_SUPPORT_MURMUR_HASH_H__ */ +#endif /* __GRPC_INTERNAL_SUPPORT_MURMUR_HASH_H__ */ diff --git a/src/core/support/slice.c b/src/core/support/slice.c index fcdeb478fb6..836a5a6c2a7 100644 --- a/src/core/support/slice.c +++ b/src/core/support/slice.c @@ -37,7 +37,7 @@ #include -gpr_slice gpr_empty_slice() { +gpr_slice gpr_empty_slice(void) { gpr_slice out; out.refcount = 0; out.data.inlined.length = 0; diff --git a/src/core/support/string.c b/src/core/support/string.c index b1f07958466..7960547735b 100644 --- a/src/core/support/string.c +++ b/src/core/support/string.c @@ -63,7 +63,7 @@ typedef struct { char *data; } hexout; -static hexout hexout_create() { +static hexout hexout_create(void) { hexout r = {0, 0, NULL}; return r; } diff --git a/src/core/support/thd_internal.h b/src/core/support/thd_internal.h index 519177a5551..190d4e36681 100644 --- a/src/core/support/thd_internal.h +++ b/src/core/support/thd_internal.h @@ -36,4 +36,4 @@ /* Internal interfaces between modules within the gpr support library. */ -#endif /* __GRPC_INTERNAL_SUPPORT_THD_INTERNAL_H__ */ +#endif /* __GRPC_INTERNAL_SUPPORT_THD_INTERNAL_H__ */ diff --git a/src/core/support/time.c b/src/core/support/time.c index 0e88c65be0c..97243318fda 100644 --- a/src/core/support/time.c +++ b/src/core/support/time.c @@ -259,7 +259,7 @@ gpr_int32 gpr_time_to_millis(gpr_timespec t) { } else if (t.tv_sec <= -2147483) { /* TODO(ctiller): correct handling here (it's so far in the past do we care?) */ - return -2147483648; + return -2147483647; } else { return t.tv_sec * GPR_MS_PER_SEC + t.tv_nsec / GPR_NS_PER_MS; } diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 9c5f5064eba..46502fb6b14 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -178,6 +178,7 @@ struct grpc_call { gpr_uint8 received_metadata; gpr_uint8 have_read; gpr_uint8 have_alarm; + gpr_uint8 got_status_code; /* The current outstanding read message tag (only valid if have_read == 1) */ void *read_tag; void *metadata_tag; @@ -225,6 +226,7 @@ grpc_call *grpc_call_create(grpc_channel *channel, call->have_write = 0; call->have_alarm = 0; call->received_metadata = 0; + call->got_status_code = 0; call->status_code = server_transport_data != NULL ? GRPC_STATUS_OK : GRPC_STATUS_UNKNOWN; call->status_details = NULL; @@ -268,6 +270,19 @@ void grpc_call_destroy(grpc_call *c) { grpc_call_internal_unref(c); } +static void maybe_set_status_code(grpc_call *call, gpr_uint32 status) { + if (!call->got_status_code) { + call->status_code = status; + call->got_status_code = 1; + } +} + +static void maybe_set_status_details(grpc_call *call, grpc_mdstr *status) { + if (!call->status_details) { + call->status_details = grpc_mdstr_ref(status); + } +} + grpc_call_error grpc_call_cancel(grpc_call *c) { grpc_call_element *elem; grpc_call_op op; @@ -284,6 +299,21 @@ grpc_call_error grpc_call_cancel(grpc_call *c) { return GRPC_CALL_OK; } +grpc_call_error grpc_call_cancel_with_status(grpc_call *c, + grpc_status_code status, + const char *description) { + grpc_mdstr *details = + description ? grpc_mdstr_from_string(c->metadata_context, description) + : NULL; + gpr_mu_lock(&c->read_mu); + maybe_set_status_code(c, status); + if (details) { + maybe_set_status_details(c, details); + } + gpr_mu_unlock(&c->read_mu); + return grpc_call_cancel(c); +} + void grpc_call_execute_op(grpc_call *call, grpc_call_op *op) { grpc_call_element *elem; GPR_ASSERT(op->dir == GRPC_CALL_DOWN); @@ -505,17 +535,6 @@ grpc_call_error grpc_call_server_end_initial_metadata(grpc_call *call, return GRPC_CALL_OK; } -grpc_call_error grpc_call_accept(grpc_call *call, grpc_completion_queue *cq, - void *finished_tag, gpr_uint32 flags) { - grpc_call_error err; - - err = grpc_call_server_accept(call, cq, finished_tag); - if (err != GRPC_CALL_OK) return err; - err = grpc_call_server_end_initial_metadata(call, flags); - if (err != GRPC_CALL_OK) return err; - return GRPC_CALL_OK; -} - static void done_writes_done(void *user_data, grpc_op_error error) { grpc_call *call = user_data; void *tag = call->write_tag; @@ -782,7 +801,7 @@ static gpr_uint32 decode_status(grpc_mdelem *md) { gpr_uint32 status; void *user_data = grpc_mdelem_get_user_data(md, destroy_status); if (user_data) { - status = ((gpr_uint32)(gpr_intptr)user_data) - STATUS_OFFSET; + status = ((gpr_uint32)(gpr_intptr) user_data) - STATUS_OFFSET; } else { if (!gpr_parse_bytes_to_uint32(grpc_mdstr_as_c_string(md->value), GPR_SLICE_LENGTH(md->value->slice), @@ -800,14 +819,11 @@ void grpc_call_recv_metadata(grpc_call_element *elem, grpc_call_op *op) { grpc_mdelem *md = op->data.metadata; grpc_mdstr *key = md->key; if (key == grpc_channel_get_status_string(call->channel)) { - call->status_code = decode_status(md); + maybe_set_status_code(call, decode_status(md)); grpc_mdelem_unref(md); op->done_cb(op->user_data, GRPC_OP_OK); } else if (key == grpc_channel_get_message_string(call->channel)) { - if (call->status_details) { - grpc_mdstr_unref(call->status_details); - } - call->status_details = grpc_mdstr_ref(md->value); + maybe_set_status_details(call, md->value); grpc_mdelem_unref(md); op->done_cb(op->user_data, GRPC_OP_OK); } else { @@ -881,7 +897,12 @@ grpc_metadata_buffer *grpc_call_get_metadata_buffer(grpc_call *call) { static void call_alarm(void *arg, int success) { grpc_call *call = arg; if (success) { - grpc_call_cancel(call); + if (call->is_client) { + grpc_call_cancel_with_status(call, GRPC_STATUS_DEADLINE_EXCEEDED, + "Deadline Exceeded"); + } else { + grpc_call_cancel(call); + } } grpc_call_internal_unref(call); } diff --git a/src/core/surface/call.h b/src/core/surface/call.h index 5c2ef3be187..01605bb38a7 100644 --- a/src/core/surface/call.h +++ b/src/core/surface/call.h @@ -73,4 +73,4 @@ grpc_metadata_buffer *grpc_call_get_metadata_buffer(grpc_call *call); void grpc_call_add_mdelem(grpc_call *call, grpc_mdelem *mdelem, gpr_uint32 flags); -#endif /* __GRPC_INTERNAL_SURFACE_CALL_H__ */ +#endif /* __GRPC_INTERNAL_SURFACE_CALL_H__ */ diff --git a/src/core/surface/channel.h b/src/core/surface/channel.h index 11d4939916a..b3ea2ede403 100644 --- a/src/core/surface/channel.h +++ b/src/core/surface/channel.h @@ -48,4 +48,4 @@ grpc_mdstr *grpc_channel_get_message_string(grpc_channel *channel); void grpc_channel_internal_ref(grpc_channel *channel); void grpc_channel_internal_unref(grpc_channel *channel); -#endif /* __GRPC_INTERNAL_SURFACE_CHANNEL_H__ */ +#endif /* __GRPC_INTERNAL_SURFACE_CHANNEL_H__ */ diff --git a/src/core/surface/client.c b/src/core/surface/client.c index 98cb460d630..74c79bdf9b1 100644 --- a/src/core/surface/client.c +++ b/src/core/surface/client.c @@ -106,8 +106,7 @@ static void init_channel_elem(grpc_channel_element *elem, GPR_ASSERT(!is_last); } -static void destroy_channel_elem(grpc_channel_element *elem) { -} +static void destroy_channel_elem(grpc_channel_element *elem) {} const grpc_channel_filter grpc_client_surface_filter = { call_op, channel_op, diff --git a/src/core/surface/client.h b/src/core/surface/client.h index eb567276e2a..cff3d401d92 100644 --- a/src/core/surface/client.h +++ b/src/core/surface/client.h @@ -38,4 +38,4 @@ extern const grpc_channel_filter grpc_client_surface_filter; -#endif /* __GRPC_INTERNAL_SURFACE_CLIENT_H__ */ +#endif /* __GRPC_INTERNAL_SURFACE_CLIENT_H__ */ diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c index b59c36e03a7..652f23e8889 100644 --- a/src/core/surface/completion_queue.c +++ b/src/core/surface/completion_queue.c @@ -85,7 +85,7 @@ struct grpc_completion_queue { /* Default do-nothing on_finish function */ static void null_on_finish(void *user_data, grpc_op_error error) {} -grpc_completion_queue *grpc_completion_queue_create() { +grpc_completion_queue *grpc_completion_queue_create(void) { grpc_completion_queue *cc = gpr_malloc(sizeof(grpc_completion_queue)); memset(cc, 0, sizeof(*cc)); /* Initial ref is dropped by grpc_completion_queue_shutdown */ @@ -155,6 +155,13 @@ static void end_op_locked(grpc_completion_queue *cc, } } +void grpc_cq_end_server_shutdown(grpc_completion_queue *cc, void *tag) { + gpr_mu_lock(GRPC_POLLSET_MU(&cc->pollset)); + add_locked(cc, GRPC_SERVER_SHUTDOWN, tag, NULL, NULL, NULL); + end_op_locked(cc, GRPC_SERVER_SHUTDOWN); + gpr_mu_unlock(GRPC_POLLSET_MU(&cc->pollset)); +} + void grpc_cq_end_read(grpc_completion_queue *cc, void *tag, grpc_call *call, grpc_event_finish_func on_finish, void *user_data, grpc_byte_buffer *read) { @@ -251,7 +258,7 @@ void grpc_cq_end_new_rpc(grpc_completion_queue *cc, void *tag, grpc_call *call, } /* Create a GRPC_QUEUE_SHUTDOWN event without queuing it anywhere */ -static event *create_shutdown_event() { +static event *create_shutdown_event(void) { event *ev = gpr_malloc(sizeof(event)); ev->base.type = GRPC_QUEUE_SHUTDOWN; ev->base.call = NULL; diff --git a/src/core/surface/completion_queue.h b/src/core/surface/completion_queue.h index 2e752a3fe00..85984075f78 100644 --- a/src/core/surface/completion_queue.h +++ b/src/core/surface/completion_queue.h @@ -97,6 +97,8 @@ void grpc_cq_end_new_rpc(grpc_completion_queue *cc, void *tag, grpc_call *call, gpr_timespec deadline, size_t metadata_count, grpc_metadata *metadata_elements); +void grpc_cq_end_server_shutdown(grpc_completion_queue *cc, void *tag); + /* disable polling for some tests */ void grpc_completion_queue_dont_poll_test_only(grpc_completion_queue *cc); @@ -104,4 +106,4 @@ void grpc_cq_dump_pending_ops(grpc_completion_queue *cc); grpc_pollset *grpc_cq_pollset(grpc_completion_queue *cc); -#endif /* __GRPC_INTERNAL_SURFACE_COMPLETION_QUEUE_H__ */ +#endif /* __GRPC_INTERNAL_SURFACE_COMPLETION_QUEUE_H__ */ diff --git a/src/core/surface/event_string.c b/src/core/surface/event_string.c index 8bd80495205..8ae2af74726 100644 --- a/src/core/surface/event_string.c +++ b/src/core/surface/event_string.c @@ -63,6 +63,9 @@ char *grpc_event_string(grpc_event *ev) { if (ev == NULL) return gpr_strdup("null"); switch (ev->type) { + case GRPC_SERVER_SHUTDOWN: + p += sprintf(p, "SERVER_SHUTDOWN"); + break; case GRPC_QUEUE_SHUTDOWN: p += sprintf(p, "QUEUE_SHUTDOWN"); break; diff --git a/src/core/surface/event_string.h b/src/core/surface/event_string.h index 30b693e95cd..b34e2d152b5 100644 --- a/src/core/surface/event_string.h +++ b/src/core/surface/event_string.h @@ -39,4 +39,4 @@ /* Returns a string describing an event. Must be later freed with gpr_free() */ char *grpc_event_string(grpc_event *ev); -#endif /* __GRPC_INTERNAL_SURFACE_EVENT_STRING_H__ */ +#endif /* __GRPC_INTERNAL_SURFACE_EVENT_STRING_H__ */ diff --git a/src/core/surface/init.c b/src/core/surface/init.c index 832ec085c79..b5019eb03f0 100644 --- a/src/core/surface/init.c +++ b/src/core/surface/init.c @@ -35,12 +35,12 @@ #include "src/core/statistics/census_interface.h" #include "src/core/iomgr/iomgr.h" -void grpc_init() { +void grpc_init(void) { grpc_iomgr_init(); census_init(); } -void grpc_shutdown() { +void grpc_shutdown(void) { grpc_iomgr_shutdown(); census_shutdown(); } diff --git a/src/core/surface/lame_client.c b/src/core/surface/lame_client.c index 5fa3e42362c..a5244dbe61f 100644 --- a/src/core/surface/lame_client.c +++ b/src/core/surface/lame_client.c @@ -111,9 +111,9 @@ static void destroy_channel_elem(grpc_channel_element *elem) { } static const grpc_channel_filter lame_filter = { - call_op, channel_op, + call_op, channel_op, - sizeof(call_data), init_call_elem, destroy_call_elem, + sizeof(call_data), init_call_elem, destroy_call_elem, sizeof(channel_data), init_channel_elem, destroy_channel_elem, diff --git a/src/core/surface/server.c b/src/core/surface/server.c index aa544a97f28..cbdd3bfa308 100644 --- a/src/core/surface/server.c +++ b/src/core/surface/server.c @@ -81,6 +81,8 @@ struct grpc_server { size_t tag_cap; gpr_uint8 shutdown; + gpr_uint8 have_shutdown_tag; + void *shutdown_tag; call_data *lists[CALL_LIST_COUNT]; channel_data root_channel_data; @@ -375,6 +377,10 @@ static void destroy_call_elem(grpc_call_element *elem) { for (i = 0; i < CALL_LIST_COUNT; i++) { call_list_remove(chand->server, elem->call_data, i); } + if (chand->server->shutdown && chand->server->have_shutdown_tag && + chand->server->lists[ALL_CALLS] == NULL) { + grpc_cq_end_server_shutdown(chand->server->cq, chand->server->shutdown_tag); + } gpr_mu_unlock(&chand->server->mu); server_unref(chand->server); @@ -513,7 +519,8 @@ grpc_transport_setup_result grpc_server_setup_transport( grpc_channel_get_channel_stack(channel), transport); } -void grpc_server_shutdown(grpc_server *server) { +void shutdown_internal(grpc_server *server, gpr_uint8 have_shutdown_tag, + void *shutdown_tag) { listener *l; void **tags; size_t ntags; @@ -551,6 +558,14 @@ void grpc_server_shutdown(grpc_server *server) { server->ntags = 0; server->shutdown = 1; + server->have_shutdown_tag = have_shutdown_tag; + server->shutdown_tag = shutdown_tag; + if (have_shutdown_tag) { + grpc_cq_begin_op(server->cq, NULL, GRPC_SERVER_SHUTDOWN); + if (server->lists[ALL_CALLS] == NULL) { + grpc_cq_end_server_shutdown(server->cq, shutdown_tag); + } + } gpr_mu_unlock(&server->mu); for (i = 0; i < nchannels; i++) { @@ -583,6 +598,14 @@ void grpc_server_shutdown(grpc_server *server) { } } +void grpc_server_shutdown(grpc_server *server) { + shutdown_internal(server, 0, NULL); +} + +void grpc_server_shutdown_and_notify(grpc_server *server, void *tag) { + shutdown_internal(server, 1, tag); +} + void grpc_server_destroy(grpc_server *server) { channel_data *c; gpr_mu_lock(&server->mu); diff --git a/src/core/surface/server.h b/src/core/surface/server.h index 61292ebe4e6..50574d66a40 100644 --- a/src/core/surface/server.h +++ b/src/core/surface/server.h @@ -60,4 +60,4 @@ grpc_transport_setup_result grpc_server_setup_transport( const grpc_channel_args *grpc_server_get_channel_args(grpc_server *server); -#endif /* __GRPC_INTERNAL_SURFACE_SERVER_H__ */ +#endif /* __GRPC_INTERNAL_SURFACE_SERVER_H__ */ diff --git a/src/core/surface/surface_trace.h b/src/core/surface/surface_trace.h index f6f9acfd9cf..df1aea9669e 100644 --- a/src/core/surface/surface_trace.h +++ b/src/core/surface/surface_trace.h @@ -51,4 +51,4 @@ } while (0) #endif -#endif /* __GRPC_INTERNAL_SURFACE_SURFACE_TRACE_H__ */ +#endif /* __GRPC_INTERNAL_SURFACE_SURFACE_TRACE_H__ */ diff --git a/src/core/transport/chttp2/alpn.c b/src/core/transport/chttp2/alpn.c index 8107406f8b5..bc4e789f60c 100644 --- a/src/core/transport/chttp2/alpn.c +++ b/src/core/transport/chttp2/alpn.c @@ -46,7 +46,7 @@ int grpc_chttp2_is_alpn_version_supported(const char *version, size_t size) { return 0; } -size_t grpc_chttp2_num_alpn_versions() { +size_t grpc_chttp2_num_alpn_versions(void) { return GPR_ARRAY_SIZE(supported_versions); } diff --git a/src/core/transport/chttp2/alpn.h b/src/core/transport/chttp2/alpn.h index de4da8fedb0..cb96f17831f 100644 --- a/src/core/transport/chttp2/alpn.h +++ b/src/core/transport/chttp2/alpn.h @@ -40,7 +40,7 @@ int grpc_chttp2_is_alpn_version_supported(const char *version, size_t size); /* Returns the number of protocol versions to advertise */ -size_t grpc_chttp2_num_alpn_versions(); +size_t grpc_chttp2_num_alpn_versions(void); /* Returns the protocol version at index i (0 <= i < * grpc_chttp2_num_alpn_versions()) */ diff --git a/src/core/transport/chttp2/frame.h b/src/core/transport/chttp2/frame.h index a04e442ed6e..6d286383091 100644 --- a/src/core/transport/chttp2/frame.h +++ b/src/core/transport/chttp2/frame.h @@ -77,4 +77,4 @@ typedef struct { #define GRPC_CHTTP2_DATA_FLAG_PADDED 8 #define GRPC_CHTTP2_FLAG_HAS_PRIORITY 0x20 -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_H__ */ diff --git a/src/core/transport/chttp2/frame_data.c b/src/core/transport/chttp2/frame_data.c index fbd3b6cabfe..c22a2237370 100644 --- a/src/core/transport/chttp2/frame_data.c +++ b/src/core/transport/chttp2/frame_data.c @@ -161,4 +161,3 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( abort(); return GRPC_CHTTP2_CONNECTION_ERROR; } - diff --git a/src/core/transport/chttp2/frame_data.h b/src/core/transport/chttp2/frame_data.h index abe26dab766..c260059e8b9 100644 --- a/src/core/transport/chttp2/frame_data.h +++ b/src/core/transport/chttp2/frame_data.h @@ -77,4 +77,4 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( /* create a slice with an empty data frame and is_last set */ gpr_slice grpc_chttp2_data_frame_create_empty_close(gpr_uint32 id); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_DATA_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_DATA_H__ */ diff --git a/src/core/transport/chttp2/frame_ping.h b/src/core/transport/chttp2/frame_ping.h index a64d53644b7..fa778c51b2f 100644 --- a/src/core/transport/chttp2/frame_ping.h +++ b/src/core/transport/chttp2/frame_ping.h @@ -50,4 +50,4 @@ grpc_chttp2_parse_error grpc_chttp2_ping_parser_begin_frame( grpc_chttp2_parse_error grpc_chttp2_ping_parser_parse( void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_PING_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_PING_H__ */ diff --git a/src/core/transport/chttp2/frame_rst_stream.h b/src/core/transport/chttp2/frame_rst_stream.h index 78aea0f26aa..dbb262971b3 100644 --- a/src/core/transport/chttp2/frame_rst_stream.h +++ b/src/core/transport/chttp2/frame_rst_stream.h @@ -38,4 +38,4 @@ gpr_slice grpc_chttp2_rst_stream_create(gpr_uint32 stream_id, gpr_uint32 code); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H__ */ diff --git a/src/core/transport/chttp2/frame_settings.c b/src/core/transport/chttp2/frame_settings.c index d8bc4928708..3ca973c07bf 100644 --- a/src/core/transport/chttp2/frame_settings.c +++ b/src/core/transport/chttp2/frame_settings.c @@ -102,7 +102,7 @@ gpr_slice grpc_chttp2_settings_create(gpr_uint32 *old, const gpr_uint32 *new, return output; } -gpr_slice grpc_chttp2_settings_ack_create() { +gpr_slice grpc_chttp2_settings_ack_create(void) { gpr_slice output = gpr_slice_malloc(9); fill_header(GPR_SLICE_START_PTR(output), 0, GRPC_CHTTP2_FLAG_ACK); return output; diff --git a/src/core/transport/chttp2/frame_settings.h b/src/core/transport/chttp2/frame_settings.h index dcb8b00ca19..fc513913d90 100644 --- a/src/core/transport/chttp2/frame_settings.h +++ b/src/core/transport/chttp2/frame_settings.h @@ -88,7 +88,7 @@ extern const grpc_chttp2_setting_parameters gpr_slice grpc_chttp2_settings_create(gpr_uint32 *old, const gpr_uint32 *new, gpr_uint32 force_mask, size_t count); /* Create an ack settings frame */ -gpr_slice grpc_chttp2_settings_ack_create(); +gpr_slice grpc_chttp2_settings_ack_create(void); grpc_chttp2_parse_error grpc_chttp2_settings_parser_begin_frame( grpc_chttp2_settings_parser *parser, gpr_uint32 length, gpr_uint8 flags, @@ -96,4 +96,4 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_begin_frame( grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_SETTINGS_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_SETTINGS_H__ */ diff --git a/src/core/transport/chttp2/frame_window_update.h b/src/core/transport/chttp2/frame_window_update.h index 4b789fcc4ab..2d9e6c4dcb7 100644 --- a/src/core/transport/chttp2/frame_window_update.h +++ b/src/core/transport/chttp2/frame_window_update.h @@ -52,4 +52,4 @@ grpc_chttp2_parse_error grpc_chttp2_window_update_parser_begin_frame( grpc_chttp2_parse_error grpc_chttp2_window_update_parser_parse( void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H__ */ diff --git a/src/core/transport/chttp2/gen_hpack_tables.c b/src/core/transport/chttp2/gen_hpack_tables.c index 3b9e8ed4dc1..cd78fcc39aa 100644 --- a/src/core/transport/chttp2/gen_hpack_tables.c +++ b/src/core/transport/chttp2/gen_hpack_tables.c @@ -86,7 +86,7 @@ static unsigned char suffix_mask(unsigned char prefix_len) { return ~prefix_mask(prefix_len); } -static void generate_first_byte_lut() { +static void generate_first_byte_lut(void) { int i, j, n; const spec *chrspec; unsigned char suffix; @@ -136,21 +136,21 @@ typedef struct { char included[GRPC_CHTTP2_NUM_HUFFSYMS]; } symset; typedef struct { int values[16]; } nibblelut; /* returns a symset that includes all possible symbols */ -static symset symset_all() { +static symset symset_all(void) { symset x; memset(x.included, 1, sizeof(x.included)); return x; } /* returns a symset that includes no symbols */ -static symset symset_none() { +static symset symset_none(void) { symset x; memset(x.included, 0, sizeof(x.included)); return x; } /* returns an empty nibblelut */ -static nibblelut nibblelut_empty() { +static nibblelut nibblelut_empty(void) { nibblelut x; int i; for (i = 0; i < 16; i++) { @@ -296,7 +296,7 @@ static void dump_ctbl(const char *name) { printf("};\n"); } -static void generate_huff_tables() { +static void generate_huff_tables(void) { int i; build_dec_tbl(state_index(0, symset_all(), &i), 0, 0, 0, -1, symset_all()); @@ -317,7 +317,7 @@ static void generate_huff_tables() { dump_ctbl("emit_sub_tbl"); } -static void generate_base64_huff_encoder_table() { +static void generate_base64_huff_encoder_table(void) { static const char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; int i; @@ -332,7 +332,7 @@ static void generate_base64_huff_encoder_table() { printf("};\n"); } -static void generate_base64_inverse_table() { +static void generate_base64_inverse_table(void) { static const char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; unsigned char inverse[256]; diff --git a/src/core/transport/chttp2/hpack_parser.h b/src/core/transport/chttp2/hpack_parser.h index 799513e7fff..b0a0d76713c 100644 --- a/src/core/transport/chttp2/hpack_parser.h +++ b/src/core/transport/chttp2/hpack_parser.h @@ -108,4 +108,4 @@ grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( void *hpack_parser, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_HPACK_PARSER_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_HPACK_PARSER_H__ */ diff --git a/src/core/transport/chttp2/hpack_table.h b/src/core/transport/chttp2/hpack_table.h index a3a07ad014d..84a8e2d1e08 100644 --- a/src/core/transport/chttp2/hpack_table.h +++ b/src/core/transport/chttp2/hpack_table.h @@ -94,4 +94,4 @@ typedef struct { grpc_chttp2_hptbl_find_result grpc_chttp2_hptbl_find( const grpc_chttp2_hptbl *tbl, grpc_mdelem *md); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_HPACK_TABLE_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_HPACK_TABLE_H__ */ diff --git a/src/core/transport/chttp2/http2_errors.h b/src/core/transport/chttp2/http2_errors.h index d065422c6f0..7791da6d5ad 100644 --- a/src/core/transport/chttp2/http2_errors.h +++ b/src/core/transport/chttp2/http2_errors.h @@ -53,4 +53,4 @@ typedef enum { GRPC_CHTTP2__ERROR_DO_NOT_USE = -1 } grpc_chttp2_error_code; -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_HTTP2_ERRORS_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_HTTP2_ERRORS_H__ */ diff --git a/src/core/transport/chttp2/status_conversion.h b/src/core/transport/chttp2/status_conversion.h index ae9e7f2ca3e..f78d81e0aab 100644 --- a/src/core/transport/chttp2/status_conversion.h +++ b/src/core/transport/chttp2/status_conversion.h @@ -47,4 +47,4 @@ grpc_status_code grpc_chttp2_http2_error_to_grpc_status( grpc_status_code grpc_chttp2_http2_status_to_grpc_status(int status); int grpc_chttp2_grpc_status_to_http2_status(grpc_status_code status); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_STATUS_CONVERSION_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_STATUS_CONVERSION_H__ */ diff --git a/src/core/transport/chttp2/stream_encoder.h b/src/core/transport/chttp2/stream_encoder.h index 4b093e84959..147b1d31ffe 100644 --- a/src/core/transport/chttp2/stream_encoder.h +++ b/src/core/transport/chttp2/stream_encoder.h @@ -90,4 +90,4 @@ void grpc_chttp2_encode(grpc_stream_op *ops, size_t ops_count, int eof, grpc_chttp2_hpack_compressor *compressor, gpr_slice_buffer *output); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_STREAM_ENCODER_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_STREAM_ENCODER_H__ */ diff --git a/src/core/transport/chttp2/stream_map.h b/src/core/transport/chttp2/stream_map.h index caaee30676b..03bf719f376 100644 --- a/src/core/transport/chttp2/stream_map.h +++ b/src/core/transport/chttp2/stream_map.h @@ -78,4 +78,4 @@ void grpc_chttp2_stream_map_for_each(grpc_chttp2_stream_map *map, void *value), void *user_data); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_STREAM_MAP_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_STREAM_MAP_H__ */ diff --git a/src/core/transport/chttp2/varint.h b/src/core/transport/chttp2/varint.h index 780390238fa..55f92af3d6e 100644 --- a/src/core/transport/chttp2/varint.h +++ b/src/core/transport/chttp2/varint.h @@ -58,16 +58,16 @@ void grpc_chttp2_hpack_write_varint_tail(gpr_uint32 tail_value, : grpc_chttp2_hpack_varint_length( \ (n)-GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits))) -#define GRPC_CHTTP2_WRITE_VARINT(n, prefix_bits, prefix_or, target, length) \ - do { \ - gpr_uint8* tgt = target; \ - if ((length) == 1) { \ - (tgt)[0] = (prefix_or) | (n); \ - } else { \ - (tgt)[0] = (prefix_or) | GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits); \ - grpc_chttp2_hpack_write_varint_tail( \ - (n)-GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits), (tgt) + 1, (length)-1); \ - } \ +#define GRPC_CHTTP2_WRITE_VARINT(n, prefix_bits, prefix_or, target, length) \ + do { \ + gpr_uint8* tgt = target; \ + if ((length) == 1) { \ + (tgt)[0] = (prefix_or) | (n); \ + } else { \ + (tgt)[0] = (prefix_or) | GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits); \ + grpc_chttp2_hpack_write_varint_tail( \ + (n)-GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits), (tgt)+1, (length)-1); \ + } \ } while (0) -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_VARINT_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_VARINT_H__ */ diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 1b90d4715b3..e61afb71ae8 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -525,7 +525,7 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, lock(t); s->id = 0; } else { - s->id = (gpr_uint32)(gpr_uintptr)server_data; + s->id = (gpr_uint32)(gpr_uintptr) server_data; t->incoming_stream = s; grpc_chttp2_stream_map_add(&t->stream_map, s->id, s); } @@ -1238,7 +1238,7 @@ static int init_header_frame_parser(transport *t, int is_continuation) { t->incoming_stream = NULL; /* if stream is accepted, we set incoming_stream in init_stream */ t->cb->accept_stream(t->cb_user_data, &t->base, - (void *)(gpr_uintptr)t->incoming_stream_id); + (void *)(gpr_uintptr) t->incoming_stream_id); s = t->incoming_stream; if (!s) { gpr_log(GPR_ERROR, "stream not accepted"); @@ -1503,8 +1503,9 @@ static int process_read(transport *t, gpr_slice slice) { "Connect string mismatch: expected '%c' (%d) got '%c' (%d) " "at byte %d", CLIENT_CONNECT_STRING[t->deframe_state], - (int)(gpr_uint8)CLIENT_CONNECT_STRING[t->deframe_state], *cur, - (int)*cur, t->deframe_state); + (int)(gpr_uint8) CLIENT_CONNECT_STRING[t->deframe_state], + *cur, (int)*cur, t->deframe_state); + drop_connection(t); return 0; } ++cur; @@ -1737,9 +1738,9 @@ static void add_to_pollset(grpc_transport *gt, grpc_pollset *pollset) { */ static const grpc_transport_vtable vtable = { - sizeof(stream), init_stream, send_batch, set_allow_window_updates, - add_to_pollset, destroy_stream, abort_stream, goaway, close_transport, - send_ping, destroy_transport}; + sizeof(stream), init_stream, send_batch, set_allow_window_updates, + add_to_pollset, destroy_stream, abort_stream, goaway, + close_transport, send_ping, destroy_transport}; void grpc_create_chttp2_transport(grpc_transport_setup_callback setup, void *arg, diff --git a/src/core/transport/chttp2_transport.h b/src/core/transport/chttp2_transport.h index dd4419b98dc..e12357ff5ef 100644 --- a/src/core/transport/chttp2_transport.h +++ b/src/core/transport/chttp2_transport.h @@ -44,4 +44,4 @@ void grpc_create_chttp2_transport(grpc_transport_setup_callback setup, size_t nslices, grpc_mdctx *metadata_context, int is_client); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_TRANSPORT_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_TRANSPORT_H__ */ diff --git a/src/core/transport/metadata.c b/src/core/transport/metadata.c index e8ab2166714..6881b871ecb 100644 --- a/src/core/transport/metadata.c +++ b/src/core/transport/metadata.c @@ -154,7 +154,7 @@ grpc_mdctx *grpc_mdctx_create_with_seed(gpr_uint32 seed) { return ctx; } -grpc_mdctx *grpc_mdctx_create() { +grpc_mdctx *grpc_mdctx_create(void) { /* This seed is used to prevent remote connections from controlling hash table * collisions. It needs to be somewhat unpredictable to a remote connection. */ diff --git a/src/core/transport/metadata.h b/src/core/transport/metadata.h index 6c6dee5efd6..ac845def379 100644 --- a/src/core/transport/metadata.h +++ b/src/core/transport/metadata.h @@ -82,7 +82,7 @@ struct grpc_mdelem { }; /* Create/orphan a metadata context */ -grpc_mdctx *grpc_mdctx_create(); +grpc_mdctx *grpc_mdctx_create(void); grpc_mdctx *grpc_mdctx_create_with_seed(gpr_uint32 seed); void grpc_mdctx_orphan(grpc_mdctx *mdctx); @@ -136,4 +136,4 @@ const char *grpc_mdstr_as_c_string(grpc_mdstr *s); #define GRPC_MDSTR_KV_HASH(k_hash, v_hash) (GPR_ROTL((k_hash), 2) ^ (v_hash)) -#endif /* __GRPC_INTERNAL_TRANSPORT_METADATA_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_METADATA_H__ */ diff --git a/src/core/transport/stream_op.h b/src/core/transport/stream_op.h index be60bc2da65..20d609133f8 100644 --- a/src/core/transport/stream_op.h +++ b/src/core/transport/stream_op.h @@ -125,4 +125,4 @@ void grpc_sopb_add_flow_ctl_cb(grpc_stream_op_buffer *sopb, void grpc_sopb_append(grpc_stream_op_buffer *sopb, grpc_stream_op *ops, size_t nops); -#endif /* __GRPC_INTERNAL_TRANSPORT_STREAM_OP_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_STREAM_OP_H__ */ diff --git a/src/core/transport/transport.h b/src/core/transport/transport.h index 00dacbf5b9c..af12f4e700d 100644 --- a/src/core/transport/transport.h +++ b/src/core/transport/transport.h @@ -254,4 +254,4 @@ void grpc_transport_setup_initiate(grpc_transport_setup *setup); used as a destruction call by setup). */ void grpc_transport_setup_cancel(grpc_transport_setup *setup); -#endif /* __GRPC_INTERNAL_TRANSPORT_TRANSPORT_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_TRANSPORT_H__ */ diff --git a/src/core/transport/transport_impl.h b/src/core/transport/transport_impl.h index 9f497b9cbaf..31e80d36edd 100644 --- a/src/core/transport/transport_impl.h +++ b/src/core/transport/transport_impl.h @@ -84,4 +84,4 @@ struct grpc_transport { const grpc_transport_vtable *vtable; }; -#endif /* __GRPC_INTERNAL_TRANSPORT_TRANSPORT_IMPL_H__ */ +#endif /* __GRPC_INTERNAL_TRANSPORT_TRANSPORT_IMPL_H__ */ diff --git a/src/core/tsi/fake_transport_security.c b/src/core/tsi/fake_transport_security.c index 7807e719495..756b2173ecf 100644 --- a/src/core/tsi/fake_transport_security.c +++ b/src/core/tsi/fake_transport_security.c @@ -37,6 +37,7 @@ #include #include +#include #include "src/core/tsi/transport_security.h" /* --- Constants. ---*/ @@ -52,9 +53,9 @@ the data encoded in little endian on 4 bytes. */ typedef struct { unsigned char* data; - uint32_t size; - uint32_t allocated_size; - uint32_t offset; + size_t size; + size_t allocated_size; + size_t offset; int needs_draining; } tsi_fake_frame; @@ -80,10 +81,9 @@ typedef struct { tsi_frame_protector base; tsi_fake_frame protect_frame; tsi_fake_frame unprotect_frame; - uint32_t max_frame_size; + size_t max_frame_size; } tsi_fake_frame_protector; - /* --- Utils. ---*/ static const char* tsi_fake_handshake_message_strings[] = { @@ -111,12 +111,12 @@ static tsi_result tsi_fake_handshake_message_from_string( return TSI_DATA_CORRUPTED; } -static uint32_t load32_little_endian(const unsigned char* buf) { - return ((uint32_t)(buf[0]) | (uint32_t)(buf[1] << 8) | - (uint32_t)(buf[2] << 16) | (uint32_t)(buf[3] << 24)); +static gpr_uint32 load32_little_endian(const unsigned char* buf) { + return ((gpr_uint32)(buf[0]) | (gpr_uint32)(buf[1] << 8) | + (gpr_uint32)(buf[2] << 16) | (gpr_uint32)(buf[3] << 24)); } -static void store32_little_endian(uint32_t value, unsigned char* buf) { +static void store32_little_endian(gpr_uint32 value, unsigned char* buf) { buf[3] = (unsigned char)(value >> 24) & 0xFF; buf[2] = (unsigned char)(value >> 16) & 0xFF; buf[1] = (unsigned char)(value >> 8) & 0xFF; @@ -150,10 +150,10 @@ static int tsi_fake_frame_ensure_size(tsi_fake_frame* frame) { /* This method should not be called if frame->needs_framing is not 0. */ static tsi_result fill_frame_from_bytes(const unsigned char* incoming_bytes, - uint32_t* incoming_bytes_size, + size_t* incoming_bytes_size, tsi_fake_frame* frame) { - uint32_t available_size = *incoming_bytes_size; - uint32_t to_read_size = 0; + size_t available_size = *incoming_bytes_size; + size_t to_read_size = 0; const unsigned char* bytes_cursor = incoming_bytes; if (frame->needs_draining) return TSI_INTERNAL_ERROR; @@ -198,9 +198,9 @@ static tsi_result fill_frame_from_bytes(const unsigned char* incoming_bytes, /* This method should not be called if frame->needs_framing is 0. */ static tsi_result drain_frame_to_bytes(unsigned char* outgoing_bytes, - uint32_t* outgoing_bytes_size, + size_t* outgoing_bytes_size, tsi_fake_frame* frame) { - uint32_t to_write_size = frame->size - frame->offset; + size_t to_write_size = frame->size - frame->offset; if (!frame->needs_draining) return TSI_INTERNAL_ERROR; if (*outgoing_bytes_size < to_write_size) { memcpy(outgoing_bytes, frame->data + frame->offset, *outgoing_bytes_size); @@ -213,7 +213,7 @@ static tsi_result drain_frame_to_bytes(unsigned char* outgoing_bytes, return TSI_OK; } -static tsi_result bytes_to_frame(unsigned char* bytes, uint32_t bytes_size, +static tsi_result bytes_to_frame(unsigned char* bytes, size_t bytes_size, tsi_fake_frame* frame) { frame->offset = 0; frame->size = bytes_size + TSI_FAKE_FRAME_HEADER_SIZE; @@ -230,24 +230,25 @@ static void tsi_fake_frame_destruct(tsi_fake_frame* frame) { /* --- tsi_frame_protector methods implementation. ---*/ -static tsi_result fake_protector_protect( - tsi_frame_protector* self, const unsigned char* unprotected_bytes, - uint32_t* unprotected_bytes_size, unsigned char* protected_output_frames, - uint32_t* protected_output_frames_size) { +static tsi_result fake_protector_protect(tsi_frame_protector* self, + const unsigned char* unprotected_bytes, + size_t* unprotected_bytes_size, + unsigned char* protected_output_frames, + size_t* protected_output_frames_size) { tsi_result result = TSI_OK; tsi_fake_frame_protector* impl = (tsi_fake_frame_protector*)self; unsigned char frame_header[TSI_FAKE_FRAME_HEADER_SIZE]; tsi_fake_frame* frame = &impl->protect_frame; - uint32_t saved_output_size = *protected_output_frames_size; - uint32_t drained_size = 0; - uint32_t* num_bytes_written = protected_output_frames_size; + size_t saved_output_size = *protected_output_frames_size; + size_t drained_size = 0; + size_t* num_bytes_written = protected_output_frames_size; *num_bytes_written = 0; /* Try to drain first. */ if (frame->needs_draining) { drained_size = saved_output_size - *num_bytes_written; - result = drain_frame_to_bytes(protected_output_frames, - &drained_size, frame); + result = + drain_frame_to_bytes(protected_output_frames, &drained_size, frame); *num_bytes_written += drained_size; protected_output_frames += drained_size; if (result != TSI_OK) { @@ -263,7 +264,7 @@ static tsi_result fake_protector_protect( if (frame->needs_draining) return TSI_INTERNAL_ERROR; if (frame->size == 0) { /* New frame, create a header. */ - uint32_t written_in_frame_size = 0; + size_t written_in_frame_size = 0; store32_little_endian(impl->max_frame_size, frame_header); written_in_frame_size = TSI_FAKE_FRAME_HEADER_SIZE; result = fill_frame_from_bytes(frame_header, &written_in_frame_size, frame); @@ -273,8 +274,8 @@ static tsi_result fake_protector_protect( return result; } } - result = fill_frame_from_bytes(unprotected_bytes, unprotected_bytes_size, - frame); + result = + fill_frame_from_bytes(unprotected_bytes, unprotected_bytes_size, frame); if (result != TSI_OK) { if (result == TSI_INCOMPLETE_DATA) result = TSI_OK; return result; @@ -292,7 +293,7 @@ static tsi_result fake_protector_protect( static tsi_result fake_protector_protect_flush( tsi_frame_protector* self, unsigned char* protected_output_frames, - uint32_t* protected_output_frames_size, uint32_t* still_pending_size) { + size_t* protected_output_frames_size, size_t* still_pending_size) { tsi_result result = TSI_OK; tsi_fake_frame_protector* impl = (tsi_fake_frame_protector*)self; tsi_fake_frame* frame = &impl->protect_frame; @@ -301,7 +302,7 @@ static tsi_result fake_protector_protect_flush( frame->size = frame->offset; frame->offset = 0; frame->needs_draining = 1; - store32_little_endian(frame->size, frame->data); /* Overwrite header. */ + store32_little_endian(frame->size, frame->data); /* Overwrite header. */ } result = drain_frame_to_bytes(protected_output_frames, protected_output_frames_size, frame); @@ -312,14 +313,14 @@ static tsi_result fake_protector_protect_flush( static tsi_result fake_protector_unprotect( tsi_frame_protector* self, const unsigned char* protected_frames_bytes, - uint32_t* protected_frames_bytes_size, unsigned char* unprotected_bytes, - uint32_t* unprotected_bytes_size) { + size_t* protected_frames_bytes_size, unsigned char* unprotected_bytes, + size_t* unprotected_bytes_size) { tsi_result result = TSI_OK; tsi_fake_frame_protector* impl = (tsi_fake_frame_protector*)self; tsi_fake_frame* frame = &impl->unprotect_frame; - uint32_t saved_output_size = *unprotected_bytes_size; - uint32_t drained_size = 0; - uint32_t* num_bytes_written = unprotected_bytes_size; + size_t saved_output_size = *unprotected_bytes_size; + size_t drained_size = 0; + size_t* num_bytes_written = unprotected_bytes_size; *num_bytes_written = 0; /* Try to drain first. */ @@ -327,8 +328,7 @@ static tsi_result fake_protector_unprotect( /* Go past the header if needed. */ if (frame->offset == 0) frame->offset = TSI_FAKE_FRAME_HEADER_SIZE; drained_size = saved_output_size - *num_bytes_written; - result = drain_frame_to_bytes(unprotected_bytes, &drained_size, - frame); + result = drain_frame_to_bytes(unprotected_bytes, &drained_size, frame); unprotected_bytes += drained_size; *num_bytes_written += drained_size; if (result != TSI_OK) { @@ -352,7 +352,7 @@ static tsi_result fake_protector_unprotect( /* Try to drain again. */ if (!frame->needs_draining) return TSI_INTERNAL_ERROR; if (frame->offset != 0) return TSI_INTERNAL_ERROR; - frame->offset = TSI_FAKE_FRAME_HEADER_SIZE; /* Go past the header. */ + frame->offset = TSI_FAKE_FRAME_HEADER_SIZE; /* Go past the header. */ drained_size = saved_output_size - *num_bytes_written; result = drain_frame_to_bytes(unprotected_bytes, &drained_size, frame); *num_bytes_written += drained_size; @@ -375,7 +375,7 @@ static const tsi_frame_protector_vtable frame_protector_vtable = { /* --- tsi_handshaker methods implementation. ---*/ static tsi_result fake_handshaker_get_bytes_to_send_to_peer( - tsi_handshaker* self, unsigned char* bytes, uint32_t* bytes_size) { + tsi_handshaker* self, unsigned char* bytes, size_t* bytes_size) { tsi_fake_handshaker* impl = (tsi_fake_handshaker*)self; tsi_result result = TSI_OK; if (impl->needs_incoming_message || impl->result == TSI_OK) { @@ -410,7 +410,7 @@ static tsi_result fake_handshaker_get_bytes_to_send_to_peer( } static tsi_result fake_handshaker_process_bytes_from_peer( - tsi_handshaker* self, const unsigned char* bytes, uint32_t* bytes_size) { + tsi_handshaker* self, const unsigned char* bytes, size_t* bytes_size) { tsi_result result = TSI_OK; tsi_fake_handshaker* impl = (tsi_fake_handshaker*)self; int expected_msg = impl->next_message_to_send - 1; @@ -465,7 +465,7 @@ static tsi_result fake_handshaker_extract_peer(tsi_handshaker* self, } static tsi_result fake_handshaker_create_frame_protector( - tsi_handshaker* self, uint32_t* max_protected_frame_size, + tsi_handshaker* self, size_t* max_protected_frame_size, tsi_frame_protector** protector) { *protector = tsi_create_fake_protector(max_protected_frame_size); if (*protector == NULL) return TSI_OUT_OF_RESOURCES; @@ -504,7 +504,7 @@ tsi_handshaker* tsi_create_fake_handshaker(int is_client) { } tsi_frame_protector* tsi_create_fake_protector( - uint32_t* max_protected_frame_size) { + size_t* max_protected_frame_size) { tsi_fake_frame_protector* impl = calloc(1, sizeof(tsi_fake_frame_protector)); if (impl == NULL) return NULL; impl->max_frame_size = (max_protected_frame_size == NULL) diff --git a/src/core/tsi/fake_transport_security.h b/src/core/tsi/fake_transport_security.h index 075d51871b3..9e3480adfaa 100644 --- a/src/core/tsi/fake_transport_security.h +++ b/src/core/tsi/fake_transport_security.h @@ -50,13 +50,12 @@ extern "C" { cleartext data for the protector. */ tsi_handshaker* tsi_create_fake_handshaker(int is_client); - /* Creates a protector directly without going through the handshake phase. */ tsi_frame_protector* tsi_create_fake_protector( - uint32_t* max_protected_frame_size); + size_t* max_protected_frame_size); #ifdef __cplusplus } #endif -#endif /* __FAKE_TRANSPORT_SECURITY_H_ */ +#endif /* __FAKE_TRANSPORT_SECURITY_H_ */ diff --git a/src/core/tsi/ssl_transport_security.c b/src/core/tsi/ssl_transport_security.c index b9e48e73737..1159254a8c7 100644 --- a/src/core/tsi/ssl_transport_security.c +++ b/src/core/tsi/ssl_transport_security.c @@ -54,7 +54,6 @@ * SSL structure. This is what we would ultimately want though... */ #define TSI_SSL_MAX_PROTECTION_OVERHEAD 100 - /* --- Structure definitions. ---*/ struct tsi_ssl_handshaker_factory { @@ -77,9 +76,9 @@ typedef struct { associated with the contexts at the same index. */ SSL_CTX** ssl_contexts; tsi_peer* ssl_context_x509_subject_names; - uint32_t ssl_context_count; + size_t ssl_context_count; unsigned char* alpn_protocol_list; - uint32_t alpn_protocol_list_length; + size_t alpn_protocol_list_length; } tsi_ssl_server_handshaker_factory; typedef struct { @@ -96,11 +95,10 @@ typedef struct { BIO* into_ssl; BIO* from_ssl; unsigned char* buffer; - uint32_t buffer_size; - uint32_t buffer_offset; + size_t buffer_size; + size_t buffer_offset; } tsi_ssl_frame_protector; - /* --- Library Initialization. ---*/ static gpr_once init_openssl_once = GPR_ONCE_INIT; @@ -161,7 +159,7 @@ static void ssl_info_callback(const SSL* ssl, int where, int ret) { /* Gets the subject CN from an X509 cert. */ static tsi_result ssl_get_x509_common_name(X509* cert, unsigned char** utf8, - uint32_t* utf8_size) { + size_t* utf8_size) { int common_name_index = -1; X509_NAME_ENTRY* common_name_entry = NULL; ASN1_STRING* common_name_asn1 = NULL; @@ -202,7 +200,7 @@ static tsi_result ssl_get_x509_common_name(X509* cert, unsigned char** utf8, static tsi_result peer_property_from_x509_common_name( X509* cert, tsi_peer_property* property) { unsigned char* common_name; - uint32_t common_name_size; + size_t common_name_size; tsi_result result = ssl_get_x509_common_name(cert, &common_name, &common_name_size); if (result != TSI_OK) return result; @@ -268,8 +266,8 @@ static tsi_result peer_property_from_x509_subject_alt_names( static tsi_result peer_from_x509(X509* cert, int include_certificate_type, tsi_peer* peer) { /* TODO(jboeuf): Maybe add more properties. */ - uint32_t property_count = include_certificate_type ? 3 : 2; - tsi_result result = tsi_construct_peer(property_count, peer); + size_t property_count = include_certificate_type ? 3 : 2; + tsi_result result = tsi_construct_peer(property_count, peer); if (result != TSI_OK) return result; do { result = peer_property_from_x509_common_name(cert, &peer->properties[0]); @@ -299,12 +297,10 @@ static void log_ssl_error_stack(void) { } } - /* Performs an SSL_read and handle errors. */ static tsi_result do_ssl_read(SSL* ssl, unsigned char* unprotected_bytes, - uint32_t* unprotected_bytes_size) { - int read_from_ssl = SSL_read(ssl, unprotected_bytes, - *unprotected_bytes_size); + size_t* unprotected_bytes_size) { + int read_from_ssl = SSL_read(ssl, unprotected_bytes, *unprotected_bytes_size); if (read_from_ssl == 0) { gpr_log(GPR_ERROR, "SSL_read returned 0 unexpectedly."); return TSI_INTERNAL_ERROR; @@ -337,7 +333,7 @@ static tsi_result do_ssl_read(SSL* ssl, unsigned char* unprotected_bytes, /* Performs an SSL_write and handle errors. */ static tsi_result do_ssl_write(SSL* ssl, unsigned char* unprotected_bytes, - uint32_t unprotected_bytes_size) { + size_t unprotected_bytes_size) { int ssl_write_result = SSL_write(ssl, unprotected_bytes, unprotected_bytes_size); if (ssl_write_result < 0) { @@ -358,7 +354,7 @@ static tsi_result do_ssl_write(SSL* ssl, unsigned char* unprotected_bytes, /* Loads an in-memory PEM certificate chain into the SSL context. */ static tsi_result ssl_ctx_use_certificate_chain( SSL_CTX* context, const unsigned char* pem_cert_chain, - uint32_t pem_cert_chain_size) { + size_t pem_cert_chain_size) { tsi_result result = TSI_OK; X509* certificate = NULL; BIO* pem = BIO_new_mem_buf((void*)pem_cert_chain, pem_cert_chain_size); @@ -378,7 +374,7 @@ static tsi_result ssl_ctx_use_certificate_chain( X509* certificate_authority = PEM_read_bio_X509(pem, NULL, NULL, ""); if (certificate_authority == NULL) { ERR_clear_error(); - break; /* Done reading. */ + break; /* Done reading. */ } if (!SSL_CTX_add_extra_chain_cert(context, certificate_authority)) { X509_free(certificate_authority); @@ -399,7 +395,7 @@ static tsi_result ssl_ctx_use_certificate_chain( /* Loads an in-memory PEM private key into the SSL context. */ static tsi_result ssl_ctx_use_private_key(SSL_CTX* context, const unsigned char* pem_key, - uint32_t pem_key_size) { + size_t pem_key_size) { tsi_result result = TSI_OK; EVP_PKEY* private_key = NULL; BIO* pem = BIO_new_mem_buf((void*)pem_key, pem_key_size); @@ -423,10 +419,10 @@ static tsi_result ssl_ctx_use_private_key(SSL_CTX* context, /* Loads in-memory PEM verification certs into the SSL context and optionally returns the verification cert names (root_names can be NULL). */ static tsi_result ssl_ctx_load_verification_certs( - SSL_CTX* context, const unsigned char* pem_roots, - uint32_t pem_roots_size, STACK_OF(X509_NAME)** root_names) { + SSL_CTX* context, const unsigned char* pem_roots, size_t pem_roots_size, + STACK_OF(X509_NAME) * *root_names) { tsi_result result = TSI_OK; - uint32_t num_roots = 0; + size_t num_roots = 0; X509* root = NULL; X509_NAME* root_name = NULL; BIO* pem = BIO_new_mem_buf((void*)pem_roots, pem_roots_size); @@ -442,7 +438,7 @@ static tsi_result ssl_ctx_load_verification_certs( root = PEM_read_bio_X509_AUX(pem, NULL, NULL, ""); if (root == NULL) { ERR_clear_error(); - break; /* We're at the end of stream. */ + break; /* We're at the end of stream. */ } if (root_names != NULL) { root_name = X509_get_subject_name(root); @@ -485,14 +481,12 @@ static tsi_result ssl_ctx_load_verification_certs( return result; } - /* Populates the SSL context with a private key and a cert chain, and sets the cipher list and the ephemeral ECDH key. */ static tsi_result populate_ssl_context( SSL_CTX* context, const unsigned char* pem_private_key, - uint32_t pem_private_key_size, - const unsigned char* pem_certificate_chain, - uint32_t pem_certificate_chain_size, const char* cipher_list) { + size_t pem_private_key_size, const unsigned char* pem_certificate_chain, + size_t pem_certificate_chain_size, const char* cipher_list) { tsi_result result = TSI_OK; if (pem_certificate_chain != NULL) { result = ssl_ctx_use_certificate_chain(context, pem_certificate_chain, @@ -528,16 +522,16 @@ static tsi_result populate_ssl_context( /* Extracts the CN and the SANs from an X509 cert as a peer object. */ static tsi_result extract_x509_subject_names_from_pem_cert( - const unsigned char* pem_cert, uint32_t pem_cert_size, tsi_peer* peer) { + const unsigned char* pem_cert, size_t pem_cert_size, tsi_peer* peer) { tsi_result result = TSI_OK; X509* cert = NULL; BIO* pem = BIO_new_mem_buf((void*)pem_cert, pem_cert_size); - if (pem == NULL) return TSI_OUT_OF_RESOURCES; + if (pem == NULL) return TSI_OUT_OF_RESOURCES; cert = PEM_read_bio_X509(pem, NULL, NULL, ""); if (cert == NULL) { - gpr_log(GPR_ERROR, "Invalid certificate"); - result = TSI_INVALID_ARGUMENT; + gpr_log(GPR_ERROR, "Invalid certificate"); + result = TSI_INVALID_ARGUMENT; } else { result = peer_from_x509(cert, 0, peer); } @@ -550,7 +544,7 @@ static tsi_result extract_x509_subject_names_from_pem_cert( static tsi_result build_alpn_protocol_name_list( const unsigned char** alpn_protocols, const unsigned char* alpn_protocols_lengths, uint16_t num_alpn_protocols, - unsigned char** protocol_name_list, uint32_t* protocol_name_list_length) { + unsigned char** protocol_name_list, size_t* protocol_name_list_length) { uint16_t i; unsigned char* current; *protocol_name_list = NULL; @@ -579,18 +573,18 @@ static tsi_result build_alpn_protocol_name_list( /* --- tsi_frame_protector methods implementation. ---*/ -static tsi_result ssl_protector_protect( - tsi_frame_protector* self, const unsigned char* unprotected_bytes, - uint32_t* unprotected_bytes_size, - unsigned char* protected_output_frames, - uint32_t* protected_output_frames_size) { +static tsi_result ssl_protector_protect(tsi_frame_protector* self, + const unsigned char* unprotected_bytes, + size_t* unprotected_bytes_size, + unsigned char* protected_output_frames, + size_t* protected_output_frames_size) { tsi_ssl_frame_protector* impl = (tsi_ssl_frame_protector*)self; int read_from_ssl; - uint32_t available; + size_t available; tsi_result result = TSI_OK; /* First see if we have some pending data in the SSL BIO. */ - uint32_t pending_in_ssl = BIO_ctrl_pending(impl->from_ssl); + size_t pending_in_ssl = BIO_ctrl_pending(impl->from_ssl); if (pending_in_ssl > 0) { *unprotected_bytes_size = 0; read_from_ssl = BIO_read(impl->from_ssl, protected_output_frames, @@ -634,8 +628,7 @@ static tsi_result ssl_protector_protect( static tsi_result ssl_protector_protect_flush( tsi_frame_protector* self, unsigned char* protected_output_frames, - uint32_t* protected_output_frames_size, - uint32_t* still_pending_size) { + size_t* protected_output_frames_size, size_t* still_pending_size) { tsi_result result = TSI_OK; tsi_ssl_frame_protector* impl = (tsi_ssl_frame_protector*)self; int read_from_ssl = 0; @@ -662,18 +655,17 @@ static tsi_result ssl_protector_protect_flush( static tsi_result ssl_protector_unprotect( tsi_frame_protector* self, const unsigned char* protected_frames_bytes, - uint32_t* protected_frames_bytes_size, - unsigned char* unprotected_bytes, - uint32_t* unprotected_bytes_size) { + size_t* protected_frames_bytes_size, unsigned char* unprotected_bytes, + size_t* unprotected_bytes_size) { tsi_result result = TSI_OK; int written_into_ssl = 0; - uint32_t output_bytes_size = *unprotected_bytes_size; - uint32_t output_bytes_offset = 0; + size_t output_bytes_size = *unprotected_bytes_size; + size_t output_bytes_offset = 0; tsi_ssl_frame_protector* impl = (tsi_ssl_frame_protector*)self; /* First, try to read remaining data from ssl. */ result = do_ssl_read(impl->ssl, unprotected_bytes, unprotected_bytes_size); - if (result != TSI_OK) return result; + if (result != TSI_OK) return result; if (*unprotected_bytes_size == output_bytes_size) { /* We have read everything we could and cannot process any more input. */ *protected_frames_bytes_size = 0; @@ -684,8 +676,8 @@ static tsi_result ssl_protector_unprotect( *unprotected_bytes_size = output_bytes_size - output_bytes_offset; /* Then, try to write some data to ssl. */ - written_into_ssl = BIO_write( - impl->into_ssl, protected_frames_bytes, *protected_frames_bytes_size); + written_into_ssl = BIO_write(impl->into_ssl, protected_frames_bytes, + *protected_frames_bytes_size); if (written_into_ssl < 0) { gpr_log(GPR_ERROR, "Sending protected frame to ssl failed with %d", written_into_ssl); @@ -710,17 +702,15 @@ static void ssl_protector_destroy(tsi_frame_protector* self) { } static const tsi_frame_protector_vtable frame_protector_vtable = { - ssl_protector_protect, - ssl_protector_protect_flush, - ssl_protector_unprotect, + ssl_protector_protect, ssl_protector_protect_flush, ssl_protector_unprotect, ssl_protector_destroy, }; - /* --- tsi_handshaker methods implementation. ---*/ -static tsi_result ssl_handshaker_get_bytes_to_send_to_peer( - tsi_handshaker* self, unsigned char* bytes, uint32_t* bytes_size) { +static tsi_result ssl_handshaker_get_bytes_to_send_to_peer(tsi_handshaker* self, + unsigned char* bytes, + size_t* bytes_size) { tsi_ssl_handshaker* impl = (tsi_ssl_handshaker*)self; int bytes_read_from_ssl = 0; if (bytes == NULL || bytes_size == NULL || *bytes_size == 0 || @@ -737,7 +727,7 @@ static tsi_result ssl_handshaker_get_bytes_to_send_to_peer( return TSI_OK; } } - *bytes_size = (uint32_t)bytes_read_from_ssl; + *bytes_size = (size_t)bytes_read_from_ssl; return BIO_ctrl_pending(impl->from_ssl) == 0 ? TSI_OK : TSI_INCOMPLETE_DATA; } @@ -751,8 +741,7 @@ static tsi_result ssl_handshaker_get_result(tsi_handshaker* self) { } static tsi_result ssl_handshaker_process_bytes_from_peer( - tsi_handshaker* self, const unsigned char* bytes, - uint32_t* bytes_size) { + tsi_handshaker* self, const unsigned char* bytes, size_t* bytes_size) { tsi_ssl_handshaker* impl = (tsi_ssl_handshaker*)self; int bytes_written_into_ssl_size = 0; if (bytes == NULL || bytes_size == 0 || *bytes_size > INT_MAX) { @@ -809,7 +798,7 @@ static tsi_result ssl_handshaker_extract_peer(tsi_handshaker* self, } SSL_get0_alpn_selected(impl->ssl, &alpn_selected, &alpn_selected_len); if (alpn_selected != NULL) { - uint32_t i; + size_t i; tsi_peer_property* new_properties = calloc(1, sizeof(tsi_peer_property) * (peer->property_count + 1)); if (new_properties == NULL) return TSI_OUT_OF_RESOURCES; @@ -831,9 +820,9 @@ static tsi_result ssl_handshaker_extract_peer(tsi_handshaker* self, } static tsi_result ssl_handshaker_create_frame_protector( - tsi_handshaker* self, uint32_t* max_output_protected_frame_size, + tsi_handshaker* self, size_t* max_output_protected_frame_size, tsi_frame_protector** protector) { - uint32_t actual_max_output_protected_frame_size = + size_t actual_max_output_protected_frame_size = TSI_SSL_MAX_PROTECTED_FRAME_SIZE_UPPER_BOUND; tsi_ssl_handshaker* impl = (tsi_ssl_handshaker*)self; tsi_ssl_frame_protector* protector_impl = @@ -891,7 +880,6 @@ static const tsi_handshaker_vtable handshaker_vtable = { ssl_handshaker_destroy, }; - /* --- tsi_ssl_handshaker_factory common methods. --- */ tsi_result tsi_ssl_handshaker_factory_create_handshaker( @@ -971,7 +959,6 @@ static tsi_result create_tsi_ssl_handshaker(SSL_CTX* ctx, int is_client, return TSI_OK; } - /* --- tsi_ssl__client_handshaker_factory methods implementation. --- */ static tsi_result ssl_client_handshaker_factory_create_handshaker( @@ -991,7 +978,6 @@ static void ssl_client_handshaker_factory_destroy( free(impl); } - /* --- tsi_ssl_server_handshaker_factory methods implementation. --- */ static tsi_result ssl_server_handshaker_factory_create_handshaker( @@ -1011,7 +997,7 @@ static void ssl_server_handshaker_factory_destroy( tsi_ssl_handshaker_factory* self) { tsi_ssl_server_handshaker_factory* impl = (tsi_ssl_server_handshaker_factory*)self; - uint32_t i; + size_t i; for (i = 0; i < impl->ssl_context_count; i++) { if (impl->ssl_contexts[i] != NULL) { SSL_CTX_free(impl->ssl_contexts[i]); @@ -1026,24 +1012,24 @@ static void ssl_server_handshaker_factory_destroy( free(impl); } -static int does_entry_match_name(const char* entry, uint32_t entry_length, +static int does_entry_match_name(const char* entry, size_t entry_length, const char* name) { const char* name_subdomain = NULL; if (entry_length == 0) return 0; if (!strncmp(name, entry, entry_length) && (strlen(name) == entry_length)) { - return 1; /* Perfect match. */ + return 1; /* Perfect match. */ } if (entry[0] != '*') return 0; /* Wildchar subdomain matching. */ - if (entry_length < 3 || entry[1] != '.') { /* At least *.x */ + if (entry_length < 3 || entry[1] != '.') { /* At least *.x */ gpr_log(GPR_ERROR, "Invalid wildchar entry."); return 0; } name_subdomain = strchr(name, '.'); if (name_subdomain == NULL || strlen(name_subdomain) < 2) return 0; - name_subdomain++; /* Starts after the dot. */ - entry += 2; /* Remove *. */ + name_subdomain++; /* Starts after the dot. */ + entry += 2; /* Remove *. */ entry_length -= 2; return (!strncmp(entry, name_subdomain, entry_length) && (strlen(name_subdomain) == entry_length)); @@ -1053,7 +1039,7 @@ static int ssl_server_handshaker_factory_servername_callback(SSL* ssl, int* ap, void* arg) { tsi_ssl_server_handshaker_factory* impl = (tsi_ssl_server_handshaker_factory*)arg; - uint32_t i = 0; + size_t i = 0; const char* servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name); if (servername == NULL || strlen(servername) == 0) { return SSL_TLSEXT_ERR_NOACK; @@ -1095,13 +1081,12 @@ static int server_handshaker_factory_alpn_callback( return SSL_TLSEXT_ERR_NOACK; } - /* --- tsi_ssl_handshaker_factory constructors. --- */ tsi_result tsi_create_ssl_client_handshaker_factory( - const unsigned char* pem_private_key, uint32_t pem_private_key_size, - const unsigned char* pem_cert_chain, uint32_t pem_cert_chain_size, - const unsigned char* pem_root_certs, uint32_t pem_root_certs_size, + const unsigned char* pem_private_key, size_t pem_private_key_size, + const unsigned char* pem_cert_chain, size_t pem_cert_chain_size, + const unsigned char* pem_root_certs, size_t pem_root_certs_size, const char* cipher_list, const unsigned char** alpn_protocols, const unsigned char* alpn_protocols_lengths, uint16_t num_alpn_protocols, tsi_ssl_handshaker_factory** factory) { @@ -1134,7 +1119,7 @@ tsi_result tsi_create_ssl_client_handshaker_factory( if (num_alpn_protocols != 0) { unsigned char* alpn_protocol_list = NULL; - uint32_t alpn_protocol_list_length = 0; + size_t alpn_protocol_list_length = 0; int ssl_failed; result = build_alpn_protocol_name_list( alpn_protocols, alpn_protocols_lengths, num_alpn_protocols, @@ -1176,17 +1161,16 @@ tsi_result tsi_create_ssl_client_handshaker_factory( tsi_result tsi_create_ssl_server_handshaker_factory( const unsigned char** pem_private_keys, - const uint32_t* pem_private_keys_sizes, - const unsigned char** pem_cert_chains, - const uint32_t* pem_cert_chains_sizes, uint32_t key_cert_pair_count, + const size_t* pem_private_keys_sizes, const unsigned char** pem_cert_chains, + const size_t* pem_cert_chains_sizes, size_t key_cert_pair_count, const unsigned char* pem_client_root_certs, - uint32_t pem_client_root_certs_size, const char* cipher_list, + size_t pem_client_root_certs_size, const char* cipher_list, const unsigned char** alpn_protocols, const unsigned char* alpn_protocols_lengths, uint16_t num_alpn_protocols, tsi_ssl_handshaker_factory** factory) { tsi_ssl_server_handshaker_factory* impl = NULL; tsi_result result = TSI_OK; - uint32_t i = 0; + size_t i = 0; gpr_once_init(&init_openssl_once, init_openssl); @@ -1274,13 +1258,11 @@ tsi_result tsi_create_ssl_server_handshaker_factory( /* --- tsi_ssl utils. --- */ int tsi_ssl_peer_matches_name(const tsi_peer* peer, const char* name) { - uint32_t i = 0; + size_t i = 0; const tsi_peer_property* property = tsi_peer_get_property_by_name( peer, TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY); - if (property == NULL || - property->type != TSI_PEER_PROPERTY_TYPE_STRING) { - gpr_log(GPR_ERROR, - "Invalid x509 subject common name property."); + if (property == NULL || property->type != TSI_PEER_PROPERTY_TYPE_STRING) { + gpr_log(GPR_ERROR, "Invalid x509 subject common name property."); return 0; } if (does_entry_match_name(property->value.string.data, @@ -1291,8 +1273,7 @@ int tsi_ssl_peer_matches_name(const tsi_peer* peer, const char* name) { property = tsi_peer_get_property_by_name( peer, TSI_X509_SUBJECT_ALTERNATIVE_NAMES_PEER_PROPERTY); if (property == NULL || property->type != TSI_PEER_PROPERTY_TYPE_LIST) { - gpr_log(GPR_ERROR, - "Invalid x509 subject alternative names property."); + gpr_log(GPR_ERROR, "Invalid x509 subject alternative names property."); return 0; } @@ -1308,5 +1289,5 @@ int tsi_ssl_peer_matches_name(const tsi_peer* peer, const char* name) { return 1; } } - return 0; /* Not found. */ + return 0; /* Not found. */ } diff --git a/src/core/tsi/ssl_transport_security.h b/src/core/tsi/ssl_transport_security.h index 56f50a5ddec..3a33deacac5 100644 --- a/src/core/tsi/ssl_transport_security.h +++ b/src/core/tsi/ssl_transport_security.h @@ -89,9 +89,9 @@ typedef struct tsi_ssl_handshaker_factory tsi_ssl_handshaker_factory; - This method returns TSI_OK on success or TSI_INVALID_PARAMETER in the case where a parameter is invalid. */ tsi_result tsi_create_ssl_client_handshaker_factory( - const unsigned char* pem_private_key, uint32_t pem_private_key_size, - const unsigned char* pem_cert_chain, uint32_t pem_cert_chain_size, - const unsigned char* pem_root_certs, uint32_t pem_root_certs_size, + const unsigned char* pem_private_key, size_t pem_private_key_size, + const unsigned char* pem_cert_chain, size_t pem_cert_chain_size, + const unsigned char* pem_root_certs, size_t pem_root_certs_size, const char* cipher_suites, const unsigned char** alpn_protocols, const unsigned char* alpn_protocols_lengths, uint16_t num_alpn_protocols, tsi_ssl_handshaker_factory** factory); @@ -132,11 +132,10 @@ tsi_result tsi_create_ssl_client_handshaker_factory( where a parameter is invalid. */ tsi_result tsi_create_ssl_server_handshaker_factory( const unsigned char** pem_private_keys, - const uint32_t* pem_private_keys_sizes, - const unsigned char** pem_cert_chains, - const uint32_t* pem_cert_chains_sizes, uint32_t key_cert_pair_count, + const size_t* pem_private_keys_sizes, const unsigned char** pem_cert_chains, + const size_t* pem_cert_chains_sizes, size_t key_cert_pair_count, const unsigned char* pem_client_root_certs, - uint32_t pem_client_root_certs_size, const char* cipher_suites, + size_t pem_client_root_certs_size, const char* cipher_suites, const unsigned char** alpn_protocols, const unsigned char* alpn_protocols_lengths, uint16_t num_alpn_protocols, tsi_ssl_handshaker_factory** factory); @@ -162,9 +161,8 @@ void tsi_ssl_handshaker_factory_destroy(tsi_ssl_handshaker_factory* self); /* Util that checks that an ssl peer matches a specific name. */ int tsi_ssl_peer_matches_name(const tsi_peer* peer, const char* name); - #ifdef __cplusplus } #endif -#endif /* __SSL_TRANSPORT_SECURITY_H_ */ +#endif /* __SSL_TRANSPORT_SECURITY_H_ */ diff --git a/src/core/tsi/transport_security.c b/src/core/tsi/transport_security.c index 94252e36d0e..fcf03eeb952 100644 --- a/src/core/tsi/transport_security.c +++ b/src/core/tsi/transport_security.c @@ -40,11 +40,11 @@ char* tsi_strdup(const char* src) { char* dst; - uint32_t len; + size_t len; if (!src) return NULL; len = strlen(src) + 1; dst = malloc(len); - if (!dst) return NULL; + if (!dst) return NULL; memcpy(dst, src, len); return dst; } @@ -84,17 +84,15 @@ const char* tsi_result_to_string(tsi_result result) { } } - /* --- tsi_frame_protector common implementation. --- Calls specific implementation after state/input validation. */ -tsi_result tsi_frame_protector_protect( - tsi_frame_protector* self, - const unsigned char* unprotected_bytes, - uint32_t* unprotected_bytes_size, - unsigned char* protected_output_frames, - uint32_t* protected_output_frames_size) { +tsi_result tsi_frame_protector_protect(tsi_frame_protector* self, + const unsigned char* unprotected_bytes, + size_t* unprotected_bytes_size, + unsigned char* protected_output_frames, + size_t* protected_output_frames_size) { if (self == NULL || unprotected_bytes == NULL || unprotected_bytes_size == NULL || protected_output_frames == NULL || protected_output_frames_size == NULL) { @@ -106,10 +104,8 @@ tsi_result tsi_frame_protector_protect( } tsi_result tsi_frame_protector_protect_flush( - tsi_frame_protector* self, - unsigned char* protected_output_frames, - uint32_t* protected_output_frames_size, - uint32_t* still_pending_size) { + tsi_frame_protector* self, unsigned char* protected_output_frames, + size_t* protected_output_frames_size, size_t* still_pending_size) { if (self == NULL || protected_output_frames == NULL || protected_output_frames == NULL || still_pending_size == NULL) { return TSI_INVALID_ARGUMENT; @@ -120,11 +116,9 @@ tsi_result tsi_frame_protector_protect_flush( } tsi_result tsi_frame_protector_unprotect( - tsi_frame_protector* self, - const unsigned char* protected_frames_bytes, - uint32_t* protected_frames_bytes_size, - unsigned char* unprotected_bytes, - uint32_t* unprotected_bytes_size) { + tsi_frame_protector* self, const unsigned char* protected_frames_bytes, + size_t* protected_frames_bytes_size, unsigned char* unprotected_bytes, + size_t* unprotected_bytes_size) { if (self == NULL || protected_frames_bytes == NULL || protected_frames_bytes_size == NULL || unprotected_bytes == NULL || unprotected_bytes_size == NULL) { @@ -140,23 +134,21 @@ void tsi_frame_protector_destroy(tsi_frame_protector* self) { self->vtable->destroy(self); } - /* --- tsi_handshaker common implementation. --- Calls specific implementation after state/input validation. */ tsi_result tsi_handshaker_get_bytes_to_send_to_peer(tsi_handshaker* self, unsigned char* bytes, - uint32_t* bytes_size) { + size_t* bytes_size) { if (self == NULL) return TSI_INVALID_ARGUMENT; if (self->frame_protector_created) return TSI_FAILED_PRECONDITION; return self->vtable->get_bytes_to_send_to_peer(self, bytes, bytes_size); } - tsi_result tsi_handshaker_process_bytes_from_peer(tsi_handshaker* self, const unsigned char* bytes, - uint32_t* bytes_size) { + size_t* bytes_size) { if (self == NULL) return TSI_INVALID_ARGUMENT; if (self->frame_protector_created) return TSI_FAILED_PRECONDITION; return self->vtable->process_bytes_from_peer(self, bytes, bytes_size); @@ -179,8 +171,7 @@ tsi_result tsi_handshaker_extract_peer(tsi_handshaker* self, tsi_peer* peer) { } tsi_result tsi_handshaker_create_frame_protector( - tsi_handshaker* self, - uint32_t* max_protected_frame_size, + tsi_handshaker* self, size_t* max_protected_frame_size, tsi_frame_protector** protector) { tsi_result result; if (self == NULL || protector == NULL) return TSI_INVALID_ARGUMENT; @@ -201,12 +192,11 @@ void tsi_handshaker_destroy(tsi_handshaker* self) { self->vtable->destroy(self); } - /* --- tsi_peer implementation. --- */ const tsi_peer_property* tsi_peer_get_property_by_name(const tsi_peer* self, const char* name) { - uint32_t i; + size_t i; if (self == NULL) return NULL; for (i = 0; i < self->property_count; i++) { const tsi_peer_property* property = &self->properties[i]; @@ -227,10 +217,9 @@ tsi_peer_property tsi_init_peer_property(void) { return property; } - static void tsi_peer_destroy_list_property(tsi_peer_property* children, - uint32_t child_count) { - uint32_t i; + size_t child_count) { + size_t i; for (i = 0; i < child_count; i++) { tsi_peer_property_destruct(&children[i]); } @@ -254,7 +243,7 @@ void tsi_peer_property_destruct(tsi_peer_property* property) { /* Nothing to free. */ break; } - *property = tsi_init_peer_property(); /* Reset everything to 0. */ + *property = tsi_init_peer_property(); /* Reset everything to 0. */ } void tsi_peer_destruct(tsi_peer* self) { @@ -303,7 +292,7 @@ tsi_result tsi_construct_real_peer_property(const char* name, double value, } tsi_result tsi_construct_allocated_string_peer_property( - const char* name, uint32_t value_length, tsi_peer_property* property) { + const char* name, size_t value_length, tsi_peer_property* property) { *property = tsi_init_peer_property(); property->type = TSI_PEER_PROPERTY_TYPE_STRING; if (name != NULL) { @@ -329,7 +318,7 @@ tsi_result tsi_construct_string_peer_property_from_cstring( tsi_result tsi_construct_string_peer_property(const char* name, const char* value, - uint32_t value_length, + size_t value_length, tsi_peer_property* property) { tsi_result result = tsi_construct_allocated_string_peer_property( name, value_length, property); @@ -341,7 +330,7 @@ tsi_result tsi_construct_string_peer_property(const char* name, } tsi_result tsi_construct_list_peer_property(const char* name, - uint32_t child_count, + size_t child_count, tsi_peer_property* property) { *property = tsi_init_peer_property(); property->type = TSI_PEER_PROPERTY_TYPE_LIST; @@ -361,7 +350,7 @@ tsi_result tsi_construct_list_peer_property(const char* name, return TSI_OK; } -tsi_result tsi_construct_peer(uint32_t property_count, tsi_peer* peer) { +tsi_result tsi_construct_peer(size_t property_count, tsi_peer* peer) { memset(peer, 0, sizeof(tsi_peer)); if (property_count > 0) { peer->properties = calloc(property_count, sizeof(tsi_peer_property)); diff --git a/src/core/tsi/transport_security.h b/src/core/tsi/transport_security.h index cf9a2b01954..3a6ed5290b3 100644 --- a/src/core/tsi/transport_security.h +++ b/src/core/tsi/transport_security.h @@ -45,18 +45,18 @@ extern "C" { typedef struct { tsi_result (*protect)(tsi_frame_protector* self, const unsigned char* unprotected_bytes, - uint32_t* unprotected_bytes_size, + size_t* unprotected_bytes_size, unsigned char* protected_output_frames, - uint32_t* protected_output_frames_size); + size_t* protected_output_frames_size); tsi_result (*protect_flush)(tsi_frame_protector* self, unsigned char* protected_output_frames, - uint32_t* protected_output_frames_size, - uint32_t* still_pending_size); + size_t* protected_output_frames_size, + size_t* still_pending_size); tsi_result (*unprotect)(tsi_frame_protector* self, const unsigned char* protected_frames_bytes, - uint32_t* protected_frames_bytes_size, + size_t* protected_frames_bytes_size, unsigned char* unprotected_bytes, - uint32_t* unprotected_bytes_size); + size_t* unprotected_bytes_size); void (*destroy)(tsi_frame_protector* self); } tsi_frame_protector_vtable; @@ -69,14 +69,14 @@ struct tsi_frame_protector { typedef struct { tsi_result (*get_bytes_to_send_to_peer)(tsi_handshaker* self, unsigned char* bytes, - uint32_t* bytes_size); + size_t* bytes_size); tsi_result (*process_bytes_from_peer)(tsi_handshaker* self, const unsigned char* bytes, - uint32_t* bytes_size); + size_t* bytes_size); tsi_result (*get_result)(tsi_handshaker* self); tsi_result (*extract_peer)(tsi_handshaker* self, tsi_peer* peer); tsi_result (*create_frame_protector)(tsi_handshaker* self, - uint32_t* max_protected_frame_size, + size_t* max_protected_frame_size, tsi_frame_protector** protector); void (*destroy)(tsi_handshaker* self); } tsi_handshaker_vtable; @@ -87,7 +87,7 @@ struct tsi_handshaker { }; /* Peer and property construction/destruction functions. */ -tsi_result tsi_construct_peer(uint32_t property_count, tsi_peer* peer); +tsi_result tsi_construct_peer(size_t property_count, tsi_peer* peer); tsi_peer_property tsi_init_peer_property(void); void tsi_peer_property_destruct(tsi_peer_property* property); tsi_result tsi_construct_signed_integer_peer_property( @@ -98,21 +98,21 @@ tsi_result tsi_construct_real_peer_property(const char* name, double value, tsi_peer_property* property); tsi_result tsi_construct_string_peer_property(const char* name, const char* value, - uint32_t value_length, + size_t value_length, tsi_peer_property* property); tsi_result tsi_construct_allocated_string_peer_property( - const char* name, uint32_t value_length, tsi_peer_property* property); + const char* name, size_t value_length, tsi_peer_property* property); tsi_result tsi_construct_string_peer_property_from_cstring( const char* name, const char* value, tsi_peer_property* property); tsi_result tsi_construct_list_peer_property(const char* name, - uint32_t child_count, + size_t child_count, tsi_peer_property* property); /* Utils. */ -char* tsi_strdup(const char* src); /* Sadly, no strdup in C89. */ +char* tsi_strdup(const char* src); /* Sadly, no strdup in C89. */ #ifdef __cplusplus } #endif -#endif /* __TRANSPORT_SECURITY_H_ */ +#endif /* __TRANSPORT_SECURITY_H_ */ diff --git a/src/core/tsi/transport_security_interface.h b/src/core/tsi/transport_security_interface.h index 18545b42532..d180e90799a 100644 --- a/src/core/tsi/transport_security_interface.h +++ b/src/core/tsi/transport_security_interface.h @@ -35,6 +35,7 @@ #define __TRANSPORT_SECURITY_INTERFACE_H_ #include +#include #ifdef __cplusplus extern "C" { @@ -60,7 +61,6 @@ typedef enum { const char* tsi_result_to_string(tsi_result result); - /* --- tsi_frame_protector object --- This object protects and unprotects buffers once the handshake is done. @@ -90,11 +90,11 @@ typedef struct tsi_frame_protector tsi_frame_protector; ------------------------------------------------------------------------ unsigned char protected_buffer[4096]; - uint32_t protected_buffer_size = sizeof(protected_buffer); + size_t protected_buffer_size = sizeof(protected_buffer); tsi_result result = TSI_OK; while (message_size > 0) { - uint32_t protected_buffer_size_to_send = protected_buffer_size; - uint32_t processed_message_size = message_size; + size_t protected_buffer_size_to_send = protected_buffer_size; + size_t processed_message_size = message_size; result = tsi_frame_protector_protect(protector, message_bytes, &processed_message_size, @@ -107,7 +107,7 @@ typedef struct tsi_frame_protector tsi_frame_protector; // Don't forget to flush. if (message_size == 0) { - uint32_t still_pending_size; + size_t still_pending_size; do { protected_buffer_size_to_send = protected_buffer_size; result = tsi_frame_protector_protect_flush( @@ -121,12 +121,11 @@ typedef struct tsi_frame_protector tsi_frame_protector; if (result != TSI_OK) HandleError(result); ------------------------------------------------------------------------ */ -tsi_result tsi_frame_protector_protect( - tsi_frame_protector* self, - const unsigned char* unprotected_bytes, - uint32_t* unprotected_bytes_size, - unsigned char* protected_output_frames, - uint32_t* protected_output_frames_size); +tsi_result tsi_frame_protector_protect(tsi_frame_protector* self, + const unsigned char* unprotected_bytes, + size_t* unprotected_bytes_size, + unsigned char* protected_output_frames, + size_t* protected_output_frames_size); /* Indicates that we need to flush the bytes buffered in the protector and get the resulting frame. @@ -137,10 +136,8 @@ tsi_result tsi_frame_protector_protect( - still_pending_bytes is an output parameter indicating the number of bytes that still need to be flushed from the protector.*/ tsi_result tsi_frame_protector_protect_flush( - tsi_frame_protector* self, - unsigned char* protected_output_frames, - uint32_t* protected_output_frames_size, - uint32_t* still_pending_size); + tsi_frame_protector* self, unsigned char* protected_output_frames, + size_t* protected_output_frames_size, size_t* still_pending_size); /* Outputs unprotected bytes. - protected_frames_bytes is an input only parameter and points to the @@ -163,16 +160,13 @@ tsi_result tsi_frame_protector_protect_flush( needs to be read before new protected data can be processed in which case protected_frames_size will be set to 0. */ tsi_result tsi_frame_protector_unprotect( - tsi_frame_protector* self, - const unsigned char* protected_frames_bytes, - uint32_t* protected_frames_bytes_size, - unsigned char* unprotected_bytes, - uint32_t* unprotected_bytes_size); + tsi_frame_protector* self, const unsigned char* protected_frames_bytes, + size_t* protected_frames_bytes_size, unsigned char* unprotected_bytes, + size_t* unprotected_bytes_size); /* Destroys the tsi_frame_protector object. */ void tsi_frame_protector_destroy(tsi_frame_protector* self); - /* --- tsi_peer objects --- tsi_peer objects are a set of properties. The peer owns the properties. */ @@ -201,18 +195,18 @@ typedef struct tsi_peer_property { double real; struct { char* data; - uint32_t length; + size_t length; } string; struct { struct tsi_peer_property* children; - uint32_t child_count; + size_t child_count; } list; } value; } tsi_peer_property; typedef struct { tsi_peer_property* properties; - uint32_t property_count; + size_t property_count; } tsi_peer; /* Gets the first property with the specified name. Iteration over the @@ -234,12 +228,12 @@ void tsi_peer_destruct(tsi_peer* self); ------------------------------------------------------------------------ tsi_result result = TSI_OK; unsigned char buf[4096]; - uint32_t buf_offset; - uint32_t buf_size; + size_t buf_offset; + size_t buf_size; while (1) { // See if we need to send some bytes to the peer. do { - uint32_t buf_size_to_send = sizeof(buf); + size_t buf_size_to_send = sizeof(buf); result = tsi_handshaker_get_bytes_to_send_to_peer(handshaker, buf, &buf_size_to_send); if (buf_size_to_send > 0) send_bytes_to_peer(buf, buf_size_to_send); @@ -257,7 +251,7 @@ void tsi_peer_destruct(tsi_peer* self); // Process the bytes from the peer. We have to be careful as these bytes // may contain non-handshake data (protected data). If this is the case, // we will exit from the loop with buf_size > 0. - uint32_t consumed_by_handshaker = buf_size; + size_t consumed_by_handshaker = buf_size; result = tsi_handshaker_process_bytes_from_peer( handshaker, buf, &consumed_by_handshaker); buf_size -= consumed_by_handshaker; @@ -307,7 +301,7 @@ typedef struct tsi_handshaker tsi_handshaker; error in the handshake, another specific error code is returned. */ tsi_result tsi_handshaker_get_bytes_to_send_to_peer(tsi_handshaker* self, unsigned char* bytes, - uint32_t* bytes_size); + size_t* bytes_size); /* Processes bytes received from the peer. - bytes is the buffer containing the data. @@ -320,7 +314,7 @@ tsi_result tsi_handshaker_get_bytes_to_send_to_peer(tsi_handshaker* self, returned. */ tsi_result tsi_handshaker_process_bytes_from_peer(tsi_handshaker* self, const unsigned char* bytes, - uint32_t* bytes_size); + size_t* bytes_size); /* Gets the result of the handshaker. Returns TSI_OK if the hanshake completed successfully and there has been no @@ -333,7 +327,6 @@ tsi_result tsi_handshaker_get_result(tsi_handshaker* self); #define tsi_handshaker_is_in_progress(h) \ (tsi_handshaker_get_result((h)) == TSI_HANDSHAKE_IN_PROGRESS) - /* This method may return TSI_FAILED_PRECONDITION if tsi_handshaker_is_in_progress returns 1, it returns TSI_OK otherwise assuming the handshaker is not in a fatal error state. @@ -357,8 +350,7 @@ tsi_result tsi_handshaker_extract_peer(tsi_handshaker* self, tsi_peer* peer); the handshaker is not in a fatal error state. The caller is responsible for destroying the protector. */ tsi_result tsi_handshaker_create_frame_protector( - tsi_handshaker* self, - uint32_t* max_output_protected_frame_size, + tsi_handshaker* self, size_t* max_output_protected_frame_size, tsi_frame_protector** protector); /* This method releases the tsi_handshaker object. After this method is called, @@ -369,4 +361,4 @@ void tsi_handshaker_destroy(tsi_handshaker* self); } #endif -#endif /* __TRANSPORT_SECURITY_INTERFACE_H_ */ +#endif /* __TRANSPORT_SECURITY_INTERFACE_H_ */ diff --git a/src/cpp/client/channel.cc b/src/cpp/client/channel.cc index bcda4ed40cc..a8919a10d9d 100644 --- a/src/cpp/client/channel.cc +++ b/src/cpp/client/channel.cc @@ -53,7 +53,7 @@ namespace grpc { -Channel::Channel(const grpc::string& target, const ChannelArguments& args) +Channel::Channel(const grpc::string &target, const ChannelArguments &args) : target_(target) { grpc_channel_args channel_args; args.SetChannelArgs(&channel_args); @@ -61,15 +61,15 @@ Channel::Channel(const grpc::string& target, const ChannelArguments& args) target_.c_str(), channel_args.num_args > 0 ? &channel_args : nullptr); } -Channel::Channel(const grpc::string& target, - const std::unique_ptr& creds, - const ChannelArguments& args) +Channel::Channel(const grpc::string &target, + const std::unique_ptr &creds, + const ChannelArguments &args) : target_(args.GetSslTargetNameOverride().empty() ? target : args.GetSslTargetNameOverride()) { grpc_channel_args channel_args; args.SetChannelArgs(&channel_args); - grpc_credentials* c_creds = creds ? creds->GetRawCreds() : nullptr; + grpc_credentials *c_creds = creds ? creds->GetRawCreds() : nullptr; c_channel_ = grpc_secure_channel_create( c_creds, target.c_str(), channel_args.num_args > 0 ? &channel_args : nullptr); @@ -79,9 +79,9 @@ Channel::~Channel() { grpc_channel_destroy(c_channel_); } namespace { // Pluck the finished event and set to status when it is not nullptr. -void GetFinalStatus(grpc_completion_queue* cq, void* finished_tag, - Status* status) { - grpc_event* ev = +void GetFinalStatus(grpc_completion_queue *cq, void *finished_tag, + Status *status) { + grpc_event *ev = grpc_completion_queue_pluck(cq, finished_tag, gpr_inf_future); if (status) { StatusCode error_code = static_cast(ev->data.finished.status); @@ -94,23 +94,23 @@ void GetFinalStatus(grpc_completion_queue* cq, void* finished_tag, } // namespace // TODO(yangg) more error handling -Status Channel::StartBlockingRpc(const RpcMethod& method, - ClientContext* context, - const google::protobuf::Message& request, - google::protobuf::Message* result) { +Status Channel::StartBlockingRpc(const RpcMethod &method, + ClientContext *context, + const google::protobuf::Message &request, + google::protobuf::Message *result) { Status status; - grpc_call* call = grpc_channel_create_call( + grpc_call *call = grpc_channel_create_call( c_channel_, method.name(), target_.c_str(), context->RawDeadline()); context->set_call(call); - grpc_event* ev; - void* finished_tag = reinterpret_cast(call); - void* invoke_tag = reinterpret_cast(call) + 1; - void* metadata_read_tag = reinterpret_cast(call) + 2; - void* write_tag = reinterpret_cast(call) + 3; - void* halfclose_tag = reinterpret_cast(call) + 4; - void* read_tag = reinterpret_cast(call) + 5; + grpc_event *ev; + void *finished_tag = reinterpret_cast(call); + void *invoke_tag = reinterpret_cast(call) + 1; + void *metadata_read_tag = reinterpret_cast(call) + 2; + void *write_tag = reinterpret_cast(call) + 3; + void *halfclose_tag = reinterpret_cast(call) + 4; + void *read_tag = reinterpret_cast(call) + 5; - grpc_completion_queue* cq = grpc_completion_queue_create(); + grpc_completion_queue *cq = grpc_completion_queue_create(); context->set_cq(cq); // add_metadata from context // @@ -126,7 +126,7 @@ Status Channel::StartBlockingRpc(const RpcMethod& method, return status; } // write request - grpc_byte_buffer* write_buffer = nullptr; + grpc_byte_buffer *write_buffer = nullptr; success = SerializeProto(request, &write_buffer); if (!success) { grpc_call_cancel(call); @@ -172,14 +172,14 @@ Status Channel::StartBlockingRpc(const RpcMethod& method, return status; } -StreamContextInterface* Channel::CreateStream(const RpcMethod& method, - ClientContext* context, - const google::protobuf::Message* request, - google::protobuf::Message* result) { - grpc_call* call = grpc_channel_create_call( +StreamContextInterface *Channel::CreateStream( + const RpcMethod &method, ClientContext *context, + const google::protobuf::Message *request, + google::protobuf::Message *result) { + grpc_call *call = grpc_channel_create_call( c_channel_, method.name(), target_.c_str(), context->RawDeadline()); context->set_call(call); - grpc_completion_queue* cq = grpc_completion_queue_create(); + grpc_completion_queue *cq = grpc_completion_queue_create(); context->set_cq(cq); return new StreamContext(method, context, request, result); } diff --git a/src/cpp/client/channel.h b/src/cpp/client/channel.h index 621e58539bf..67d18bf4c89 100644 --- a/src/cpp/client/channel.h +++ b/src/cpp/client/channel.h @@ -48,24 +48,24 @@ class StreamContextInterface; class Channel : public ChannelInterface { public: - Channel(const grpc::string& target, const ChannelArguments& args); - Channel(const grpc::string& target, const std::unique_ptr& creds, - const ChannelArguments& args); + Channel(const grpc::string &target, const ChannelArguments &args); + Channel(const grpc::string &target, const std::unique_ptr &creds, + const ChannelArguments &args); ~Channel() override; - Status StartBlockingRpc(const RpcMethod& method, ClientContext* context, - const google::protobuf::Message& request, - google::protobuf::Message* result) override; + Status StartBlockingRpc(const RpcMethod &method, ClientContext *context, + const google::protobuf::Message &request, + google::protobuf::Message *result) override; - StreamContextInterface* CreateStream(const RpcMethod& method, - ClientContext* context, - const google::protobuf::Message* request, - google::protobuf::Message* result) override; + StreamContextInterface *CreateStream( + const RpcMethod &method, ClientContext *context, + const google::protobuf::Message *request, + google::protobuf::Message *result) override; private: const grpc::string target_; - grpc_channel* c_channel_; // owned + grpc_channel *c_channel_; // owned }; } // namespace grpc diff --git a/src/cpp/client/channel_arguments.cc b/src/cpp/client/channel_arguments.cc index eba9c1e76a7..70713f015f1 100644 --- a/src/cpp/client/channel_arguments.cc +++ b/src/cpp/client/channel_arguments.cc @@ -37,7 +37,7 @@ namespace grpc { -void ChannelArguments::SetSslTargetNameOverride(const grpc::string& name) { +void ChannelArguments::SetSslTargetNameOverride(const grpc::string &name) { SetString(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, name); } @@ -50,32 +50,32 @@ grpc::string ChannelArguments::GetSslTargetNameOverride() const { return ""; } -void ChannelArguments::SetInt(const grpc::string& key, int value) { +void ChannelArguments::SetInt(const grpc::string &key, int value) { grpc_arg arg; arg.type = GRPC_ARG_INTEGER; strings_.push_back(key); - arg.key = const_cast(strings_.back().c_str()); + arg.key = const_cast(strings_.back().c_str()); arg.value.integer = value; args_.push_back(arg); } -void ChannelArguments::SetString(const grpc::string& key, - const grpc::string& value) { +void ChannelArguments::SetString(const grpc::string &key, + const grpc::string &value) { grpc_arg arg; arg.type = GRPC_ARG_STRING; strings_.push_back(key); - arg.key = const_cast(strings_.back().c_str()); + arg.key = const_cast(strings_.back().c_str()); strings_.push_back(value); - arg.value.string = const_cast(strings_.back().c_str()); + arg.value.string = const_cast(strings_.back().c_str()); args_.push_back(arg); } -void ChannelArguments::SetChannelArgs(grpc_channel_args* channel_args) const { +void ChannelArguments::SetChannelArgs(grpc_channel_args *channel_args) const { channel_args->num_args = args_.size(); if (channel_args->num_args > 0) { - channel_args->args = const_cast(&args_[0]); + channel_args->args = const_cast(&args_[0]); } } diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc index 505b7d89b46..7bda2d07c31 100644 --- a/src/cpp/client/client_context.cc +++ b/src/cpp/client/client_context.cc @@ -50,7 +50,7 @@ ClientContext::~ClientContext() { if (cq_) { grpc_completion_queue_shutdown(cq_); // Drain cq_. - grpc_event* ev; + grpc_event *ev; grpc_completion_type t; do { ev = grpc_completion_queue_next(cq_, gpr_inf_future); @@ -62,7 +62,7 @@ ClientContext::~ClientContext() { } void ClientContext::set_absolute_deadline( - const system_clock::time_point& deadline) { + const system_clock::time_point &deadline) { Timepoint2Timespec(deadline, &absolute_deadline_); } @@ -70,8 +70,8 @@ system_clock::time_point ClientContext::absolute_deadline() { return Timespec2Timepoint(absolute_deadline_); } -void ClientContext::AddMetadata(const grpc::string& meta_key, - const grpc::string& meta_value) { +void ClientContext::AddMetadata(const grpc::string &meta_key, + const grpc::string &meta_value) { return; } diff --git a/src/cpp/client/create_channel.cc b/src/cpp/client/create_channel.cc index 1a88d7f2f19..9cc5cff2148 100644 --- a/src/cpp/client/create_channel.cc +++ b/src/cpp/client/create_channel.cc @@ -40,14 +40,14 @@ namespace grpc { class ChannelArguments; -std::shared_ptr CreateChannel(const grpc::string& target, - const ChannelArguments& args) { +std::shared_ptr CreateChannel(const grpc::string &target, + const ChannelArguments &args) { return std::shared_ptr(new Channel(target, args)); } std::shared_ptr CreateChannel( - const grpc::string& target, const std::unique_ptr& creds, - const ChannelArguments& args) { + const grpc::string &target, const std::unique_ptr &creds, + const ChannelArguments &args) { return std::shared_ptr(new Channel(target, creds, args)); } } // namespace grpc diff --git a/src/cpp/client/credentials.cc b/src/cpp/client/credentials.cc index cac1d3d106c..0955fa28aed 100644 --- a/src/cpp/client/credentials.cc +++ b/src/cpp/client/credentials.cc @@ -31,7 +31,6 @@ * */ - #include #include @@ -41,37 +40,37 @@ namespace grpc { -Credentials::Credentials(grpc_credentials* c_creds) : creds_(c_creds) {} +Credentials::Credentials(grpc_credentials *c_creds) : creds_(c_creds) {} Credentials::~Credentials() { grpc_credentials_release(creds_); } -grpc_credentials* Credentials::GetRawCreds() { return creds_; } +grpc_credentials *Credentials::GetRawCreds() { return creds_; } std::unique_ptr CredentialsFactory::DefaultCredentials() { - grpc_credentials* c_creds = grpc_default_credentials_create(); + grpc_credentials *c_creds = grpc_default_credentials_create(); std::unique_ptr cpp_creds(new Credentials(c_creds)); return cpp_creds; } // Builds SSL Credentials given SSL specific options std::unique_ptr CredentialsFactory::SslCredentials( - const SslCredentialsOptions& options) { - const unsigned char* pem_root_certs = + const SslCredentialsOptions &options) { + const unsigned char *pem_root_certs = options.pem_root_certs.empty() ? nullptr - : reinterpret_cast( + : reinterpret_cast( options.pem_root_certs.c_str()); if (pem_root_certs == nullptr) { return std::unique_ptr(); } - const unsigned char* pem_private_key = + const unsigned char *pem_private_key = options.pem_private_key.empty() ? nullptr - : reinterpret_cast( + : reinterpret_cast( options.pem_private_key.c_str()); - const unsigned char* pem_cert_chain = + const unsigned char *pem_cert_chain = options.pem_cert_chain.empty() ? nullptr - : reinterpret_cast( + : reinterpret_cast( options.pem_cert_chain.c_str()); - grpc_credentials* c_creds = grpc_ssl_credentials_create( + grpc_credentials *c_creds = grpc_ssl_credentials_create( pem_root_certs, options.pem_root_certs.size(), pem_private_key, options.pem_private_key.size(), pem_cert_chain, options.pem_cert_chain.size()); @@ -82,7 +81,7 @@ std::unique_ptr CredentialsFactory::SslCredentials( // Builds credentials for use when running in GCE std::unique_ptr CredentialsFactory::ComputeEngineCredentials() { - grpc_credentials* c_creds = grpc_compute_engine_credentials_create(); + grpc_credentials *c_creds = grpc_compute_engine_credentials_create(); std::unique_ptr cpp_creds( c_creds == nullptr ? nullptr : new Credentials(c_creds)); return cpp_creds; @@ -90,11 +89,11 @@ std::unique_ptr CredentialsFactory::ComputeEngineCredentials() { // Builds service account credentials. std::unique_ptr CredentialsFactory::ServiceAccountCredentials( - const grpc::string& json_key, const grpc::string& scope, + const grpc::string &json_key, const grpc::string &scope, std::chrono::seconds token_lifetime) { gpr_timespec lifetime = gpr_time_from_seconds( token_lifetime.count() > 0 ? token_lifetime.count() : 0); - grpc_credentials* c_creds = grpc_service_account_credentials_create( + grpc_credentials *c_creds = grpc_service_account_credentials_create( json_key.c_str(), scope.c_str(), lifetime); std::unique_ptr cpp_creds( c_creds == nullptr ? nullptr : new Credentials(c_creds)); @@ -103,25 +102,24 @@ std::unique_ptr CredentialsFactory::ServiceAccountCredentials( // Builds IAM credentials. std::unique_ptr CredentialsFactory::IAMCredentials( - const grpc::string& authorization_token, - const grpc::string& authority_selector) { - grpc_credentials* c_creds = grpc_iam_credentials_create( + const grpc::string &authorization_token, + const grpc::string &authority_selector) { + grpc_credentials *c_creds = grpc_iam_credentials_create( authorization_token.c_str(), authority_selector.c_str()); std::unique_ptr cpp_creds( c_creds == nullptr ? nullptr : new Credentials(c_creds)); return cpp_creds; } - // Combines two credentials objects into a composite credentials. std::unique_ptr CredentialsFactory::ComposeCredentials( - const std::unique_ptr& creds1, - const std::unique_ptr& creds2) { + const std::unique_ptr &creds1, + const std::unique_ptr &creds2) { // Note that we are not saving unique_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. - grpc_credentials* c_creds = grpc_composite_credentials_create( + grpc_credentials *c_creds = grpc_composite_credentials_create( creds1->GetRawCreds(), creds2->GetRawCreds()); std::unique_ptr cpp_creds( c_creds == nullptr ? nullptr : new Credentials(c_creds)); diff --git a/src/cpp/proto/proto_utils.cc b/src/cpp/proto/proto_utils.cc index 255d1461a9a..85f859b9eb5 100644 --- a/src/cpp/proto/proto_utils.cc +++ b/src/cpp/proto/proto_utils.cc @@ -40,7 +40,8 @@ namespace grpc { -bool SerializeProto(const google::protobuf::Message& msg, grpc_byte_buffer** bp) { +bool SerializeProto(const google::protobuf::Message &msg, + grpc_byte_buffer **bp) { grpc::string msg_str; bool success = msg.SerializeToString(&msg_str); if (success) { @@ -52,12 +53,13 @@ bool SerializeProto(const google::protobuf::Message& msg, grpc_byte_buffer** bp) return success; } -bool DeserializeProto(grpc_byte_buffer* buffer, google::protobuf::Message* msg) { +bool DeserializeProto(grpc_byte_buffer *buffer, + google::protobuf::Message *msg) { grpc::string msg_string; - grpc_byte_buffer_reader* reader = grpc_byte_buffer_reader_create(buffer); + grpc_byte_buffer_reader *reader = grpc_byte_buffer_reader_create(buffer); gpr_slice slice; while (grpc_byte_buffer_reader_next(reader, &slice)) { - const char* data = reinterpret_cast( + const char *data = reinterpret_cast( slice.refcount ? slice.data.refcounted.bytes : slice.data.inlined.bytes); msg_string.append(data, slice.refcount ? slice.data.refcounted.length diff --git a/src/cpp/proto/proto_utils.h b/src/cpp/proto/proto_utils.h index 11471f1acb6..a611a227fa7 100644 --- a/src/cpp/proto/proto_utils.h +++ b/src/cpp/proto/proto_utils.h @@ -46,10 +46,11 @@ namespace grpc { // Serialize the msg into a buffer created inside the function. The caller // should destroy the returned buffer when done with it. If serialization fails, // false is returned and buffer is left unchanged. -bool SerializeProto(const google::protobuf::Message& msg, grpc_byte_buffer** buffer); +bool SerializeProto(const google::protobuf::Message &msg, + grpc_byte_buffer **buffer); // The caller keeps ownership of buffer and msg. -bool DeserializeProto(grpc_byte_buffer* buffer, google::protobuf::Message* msg); +bool DeserializeProto(grpc_byte_buffer *buffer, google::protobuf::Message *msg); } // namespace grpc diff --git a/src/cpp/server/async_server.cc b/src/cpp/server/async_server.cc index aae2c820504..d576201b11f 100644 --- a/src/cpp/server/async_server.cc +++ b/src/cpp/server/async_server.cc @@ -39,7 +39,7 @@ namespace grpc { -AsyncServer::AsyncServer(CompletionQueue* cc) +AsyncServer::AsyncServer(CompletionQueue *cc) : started_(false), shutdown_(false) { server_ = grpc_server_create(cc->cq(), nullptr); } @@ -53,7 +53,7 @@ AsyncServer::~AsyncServer() { grpc_server_destroy(server_); } -void AsyncServer::AddPort(const grpc::string& addr) { +void AsyncServer::AddPort(const grpc::string &addr) { GPR_ASSERT(!started_); int success = grpc_server_add_http2_port(server_, addr.c_str()); GPR_ASSERT(success); diff --git a/src/cpp/server/async_server_context.cc b/src/cpp/server/async_server_context.cc index f44678b5699..92958111c0c 100644 --- a/src/cpp/server/async_server_context.cc +++ b/src/cpp/server/async_server_context.cc @@ -42,32 +42,31 @@ namespace grpc { AsyncServerContext::AsyncServerContext( - grpc_call* call, const grpc::string& method, const grpc::string& host, + grpc_call *call, const grpc::string &method, const grpc::string &host, system_clock::time_point absolute_deadline) : method_(method), host_(host), absolute_deadline_(absolute_deadline), request_(nullptr), - call_(call) { -} + call_(call) {} AsyncServerContext::~AsyncServerContext() { grpc_call_destroy(call_); } -void AsyncServerContext::Accept(grpc_completion_queue* cq) { +void AsyncServerContext::Accept(grpc_completion_queue *cq) { GPR_ASSERT(grpc_call_server_accept(call_, cq, this) == GRPC_CALL_OK); GPR_ASSERT(grpc_call_server_end_initial_metadata(call_, 0) == GRPC_CALL_OK); } -bool AsyncServerContext::StartRead(google::protobuf::Message* request) { +bool AsyncServerContext::StartRead(google::protobuf::Message *request) { GPR_ASSERT(request); request_ = request; grpc_call_error err = grpc_call_start_read(call_, this); return err == GRPC_CALL_OK; } -bool AsyncServerContext::StartWrite(const google::protobuf::Message& response, +bool AsyncServerContext::StartWrite(const google::protobuf::Message &response, int flags) { - grpc_byte_buffer* buffer = nullptr; + grpc_byte_buffer *buffer = nullptr; if (!SerializeProto(response, &buffer)) { return false; } @@ -76,16 +75,16 @@ bool AsyncServerContext::StartWrite(const google::protobuf::Message& response, return err == GRPC_CALL_OK; } -bool AsyncServerContext::StartWriteStatus(const Status& status) { +bool AsyncServerContext::StartWriteStatus(const Status &status) { grpc_call_error err = grpc_call_start_write_status( call_, static_cast(status.code()), status.details().empty() ? nullptr - : const_cast(status.details().c_str()), + : const_cast(status.details().c_str()), this); return err == GRPC_CALL_OK; } -bool AsyncServerContext::ParseRead(grpc_byte_buffer* read_buffer) { +bool AsyncServerContext::ParseRead(grpc_byte_buffer *read_buffer) { GPR_ASSERT(request_); bool success = DeserializeProto(read_buffer, request_); request_ = nullptr; diff --git a/src/cpp/server/completion_queue.cc b/src/cpp/server/completion_queue.cc index 56d165c9a68..102a81bf0eb 100644 --- a/src/cpp/server/completion_queue.cc +++ b/src/cpp/server/completion_queue.cc @@ -48,8 +48,8 @@ CompletionQueue::~CompletionQueue() { grpc_completion_queue_destroy(cq_); } void CompletionQueue::Shutdown() { grpc_completion_queue_shutdown(cq_); } -CompletionQueue::CompletionType CompletionQueue::Next(void** tag) { - grpc_event* ev; +CompletionQueue::CompletionType CompletionQueue::Next(void **tag) { + grpc_event *ev; CompletionType return_type; bool success; @@ -65,8 +65,8 @@ CompletionQueue::CompletionType CompletionQueue::Next(void** tag) { case GRPC_READ: *tag = ev->tag; if (ev->data.read) { - success = - static_cast(ev->tag)->ParseRead(ev->data.read); + success = static_cast(ev->tag) + ->ParseRead(ev->data.read); return_type = success ? SERVER_READ_OK : SERVER_READ_ERROR; } else { return_type = SERVER_READ_ERROR; diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index d85748eea44..193688e743e 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -49,7 +49,7 @@ namespace grpc { // TODO(rocking): consider a better default value like num of cores. static const int kNumThreads = 4; -Server::Server(ThreadPoolInterface* thread_pool, ServerCredentials* creds) +Server::Server(ThreadPoolInterface *thread_pool, ServerCredentials *creds) : started_(false), shutdown_(false), num_running_cb_(0), @@ -82,14 +82,14 @@ Server::~Server() { } } -void Server::RegisterService(RpcService* service) { +void Server::RegisterService(RpcService *service) { for (int i = 0; i < service->GetMethodCount(); ++i) { - RpcServiceMethod* method = service->GetMethod(i); + RpcServiceMethod *method = service->GetMethod(i); method_map_.insert(std::make_pair(method->name(), method)); } } -void Server::AddPort(const grpc::string& addr) { +void Server::AddPort(const grpc::string &addr) { GPR_ASSERT(!started_); int success; if (secure_) { @@ -131,7 +131,7 @@ void Server::Shutdown() { // Shutdown the completion queue. cq_.Shutdown(); - void* tag = nullptr; + void *tag = nullptr; CompletionQueue::CompletionType t = cq_.Next(&tag); GPR_ASSERT(t == CompletionQueue::QUEUE_CLOSED); } @@ -147,18 +147,18 @@ void Server::ScheduleCallback() { void Server::RunRpc() { // Wait for one more incoming rpc. - void* tag = nullptr; + void *tag = nullptr; AllowOneRpc(); CompletionQueue::CompletionType t = cq_.Next(&tag); GPR_ASSERT(t == CompletionQueue::SERVER_RPC_NEW); - AsyncServerContext* server_context = static_cast(tag); + AsyncServerContext *server_context = static_cast(tag); // server_context could be nullptr during server shutdown. if (server_context != nullptr) { // Schedule a new callback to handle more rpcs. ScheduleCallback(); - RpcServiceMethod* method = nullptr; + RpcServiceMethod *method = nullptr; auto iter = method_map_.find(server_context->method()); if (iter != method_map_.end()) { method = iter->second; diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index d74d8cb65f2..add22cc3d86 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -40,30 +40,30 @@ namespace grpc { ServerBuilder::ServerBuilder() : thread_pool_(nullptr) {} -void ServerBuilder::RegisterService(RpcService* service) { +void ServerBuilder::RegisterService(RpcService *service) { services_.push_back(service); } -void ServerBuilder::AddPort(const grpc::string& addr) { +void ServerBuilder::AddPort(const grpc::string &addr) { ports_.push_back(addr); } void ServerBuilder::SetCredentials( - const std::shared_ptr& creds) { + const std::shared_ptr &creds) { GPR_ASSERT(!creds_); creds_ = creds; } -void ServerBuilder::SetThreadPool(ThreadPoolInterface* thread_pool) { +void ServerBuilder::SetThreadPool(ThreadPoolInterface *thread_pool) { thread_pool_ = thread_pool; } std::unique_ptr ServerBuilder::BuildAndStart() { std::unique_ptr server(new Server(thread_pool_, creds_.get())); - for (auto* service : services_) { + for (auto *service : services_) { server->RegisterService(service); } - for (auto& port : ports_) { + for (auto &port : ports_) { server->AddPort(port); } server->Start(); diff --git a/src/cpp/server/server_context_impl.cc b/src/cpp/server/server_context_impl.cc index 13f2a3ae1ac..467cc80e055 100644 --- a/src/cpp/server/server_context_impl.cc +++ b/src/cpp/server/server_context_impl.cc @@ -33,6 +33,4 @@ #include "src/cpp/server/server_context_impl.h" -namespace grpc { - -} // namespace grpc +namespace grpc {} // namespace grpc diff --git a/src/cpp/server/server_credentials.cc b/src/cpp/server/server_credentials.cc index f9ca1622bac..b82a2d821a3 100644 --- a/src/cpp/server/server_credentials.cc +++ b/src/cpp/server/server_credentials.cc @@ -31,38 +31,37 @@ * */ - #include #include namespace grpc { -ServerCredentials::ServerCredentials(grpc_server_credentials* c_creds) +ServerCredentials::ServerCredentials(grpc_server_credentials *c_creds) : creds_(c_creds) {} ServerCredentials::~ServerCredentials() { grpc_server_credentials_release(creds_); } -grpc_server_credentials* ServerCredentials::GetRawCreds() { return creds_; } +grpc_server_credentials *ServerCredentials::GetRawCreds() { return creds_; } std::shared_ptr ServerCredentialsFactory::SslCredentials( - const SslServerCredentialsOptions& options) { - const unsigned char* pem_root_certs = + const SslServerCredentialsOptions &options) { + const unsigned char *pem_root_certs = options.pem_root_certs.empty() ? nullptr - : reinterpret_cast( + : reinterpret_cast( options.pem_root_certs.c_str()); - const unsigned char* pem_private_key = + const unsigned char *pem_private_key = options.pem_private_key.empty() ? nullptr - : reinterpret_cast( + : reinterpret_cast( options.pem_private_key.c_str()); - const unsigned char* pem_cert_chain = + const unsigned char *pem_cert_chain = options.pem_cert_chain.empty() ? nullptr - : reinterpret_cast( + : reinterpret_cast( options.pem_cert_chain.c_str()); - grpc_server_credentials* c_creds = grpc_ssl_server_credentials_create( + grpc_server_credentials *c_creds = grpc_ssl_server_credentials_create( pem_root_certs, options.pem_root_certs.size(), pem_private_key, options.pem_private_key.size(), pem_cert_chain, options.pem_cert_chain.size()); diff --git a/src/cpp/server/server_rpc_handler.cc b/src/cpp/server/server_rpc_handler.cc index b7b29c24066..061ac1c2f39 100644 --- a/src/cpp/server/server_rpc_handler.cc +++ b/src/cpp/server/server_rpc_handler.cc @@ -41,8 +41,8 @@ namespace grpc { -ServerRpcHandler::ServerRpcHandler(AsyncServerContext* async_server_context, - RpcServiceMethod* method) +ServerRpcHandler::ServerRpcHandler(AsyncServerContext *async_server_context, + RpcServiceMethod *method) : async_server_context_(async_server_context), method_(method) {} void ServerRpcHandler::StartRpc() { @@ -60,8 +60,10 @@ void ServerRpcHandler::StartRpc() { async_server_context_->Accept(cq_.cq()); // Allocate request and response. - std::unique_ptr request(method_->AllocateRequestProto()); - std::unique_ptr response(method_->AllocateResponseProto()); + std::unique_ptr request( + method_->AllocateRequestProto()); + std::unique_ptr response( + method_->AllocateResponseProto()); // Read request async_server_context_->StartRead(request.get()); @@ -69,7 +71,7 @@ void ServerRpcHandler::StartRpc() { GPR_ASSERT(type == CompletionQueue::SERVER_READ_OK); // Run the application's rpc handler - MethodHandler* handler = method_->handler(); + MethodHandler *handler = method_->handler(); Status status = handler->RunHandler(MethodHandler::HandlerParameter( &user_context, request.get(), response.get())); @@ -86,14 +88,16 @@ void ServerRpcHandler::StartRpc() { } else { // Allocate request and response. // TODO(yangg) maybe not allocate both when not needed? - std::unique_ptr request(method_->AllocateRequestProto()); - std::unique_ptr response(method_->AllocateResponseProto()); + std::unique_ptr request( + method_->AllocateRequestProto()); + std::unique_ptr response( + method_->AllocateResponseProto()); StreamContext stream_context(*method_, async_server_context_->call(), cq_.cq(), request.get(), response.get()); // Run the application's rpc handler - MethodHandler* handler = method_->handler(); + MethodHandler *handler = method_->handler(); Status status = handler->RunHandler(MethodHandler::HandlerParameter( &user_context, request.get(), response.get(), &stream_context)); if (status.IsOk() && @@ -106,17 +110,17 @@ void ServerRpcHandler::StartRpc() { } CompletionQueue::CompletionType ServerRpcHandler::WaitForNextEvent() { - void* tag = nullptr; + void *tag = nullptr; CompletionQueue::CompletionType type = cq_.Next(&tag); if (type != CompletionQueue::QUEUE_CLOSED && type != CompletionQueue::RPC_END) { - GPR_ASSERT(static_cast(tag) == + GPR_ASSERT(static_cast(tag) == async_server_context_.get()); } return type; } -void ServerRpcHandler::FinishRpc(const Status& status) { +void ServerRpcHandler::FinishRpc(const Status &status) { async_server_context_->StartWriteStatus(status); CompletionQueue::CompletionType type; diff --git a/src/cpp/server/server_rpc_handler.h b/src/cpp/server/server_rpc_handler.h index 249576d504a..a43e07dc5f9 100644 --- a/src/cpp/server/server_rpc_handler.h +++ b/src/cpp/server/server_rpc_handler.h @@ -47,17 +47,17 @@ class RpcServiceMethod; class ServerRpcHandler { public: // Takes ownership of async_server_context. - ServerRpcHandler(AsyncServerContext* async_server_context, - RpcServiceMethod* method); + ServerRpcHandler(AsyncServerContext *async_server_context, + RpcServiceMethod *method); void StartRpc(); private: CompletionQueue::CompletionType WaitForNextEvent(); - void FinishRpc(const Status& status); + void FinishRpc(const Status &status); std::unique_ptr async_server_context_; - RpcServiceMethod* method_; + RpcServiceMethod *method_; CompletionQueue cq_; }; diff --git a/src/cpp/server/thread_pool.cc b/src/cpp/server/thread_pool.cc index ce364c47955..a46d4c64d25 100644 --- a/src/cpp/server/thread_pool.cc +++ b/src/cpp/server/thread_pool.cc @@ -63,12 +63,12 @@ ThreadPool::~ThreadPool() { shutdown_ = true; cv_.notify_all(); } - for (auto& t : threads_) { + for (auto &t : threads_) { t.join(); } } -void ThreadPool::ScheduleCallback(const std::function& callback) { +void ThreadPool::ScheduleCallback(const std::function &callback) { std::lock_guard lock(mu_); callbacks_.push(callback); cv_.notify_all(); diff --git a/src/cpp/server/thread_pool.h b/src/cpp/server/thread_pool.h index 6fc71d6695b..c53f7a7517a 100644 --- a/src/cpp/server/thread_pool.h +++ b/src/cpp/server/thread_pool.h @@ -49,7 +49,7 @@ class ThreadPool : public ThreadPoolInterface { explicit ThreadPool(int num_threads); ~ThreadPool(); - void ScheduleCallback(const std::function& callback) final; + void ScheduleCallback(const std::function &callback) final; private: std::mutex mu_; diff --git a/src/cpp/stream/stream_context.cc b/src/cpp/stream/stream_context.cc index 6c424b937ed..e64010be64f 100644 --- a/src/cpp/stream/stream_context.cc +++ b/src/cpp/stream/stream_context.cc @@ -44,14 +44,14 @@ namespace grpc { // Client only ctor -StreamContext::StreamContext(const RpcMethod& method, ClientContext* context, - const google::protobuf::Message* request, - google::protobuf::Message* result) +StreamContext::StreamContext(const RpcMethod &method, ClientContext *context, + const google::protobuf::Message *request, + google::protobuf::Message *result) : is_client_(true), method_(&method), call_(context->call()), cq_(context->cq()), - request_(const_cast(request)), + request_(const_cast(request)), result_(result), peer_halfclosed_(false), self_halfclosed_(false) { @@ -59,9 +59,10 @@ StreamContext::StreamContext(const RpcMethod& method, ClientContext* context, } // Server only ctor -StreamContext::StreamContext(const RpcMethod& method, grpc_call* call, - grpc_completion_queue* cq, - google::protobuf::Message* request, google::protobuf::Message* result) +StreamContext::StreamContext(const RpcMethod &method, grpc_call *call, + grpc_completion_queue *cq, + google::protobuf::Message *request, + google::protobuf::Message *result) : is_client_(false), method_(&method), call_(call), @@ -83,7 +84,7 @@ void StreamContext::Start(bool buffered) { client_metadata_read_tag(), finished_tag(), flag); GPR_ASSERT(GRPC_CALL_OK == error); - grpc_event* invoke_ev = + grpc_event *invoke_ev = grpc_completion_queue_pluck(cq(), invoke_tag(), gpr_inf_future); if (invoke_ev->data.invoke_accepted != GRPC_OP_OK) { peer_halfclosed_ = true; @@ -100,20 +101,19 @@ void StreamContext::Start(bool buffered) { } } -bool StreamContext::Read(google::protobuf::Message* msg) { +bool StreamContext::Read(google::protobuf::Message *msg) { // TODO(yangg) check peer_halfclosed_ here for possible early return. grpc_call_error err = grpc_call_start_read(call(), read_tag()); GPR_ASSERT(err == GRPC_CALL_OK); - grpc_event* read_ev = + grpc_event *read_ev = grpc_completion_queue_pluck(cq(), read_tag(), gpr_inf_future); GPR_ASSERT(read_ev->type == GRPC_READ); bool ret = true; if (read_ev->data.read) { if (!DeserializeProto(read_ev->data.read, msg)) { ret = false; - FinishStream( - Status(StatusCode::DATA_LOSS, "Failed to parse incoming proto"), - true); + grpc_call_cancel_with_status(call(), GRPC_STATUS_DATA_LOSS, + "Failed to parse incoming proto"); } } else { ret = false; @@ -123,17 +123,16 @@ bool StreamContext::Read(google::protobuf::Message* msg) { return ret; } -bool StreamContext::Write(const google::protobuf::Message* msg, bool is_last) { +bool StreamContext::Write(const google::protobuf::Message *msg, bool is_last) { // TODO(yangg) check self_halfclosed_ for possible early return. bool ret = true; - grpc_event* ev = nullptr; + grpc_event *ev = nullptr; if (msg) { - grpc_byte_buffer* out_buf = nullptr; + grpc_byte_buffer *out_buf = nullptr; if (!SerializeProto(*msg, &out_buf)) { - FinishStream(Status(StatusCode::INVALID_ARGUMENT, - "Failed to serialize outgoing proto"), - true); + grpc_call_cancel_with_status(call(), GRPC_STATUS_INVALID_ARGUMENT, + "Failed to serialize outgoing proto"); return false; } int flag = is_last ? GRPC_WRITE_BUFFER_HINT : 0; @@ -164,36 +163,25 @@ bool StreamContext::Write(const google::protobuf::Message* msg, bool is_last) { return ret; } -const Status& StreamContext::Wait() { +const Status &StreamContext::Wait() { // TODO(yangg) properly support metadata - grpc_event* metadata_ev = grpc_completion_queue_pluck( + grpc_event *metadata_ev = grpc_completion_queue_pluck( cq(), client_metadata_read_tag(), gpr_inf_future); grpc_event_finish(metadata_ev); // TODO(yangg) protect states by a mutex, including other places. if (!self_halfclosed_ || !peer_halfclosed_) { - FinishStream(Status::Cancelled, true); - } else { - grpc_event* finish_ev = - grpc_completion_queue_pluck(cq(), finished_tag(), gpr_inf_future); - GPR_ASSERT(finish_ev->type == GRPC_FINISHED); - final_status_ = Status( - static_cast(finish_ev->data.finished.status), - finish_ev->data.finished.details ? finish_ev->data.finished.details - : ""); - grpc_event_finish(finish_ev); + Cancel(); } - return final_status_; -} - -void StreamContext::FinishStream(const Status& status, bool send) { - if (send) { - grpc_call_cancel(call()); - } - grpc_event* finish_ev = + grpc_event *finish_ev = grpc_completion_queue_pluck(cq(), finished_tag(), gpr_inf_future); GPR_ASSERT(finish_ev->type == GRPC_FINISHED); + final_status_ = Status( + static_cast(finish_ev->data.finished.status), + finish_ev->data.finished.details ? finish_ev->data.finished.details : ""); grpc_event_finish(finish_ev); - final_status_ = status; + return final_status_; } +void StreamContext::Cancel() { grpc_call_cancel(call()); } + } // namespace grpc diff --git a/src/cpp/stream/stream_context.h b/src/cpp/stream/stream_context.h index 6c31095042a..8697d86e830 100644 --- a/src/cpp/stream/stream_context.h +++ b/src/cpp/stream/stream_context.h @@ -48,44 +48,47 @@ namespace grpc { class ClientContext; class RpcMethod; -class StreamContext : public StreamContextInterface { +class StreamContext final : public StreamContextInterface { public: - StreamContext(const RpcMethod& method, ClientContext* context, - const google::protobuf::Message* request, google::protobuf::Message* result); - StreamContext(const RpcMethod& method, grpc_call* call, - grpc_completion_queue* cq, google::protobuf::Message* request, - google::protobuf::Message* result); + StreamContext(const RpcMethod &method, ClientContext *context, + const google::protobuf::Message *request, + google::protobuf::Message *result); + StreamContext(const RpcMethod &method, grpc_call *call, + grpc_completion_queue *cq, google::protobuf::Message *request, + google::protobuf::Message *result); ~StreamContext(); // Start the stream, if there is a final write following immediately, set // buffered so that the messages can be sent in batch. void Start(bool buffered) override; - bool Read(google::protobuf::Message* msg) override; - bool Write(const google::protobuf::Message* msg, bool is_last) override; - const Status& Wait() override; - void FinishStream(const Status& status, bool send) override; + bool Read(google::protobuf::Message *msg) override; + bool Write(const google::protobuf::Message *msg, bool is_last) override; + const Status &Wait() override; + void Cancel() override; - google::protobuf::Message* request() override { return request_; } - google::protobuf::Message* response() override { return result_; } + google::protobuf::Message *request() override { return request_; } + google::protobuf::Message *response() override { return result_; } private: // Unique tags for plucking events from the c layer. this pointer is casted // to char* to create single byte step between tags. It implicitly relies on // that StreamContext is large enough to contain all the pointers. - void* finished_tag() { return reinterpret_cast(this); } - void* read_tag() { return reinterpret_cast(this) + 1; } - void* write_tag() { return reinterpret_cast(this) + 2; } - void* halfclose_tag() { return reinterpret_cast(this) + 3; } - void* invoke_tag() { return reinterpret_cast(this) + 4; } - void* client_metadata_read_tag() { return reinterpret_cast(this) + 5; } - grpc_call* call() { return call_; } - grpc_completion_queue* cq() { return cq_; } + void *finished_tag() { return reinterpret_cast(this); } + void *read_tag() { return reinterpret_cast(this) + 1; } + void *write_tag() { return reinterpret_cast(this) + 2; } + void *halfclose_tag() { return reinterpret_cast(this) + 3; } + void *invoke_tag() { return reinterpret_cast(this) + 4; } + void *client_metadata_read_tag() { + return reinterpret_cast(this) + 5; + } + grpc_call *call() { return call_; } + grpc_completion_queue *cq() { return cq_; } bool is_client_; - const RpcMethod* method_; // not owned - grpc_call* call_; // not owned - grpc_completion_queue* cq_; // not owned - google::protobuf::Message* request_; // first request, not owned - google::protobuf::Message* result_; // last response, not owned + const RpcMethod *method_; // not owned + grpc_call *call_; // not owned + grpc_completion_queue *cq_; // not owned + google::protobuf::Message *request_; // first request, not owned + google::protobuf::Message *result_; // last response, not owned bool peer_halfclosed_; bool self_halfclosed_; diff --git a/src/cpp/util/status.cc b/src/cpp/util/status.cc index 66be26da074..1ca12d0ae90 100644 --- a/src/cpp/util/status.cc +++ b/src/cpp/util/status.cc @@ -31,12 +31,11 @@ * */ - #include namespace grpc { -const Status& Status::OK = Status(); -const Status& Status::Cancelled = Status(StatusCode::CANCELLED); +const Status &Status::OK = Status(); +const Status &Status::Cancelled = Status(StatusCode::CANCELLED); } // namespace grpc diff --git a/src/cpp/util/time.cc b/src/cpp/util/time.cc index e58dde82a3e..7ce7a371f56 100644 --- a/src/cpp/util/time.cc +++ b/src/cpp/util/time.cc @@ -43,8 +43,8 @@ using std::chrono::system_clock; namespace grpc { // TODO(yangg) prevent potential overflow. -void Timepoint2Timespec(const system_clock::time_point& from, - gpr_timespec* to) { +void Timepoint2Timespec(const system_clock::time_point &from, + gpr_timespec *to) { system_clock::duration deadline = from.time_since_epoch(); seconds secs = duration_cast(deadline); nanoseconds nsecs = duration_cast(deadline - secs); diff --git a/src/cpp/util/time.h b/src/cpp/util/time.h index 338c4f5119b..908395c92b9 100644 --- a/src/cpp/util/time.h +++ b/src/cpp/util/time.h @@ -41,8 +41,8 @@ namespace grpc { // from and to should be absolute time. -void Timepoint2Timespec(const std::chrono::system_clock::time_point& from, - gpr_timespec* to); +void Timepoint2Timespec(const std::chrono::system_clock::time_point &from, + gpr_timespec *to); std::chrono::system_clock::time_point Timespec2Timepoint(gpr_timespec t); diff --git a/src/node/README.md b/src/node/README.md new file mode 100644 index 00000000000..55329d8cb2f --- /dev/null +++ b/src/node/README.md @@ -0,0 +1,12 @@ +# Node.js GRPC extension + +The package is built with + + node-gyp configure + node-gyp build + +or, for brevity + + node-gyp configure build + +The tests can be run with `npm test` on a dev install. \ No newline at end of file diff --git a/src/node/binding.gyp b/src/node/binding.gyp new file mode 100644 index 00000000000..4a1fd7aaf08 --- /dev/null +++ b/src/node/binding.gyp @@ -0,0 +1,46 @@ +{ + "targets" : [ + { + 'include_dirs': [ + " +#include + +#include +#include +#include "grpc/grpc.h" +#include "grpc/support/slice.h" + +namespace grpc { +namespace node { + +#include "byte_buffer.h" + +using ::node::Buffer; +using v8::Handle; +using v8::Value; + +grpc_byte_buffer *BufferToByteBuffer(Handle buffer) { + NanScope(); + int length = Buffer::Length(buffer); + char *data = Buffer::Data(buffer); + gpr_slice slice = gpr_slice_malloc(length); + memcpy(GPR_SLICE_START_PTR(slice), data, length); + grpc_byte_buffer *byte_buffer(grpc_byte_buffer_create(&slice, 1)); + gpr_slice_unref(slice); + return byte_buffer; +} + +Handle ByteBufferToBuffer(grpc_byte_buffer *buffer) { + NanEscapableScope(); + if (buffer == NULL) { + NanReturnNull(); + } + size_t length = grpc_byte_buffer_length(buffer); + char *result = reinterpret_cast(calloc(length, sizeof(char))); + size_t offset = 0; + grpc_byte_buffer_reader *reader = grpc_byte_buffer_reader_create(buffer); + gpr_slice next; + while (grpc_byte_buffer_reader_next(reader, &next) != 0) { + memcpy(result + offset, GPR_SLICE_START_PTR(next), GPR_SLICE_LENGTH(next)); + offset += GPR_SLICE_LENGTH(next); + } + return NanEscapeScope(NanNewBufferHandle(result, length)); +} +} // namespace node +} // namespace grpc diff --git a/src/node/byte_buffer.h b/src/node/byte_buffer.h new file mode 100644 index 00000000000..ee2b4c0d158 --- /dev/null +++ b/src/node/byte_buffer.h @@ -0,0 +1,56 @@ +/* + * + * Copyright 2014, 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 NET_GRPC_NODE_BYTE_BUFFER_H_ +#define NET_GRPC_NODE_BYTE_BUFFER_H_ + +#include + +#include +#include +#include "grpc/grpc.h" + +namespace grpc { +namespace node { + +/* Convert a Node.js Buffer to grpc_byte_buffer. Requires that + ::node::Buffer::HasInstance(buffer) */ +grpc_byte_buffer *BufferToByteBuffer(v8::Handle buffer); + +/* Convert a grpc_byte_buffer to a Node.js Buffer */ +v8::Handle ByteBufferToBuffer(grpc_byte_buffer *buffer); + +} // namespace node +} // namespace grpc + +#endif // NET_GRPC_NODE_BYTE_BUFFER_H_ diff --git a/src/node/call.cc b/src/node/call.cc new file mode 100644 index 00000000000..b8ee1786a68 --- /dev/null +++ b/src/node/call.cc @@ -0,0 +1,392 @@ +/* + * + * Copyright 2014, 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 + +#include "grpc/grpc.h" +#include "grpc/support/time.h" +#include "byte_buffer.h" +#include "call.h" +#include "channel.h" +#include "completion_queue_async_worker.h" +#include "timeval.h" +#include "tag.h" + +namespace grpc { +namespace node { + +using ::node::Buffer; +using v8::Arguments; +using v8::Array; +using v8::Exception; +using v8::External; +using v8::Function; +using v8::FunctionTemplate; +using v8::Handle; +using v8::HandleScope; +using v8::Integer; +using v8::Local; +using v8::Number; +using v8::Object; +using v8::ObjectTemplate; +using v8::Persistent; +using v8::Uint32; +using v8::String; +using v8::Value; + +Persistent Call::constructor; +Persistent Call::fun_tpl; + +Call::Call(grpc_call *call) : wrapped_call(call) {} + +Call::~Call() { grpc_call_destroy(wrapped_call); } + +void Call::Init(Handle exports) { + NanScope(); + Local tpl = FunctionTemplate::New(New); + tpl->SetClassName(NanNew("Call")); + tpl->InstanceTemplate()->SetInternalFieldCount(1); + NanSetPrototypeTemplate(tpl, "addMetadata", + FunctionTemplate::New(AddMetadata)->GetFunction()); + NanSetPrototypeTemplate(tpl, "startInvoke", + FunctionTemplate::New(StartInvoke)->GetFunction()); + NanSetPrototypeTemplate(tpl, "serverAccept", + FunctionTemplate::New(ServerAccept)->GetFunction()); + NanSetPrototypeTemplate( + tpl, "serverEndInitialMetadata", + FunctionTemplate::New(ServerEndInitialMetadata)->GetFunction()); + NanSetPrototypeTemplate(tpl, "cancel", + FunctionTemplate::New(Cancel)->GetFunction()); + NanSetPrototypeTemplate(tpl, "startWrite", + FunctionTemplate::New(StartWrite)->GetFunction()); + NanSetPrototypeTemplate( + tpl, "startWriteStatus", + FunctionTemplate::New(StartWriteStatus)->GetFunction()); + NanSetPrototypeTemplate(tpl, "writesDone", + FunctionTemplate::New(WritesDone)->GetFunction()); + NanSetPrototypeTemplate(tpl, "startReadMetadata", + FunctionTemplate::New(WritesDone)->GetFunction()); + NanSetPrototypeTemplate(tpl, "startRead", + FunctionTemplate::New(StartRead)->GetFunction()); + NanAssignPersistent(fun_tpl, tpl); + NanAssignPersistent(constructor, tpl->GetFunction()); + constructor->Set(NanNew("WRITE_BUFFER_HINT"), + NanNew(GRPC_WRITE_BUFFER_HINT)); + constructor->Set(NanNew("WRITE_NO_COMPRESS"), + NanNew(GRPC_WRITE_NO_COMPRESS)); + exports->Set(String::NewSymbol("Call"), constructor); +} + +bool Call::HasInstance(Handle val) { + NanScope(); + return NanHasInstance(fun_tpl, val); +} + +Handle Call::WrapStruct(grpc_call *call) { + NanEscapableScope(); + if (call == NULL) { + return NanEscapeScope(NanNull()); + } + const int argc = 1; + Handle argv[argc] = {External::New(reinterpret_cast(call))}; + return NanEscapeScope(constructor->NewInstance(argc, argv)); +} + +NAN_METHOD(Call::New) { + NanScope(); + + if (args.IsConstructCall()) { + Call *call; + if (args[0]->IsExternal()) { + // This option is used for wrapping an existing call + grpc_call *call_value = + reinterpret_cast(External::Unwrap(args[0])); + call = new Call(call_value); + } else { + if (!Channel::HasInstance(args[0])) { + return NanThrowTypeError("Call's first argument must be a Channel"); + } + if (!args[1]->IsString()) { + return NanThrowTypeError("Call's second argument must be a string"); + } + if (!(args[2]->IsNumber() || args[2]->IsDate())) { + return NanThrowTypeError( + "Call's third argument must be a date or a number"); + } + Handle channel_object = args[0]->ToObject(); + Channel *channel = ObjectWrap::Unwrap(channel_object); + if (channel->GetWrappedChannel() == NULL) { + return NanThrowError("Call cannot be created from a closed channel"); + } + NanUtf8String method(args[1]); + double deadline = args[2]->NumberValue(); + grpc_channel *wrapped_channel = channel->GetWrappedChannel(); + grpc_call *wrapped_call = + grpc_channel_create_call(wrapped_channel, *method, channel->GetHost(), + MillisecondsToTimespec(deadline)); + call = new Call(wrapped_call); + args.This()->SetHiddenValue(String::NewSymbol("channel_"), + channel_object); + } + call->Wrap(args.This()); + NanReturnValue(args.This()); + } else { + const int argc = 4; + Local argv[argc] = {args[0], args[1], args[2], args[3]}; + NanReturnValue(constructor->NewInstance(argc, argv)); + } +} + +NAN_METHOD(Call::AddMetadata) { + NanScope(); + if (!HasInstance(args.This())) { + return NanThrowTypeError("addMetadata can only be called on Call objects"); + } + Call *call = ObjectWrap::Unwrap(args.This()); + for (int i = 0; !args[i]->IsUndefined(); i++) { + if (!args[i]->IsObject()) { + return NanThrowTypeError( + "addMetadata arguments must be objects with key and value"); + } + Handle item = args[i]->ToObject(); + Handle key = item->Get(NanNew("key")); + if (!key->IsString()) { + return NanThrowTypeError( + "objects passed to addMetadata must have key->string"); + } + Handle value = item->Get(NanNew("value")); + if (!Buffer::HasInstance(value)) { + return NanThrowTypeError( + "objects passed to addMetadata must have value->Buffer"); + } + grpc_metadata metadata; + NanUtf8String utf8_key(key); + metadata.key = *utf8_key; + metadata.value = Buffer::Data(value); + metadata.value_length = Buffer::Length(value); + grpc_call_error error = + grpc_call_add_metadata(call->wrapped_call, &metadata, 0); + if (error != GRPC_CALL_OK) { + return NanThrowError("addMetadata failed", error); + } + } + NanReturnUndefined(); +} + +NAN_METHOD(Call::StartInvoke) { + NanScope(); + if (!HasInstance(args.This())) { + return NanThrowTypeError("startInvoke can only be called on Call objects"); + } + if (!args[0]->IsFunction()) { + return NanThrowTypeError("StartInvoke's first argument must be a function"); + } + if (!args[1]->IsFunction()) { + return NanThrowTypeError( + "StartInvoke's second argument must be a function"); + } + if (!args[2]->IsFunction()) { + return NanThrowTypeError("StartInvoke's third argument must be a function"); + } + if (!args[3]->IsUint32()) { + return NanThrowTypeError( + "StartInvoke's fourth argument must be integer flags"); + } + Call *call = ObjectWrap::Unwrap(args.This()); + unsigned int flags = args[3]->Uint32Value(); + grpc_call_error error = grpc_call_start_invoke( + call->wrapped_call, CompletionQueueAsyncWorker::GetQueue(), + CreateTag(args[0], args.This()), CreateTag(args[1], args.This()), + CreateTag(args[2], args.This()), flags); + if (error == GRPC_CALL_OK) { + CompletionQueueAsyncWorker::Next(); + CompletionQueueAsyncWorker::Next(); + CompletionQueueAsyncWorker::Next(); + } else { + return NanThrowError("startInvoke failed", error); + } + NanReturnUndefined(); +} + +NAN_METHOD(Call::ServerAccept) { + NanScope(); + if (!HasInstance(args.This())) { + return NanThrowTypeError("accept can only be called on Call objects"); + } + if (!args[0]->IsFunction()) { + return NanThrowTypeError("accept's first argument must be a function"); + } + Call *call = ObjectWrap::Unwrap(args.This()); + grpc_call_error error = grpc_call_server_accept( + call->wrapped_call, CompletionQueueAsyncWorker::GetQueue(), + CreateTag(args[0], args.This())); + if (error == GRPC_CALL_OK) { + CompletionQueueAsyncWorker::Next(); + } else { + return NanThrowError("serverAccept failed", error); + } + NanReturnUndefined(); +} + +NAN_METHOD(Call::ServerEndInitialMetadata) { + NanScope(); + if (!HasInstance(args.This())) { + return NanThrowTypeError( + "serverEndInitialMetadata can only be called on Call objects"); + } + if (!args[0]->IsUint32()) { + return NanThrowTypeError( + "serverEndInitialMetadata's second argument must be integer flags"); + } + Call *call = ObjectWrap::Unwrap(args.This()); + unsigned int flags = args[1]->Uint32Value(); + grpc_call_error error = + grpc_call_server_end_initial_metadata(call->wrapped_call, flags); + if (error != GRPC_CALL_OK) { + return NanThrowError("serverEndInitialMetadata failed", error); + } + NanReturnUndefined(); +} + +NAN_METHOD(Call::Cancel) { + NanScope(); + if (!HasInstance(args.This())) { + return NanThrowTypeError("startInvoke can only be called on Call objects"); + } + Call *call = ObjectWrap::Unwrap(args.This()); + grpc_call_error error = grpc_call_cancel(call->wrapped_call); + if (error != GRPC_CALL_OK) { + return NanThrowError("cancel failed", error); + } + NanReturnUndefined(); +} + +NAN_METHOD(Call::StartWrite) { + NanScope(); + if (!HasInstance(args.This())) { + return NanThrowTypeError("startWrite can only be called on Call objects"); + } + if (!Buffer::HasInstance(args[0])) { + return NanThrowTypeError("startWrite's first argument must be a Buffer"); + } + if (!args[1]->IsFunction()) { + return NanThrowTypeError("startWrite's second argument must be a function"); + } + if (!args[2]->IsUint32()) { + return NanThrowTypeError( + "startWrite's third argument must be integer flags"); + } + Call *call = ObjectWrap::Unwrap(args.This()); + grpc_byte_buffer *buffer = BufferToByteBuffer(args[0]); + unsigned int flags = args[2]->Uint32Value(); + grpc_call_error error = grpc_call_start_write( + call->wrapped_call, buffer, CreateTag(args[1], args.This()), flags); + if (error == GRPC_CALL_OK) { + CompletionQueueAsyncWorker::Next(); + } else { + return NanThrowError("startWrite failed", error); + } + NanReturnUndefined(); +} + +NAN_METHOD(Call::StartWriteStatus) { + NanScope(); + if (!HasInstance(args.This())) { + return NanThrowTypeError( + "startWriteStatus can only be called on Call objects"); + } + if (!args[0]->IsUint32()) { + return NanThrowTypeError( + "startWriteStatus's first argument must be a status code"); + } + if (!args[1]->IsString()) { + return NanThrowTypeError( + "startWriteStatus's second argument must be a string"); + } + if (!args[2]->IsFunction()) { + return NanThrowTypeError( + "startWriteStatus's third argument must be a function"); + } + Call *call = ObjectWrap::Unwrap(args.This()); + NanUtf8String details(args[1]); + grpc_call_error error = grpc_call_start_write_status( + call->wrapped_call, (grpc_status_code)args[0]->Uint32Value(), *details, + CreateTag(args[2], args.This())); + if (error == GRPC_CALL_OK) { + CompletionQueueAsyncWorker::Next(); + } else { + return NanThrowError("startWriteStatus failed", error); + } + NanReturnUndefined(); +} + +NAN_METHOD(Call::WritesDone) { + NanScope(); + if (!HasInstance(args.This())) { + return NanThrowTypeError("writesDone can only be called on Call objects"); + } + if (!args[0]->IsFunction()) { + return NanThrowTypeError("writesDone's first argument must be a function"); + } + Call *call = ObjectWrap::Unwrap(args.This()); + grpc_call_error error = grpc_call_writes_done( + call->wrapped_call, CreateTag(args[0], args.This())); + if (error == GRPC_CALL_OK) { + CompletionQueueAsyncWorker::Next(); + } else { + return NanThrowError("writesDone failed", error); + } + NanReturnUndefined(); +} + +NAN_METHOD(Call::StartRead) { + NanScope(); + if (!HasInstance(args.This())) { + return NanThrowTypeError("startRead can only be called on Call objects"); + } + if (!args[0]->IsFunction()) { + return NanThrowTypeError("startRead's first argument must be a function"); + } + Call *call = ObjectWrap::Unwrap(args.This()); + grpc_call_error error = + grpc_call_start_read(call->wrapped_call, CreateTag(args[0], args.This())); + if (error == GRPC_CALL_OK) { + CompletionQueueAsyncWorker::Next(); + } else { + return NanThrowError("startRead failed", error); + } + NanReturnUndefined(); +} + +} // namespace node +} // namespace grpc diff --git a/src/node/call.h b/src/node/call.h new file mode 100644 index 00000000000..55a6fc65b84 --- /dev/null +++ b/src/node/call.h @@ -0,0 +1,82 @@ +/* + * + * Copyright 2014, 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 NET_GRPC_NODE_CALL_H_ +#define NET_GRPC_NODE_CALL_H_ + +#include +#include +#include "grpc/grpc.h" + +#include "channel.h" + +namespace grpc { +namespace node { + +/* Wrapper class for grpc_call structs. */ +class Call : public ::node::ObjectWrap { + public: + static void Init(v8::Handle exports); + static bool HasInstance(v8::Handle val); + /* Wrap a grpc_call struct in a javascript object */ + static v8::Handle WrapStruct(grpc_call *call); + + private: + explicit Call(grpc_call *call); + ~Call(); + + // Prevent copying + Call(const Call &); + Call &operator=(const Call &); + + static NAN_METHOD(New); + static NAN_METHOD(AddMetadata); + static NAN_METHOD(StartInvoke); + static NAN_METHOD(ServerAccept); + static NAN_METHOD(ServerEndInitialMetadata); + static NAN_METHOD(Cancel); + static NAN_METHOD(StartWrite); + static NAN_METHOD(StartWriteStatus); + static NAN_METHOD(WritesDone); + static NAN_METHOD(StartRead); + static v8::Persistent constructor; + // Used for typechecking instances of this javascript class + static v8::Persistent fun_tpl; + + grpc_call *wrapped_call; +}; + +} // namespace node +} // namespace grpc + +#endif // NET_GRPC_NODE_CALL_H_ diff --git a/src/node/channel.cc b/src/node/channel.cc new file mode 100644 index 00000000000..9087d6f919b --- /dev/null +++ b/src/node/channel.cc @@ -0,0 +1,182 @@ +/* + * + * Copyright 2014, 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 + +#include + +#include +#include +#include "grpc/grpc.h" +#include "grpc/grpc_security.h" +#include "channel.h" +#include "credentials.h" + +namespace grpc { +namespace node { + +using v8::Arguments; +using v8::Array; +using v8::Exception; +using v8::Function; +using v8::FunctionTemplate; +using v8::Handle; +using v8::HandleScope; +using v8::Integer; +using v8::Local; +using v8::Object; +using v8::Persistent; +using v8::String; +using v8::Value; + +Persistent Channel::constructor; +Persistent Channel::fun_tpl; + +Channel::Channel(grpc_channel *channel, NanUtf8String *host) + : wrapped_channel(channel), host(host) {} + +Channel::~Channel() { + if (wrapped_channel != NULL) { + grpc_channel_destroy(wrapped_channel); + } + delete host; +} + +void Channel::Init(Handle exports) { + NanScope(); + Local tpl = FunctionTemplate::New(New); + tpl->SetClassName(NanNew("Channel")); + tpl->InstanceTemplate()->SetInternalFieldCount(1); + NanSetPrototypeTemplate(tpl, "close", + FunctionTemplate::New(Close)->GetFunction()); + NanAssignPersistent(fun_tpl, tpl); + NanAssignPersistent(constructor, tpl->GetFunction()); + exports->Set(NanNew("Channel"), constructor); +} + +bool Channel::HasInstance(Handle val) { + NanScope(); + return NanHasInstance(fun_tpl, val); +} + +grpc_channel *Channel::GetWrappedChannel() { return this->wrapped_channel; } + +char *Channel::GetHost() { return **this->host; } + +NAN_METHOD(Channel::New) { + NanScope(); + + if (args.IsConstructCall()) { + if (!args[0]->IsString()) { + return NanThrowTypeError("Channel expects a string and an object"); + } + grpc_channel *wrapped_channel; + // Owned by the Channel object + NanUtf8String *host = new NanUtf8String(args[0]); + if (args[1]->IsUndefined()) { + wrapped_channel = grpc_channel_create(**host, NULL); + } else if (args[1]->IsObject()) { + grpc_credentials *creds = NULL; + Handle args_hash(args[1]->ToObject()->Clone()); + if (args_hash->HasOwnProperty(NanNew("credentials"))) { + Handle creds_value = args_hash->Get(NanNew("credentials")); + if (!Credentials::HasInstance(creds_value)) { + return NanThrowTypeError( + "credentials arg must be a Credentials object"); + } + Credentials *creds_object = + ObjectWrap::Unwrap(creds_value->ToObject()); + creds = creds_object->GetWrappedCredentials(); + args_hash->Delete(NanNew("credentials")); + } + Handle keys(args_hash->GetOwnPropertyNames()); + grpc_channel_args channel_args; + channel_args.num_args = keys->Length(); + channel_args.args = reinterpret_cast( + calloc(channel_args.num_args, sizeof(grpc_arg))); + /* These are used to keep all strings until then end of the block, then + destroy them */ + std::vector key_strings(keys->Length()); + std::vector value_strings(keys->Length()); + for (unsigned int i = 0; i < channel_args.num_args; i++) { + Handle current_key(keys->Get(i)->ToString()); + Handle current_value(args_hash->Get(current_key)); + key_strings[i] = new NanUtf8String(current_key); + channel_args.args[i].key = **key_strings[i]; + if (current_value->IsInt32()) { + channel_args.args[i].type = GRPC_ARG_INTEGER; + channel_args.args[i].value.integer = current_value->Int32Value(); + } else if (current_value->IsString()) { + channel_args.args[i].type = GRPC_ARG_STRING; + value_strings[i] = new NanUtf8String(current_value); + channel_args.args[i].value.string = **value_strings[i]; + } else { + free(channel_args.args); + return NanThrowTypeError("Arg values must be strings"); + } + } + if (creds == NULL) { + wrapped_channel = grpc_channel_create(**host, &channel_args); + } else { + wrapped_channel = + grpc_secure_channel_create(creds, **host, &channel_args); + } + free(channel_args.args); + } else { + return NanThrowTypeError("Channel expects a string and an object"); + } + Channel *channel = new Channel(wrapped_channel, host); + channel->Wrap(args.This()); + NanReturnValue(args.This()); + } else { + const int argc = 2; + Local argv[argc] = {args[0], args[1]}; + NanReturnValue(constructor->NewInstance(argc, argv)); + } +} + +NAN_METHOD(Channel::Close) { + NanScope(); + if (!HasInstance(args.This())) { + return NanThrowTypeError("close can only be called on Channel objects"); + } + Channel *channel = ObjectWrap::Unwrap(args.This()); + if (channel->wrapped_channel != NULL) { + grpc_channel_destroy(channel->wrapped_channel); + channel->wrapped_channel = NULL; + } + NanReturnUndefined(); +} + +} // namespace node +} // namespace grpc diff --git a/src/node/channel.h b/src/node/channel.h new file mode 100644 index 00000000000..140cbf201a1 --- /dev/null +++ b/src/node/channel.h @@ -0,0 +1,79 @@ +/* + * + * Copyright 2014, 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 NET_GRPC_NODE_CHANNEL_H_ +#define NET_GRPC_NODE_CHANNEL_H_ + +#include +#include +#include "grpc/grpc.h" + +namespace grpc { +namespace node { + +/* Wrapper class for grpc_channel structs */ +class Channel : public ::node::ObjectWrap { + public: + static void Init(v8::Handle exports); + static bool HasInstance(v8::Handle val); + /* This is used to typecheck javascript objects before converting them to + this type */ + static v8::Persistent prototype; + + /* Returns the grpc_channel struct that this object wraps */ + grpc_channel *GetWrappedChannel(); + + /* Return the hostname that this channel connects to */ + char *GetHost(); + + private: + explicit Channel(grpc_channel *channel, NanUtf8String *host); + ~Channel(); + + // Prevent copying + Channel(const Channel &); + Channel &operator=(const Channel &); + + static NAN_METHOD(New); + static NAN_METHOD(Close); + static v8::Persistent constructor; + static v8::Persistent fun_tpl; + + grpc_channel *wrapped_channel; + NanUtf8String *host; +}; + +} // namespace node +} // namespace grpc + +#endif // NET_GRPC_NODE_CHANNEL_H_ diff --git a/src/node/client.js b/src/node/client.js new file mode 100644 index 00000000000..edaa115d0fc --- /dev/null +++ b/src/node/client.js @@ -0,0 +1,209 @@ +/* + * + * Copyright 2014, 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('bindings')('grpc.node'); + +var common = require('./common'); + +var Duplex = require('stream').Duplex; +var util = require('util'); + +util.inherits(GrpcClientStream, Duplex); + +/** + * Class for representing a gRPC client side stream as a Node stream. Extends + * from stream.Duplex. + * @constructor + * @param {grpc.Call} call Call object to proxy + * @param {object} options Stream options + */ +function GrpcClientStream(call, options) { + Duplex.call(this, options); + var self = this; + // Indicates that we can start reading and have not received a null read + var can_read = false; + // Indicates that a read is currently pending + var reading = false; + // Indicates that we can call startWrite + var can_write = false; + // Indicates that a write is currently pending + var writing = false; + this._call = call; + /** + * Callback to handle receiving a READ event. Pushes the data from that event + * onto the read queue and starts reading again if applicable. + * @param {grpc.Event} event The READ event object + */ + function readCallback(event) { + var data = event.data; + if (self.push(data)) { + if (data == null) { + // Disable starting to read after null read was received + can_read = false; + reading = false; + } else { + call.startRead(readCallback); + } + } else { + // Indicate that reading can be resumed by calling startReading + reading = false; + } + }; + /** + * Initiate a read, which continues until self.push returns false (indicating + * that reading should be paused) or data is null (indicating that there is no + * more data to read). + */ + function startReading() { + call.startRead(readCallback); + } + // TODO(mlumish): possibly change queue implementation due to shift slowness + var write_queue = []; + /** + * Write the next chunk of data in the write queue if there is one. Otherwise + * indicate that there is no pending write. When the write succeeds, this + * function is called again. + */ + function writeNext() { + if (write_queue.length > 0) { + writing = true; + var next = write_queue.shift(); + var writeCallback = function(event) { + next.callback(); + writeNext(); + }; + call.startWrite(next.chunk, writeCallback, 0); + } else { + writing = false; + } + } + call.startInvoke(function(event) { + can_read = true; + can_write = true; + startReading(); + writeNext(); + }, function(event) { + self.emit('metadata', event.data); + }, function(event) { + self.emit('status', event.data); + }, 0); + this.on('finish', function() { + call.writesDone(function() {}); + }); + /** + * Indicate that reads should start, and start them if the INVOKE_ACCEPTED + * event has been received. + */ + this._enableRead = function() { + if (!reading) { + reading = true; + if (can_read) { + startReading(); + } + } + }; + /** + * Push the chunk onto the write queue, and write from the write queue if + * there is not a pending write + * @param {Buffer} chunk The chunk of data to write + * @param {function(Error=)} callback The callback to call when the write + * completes + */ + this._tryWrite = function(chunk, callback) { + write_queue.push({chunk: chunk, callback: callback}); + if (can_write && !writing) { + writeNext(); + } + }; +} + +/** + * Start reading. This is an implementation of a method needed for implementing + * stream.Readable. + * @param {number} size Ignored + */ +GrpcClientStream.prototype._read = function(size) { + this._enableRead(); +}; + +/** + * Attempt to write the given chunk. Calls the callback when done. This is an + * implementation of a method needed for implementing stream.Writable. + * @param {Buffer} chunk The chunk to write + * @param {string} encoding Ignored + * @param {function(Error=)} callback Ignored + */ +GrpcClientStream.prototype._write = function(chunk, encoding, callback) { + this._tryWrite(chunk, callback); +}; + +/** + * Make a request on the channel to the given method with the given arguments + * @param {grpc.Channel} channel The channel on which to make the request + * @param {string} method The method to request + * @param {array=} metadata Array of metadata key/value pairs to add to the call + * @param {(number|Date)=} deadline The deadline for processing this request. + * Defaults to infinite future. + * @return {stream=} The stream of responses + */ +function makeRequest(channel, + method, + metadata, + deadline) { + if (deadline === undefined) { + deadline = Infinity; + } + var call = new grpc.Call(channel, method, deadline); + if (metadata) { + call.addMetadata(metadata); + } + return new GrpcClientStream(call); +} + +/** + * See documentation for makeRequest above + */ +exports.makeRequest = makeRequest; + +/** + * Represents a client side gRPC channel associated with a single host. + */ +exports.Channel = grpc.Channel; +/** + * Status name to code number mapping + */ +exports.status = grpc.status; +/** + * Call error name to code number mapping + */ +exports.callError = grpc.callError; diff --git a/src/node/common.js b/src/node/common.js new file mode 100644 index 00000000000..656a4aca953 --- /dev/null +++ b/src/node/common.js @@ -0,0 +1,98 @@ +/* + * + * Copyright 2014, 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. + * + */ + +/** + * Get a function that deserializes a specific type of protobuf. + * @param {function()} cls The constructor of the message type to deserialize + * @return {function(Buffer):cls} The deserialization function + */ +function deserializeCls(cls) { + /** + * Deserialize a buffer to a message object + * @param {Buffer} arg_buf The buffer to deserialize + * @return {cls} The resulting object + */ + return function deserialize(arg_buf) { + return cls.decode(arg_buf); + }; +} + +/** + * Get a function that serializes objects to a buffer by protobuf class. + * @param {function()} Cls The constructor of the message type to serialize + * @return {function(Cls):Buffer} The serialization function + */ +function serializeCls(Cls) { + /** + * Serialize an object to a Buffer + * @param {Object} arg The object to serialize + * @return {Buffer} The serialized object + */ + return function serialize(arg) { + return new Buffer(new Cls(arg).encode().toBuffer()); + }; +} + +/** + * Get the fully qualified (dotted) name of a ProtoBuf.Reflect value. + * @param {ProtoBuf.Reflect.Namespace} value The value to get the name of + * @return {string} The fully qualified name of the value + */ +function fullyQualifiedName(value) { + if (value === null || value === undefined) { + return ''; + } + var name = value.name; + if (value.hasOwnProperty('parent')) { + var parent_name = fullyQualifiedName(value.parent); + if (parent_name !== '') { + name = parent_name + '.' + name; + } + } + return name; +} + +/** + * See docs for deserializeCls + */ +exports.deserializeCls = deserializeCls; + +/** + * See docs for serializeCls + */ +exports.serializeCls = serializeCls; + +/** + * See docs for fullyQualifiedName + */ +exports.fullyQualifiedName = fullyQualifiedName; diff --git a/src/node/completion_queue_async_worker.cc b/src/node/completion_queue_async_worker.cc new file mode 100644 index 00000000000..8de7db66d50 --- /dev/null +++ b/src/node/completion_queue_async_worker.cc @@ -0,0 +1,89 @@ +/* + * + * Copyright 2014, 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 +#include + +#include "grpc/grpc.h" +#include "grpc/support/time.h" +#include "completion_queue_async_worker.h" +#include "event.h" +#include "tag.h" + +namespace grpc { +namespace node { + +using v8::Function; +using v8::Handle; +using v8::Object; +using v8::Persistent; +using v8::Value; + +grpc_completion_queue *CompletionQueueAsyncWorker::queue; + +CompletionQueueAsyncWorker::CompletionQueueAsyncWorker() + : NanAsyncWorker(NULL) {} + +CompletionQueueAsyncWorker::~CompletionQueueAsyncWorker() {} + +void CompletionQueueAsyncWorker::Execute() { + result = grpc_completion_queue_next(queue, gpr_inf_future); +} + +grpc_completion_queue *CompletionQueueAsyncWorker::GetQueue() { return queue; } + +void CompletionQueueAsyncWorker::Next() { + NanScope(); + CompletionQueueAsyncWorker *worker = new CompletionQueueAsyncWorker(); + NanAsyncQueueWorker(worker); +} + +void CompletionQueueAsyncWorker::Init(Handle exports) { + NanScope(); + queue = grpc_completion_queue_create(); +} + +void CompletionQueueAsyncWorker::HandleOKCallback() { + NanScope(); + NanCallback event_callback(GetTagHandle(result->tag).As()); + Handle argv[] = {CreateEventObject(result)}; + + DestroyTag(result->tag); + grpc_event_finish(result); + result = NULL; + + event_callback.Call(1, argv); +} + +} // namespace node +} // namespace grpc diff --git a/src/node/completion_queue_async_worker.h b/src/node/completion_queue_async_worker.h new file mode 100644 index 00000000000..2c928b7024f --- /dev/null +++ b/src/node/completion_queue_async_worker.h @@ -0,0 +1,79 @@ +/* + * + * Copyright 2014, 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 NET_GRPC_NODE_COMPLETION_QUEUE_ASYNC_WORKER_H_ +#define NET_GRPC_NODE_COMPLETION_QUEUE_ASYNC_WORKER_H_ +#include + +#include "grpc/grpc.h" + +namespace grpc { +namespace node { + +/* A worker that asynchronously calls completion_queue_next, and queues onto the + node event loop a call to the function stored in the event's tag. */ +class CompletionQueueAsyncWorker : public NanAsyncWorker { + public: + CompletionQueueAsyncWorker(); + + ~CompletionQueueAsyncWorker(); + /* Calls completion_queue_next with the provided deadline, and stores the + event if there was one or sets an error message if there was not */ + void Execute(); + + /* Returns the completion queue attached to this class */ + static grpc_completion_queue *GetQueue(); + + /* Convenience function to create a worker with the given arguments and queue + it to run asynchronously */ + static void Next(); + + /* Initialize the CompletionQueueAsyncWorker class */ + static void Init(v8::Handle exports); + + protected: + /* Called when Execute has succeeded (completed without setting an error + message). Calls the saved callback with the event that came from + completion_queue_next */ + void HandleOKCallback(); + + private: + grpc_event *result; + + static grpc_completion_queue *queue; +}; + +} // namespace node +} // namespace grpc + +#endif // NET_GRPC_NODE_COMPLETION_QUEUE_ASYNC_WORKER_H_ diff --git a/src/node/credentials.cc b/src/node/credentials.cc new file mode 100644 index 00000000000..d58b7eda893 --- /dev/null +++ b/src/node/credentials.cc @@ -0,0 +1,209 @@ +/* + * + * Copyright 2014, 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 + +#include "grpc/grpc.h" +#include "grpc/grpc_security.h" +#include "grpc/support/log.h" +#include "credentials.h" + +namespace grpc { +namespace node { + +using ::node::Buffer; +using v8::Arguments; +using v8::Exception; +using v8::External; +using v8::Function; +using v8::FunctionTemplate; +using v8::Handle; +using v8::HandleScope; +using v8::Integer; +using v8::Local; +using v8::Object; +using v8::ObjectTemplate; +using v8::Persistent; +using v8::Value; + +Persistent Credentials::constructor; +Persistent Credentials::fun_tpl; + +Credentials::Credentials(grpc_credentials *credentials) + : wrapped_credentials(credentials) {} + +Credentials::~Credentials() { + gpr_log(GPR_DEBUG, "Destroying credentials object"); + grpc_credentials_release(wrapped_credentials); +} + +void Credentials::Init(Handle exports) { + NanScope(); + Local tpl = FunctionTemplate::New(New); + tpl->SetClassName(NanNew("Credentials")); + tpl->InstanceTemplate()->SetInternalFieldCount(1); + NanAssignPersistent(fun_tpl, tpl); + NanAssignPersistent(constructor, tpl->GetFunction()); + constructor->Set(NanNew("createDefault"), + FunctionTemplate::New(CreateDefault)->GetFunction()); + constructor->Set(NanNew("createSsl"), + FunctionTemplate::New(CreateSsl)->GetFunction()); + constructor->Set(NanNew("createComposite"), + FunctionTemplate::New(CreateComposite)->GetFunction()); + constructor->Set(NanNew("createGce"), + FunctionTemplate::New(CreateGce)->GetFunction()); + constructor->Set(NanNew("createFake"), + FunctionTemplate::New(CreateFake)->GetFunction()); + constructor->Set(NanNew("createIam"), + FunctionTemplate::New(CreateIam)->GetFunction()); + exports->Set(NanNew("Credentials"), constructor); +} + +bool Credentials::HasInstance(Handle val) { + NanScope(); + return NanHasInstance(fun_tpl, val); +} + +Handle Credentials::WrapStruct(grpc_credentials *credentials) { + NanEscapableScope(); + if (credentials == NULL) { + return NanEscapeScope(NanNull()); + } + const int argc = 1; + Handle argv[argc] = { + External::New(reinterpret_cast(credentials))}; + return NanEscapeScope(constructor->NewInstance(argc, argv)); +} + +grpc_credentials *Credentials::GetWrappedCredentials() { + return wrapped_credentials; +} + +NAN_METHOD(Credentials::New) { + NanScope(); + + if (args.IsConstructCall()) { + if (!args[0]->IsExternal()) { + return NanThrowTypeError( + "Credentials can only be created with the provided functions"); + } + grpc_credentials *creds_value = + reinterpret_cast(External::Unwrap(args[0])); + Credentials *credentials = new Credentials(creds_value); + credentials->Wrap(args.This()); + NanReturnValue(args.This()); + } else { + const int argc = 1; + Local argv[argc] = {args[0]}; + NanReturnValue(constructor->NewInstance(argc, argv)); + } +} + +NAN_METHOD(Credentials::CreateDefault) { + NanScope(); + NanReturnValue(WrapStruct(grpc_default_credentials_create())); +} + +NAN_METHOD(Credentials::CreateSsl) { + NanScope(); + char *root_certs; + char *private_key = NULL; + char *cert_chain = NULL; + int root_certs_length, private_key_length = 0, cert_chain_length = 0; + if (!Buffer::HasInstance(args[0])) { + return NanThrowTypeError("createSsl's first argument must be a Buffer"); + } + root_certs = Buffer::Data(args[0]); + root_certs_length = Buffer::Length(args[0]); + if (Buffer::HasInstance(args[1])) { + private_key = Buffer::Data(args[1]); + private_key_length = Buffer::Length(args[1]); + } else if (!(args[1]->IsNull() || args[1]->IsUndefined())) { + return NanThrowTypeError( + "createSSl's second argument must be a Buffer if provided"); + } + if (Buffer::HasInstance(args[2])) { + cert_chain = Buffer::Data(args[2]); + cert_chain_length = Buffer::Length(args[2]); + } else if (!(args[2]->IsNull() || args[2]->IsUndefined())) { + return NanThrowTypeError( + "createSSl's third argument must be a Buffer if provided"); + } + NanReturnValue(WrapStruct(grpc_ssl_credentials_create( + reinterpret_cast(root_certs), root_certs_length, + reinterpret_cast(private_key), private_key_length, + reinterpret_cast(cert_chain), cert_chain_length))); +} + +NAN_METHOD(Credentials::CreateComposite) { + NanScope(); + if (!HasInstance(args[0])) { + return NanThrowTypeError( + "createComposite's first argument must be a Credentials object"); + } + if (!HasInstance(args[1])) { + return NanThrowTypeError( + "createComposite's second argument must be a Credentials object"); + } + Credentials *creds1 = ObjectWrap::Unwrap(args[0]->ToObject()); + Credentials *creds2 = ObjectWrap::Unwrap(args[1]->ToObject()); + NanReturnValue(WrapStruct(grpc_composite_credentials_create( + creds1->wrapped_credentials, creds2->wrapped_credentials))); +} + +NAN_METHOD(Credentials::CreateGce) { + NanScope(); + NanReturnValue(WrapStruct(grpc_compute_engine_credentials_create())); +} + +NAN_METHOD(Credentials::CreateFake) { + NanScope(); + NanReturnValue(WrapStruct(grpc_fake_transport_security_credentials_create())); +} + +NAN_METHOD(Credentials::CreateIam) { + NanScope(); + if (!args[0]->IsString()) { + return NanThrowTypeError("createIam's first argument must be a string"); + } + if (!args[1]->IsString()) { + return NanThrowTypeError("createIam's second argument must be a string"); + } + NanUtf8String auth_token(args[0]); + NanUtf8String auth_selector(args[1]); + NanReturnValue( + WrapStruct(grpc_iam_credentials_create(*auth_token, *auth_selector))); +} + +} // namespace node +} // namespace grpc diff --git a/src/node/credentials.h b/src/node/credentials.h new file mode 100644 index 00000000000..981e5a99bc7 --- /dev/null +++ b/src/node/credentials.h @@ -0,0 +1,81 @@ +/* + * + * Copyright 2014, 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 NET_GRPC_NODE_CREDENTIALS_H_ +#define NET_GRPC_NODE_CREDENTIALS_H_ + +#include +#include +#include "grpc/grpc.h" +#include "grpc/grpc_security.h" + +namespace grpc { +namespace node { + +/* Wrapper class for grpc_credentials structs */ +class Credentials : public ::node::ObjectWrap { + public: + static void Init(v8::Handle exports); + static bool HasInstance(v8::Handle val); + /* Wrap a grpc_credentials struct in a javascript object */ + static v8::Handle WrapStruct(grpc_credentials *credentials); + + /* Returns the grpc_credentials struct that this object wraps */ + grpc_credentials *GetWrappedCredentials(); + + private: + explicit Credentials(grpc_credentials *credentials); + ~Credentials(); + + // Prevent copying + Credentials(const Credentials &); + Credentials &operator=(const Credentials &); + + static NAN_METHOD(New); + static NAN_METHOD(CreateDefault); + static NAN_METHOD(CreateSsl); + static NAN_METHOD(CreateComposite); + static NAN_METHOD(CreateGce); + static NAN_METHOD(CreateFake); + static NAN_METHOD(CreateIam); + static v8::Persistent constructor; + // Used for typechecking instances of this javascript class + static v8::Persistent fun_tpl; + + grpc_credentials *wrapped_credentials; +}; + +} // namespace node +} // namespace grpc + +#endif // NET_GRPC_NODE_CREDENTIALS_H_ diff --git a/src/node/event.cc b/src/node/event.cc new file mode 100644 index 00000000000..2ca38b7448e --- /dev/null +++ b/src/node/event.cc @@ -0,0 +1,164 @@ +/* + * + * Copyright 2014, 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 +#include +#include "grpc/grpc.h" +#include "byte_buffer.h" +#include "call.h" +#include "event.h" +#include "tag.h" +#include "timeval.h" + +namespace grpc { +namespace node { + +using v8::Array; +using v8::Date; +using v8::Handle; +using v8::HandleScope; +using v8::Number; +using v8::Object; +using v8::Persistent; +using v8::String; +using v8::Value; + +Handle GetEventData(grpc_event *event) { + NanEscapableScope(); + size_t count; + grpc_metadata *items; + Handle metadata; + Handle status; + Handle rpc_new; + switch (event->type) { + case GRPC_READ: + return NanEscapeScope(ByteBufferToBuffer(event->data.read)); + case GRPC_INVOKE_ACCEPTED: + return NanEscapeScope(NanNew(event->data.invoke_accepted)); + case GRPC_WRITE_ACCEPTED: + return NanEscapeScope(NanNew(event->data.write_accepted)); + case GRPC_FINISH_ACCEPTED: + return NanEscapeScope(NanNew(event->data.finish_accepted)); + case GRPC_CLIENT_METADATA_READ: + count = event->data.client_metadata_read.count; + items = event->data.client_metadata_read.elements; + metadata = NanNew(static_cast(count)); + for (unsigned int i = 0; i < count; i++) { + Handle item_obj = NanNew(); + item_obj->Set(NanNew("key"), + NanNew(items[i].key)); + item_obj->Set( + NanNew("value"), + NanNew(items[i].value, + static_cast(items[i].value_length))); + metadata->Set(i, item_obj); + } + return NanEscapeScope(metadata); + case GRPC_FINISHED: + status = NanNew(); + status->Set(NanNew("code"), NanNew(event->data.finished.status)); + if (event->data.finished.details != NULL) { + status->Set(NanNew("details"), + String::New(event->data.finished.details)); + } + count = event->data.finished.metadata_count; + items = event->data.finished.metadata_elements; + metadata = NanNew(static_cast(count)); + for (unsigned int i = 0; i < count; i++) { + Handle item_obj = NanNew(); + item_obj->Set(NanNew("key"), + NanNew(items[i].key)); + item_obj->Set( + NanNew("value"), + NanNew(items[i].value, + static_cast(items[i].value_length))); + metadata->Set(i, item_obj); + } + status->Set(NanNew("metadata"), metadata); + return NanEscapeScope(status); + case GRPC_SERVER_RPC_NEW: + rpc_new = NanNew(); + if (event->data.server_rpc_new.method == NULL) { + return NanEscapeScope(NanNull()); + } + rpc_new->Set( + NanNew("method"), + NanNew(event->data.server_rpc_new.method)); + rpc_new->Set( + NanNew("host"), + NanNew(event->data.server_rpc_new.host)); + rpc_new->Set(NanNew("absolute_deadline"), + NanNew(TimespecToMilliseconds( + event->data.server_rpc_new.deadline))); + count = event->data.server_rpc_new.metadata_count; + items = event->data.server_rpc_new.metadata_elements; + metadata = NanNew(static_cast(count)); + for (unsigned int i = 0; i < count; i++) { + Handle item_obj = Object::New(); + item_obj->Set(NanNew("key"), + NanNew(items[i].key)); + item_obj->Set( + NanNew("value"), + NanNew(items[i].value, + static_cast(items[i].value_length))); + metadata->Set(i, item_obj); + } + rpc_new->Set(NanNew("metadata"), metadata); + return NanEscapeScope(rpc_new); + default: + return NanEscapeScope(NanNull()); + } +} + +Handle CreateEventObject(grpc_event *event) { + NanEscapableScope(); + if (event == NULL) { + return NanEscapeScope(NanNull()); + } + Handle event_obj = NanNew(); + Handle call; + if (TagHasCall(event->tag)) { + call = TagGetCall(event->tag); + } else { + call = Call::WrapStruct(event->call); + } + event_obj->Set(NanNew("call"), call); + event_obj->Set(NanNew("type"), + NanNew(event->type)); + event_obj->Set(NanNew("data"), GetEventData(event)); + + return NanEscapeScope(event_obj); +} + +} // namespace node +} // namespace grpc diff --git a/src/compiler/go_generator.h b/src/node/event.h similarity index 80% rename from src/compiler/go_generator.h rename to src/node/event.h index fd5a05e5374..e06d8f0168d 100644 --- a/src/compiler/go_generator.h +++ b/src/node/event.h @@ -31,21 +31,18 @@ * */ -#ifndef NET_GRPC_COMPILER_GO_GENERATOR_H_ -#define NET_GRPC_COMPILER_GO_GENERATOR_H_ +#ifndef NET_GRPC_NODE_EVENT_H_ +#define NET_GRPC_NODE_EVENT_H_ -#include +#include +#include "grpc/grpc.h" -namespace google { -namespace protobuf { -class FileDescriptor; -} // namespace protobuf -} // namespace google +namespace grpc { +namespace node { -namespace grpc_go_generator { +v8::Handle CreateEventObject(grpc_event *event); -string GetServices(const google::protobuf::FileDescriptor* file); +} // namespace node +} // namespace grpc -} // namespace grpc_go_generator - -#endif // NET_GRPC_COMPILER_GO_GENERATOR_H_ +#endif // NET_GRPC_NODE_EVENT_H_ diff --git a/src/node/examples/math.proto b/src/node/examples/math.proto new file mode 100644 index 00000000000..c49787ad54d --- /dev/null +++ b/src/node/examples/math.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; + +package math; + +message DivArgs { + optional int64 dividend = 1; + optional int64 divisor = 2; +} + +message DivReply { + optional int64 quotient = 1; + optional int64 remainder = 2; +} + +message FibArgs { + optional int64 limit = 1; +} + +message Num { + optional int64 num = 1; +} + +message FibReply { + optional int64 count = 1; +} + +service Math { + // Div divides args.dividend by args.divisor and returns the quotient and + // remainder. + rpc Div (DivArgs) returns (DivReply) { + } + + // DivMany accepts an arbitrary number of division args from the client stream + // and sends back the results in the reply stream. The stream continues until + // the client closes its end; the server does the same after sending all the + // replies. The stream ends immediately if either end aborts. + rpc DivMany (stream DivArgs) returns (stream DivReply) { + } + + // Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib + // generates up to limit numbers; otherwise it continues until the call is + // canceled. Unlike Fib above, Fib has no final FibReply. + rpc Fib (FibArgs) returns (stream Num) { + } + + // Sum sums a stream of numbers, returning the final result once the stream + // is closed. + rpc Sum (stream Num) returns (Num) { + } +} diff --git a/src/node/examples/math_server.js b/src/node/examples/math_server.js new file mode 100644 index 00000000000..366513dc17d --- /dev/null +++ b/src/node/examples/math_server.js @@ -0,0 +1,136 @@ +/* + * + * Copyright 2014, 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 _ = require('underscore'); +var ProtoBuf = require('protobufjs'); +var fs = require('fs'); +var util = require('util'); + +var Transform = require('stream').Transform; + +var grpc = require('..'); +var math = grpc.load(__dirname + '/math.proto').math; + +var Server = grpc.buildServer([math.Math.service]); + +/** + * Server function for division. Provides the /Math/DivMany and /Math/Div + * functions (Div is just DivMany with only one stream element). For each + * DivArgs parameter, responds with a DivReply with the results of the division + * @param {Object} call The object containing request and cancellation info + * @param {function(Error, *)} cb Response callback + */ +function mathDiv(call, cb) { + var req = call.request; + if (req.divisor == 0) { + cb(new Error('cannot divide by zero')); + } + cb(null, { + quotient: req.dividend / req.divisor, + remainder: req.dividend % req.divisor + }); +} + +/** + * Server function for Fibonacci numbers. Provides the /Math/Fib function. Reads + * a single parameter that indicates the number of responses, and then responds + * with a stream of that many Fibonacci numbers. + * @param {stream} stream The stream for sending responses. + */ +function mathFib(stream) { + // Here, call is a standard writable Node object Stream + var previous = 0, current = 1; + for (var i = 0; i < stream.request.limit; i++) { + stream.write({num: current}); + var temp = current; + current += previous; + previous = temp; + } + stream.end(); +} + +/** + * Server function for summation. Provides the /Math/Sum function. Reads a + * stream of number parameters, then responds with their sum. + * @param {stream} call The stream of arguments. + * @param {function(Error, *)} cb Response callback + */ +function mathSum(call, cb) { + // Here, call is a standard readable Node object Stream + var sum = 0; + call.on('data', function(data) { + sum += data.num | 0; + }); + call.on('end', function() { + cb(null, {num: sum}); + }); +} + +function mathDivMany(stream) { + // Here, call is a standard duplex Node object Stream + util.inherits(DivTransform, Transform); + function DivTransform() { + var options = {objectMode: true}; + Transform.call(this, options); + } + DivTransform.prototype._transform = function(div_args, encoding, callback) { + if (div_args.divisor == 0) { + callback(new Error('cannot divide by zero')); + } + callback(null, { + quotient: div_args.dividend / div_args.divisor, + remainder: div_args.dividend % div_args.divisor + }); + }; + var transform = new DivTransform(); + stream.pipe(transform); + transform.pipe(stream); +} + +var server = new Server({ + 'math.Math' : { + Div: mathDiv, + Fib: mathFib, + Sum: mathSum, + DivMany: mathDivMany + } +}); + +if (require.main === module) { + server.bind('localhost:7070').listen(); +} + +/** + * See docs for server + */ +module.exports = server; diff --git a/src/node/main.js b/src/node/main.js new file mode 100644 index 00000000000..a8dfa200245 --- /dev/null +++ b/src/node/main.js @@ -0,0 +1,98 @@ +/* + * + * Copyright 2014, 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 _ = require('underscore'); + +var ProtoBuf = require('protobufjs'); + +var surface_client = require('./surface_client.js'); + +var surface_server = require('./surface_server.js'); + +var grpc = require('bindings')('grpc'); + +/** + * Load a gRPC object from an existing ProtoBuf.Reflect object. + * @param {ProtoBuf.Reflect.Namespace} value The ProtoBuf object to load. + * @return {Object} The resulting gRPC object + */ +function loadObject(value) { + var result = {}; + if (value.className === 'Namespace') { + _.each(value.children, function(child) { + result[child.name] = loadObject(child); + }); + return result; + } else if (value.className === 'Service') { + return surface_client.makeClientConstructor(value); + } else if (value.className === 'Service.Message') { + return value.build(); + } else { + return value; + } +} + +/** + * Load a gRPC object from a .proto file. + * @param {string} filename The file to load + * @return {Object} The resulting gRPC object + */ +function load(filename) { + var builder = ProtoBuf.loadProtoFile(filename); + + return loadObject(builder.ns); +} + +/** + * See docs for loadObject + */ +exports.loadObject = loadObject; + +/** + * See docs for load + */ +exports.load = load; + +/** + * See docs for surface_server.makeServerConstructor + */ +exports.buildServer = surface_server.makeServerConstructor; + +/** + * Status name to code number mapping + */ +exports.status = grpc.status; +/** + * Call error name to code number mapping + */ +exports.callError = grpc.callError; diff --git a/src/node/node_grpc.cc b/src/node/node_grpc.cc new file mode 100644 index 00000000000..acee0386d20 --- /dev/null +++ b/src/node/node_grpc.cc @@ -0,0 +1,182 @@ +/* + * + * Copyright 2014, 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 +#include +#include +#include "grpc/grpc.h" + +#include "call.h" +#include "channel.h" +#include "event.h" +#include "server.h" +#include "completion_queue_async_worker.h" +#include "credentials.h" +#include "server_credentials.h" + +using v8::Handle; +using v8::Value; +using v8::Object; +using v8::Uint32; +using v8::String; + +void InitStatusConstants(Handle exports) { + NanScope(); + Handle status = Object::New(); + exports->Set(NanNew("status"), status); + Handle OK(NanNew(GRPC_STATUS_OK)); + status->Set(NanNew("OK"), OK); + Handle CANCELLED(NanNew(GRPC_STATUS_CANCELLED)); + status->Set(NanNew("CANCELLED"), CANCELLED); + Handle UNKNOWN(NanNew(GRPC_STATUS_UNKNOWN)); + status->Set(NanNew("UNKNOWN"), UNKNOWN); + Handle INVALID_ARGUMENT( + NanNew(GRPC_STATUS_INVALID_ARGUMENT)); + status->Set(NanNew("INVALID_ARGUMENT"), INVALID_ARGUMENT); + Handle DEADLINE_EXCEEDED( + NanNew(GRPC_STATUS_DEADLINE_EXCEEDED)); + status->Set(NanNew("DEADLINE_EXCEEDED"), DEADLINE_EXCEEDED); + Handle NOT_FOUND(NanNew(GRPC_STATUS_NOT_FOUND)); + status->Set(NanNew("NOT_FOUND"), NOT_FOUND); + Handle ALREADY_EXISTS( + NanNew(GRPC_STATUS_ALREADY_EXISTS)); + status->Set(NanNew("ALREADY_EXISTS"), ALREADY_EXISTS); + Handle PERMISSION_DENIED( + NanNew(GRPC_STATUS_PERMISSION_DENIED)); + status->Set(NanNew("PERMISSION_DENIED"), PERMISSION_DENIED); + Handle UNAUTHENTICATED( + NanNew(GRPC_STATUS_UNAUTHENTICATED)); + status->Set(NanNew("UNAUTHENTICATED"), UNAUTHENTICATED); + Handle RESOURCE_EXHAUSTED( + NanNew(GRPC_STATUS_RESOURCE_EXHAUSTED)); + status->Set(NanNew("RESOURCE_EXHAUSTED"), RESOURCE_EXHAUSTED); + Handle FAILED_PRECONDITION( + NanNew(GRPC_STATUS_FAILED_PRECONDITION)); + status->Set(NanNew("FAILED_PRECONDITION"), FAILED_PRECONDITION); + Handle ABORTED(NanNew(GRPC_STATUS_ABORTED)); + status->Set(NanNew("ABORTED"), ABORTED); + Handle OUT_OF_RANGE( + NanNew(GRPC_STATUS_OUT_OF_RANGE)); + status->Set(NanNew("OUT_OF_RANGE"), OUT_OF_RANGE); + Handle UNIMPLEMENTED( + NanNew(GRPC_STATUS_UNIMPLEMENTED)); + status->Set(NanNew("UNIMPLEMENTED"), UNIMPLEMENTED); + Handle INTERNAL(NanNew(GRPC_STATUS_INTERNAL)); + status->Set(NanNew("INTERNAL"), INTERNAL); + Handle UNAVAILABLE(NanNew(GRPC_STATUS_UNAVAILABLE)); + status->Set(NanNew("UNAVAILABLE"), UNAVAILABLE); + Handle DATA_LOSS(NanNew(GRPC_STATUS_DATA_LOSS)); + status->Set(NanNew("DATA_LOSS"), DATA_LOSS); +} + +void InitCallErrorConstants(Handle exports) { + NanScope(); + Handle call_error = Object::New(); + exports->Set(NanNew("callError"), call_error); + Handle OK(NanNew(GRPC_CALL_OK)); + call_error->Set(NanNew("OK"), OK); + Handle ERROR(NanNew(GRPC_CALL_ERROR)); + call_error->Set(NanNew("ERROR"), ERROR); + Handle NOT_ON_SERVER( + NanNew(GRPC_CALL_ERROR_NOT_ON_SERVER)); + call_error->Set(NanNew("NOT_ON_SERVER"), NOT_ON_SERVER); + Handle NOT_ON_CLIENT( + NanNew(GRPC_CALL_ERROR_NOT_ON_CLIENT)); + call_error->Set(NanNew("NOT_ON_CLIENT"), NOT_ON_CLIENT); + Handle ALREADY_INVOKED( + NanNew(GRPC_CALL_ERROR_ALREADY_INVOKED)); + call_error->Set(NanNew("ALREADY_INVOKED"), ALREADY_INVOKED); + Handle NOT_INVOKED( + NanNew(GRPC_CALL_ERROR_NOT_INVOKED)); + call_error->Set(NanNew("NOT_INVOKED"), NOT_INVOKED); + Handle ALREADY_FINISHED( + NanNew(GRPC_CALL_ERROR_ALREADY_FINISHED)); + call_error->Set(NanNew("ALREADY_FINISHED"), ALREADY_FINISHED); + Handle TOO_MANY_OPERATIONS( + NanNew(GRPC_CALL_ERROR_TOO_MANY_OPERATIONS)); + call_error->Set(NanNew("TOO_MANY_OPERATIONS"), TOO_MANY_OPERATIONS); + Handle INVALID_FLAGS( + NanNew(GRPC_CALL_ERROR_INVALID_FLAGS)); + call_error->Set(NanNew("INVALID_FLAGS"), INVALID_FLAGS); +} + +void InitOpErrorConstants(Handle exports) { + NanScope(); + Handle op_error = Object::New(); + exports->Set(NanNew("opError"), op_error); + Handle OK(NanNew(GRPC_OP_OK)); + op_error->Set(NanNew("OK"), OK); + Handle ERROR(NanNew(GRPC_OP_ERROR)); + op_error->Set(NanNew("ERROR"), ERROR); +} + +void InitCompletionTypeConstants(Handle exports) { + NanScope(); + Handle completion_type = Object::New(); + exports->Set(NanNew("completionType"), completion_type); + Handle QUEUE_SHUTDOWN(NanNew(GRPC_QUEUE_SHUTDOWN)); + completion_type->Set(NanNew("QUEUE_SHUTDOWN"), QUEUE_SHUTDOWN); + Handle READ(NanNew(GRPC_READ)); + completion_type->Set(NanNew("READ"), READ); + Handle INVOKE_ACCEPTED(NanNew(GRPC_INVOKE_ACCEPTED)); + completion_type->Set(NanNew("INVOKE_ACCEPTED"), INVOKE_ACCEPTED); + Handle WRITE_ACCEPTED(NanNew(GRPC_WRITE_ACCEPTED)); + completion_type->Set(NanNew("WRITE_ACCEPTED"), WRITE_ACCEPTED); + Handle FINISH_ACCEPTED(NanNew(GRPC_FINISH_ACCEPTED)); + completion_type->Set(NanNew("FINISH_ACCEPTED"), FINISH_ACCEPTED); + Handle CLIENT_METADATA_READ( + NanNew(GRPC_CLIENT_METADATA_READ)); + completion_type->Set(NanNew("CLIENT_METADATA_READ"), CLIENT_METADATA_READ); + Handle FINISHED(NanNew(GRPC_FINISHED)); + completion_type->Set(NanNew("FINISHED"), FINISHED); + Handle SERVER_RPC_NEW(NanNew(GRPC_SERVER_RPC_NEW)); + completion_type->Set(NanNew("SERVER_RPC_NEW"), SERVER_RPC_NEW); +} + +void init(Handle exports) { + NanScope(); + grpc_init(); + InitStatusConstants(exports); + InitCallErrorConstants(exports); + InitOpErrorConstants(exports); + InitCompletionTypeConstants(exports); + + grpc::node::Call::Init(exports); + grpc::node::Channel::Init(exports); + grpc::node::Server::Init(exports); + grpc::node::CompletionQueueAsyncWorker::Init(exports); + grpc::node::Credentials::Init(exports); + grpc::node::ServerCredentials::Init(exports); +} + +NODE_MODULE(grpc, init) diff --git a/src/node/package.json b/src/node/package.json new file mode 100644 index 00000000000..ed93c4ff41e --- /dev/null +++ b/src/node/package.json @@ -0,0 +1,19 @@ +{ + "name": "grpc", + "version": "0.1.0", + "description": "gRPC Library for Node", + "scripts": { + "test": "./node_modules/mocha/bin/mocha" + }, + "dependencies": { + "bindings": "^1.2.1", + "nan": "~1.3.0", + "underscore": "^1.7.0", + "protobufjs": "murgatroid99/ProtoBuf.js" + }, + "devDependencies": { + "mocha": "~1.21.0", + "highland": "~2.0.0" + }, + "main": "main.js" +} diff --git a/src/node/port_picker.js b/src/node/port_picker.js new file mode 100644 index 00000000000..ad82f2a7f83 --- /dev/null +++ b/src/node/port_picker.js @@ -0,0 +1,52 @@ +/* + * + * Copyright 2014, 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 net = require('net'); + +/** + * Finds a free port that a server can bind to, in the format + * "address:port" + * @param {function(string)} cb The callback that should execute when the port + * is available + */ +function nextAvailablePort(cb) { + var server = net.createServer(); + server.listen(function() { + var address = server.address(); + server.close(function() { + cb(address.address + ':' + address.port.toString()); + }); + }); +} + +exports.nextAvailablePort = nextAvailablePort; diff --git a/src/node/server.cc b/src/node/server.cc new file mode 100644 index 00000000000..64826897cda --- /dev/null +++ b/src/node/server.cc @@ -0,0 +1,236 @@ +/* + * + * Copyright 2014, 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 "server.h" + +#include +#include + +#include + +#include +#include "grpc/grpc.h" +#include "grpc/grpc_security.h" +#include "call.h" +#include "completion_queue_async_worker.h" +#include "tag.h" +#include "server_credentials.h" + +namespace grpc { +namespace node { + +using v8::Arguments; +using v8::Array; +using v8::Boolean; +using v8::Exception; +using v8::Function; +using v8::FunctionTemplate; +using v8::Handle; +using v8::HandleScope; +using v8::Local; +using v8::Number; +using v8::Object; +using v8::Persistent; +using v8::String; +using v8::Value; + +Persistent Server::constructor; +Persistent Server::fun_tpl; + +Server::Server(grpc_server *server) : wrapped_server(server) {} + +Server::~Server() { grpc_server_destroy(wrapped_server); } + +void Server::Init(Handle exports) { + NanScope(); + Local tpl = FunctionTemplate::New(New); + tpl->SetClassName(String::NewSymbol("Server")); + tpl->InstanceTemplate()->SetInternalFieldCount(1); + NanSetPrototypeTemplate(tpl, "requestCall", + FunctionTemplate::New(RequestCall)->GetFunction()); + + NanSetPrototypeTemplate(tpl, "addHttp2Port", + FunctionTemplate::New(AddHttp2Port)->GetFunction()); + + NanSetPrototypeTemplate( + tpl, "addSecureHttp2Port", + FunctionTemplate::New(AddSecureHttp2Port)->GetFunction()); + + NanSetPrototypeTemplate(tpl, "start", + FunctionTemplate::New(Start)->GetFunction()); + + NanSetPrototypeTemplate(tpl, "shutdown", + FunctionTemplate::New(Shutdown)->GetFunction()); + + NanAssignPersistent(fun_tpl, tpl); + NanAssignPersistent(constructor, tpl->GetFunction()); + exports->Set(String::NewSymbol("Server"), constructor); +} + +bool Server::HasInstance(Handle val) { + return NanHasInstance(fun_tpl, val); +} + +NAN_METHOD(Server::New) { + NanScope(); + + /* If this is not a constructor call, make a constructor call and return + the result */ + if (!args.IsConstructCall()) { + const int argc = 1; + Local argv[argc] = {args[0]}; + NanReturnValue(constructor->NewInstance(argc, argv)); + } + grpc_server *wrapped_server; + grpc_completion_queue *queue = CompletionQueueAsyncWorker::GetQueue(); + if (args[0]->IsUndefined()) { + wrapped_server = grpc_server_create(queue, NULL); + } else if (args[0]->IsObject()) { + grpc_server_credentials *creds = NULL; + Handle args_hash(args[0]->ToObject()->Clone()); + if (args_hash->HasOwnProperty(NanNew("credentials"))) { + Handle creds_value = args_hash->Get(NanNew("credentials")); + if (!ServerCredentials::HasInstance(creds_value)) { + return NanThrowTypeError( + "credentials arg must be a ServerCredentials object"); + } + ServerCredentials *creds_object = + ObjectWrap::Unwrap(creds_value->ToObject()); + creds = creds_object->GetWrappedServerCredentials(); + args_hash->Delete(NanNew("credentials")); + } + Handle keys(args_hash->GetOwnPropertyNames()); + grpc_channel_args channel_args; + channel_args.num_args = keys->Length(); + channel_args.args = reinterpret_cast( + calloc(channel_args.num_args, sizeof(grpc_arg))); + /* These are used to keep all strings until then end of the block, then + destroy them */ + std::vector key_strings(keys->Length()); + std::vector value_strings(keys->Length()); + for (unsigned int i = 0; i < channel_args.num_args; i++) { + Handle current_key(keys->Get(i)->ToString()); + Handle current_value(args_hash->Get(current_key)); + key_strings[i] = new NanUtf8String(current_key); + channel_args.args[i].key = **key_strings[i]; + if (current_value->IsInt32()) { + channel_args.args[i].type = GRPC_ARG_INTEGER; + channel_args.args[i].value.integer = current_value->Int32Value(); + } else if (current_value->IsString()) { + channel_args.args[i].type = GRPC_ARG_STRING; + value_strings[i] = new NanUtf8String(current_value); + channel_args.args[i].value.string = **value_strings[i]; + } else { + free(channel_args.args); + return NanThrowTypeError("Arg values must be strings"); + } + } + if (creds == NULL) { + wrapped_server = grpc_server_create(queue, &channel_args); + } else { + wrapped_server = grpc_secure_server_create(creds, queue, &channel_args); + } + free(channel_args.args); + } else { + return NanThrowTypeError("Server expects an object"); + } + Server *server = new Server(wrapped_server); + server->Wrap(args.This()); + NanReturnValue(args.This()); +} + +NAN_METHOD(Server::RequestCall) { + NanScope(); + if (!HasInstance(args.This())) { + return NanThrowTypeError("requestCall can only be called on a Server"); + } + Server *server = ObjectWrap::Unwrap(args.This()); + grpc_call_error error = grpc_server_request_call( + server->wrapped_server, CreateTag(args[0], NanNull())); + if (error == GRPC_CALL_OK) { + CompletionQueueAsyncWorker::Next(); + } else { + return NanThrowError("requestCall failed", error); + } + NanReturnUndefined(); +} + +NAN_METHOD(Server::AddHttp2Port) { + NanScope(); + if (!HasInstance(args.This())) { + return NanThrowTypeError("addHttp2Port can only be called on a Server"); + } + if (!args[0]->IsString()) { + return NanThrowTypeError("addHttp2Port's argument must be a String"); + } + Server *server = ObjectWrap::Unwrap(args.This()); + NanReturnValue(NanNew(grpc_server_add_http2_port( + server->wrapped_server, *NanUtf8String(args[0])))); +} + +NAN_METHOD(Server::AddSecureHttp2Port) { + NanScope(); + if (!HasInstance(args.This())) { + return NanThrowTypeError( + "addSecureHttp2Port can only be called on a Server"); + } + if (!args[0]->IsString()) { + return NanThrowTypeError("addSecureHttp2Port's argument must be a String"); + } + Server *server = ObjectWrap::Unwrap(args.This()); + NanReturnValue(NanNew(grpc_server_add_secure_http2_port( + server->wrapped_server, *NanUtf8String(args[0])))); +} + +NAN_METHOD(Server::Start) { + NanScope(); + if (!HasInstance(args.This())) { + return NanThrowTypeError("start can only be called on a Server"); + } + Server *server = ObjectWrap::Unwrap(args.This()); + grpc_server_start(server->wrapped_server); + NanReturnUndefined(); +} + +NAN_METHOD(Server::Shutdown) { + NanScope(); + if (!HasInstance(args.This())) { + return NanThrowTypeError("shutdown can only be called on a Server"); + } + Server *server = ObjectWrap::Unwrap(args.This()); + grpc_server_shutdown(server->wrapped_server); + NanReturnUndefined(); +} + +} // namespace node +} // namespace grpc diff --git a/src/node/server.h b/src/node/server.h new file mode 100644 index 00000000000..d50f1fb6c5e --- /dev/null +++ b/src/node/server.h @@ -0,0 +1,79 @@ +/* + * + * Copyright 2014, 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 NET_GRPC_NODE_SERVER_H_ +#define NET_GRPC_NODE_SERVER_H_ + +#include +#include +#include "grpc/grpc.h" + +namespace grpc { +namespace node { + +/* Wraps grpc_server as a JavaScript object. Provides a constructor + and wrapper methods for grpc_server_create, grpc_server_request_call, + grpc_server_add_http2_port, and grpc_server_start. */ +class Server : public ::node::ObjectWrap { + public: + /* Initializes the Server class and exposes the constructor and + wrapper methods to JavaScript */ + static void Init(v8::Handle exports); + /* Tests whether the given value was constructed by this class's + JavaScript constructor */ + static bool HasInstance(v8::Handle val); + + private: + explicit Server(grpc_server *server); + ~Server(); + + // Prevent copying + Server(const Server &); + Server &operator=(const Server &); + + static NAN_METHOD(New); + static NAN_METHOD(RequestCall); + static NAN_METHOD(AddHttp2Port); + static NAN_METHOD(AddSecureHttp2Port); + static NAN_METHOD(Start); + static NAN_METHOD(Shutdown); + static v8::Persistent constructor; + static v8::Persistent fun_tpl; + + grpc_server *wrapped_server; +}; + +} // namespace node +} // namespace grpc + +#endif // NET_GRPC_NODE_SERVER_H_ diff --git a/src/node/server.js b/src/node/server.js new file mode 100644 index 00000000000..e947032b297 --- /dev/null +++ b/src/node/server.js @@ -0,0 +1,268 @@ +/* + * + * Copyright 2014, 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 _ = require('underscore'); + +var grpc = require('bindings')('grpc.node'); + +var common = require('./common'); + +var Duplex = require('stream').Duplex; +var util = require('util'); + +util.inherits(GrpcServerStream, Duplex); + +/** + * Class for representing a gRPC server side stream as a Node stream. Extends + * from stream.Duplex. + * @constructor + * @param {grpc.Call} call Call object to proxy + * @param {object} options Stream options + */ +function GrpcServerStream(call, options) { + Duplex.call(this, options); + this._call = call; + // Indicate that a status has been sent + var finished = false; + var self = this; + var status = { + 'code' : grpc.status.OK, + 'details' : 'OK' + }; + /** + * Send the pending status + */ + function sendStatus() { + call.startWriteStatus(status.code, status.details, function() { + }); + finished = true; + } + this.on('finish', sendStatus); + /** + * Set the pending status to a given error status. If the error does not have + * code or details properties, the code will be set to grpc.status.INTERNAL + * and the details will be set to 'Unknown Error'. + * @param {Error} err The error object + */ + function setStatus(err) { + console.log('Server setting status to', err); + var code = grpc.status.INTERNAL; + var details = 'Unknown Error'; + + if (err.hasOwnProperty('code')) { + code = err.code; + if (err.hasOwnProperty('details')) { + details = err.details; + } + } + status = {'code': code, 'details': details}; + } + /** + * Terminate the call. This includes indicating that reads are done, draining + * all pending writes, and sending the given error as a status + * @param {Error} err The error object + * @this GrpcServerStream + */ + function terminateCall(err) { + // Drain readable data + this.on('data', function() {}); + setStatus(err); + this.end(); + } + this.on('error', terminateCall); + // Indicates that a read is pending + var reading = false; + /** + * Callback to be called when a READ event is received. Pushes the data onto + * the read queue and starts reading again if applicable + * @param {grpc.Event} event READ event object + */ + function readCallback(event) { + if (finished) { + self.push(null); + return; + } + var data = event.data; + if (self.push(data) && data != null) { + self._call.startRead(readCallback); + } else { + reading = false; + } + } + /** + * Start reading if there is not already a pending read. Reading will + * continue until self.push returns false (indicating reads should slow + * down) or the read data is null (indicating that there is no more data). + */ + this.startReading = function() { + if (finished) { + self.push(null); + } else { + if (!reading) { + reading = true; + self._call.startRead(readCallback); + } + } + }; +} + +/** + * Start reading from the gRPC data source. This is an implementation of a + * method required for implementing stream.Readable + * @param {number} size Ignored + */ +GrpcServerStream.prototype._read = function(size) { + this.startReading(); +}; + +/** + * Start writing a chunk of data. This is an implementation of a method required + * for implementing stream.Writable. + * @param {Buffer} chunk The chunk of data to write + * @param {string} encoding Ignored + * @param {function(Error=)} callback Callback to indicate that the write is + * complete + */ +GrpcServerStream.prototype._write = function(chunk, encoding, callback) { + var self = this; + self._call.startWrite(chunk, function(event) { + callback(); + }, 0); +}; + +/** + * Constructs a server object that stores request handlers and delegates + * incoming requests to those handlers + * @constructor + * @param {Array} options Options that should be passed to the internal server + * implementation + */ +function Server(options) { + this.handlers = {}; + var handlers = this.handlers; + var server = new grpc.Server(options); + this._server = server; + var started = false; + /** + * Start the server and begin handling requests + * @this Server + */ + this.start = function() { + console.log('Server starting'); + _.each(handlers, function(handler, handler_name) { + console.log('Serving', handler_name); + }); + if (this.started) { + throw 'Server is already running'; + } + server.start(); + /** + * Handles the SERVER_RPC_NEW event. If there is a handler associated with + * the requested method, use that handler to respond to the request. Then + * wait for the next request + * @param {grpc.Event} event The event to handle with tag SERVER_RPC_NEW + */ + function handleNewCall(event) { + var call = event.call; + var data = event.data; + if (data == null) { + return; + } + server.requestCall(handleNewCall); + var handler = undefined; + var deadline = data.absolute_deadline; + var cancelled = false; + if (handlers.hasOwnProperty(data.method)) { + handler = handlers[data.method]; + } + call.serverAccept(function(event) { + if (event.data.code === grpc.status.CANCELLED) { + cancelled = true; + } + }, 0); + call.serverEndInitialMetadata(0); + var stream = new GrpcServerStream(call); + Object.defineProperty(stream, 'cancelled', { + get: function() { return cancelled;} + }); + try { + handler(stream, data.metadata); + } catch (e) { + stream.emit('error', e); + } + } + server.requestCall(handleNewCall); + }; + /** Shuts down the server. + */ + this.shutdown = function() { + server.shutdown(); + }; +} + +/** + * Registers a handler to handle the named method. Fails if there already is + * a handler for the given method. Returns true on success + * @param {string} name The name of the method that the provided function should + * handle/respond to. + * @param {function} handler Function that takes a stream of request values and + * returns a stream of response values + * @return {boolean} True if the handler was set. False if a handler was already + * set for that name. + */ +Server.prototype.register = function(name, handler) { + if (this.handlers.hasOwnProperty(name)) { + return false; + } + this.handlers[name] = handler; + return true; +}; + +/** + * Binds the server to the given port, with SSL enabled if secure is specified + * @param {string} port The port that the server should bind on, in the format + * "address:port" + * @param {boolean=} secure Whether the server should open a secure port + */ +Server.prototype.bind = function(port, secure) { + if (secure) { + this._server.addSecureHttp2Port(port); + } else { + this._server.addHttp2Port(port); + } +}; + +/** + * See documentation for Server + */ +module.exports = Server; diff --git a/src/node/server_credentials.cc b/src/node/server_credentials.cc new file mode 100644 index 00000000000..38df5475278 --- /dev/null +++ b/src/node/server_credentials.cc @@ -0,0 +1,161 @@ +/* + * + * Copyright 2014, 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 + +#include "grpc/grpc.h" +#include "grpc/grpc_security.h" +#include "grpc/support/log.h" +#include "server_credentials.h" + +namespace grpc { +namespace node { + +using ::node::Buffer; +using v8::Arguments; +using v8::Exception; +using v8::External; +using v8::Function; +using v8::FunctionTemplate; +using v8::Handle; +using v8::HandleScope; +using v8::Integer; +using v8::Local; +using v8::Object; +using v8::ObjectTemplate; +using v8::Persistent; +using v8::Value; + +Persistent ServerCredentials::constructor; +Persistent ServerCredentials::fun_tpl; + +ServerCredentials::ServerCredentials(grpc_server_credentials *credentials) + : wrapped_credentials(credentials) {} + +ServerCredentials::~ServerCredentials() { + gpr_log(GPR_DEBUG, "Destroying server credentials object"); + grpc_server_credentials_release(wrapped_credentials); +} + +void ServerCredentials::Init(Handle exports) { + NanScope(); + Local tpl = FunctionTemplate::New(New); + tpl->SetClassName(NanNew("ServerCredentials")); + tpl->InstanceTemplate()->SetInternalFieldCount(1); + NanAssignPersistent(fun_tpl, tpl); + NanAssignPersistent(constructor, tpl->GetFunction()); + constructor->Set(NanNew("createSsl"), + FunctionTemplate::New(CreateSsl)->GetFunction()); + constructor->Set(NanNew("createFake"), + FunctionTemplate::New(CreateFake)->GetFunction()); + exports->Set(NanNew("ServerCredentials"), constructor); +} + +bool ServerCredentials::HasInstance(Handle val) { + NanScope(); + return NanHasInstance(fun_tpl, val); +} + +Handle ServerCredentials::WrapStruct( + grpc_server_credentials *credentials) { + NanEscapableScope(); + if (credentials == NULL) { + return NanEscapeScope(NanNull()); + } + const int argc = 1; + Handle argv[argc] = { + External::New(reinterpret_cast(credentials))}; + return NanEscapeScope(constructor->NewInstance(argc, argv)); +} + +grpc_server_credentials *ServerCredentials::GetWrappedServerCredentials() { + return wrapped_credentials; +} + +NAN_METHOD(ServerCredentials::New) { + NanScope(); + + if (args.IsConstructCall()) { + if (!args[0]->IsExternal()) { + return NanThrowTypeError( + "ServerCredentials can only be created with the provide functions"); + } + grpc_server_credentials *creds_value = + reinterpret_cast(External::Unwrap(args[0])); + ServerCredentials *credentials = new ServerCredentials(creds_value); + credentials->Wrap(args.This()); + NanReturnValue(args.This()); + } else { + const int argc = 1; + Local argv[argc] = {args[0]}; + NanReturnValue(constructor->NewInstance(argc, argv)); + } +} + +NAN_METHOD(ServerCredentials::CreateSsl) { + NanScope(); + char *root_certs = NULL; + char *private_key; + char *cert_chain; + int root_certs_length = 0, private_key_length, cert_chain_length; + if (Buffer::HasInstance(args[0])) { + root_certs = Buffer::Data(args[0]); + root_certs_length = Buffer::Length(args[0]); + } else if (!(args[0]->IsNull() || args[0]->IsUndefined())) { + return NanThrowTypeError( + "createSSl's first argument must be a Buffer if provided"); + } + if (!Buffer::HasInstance(args[1])) { + return NanThrowTypeError("createSsl's second argument must be a Buffer"); + } + private_key = Buffer::Data(args[1]); + private_key_length = Buffer::Length(args[1]); + if (!Buffer::HasInstance(args[2])) { + return NanThrowTypeError("createSsl's third argument must be a Buffer"); + } + cert_chain = Buffer::Data(args[2]); + cert_chain_length = Buffer::Length(args[2]); + NanReturnValue(WrapStruct(grpc_ssl_server_credentials_create( + reinterpret_cast(root_certs), root_certs_length, + reinterpret_cast(private_key), private_key_length, + reinterpret_cast(cert_chain), cert_chain_length))); +} + +NAN_METHOD(ServerCredentials::CreateFake) { + NanScope(); + NanReturnValue( + WrapStruct(grpc_fake_transport_security_server_credentials_create())); +} + +} // namespace node +} // namespace grpc diff --git a/src/node/server_credentials.h b/src/node/server_credentials.h new file mode 100644 index 00000000000..8baae3f185a --- /dev/null +++ b/src/node/server_credentials.h @@ -0,0 +1,77 @@ +/* + * + * Copyright 2014, 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 NET_GRPC_NODE_SERVER_CREDENTIALS_H_ +#define NET_GRPC_NODE_SERVER_CREDENTIALS_H_ + +#include +#include +#include "grpc/grpc.h" +#include "grpc/grpc_security.h" + +namespace grpc { +namespace node { + +/* Wrapper class for grpc_server_credentials structs */ +class ServerCredentials : public ::node::ObjectWrap { + public: + static void Init(v8::Handle exports); + static bool HasInstance(v8::Handle val); + /* Wrap a grpc_server_credentials struct in a javascript object */ + static v8::Handle WrapStruct(grpc_server_credentials *credentials); + + /* Returns the grpc_server_credentials struct that this object wraps */ + grpc_server_credentials *GetWrappedServerCredentials(); + + private: + explicit ServerCredentials(grpc_server_credentials *credentials); + ~ServerCredentials(); + + // Prevent copying + ServerCredentials(const ServerCredentials &); + ServerCredentials &operator=(const ServerCredentials &); + + static NAN_METHOD(New); + static NAN_METHOD(CreateSsl); + static NAN_METHOD(CreateFake); + static v8::Persistent constructor; + // Used for typechecking instances of this javascript class + static v8::Persistent fun_tpl; + + grpc_server_credentials *wrapped_credentials; +}; + +} // namespace node +} // namespace grpc + +#endif // NET_GRPC_NODE_SERVER_CREDENTIALS_H_ diff --git a/src/node/surface_client.js b/src/node/surface_client.js new file mode 100644 index 00000000000..77dab5ca6f8 --- /dev/null +++ b/src/node/surface_client.js @@ -0,0 +1,375 @@ +/* + * + * Copyright 2014, 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 _ = require('underscore'); + +var client = require('./client.js'); + +var common = require('./common.js'); + +var EventEmitter = require('events').EventEmitter; + +var stream = require('stream'); + +var Readable = stream.Readable; +var Writable = stream.Writable; +var Duplex = stream.Duplex; +var util = require('util'); + + +function forwardEvent(fromEmitter, toEmitter, event) { + fromEmitter.on(event, function forward() { + _.partial(toEmitter.emit, event).apply(toEmitter, arguments); + }); +} + +util.inherits(ClientReadableObjectStream, Readable); + +/** + * Class for representing a gRPC server streaming call as a Node stream on the + * client side. Extends from stream.Readable. + * @constructor + * @param {stream} stream Underlying binary Duplex stream for the call + * @param {function(Buffer)} deserialize Function for deserializing binary data + * @param {object} options Stream options + */ +function ClientReadableObjectStream(stream, deserialize, options) { + options = _.extend(options, {objectMode: true}); + Readable.call(this, options); + this._stream = stream; + var self = this; + forwardEvent(stream, this, 'status'); + forwardEvent(stream, this, 'metadata'); + this._stream.on('data', function forwardData(chunk) { + if (!self.push(deserialize(chunk))) { + self._stream.pause(); + } + }); + this._stream.pause(); +} + +util.inherits(ClientWritableObjectStream, Writable); + +/** + * Class for representing a gRPC client streaming call as a Node stream on the + * client side. Extends from stream.Writable. + * @constructor + * @param {stream} stream Underlying binary Duplex stream for the call + * @param {function(*):Buffer} serialize Function for serializing objects + * @param {object} options Stream options + */ +function ClientWritableObjectStream(stream, serialize, options) { + options = _.extend(options, {objectMode: true}); + Writable.call(this, options); + this._stream = stream; + this._serialize = serialize; + forwardEvent(stream, this, 'status'); + forwardEvent(stream, this, 'metadata'); + this.on('finish', function() { + this._stream.end(); + }); +} + + +util.inherits(ClientBidiObjectStream, Duplex); + +/** + * Class for representing a gRPC bidi streaming call as a Node stream on the + * client side. Extends from stream.Duplex. + * @constructor + * @param {stream} stream Underlying binary Duplex stream for the call + * @param {function(*):Buffer} serialize Function for serializing objects + * @param {function(Buffer)} deserialize Function for deserializing binary data + * @param {object} options Stream options + */ +function ClientBidiObjectStream(stream, serialize, deserialize, options) { + options = _.extend(options, {objectMode: true}); + Duplex.call(this, options); + this._stream = stream; + this._serialize = serialize; + var self = this; + forwardEvent(stream, this, 'status'); + forwardEvent(stream, this, 'metadata'); + this._stream.on('data', function forwardData(chunk) { + if (!self.push(deserialize(chunk))) { + self._stream.pause(); + } + }); + this._stream.pause(); + this.on('finish', function() { + this._stream.end(); + }); +} + +/** + * _read implementation for both types of streams that allow reading. + * @this {ClientReadableObjectStream|ClientBidiObjectStream} + * @param {number} size Ignored + */ +function _read(size) { + this._stream.resume(); +} + +/** + * See docs for _read + */ +ClientReadableObjectStream.prototype._read = _read; +/** + * See docs for _read + */ +ClientBidiObjectStream.prototype._read = _read; + +/** + * _write implementation for both types of streams that allow writing + * @this {ClientWritableObjectStream|ClientBidiObjectStream} + * @param {*} chunk The value to write to the stream + * @param {string} encoding Ignored + * @param {function(Error)} callback Callback to call when finished writing + */ +function _write(chunk, encoding, callback) { + this._stream.write(this._serialize(chunk), encoding, callback); +} + +/** + * See docs for _write + */ +ClientWritableObjectStream.prototype._write = _write; +/** + * See docs for _write + */ +ClientBidiObjectStream.prototype._write = _write; + +/** + * Get a function that can make unary requests to the specified method. + * @param {string} method The name of the method to request + * @param {function(*):Buffer} serialize The serialization function for inputs + * @param {function(Buffer)} deserialize The deserialization function for + * outputs + * @return {Function} makeUnaryRequest + */ +function makeUnaryRequestFunction(method, serialize, deserialize) { + /** + * Make a unary request with this method on the given channel with the given + * argument, callback, etc. + * @this {SurfaceClient} Client object. Must have a channel member. + * @param {*} argument The argument to the call. Should be serializable with + * serialize + * @param {function(?Error, value=)} callback The callback to for when the + * response is received + * @param {array=} metadata Array of metadata key/value pairs to add to the + * call + * @param {(number|Date)=} deadline The deadline for processing this request. + * Defaults to infinite future + * @return {EventEmitter} An event emitter for stream related events + */ + function makeUnaryRequest(argument, callback, metadata, deadline) { + var stream = client.makeRequest(this.channel, method, metadata, deadline); + var emitter = new EventEmitter(); + forwardEvent(stream, emitter, 'status'); + forwardEvent(stream, emitter, 'metadata'); + stream.write(serialize(argument)); + stream.end(); + stream.on('data', function forwardData(chunk) { + try { + callback(null, deserialize(chunk)); + } catch (e) { + callback(e); + } + }); + return emitter; + } + return makeUnaryRequest; +} + +/** + * Get a function that can make client stream requests to the specified method. + * @param {string} method The name of the method to request + * @param {function(*):Buffer} serialize The serialization function for inputs + * @param {function(Buffer)} deserialize The deserialization function for + * outputs + * @return {Function} makeClientStreamRequest + */ +function makeClientStreamRequestFunction(method, serialize, deserialize) { + /** + * Make a client stream request with this method on the given channel with the + * given callback, etc. + * @this {SurfaceClient} Client object. Must have a channel member. + * @param {function(?Error, value=)} callback The callback to for when the + * response is received + * @param {array=} metadata Array of metadata key/value pairs to add to the + * call + * @param {(number|Date)=} deadline The deadline for processing this request. + * Defaults to infinite future + * @return {EventEmitter} An event emitter for stream related events + */ + function makeClientStreamRequest(callback, metadata, deadline) { + var stream = client.makeRequest(this.channel, method, metadata, deadline); + var obj_stream = new ClientWritableObjectStream(stream, serialize, {}); + stream.on('data', function forwardData(chunk) { + try { + callback(null, deserialize(chunk)); + } catch (e) { + callback(e); + } + }); + return obj_stream; + } + return makeClientStreamRequest; +} + +/** + * Get a function that can make server stream requests to the specified method. + * @param {string} method The name of the method to request + * @param {function(*):Buffer} serialize The serialization function for inputs + * @param {function(Buffer)} deserialize The deserialization function for + * outputs + * @return {Function} makeServerStreamRequest + */ +function makeServerStreamRequestFunction(method, serialize, deserialize) { + /** + * Make a server stream request with this method on the given channel with the + * given argument, etc. + * @this {SurfaceClient} Client object. Must have a channel member. + * @param {*} argument The argument to the call. Should be serializable with + * serialize + * @param {array=} metadata Array of metadata key/value pairs to add to the + * call + * @param {(number|Date)=} deadline The deadline for processing this request. + * Defaults to infinite future + * @return {EventEmitter} An event emitter for stream related events + */ + function makeServerStreamRequest(argument, metadata, deadline) { + var stream = client.makeRequest(this.channel, method, metadata, deadline); + var obj_stream = new ClientReadableObjectStream(stream, deserialize, {}); + stream.write(serialize(argument)); + stream.end(); + return obj_stream; + } + return makeServerStreamRequest; +} + +/** + * Get a function that can make bidirectional stream requests to the specified + * method. + * @param {string} method The name of the method to request + * @param {function(*):Buffer} serialize The serialization function for inputs + * @param {function(Buffer)} deserialize The deserialization function for + * outputs + * @return {Function} makeBidiStreamRequest + */ +function makeBidiStreamRequestFunction(method, serialize, deserialize) { + /** + * Make a bidirectional stream request with this method on the given channel. + * @this {SurfaceClient} Client object. Must have a channel member. + * @param {array=} metadata Array of metadata key/value pairs to add to the + * call + * @param {(number|Date)=} deadline The deadline for processing this request. + * Defaults to infinite future + * @return {EventEmitter} An event emitter for stream related events + */ + function makeBidiStreamRequest(metadata, deadline) { + var stream = client.makeRequest(this.channel, method, metadata, deadline); + var obj_stream = new ClientBidiObjectStream(stream, + serialize, + deserialize, + {}); + return obj_stream; + } + return makeBidiStreamRequest; +} + +/** + * Map with short names for each of the requester maker functions. Used in + * makeClientConstructor + */ +var requester_makers = { + unary: makeUnaryRequestFunction, + server_stream: makeServerStreamRequestFunction, + client_stream: makeClientStreamRequestFunction, + bidi: makeBidiStreamRequestFunction +} + +/** + * Creates a constructor for clients for the given service + * @param {ProtoBuf.Reflect.Service} service The service to generate a client + * for + * @return {function(string, Object)} New client constructor + */ +function makeClientConstructor(service) { + var prefix = '/' + common.fullyQualifiedName(service) + '/'; + /** + * Create a client with the given methods + * @constructor + * @param {string} address The address of the server to connect to + * @param {Object} options Options to pass to the underlying channel + */ + function SurfaceClient(address, options) { + this.channel = new client.Channel(address, options); + } + + _.each(service.children, function(method) { + var method_type; + if (method.requestStream) { + if (method.responseStream) { + method_type = 'bidi'; + } else { + method_type = 'client_stream'; + } + } else { + if (method.responseStream) { + method_type = 'server_stream'; + } else { + method_type = 'unary'; + } + } + SurfaceClient.prototype[method.name] = requester_makers[method_type]( + prefix + method.name, + common.serializeCls(method.resolvedRequestType.build()), + common.deserializeCls(method.resolvedResponseType.build())); + }); + + SurfaceClient.service = service; + + return SurfaceClient; +} + +exports.makeClientConstructor = makeClientConstructor; + +/** + * See docs for client.status + */ +exports.status = client.status; +/** + * See docs for client.callError + */ +exports.callError = client.callError; diff --git a/src/node/surface_server.js b/src/node/surface_server.js new file mode 100644 index 00000000000..b6e0c37b4cd --- /dev/null +++ b/src/node/surface_server.js @@ -0,0 +1,383 @@ +/* + * + * Copyright 2014, 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 _ = require('underscore'); + +var Server = require('./server.js'); + +var stream = require('stream'); + +var Readable = stream.Readable; +var Writable = stream.Writable; +var Duplex = stream.Duplex; +var util = require('util'); + +var common = require('./common.js'); + +util.inherits(ServerReadableObjectStream, Readable); + +/** + * Class for representing a gRPC client streaming call as a Node stream on the + * server side. Extends from stream.Readable. + * @constructor + * @param {stream} stream Underlying binary Duplex stream for the call + * @param {function(Buffer)} deserialize Function for deserializing binary data + * @param {object} options Stream options + */ +function ServerReadableObjectStream(stream, deserialize, options) { + options = _.extend(options, {objectMode: true}); + Readable.call(this, options); + this._stream = stream; + Object.defineProperty(this, 'cancelled', { + get: function() { return stream.cancelled; } + }); + var self = this; + this._stream.on('data', function forwardData(chunk) { + if (!self.push(deserialize(chunk))) { + self._stream.pause(); + } + }); + this._stream.on('end', function forwardEnd() { + self.push(null); + }); + this._stream.pause(); +} + +util.inherits(ServerWritableObjectStream, Writable); + +/** + * Class for representing a gRPC server streaming call as a Node stream on the + * server side. Extends from stream.Writable. + * @constructor + * @param {stream} stream Underlying binary Duplex stream for the call + * @param {function(*):Buffer} serialize Function for serializing objects + * @param {object} options Stream options + */ +function ServerWritableObjectStream(stream, serialize, options) { + options = _.extend(options, {objectMode: true}); + Writable.call(this, options); + this._stream = stream; + this._serialize = serialize; + this.on('finish', function() { + this._stream.end(); + }); +} + +util.inherits(ServerBidiObjectStream, Duplex); + +/** + * Class for representing a gRPC bidi streaming call as a Node stream on the + * server side. Extends from stream.Duplex. + * @constructor + * @param {stream} stream Underlying binary Duplex stream for the call + * @param {function(*):Buffer} serialize Function for serializing objects + * @param {function(Buffer)} deserialize Function for deserializing binary data + * @param {object} options Stream options + */ +function ServerBidiObjectStream(stream, serialize, deserialize, options) { + options = _.extend(options, {objectMode: true}); + Duplex.call(this, options); + this._stream = stream; + this._serialize = serialize; + var self = this; + this._stream.on('data', function forwardData(chunk) { + if (!self.push(deserialize(chunk))) { + self._stream.pause(); + } + }); + this._stream.on('end', function forwardEnd() { + self.push(null); + }); + this._stream.pause(); + this.on('finish', function() { + this._stream.end(); + }); +} + +/** + * _read implementation for both types of streams that allow reading. + * @this {ServerReadableObjectStream|ServerBidiObjectStream} + * @param {number} size Ignored + */ +function _read(size) { + this._stream.resume(); +} + +/** + * See docs for _read + */ +ServerReadableObjectStream.prototype._read = _read; +/** + * See docs for _read + */ +ServerBidiObjectStream.prototype._read = _read; + +/** + * _write implementation for both types of streams that allow writing + * @this {ServerWritableObjectStream|ServerBidiObjectStream} + * @param {*} chunk The value to write to the stream + * @param {string} encoding Ignored + * @param {function(Error)} callback Callback to call when finished writing + */ +function _write(chunk, encoding, callback) { + this._stream.write(this._serialize(chunk), encoding, callback); +} + +/** + * See docs for _write + */ +ServerWritableObjectStream.prototype._write = _write; +/** + * See docs for _write + */ +ServerBidiObjectStream.prototype._write = _write; + +/** + * Creates a binary stream handler function from a unary handler function + * @param {function(Object, function(Error, *))} handler Unary call handler + * @param {function(*):Buffer} serialize Serialization function + * @param {function(Buffer):*} deserialize Deserialization function + * @return {function(stream)} Binary stream handler + */ +function makeUnaryHandler(handler, serialize, deserialize) { + /** + * Handles a stream by reading a single data value, passing it to the handler, + * and writing the response back to the stream. + * @param {stream} stream Binary data stream + */ + return function handleUnaryCall(stream) { + stream.on('data', function handleUnaryData(value) { + var call = {request: deserialize(value)}; + Object.defineProperty(call, 'cancelled', { + get: function() { return stream.cancelled;} + }); + handler(call, function sendUnaryData(err, value) { + if (err) { + stream.emit('error', err); + } else { + stream.write(serialize(value)); + stream.end(); + } + }); + }); + }; +} + +/** + * Creates a binary stream handler function from a client stream handler + * function + * @param {function(Readable, function(Error, *))} handler Client stream call + * handler + * @param {function(*):Buffer} serialize Serialization function + * @param {function(Buffer):*} deserialize Deserialization function + * @return {function(stream)} Binary stream handler + */ +function makeClientStreamHandler(handler, serialize, deserialize) { + /** + * Handles a stream by passing a deserializing stream to the handler and + * writing the response back to the stream. + * @param {stream} stream Binary data stream + */ + return function handleClientStreamCall(stream) { + var object_stream = new ServerReadableObjectStream(stream, deserialize, {}); + handler(object_stream, function sendClientStreamData(err, value) { + if (err) { + stream.emit('error', err); + } else { + stream.write(serialize(value)); + stream.end(); + } + }); + }; +} + +/** + * Creates a binary stream handler function from a server stream handler + * function + * @param {function(Writable)} handler Server stream call handler + * @param {function(*):Buffer} serialize Serialization function + * @param {function(Buffer):*} deserialize Deserialization function + * @return {function(stream)} Binary stream handler + */ +function makeServerStreamHandler(handler, serialize, deserialize) { + /** + * Handles a stream by attaching it to a serializing stream, and passing it to + * the handler. + * @param {stream} stream Binary data stream + */ + return function handleServerStreamCall(stream) { + stream.on('data', function handleClientData(value) { + var object_stream = new ServerWritableObjectStream(stream, + serialize, + {}); + object_stream.request = deserialize(value); + handler(object_stream); + }); + }; +} + +/** + * Creates a binary stream handler function from a bidi stream handler function + * @param {function(Duplex)} handler Unary call handler + * @param {function(*):Buffer} serialize Serialization function + * @param {function(Buffer):*} deserialize Deserialization function + * @return {function(stream)} Binary stream handler + */ +function makeBidiStreamHandler(handler, serialize, deserialize) { + /** + * Handles a stream by wrapping it in a serializing and deserializing object + * stream, and passing it to the handler. + * @param {stream} stream Binary data stream + */ + return function handleBidiStreamCall(stream) { + var object_stream = new ServerBidiObjectStream(stream, + serialize, + deserialize, + {}); + handler(object_stream); + }; +} + +/** + * Map with short names for each of the handler maker functions. Used in + * makeServerConstructor + */ +var handler_makers = { + unary: makeUnaryHandler, + server_stream: makeServerStreamHandler, + client_stream: makeClientStreamHandler, + bidi: makeBidiStreamHandler +}; + +/** + * Creates a constructor for servers with a service defined by the methods + * object. The methods object has string keys and values of this form: + * {serialize: function, deserialize: function, client_stream: bool, + * server_stream: bool} + * @param {Object} methods Method descriptor for each method the server should + * expose + * @param {string} prefix The prefex to prepend to each method name + * @return {function(Object, Object)} New server constructor + */ +function makeServerConstructor(services) { + var qual_names = []; + _.each(services, function(service) { + _.each(service.children, function(method) { + var name = common.fullyQualifiedName(method); + if (_.indexOf(qual_names, name) !== -1) { + throw new Error('Method ' + name + ' exposed by more than one service'); + } + qual_names.push(name); + }); + }); + /** + * Create a server with the given handlers for all of the methods. + * @constructor + * @param {Object} service_handlers Map from service names to map from method + * names to handlers + * @param {Object} options Options to pass to the underlying server + */ + function SurfaceServer(service_handlers, options) { + var server = new Server(options); + this.inner_server = server; + _.each(services, function(service) { + var service_name = common.fullyQualifiedName(service); + if (service_handlers[service_name] === undefined) { + throw new Error('Handlers for service ' + + service_name + ' not provided.'); + } + var prefix = '/' + common.fullyQualifiedName(service) + '/'; + _.each(service.children, function(method) { + var method_type; + if (method.requestStream) { + if (method.responseStream) { + method_type = 'bidi'; + } else { + method_type = 'client_stream'; + } + } else { + if (method.responseStream) { + method_type = 'server_stream'; + } else { + method_type = 'unary'; + } + } + if (service_handlers[service_name][method.name] === undefined) { + throw new Error('Method handler for ' + + common.fullyQualifiedName(method) + ' not provided.'); + } + var binary_handler = handler_makers[method_type]( + service_handlers[service_name][method.name], + common.serializeCls(method.resolvedResponseType.build()), + common.deserializeCls(method.resolvedRequestType.build())); + server.register(prefix + method.name, binary_handler); + }); + }, this); + } + + /** + * Binds the server to the given port, with SSL enabled if secure is specified + * @param {string} port The port that the server should bind on, in the format + * "address:port" + * @param {boolean=} secure Whether the server should open a secure port + * @return {SurfaceServer} this + */ + SurfaceServer.prototype.bind = function(port, secure) { + this.inner_server.bind(port, secure); + return this; + }; + + /** + * Starts the server listening on any bound ports + * @return {SurfaceServer} this + */ + SurfaceServer.prototype.listen = function() { + this.inner_server.start(); + return this; + }; + + /** + * Shuts the server down; tells it to stop listening for new requests and to + * kill old requests. + */ + SurfaceServer.prototype.shutdown = function() { + this.inner_server.shutdown(); + }; + + return SurfaceServer; +} + +/** + * See documentation for makeServerConstructor + */ +exports.makeServerConstructor = makeServerConstructor; diff --git a/src/node/tag.cc b/src/node/tag.cc new file mode 100644 index 00000000000..dc8e523e12e --- /dev/null +++ b/src/node/tag.cc @@ -0,0 +1,101 @@ +/* + * + * Copyright 2014, 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 +#include +#include +#include "tag.h" + +namespace grpc { +namespace node { + +using v8::Handle; +using v8::HandleScope; +using v8::Persistent; +using v8::Value; + +struct tag { + tag(Persistent *tag, Persistent *call) + : persist_tag(tag), persist_call(call) {} + + ~tag() { + persist_tag->Dispose(); + if (persist_call != NULL) { + persist_call->Dispose(); + } + } + Persistent *persist_tag; + Persistent *persist_call; +}; + +void *CreateTag(Handle tag, Handle call) { + NanScope(); + Persistent *persist_tag = new Persistent(); + NanAssignPersistent(*persist_tag, tag); + Persistent *persist_call; + if (call->IsNull() || call->IsUndefined()) { + persist_call = NULL; + } else { + persist_call = new Persistent(); + NanAssignPersistent(*persist_call, call); + } + struct tag *tag_struct = new struct tag(persist_tag, persist_call); + return reinterpret_cast(tag_struct); +} + +Handle GetTagHandle(void *tag) { + NanEscapableScope(); + struct tag *tag_struct = reinterpret_cast(tag); + Handle tag_value = NanNew(*tag_struct->persist_tag); + return NanEscapeScope(tag_value); +} + +bool TagHasCall(void *tag) { + struct tag *tag_struct = reinterpret_cast(tag); + return tag_struct->persist_call != NULL; +} + +Handle TagGetCall(void *tag) { + NanEscapableScope(); + struct tag *tag_struct = reinterpret_cast(tag); + if (tag_struct->persist_call == NULL) { + return NanEscapeScope(NanNull()); + } + Handle call_value = NanNew(*tag_struct->persist_call); + return NanEscapeScope(call_value); +} + +void DestroyTag(void *tag) { delete reinterpret_cast(tag); } + +} // namespace node +} // namespace grpc diff --git a/src/node/tag.h b/src/node/tag.h new file mode 100644 index 00000000000..bdb09252d98 --- /dev/null +++ b/src/node/tag.h @@ -0,0 +1,59 @@ +/* + * + * Copyright 2014, 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 NET_GRPC_NODE_TAG_H_ +#define NET_GRPC_NODE_TAG_H_ + +#include + +namespace grpc { +namespace node { + +/* Create a void* tag that can be passed to various grpc_call functions from + a javascript value and the javascript wrapper for the call. The call can be + null. */ +void *CreateTag(v8::Handle tag, v8::Handle call); +/* Return the javascript value stored in the tag */ +v8::Handle GetTagHandle(void *tag); +/* Returns true if the call was set (non-null) when the tag was created */ +bool TagHasCall(void *tag); +/* Returns the javascript wrapper for the call associated with this tag */ +v8::Handle TagGetCall(void *call); +/* Destroy the tag and all resources it is holding. It is illegal to call any + of these other functions on a tag after it has been destroyed. */ +void DestroyTag(void *tag); + +} // namespace node +} // namespace grpc + +#endif // NET_GRPC_NODE_TAG_H_ diff --git a/src/node/test/call_test.js b/src/node/test/call_test.js new file mode 100644 index 00000000000..e6dc9664f10 --- /dev/null +++ b/src/node/test/call_test.js @@ -0,0 +1,202 @@ +/* + * + * Copyright 2014, 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 assert = require('assert'); +var grpc = require('bindings')('grpc.node'); + +var channel = new grpc.Channel('localhost:7070'); + +/** + * Helper function to return an absolute deadline given a relative timeout in + * seconds. + * @param {number} timeout_secs The number of seconds to wait before timing out + * @return {Date} A date timeout_secs in the future + */ +function getDeadline(timeout_secs) { + var deadline = new Date(); + deadline.setSeconds(deadline.getSeconds() + timeout_secs); + return deadline; +} + +describe('call', function() { + describe('constructor', function() { + it('should reject anything less than 3 arguments', function() { + assert.throws(function() { + new grpc.Call(); + }, TypeError); + assert.throws(function() { + new grpc.Call(channel); + }, TypeError); + assert.throws(function() { + new grpc.Call(channel, 'method'); + }, TypeError); + }); + it('should succeed with a Channel, a string, and a date or number', + function() { + assert.doesNotThrow(function() { + new grpc.Call(channel, 'method', new Date()); + }); + assert.doesNotThrow(function() { + new grpc.Call(channel, 'method', 0); + }); + }); + it('should fail with a closed channel', function() { + var local_channel = new grpc.Channel('hostname'); + local_channel.close(); + assert.throws(function() { + new grpc.Call(channel, 'method'); + }); + }); + it('should fail with other types', function() { + assert.throws(function() { + new grpc.Call({}, 'method', 0); + }, TypeError); + assert.throws(function() { + new grpc.Call(channel, null, 0); + }, TypeError); + assert.throws(function() { + new grpc.Call(channel, 'method', 'now'); + }, TypeError); + }); + }); + describe('addMetadata', function() { + it('should succeed with objects containing keys and values', function() { + var call = new grpc.Call(channel, 'method', getDeadline(1)); + assert.doesNotThrow(function() { + call.addMetadata(); + }); + assert.doesNotThrow(function() { + call.addMetadata({'key' : 'key', + 'value' : new Buffer('value')}); + }); + assert.doesNotThrow(function() { + call.addMetadata({'key' : 'key1', + 'value' : new Buffer('value1')}, + {'key' : 'key2', + 'value' : new Buffer('value2')}); + }); + }); + it('should fail with other parameter types', function() { + var call = new grpc.Call(channel, 'method', getDeadline(1)); + assert.throws(function() { + call.addMetadata(null); + }, TypeError); + assert.throws(function() { + call.addMetadata('value'); + }, TypeError); + assert.throws(function() { + call.addMetadata(5); + }, TypeError); + }); + it('should fail if startInvoke was already called', function(done) { + var call = new grpc.Call(channel, 'method', getDeadline(1)); + call.startInvoke(function() {}, + function() {}, + function() {done();}, + 0); + assert.throws(function() { + call.addMetadata({'key' : 'key', 'value' : new Buffer('value') }); + }, function(err) { + return err.code === grpc.callError.ALREADY_INVOKED; + }); + // Cancel to speed up the test + call.cancel(); + }); + }); + describe('startInvoke', function() { + it('should fail with fewer than 4 arguments', function() { + var call = new grpc.Call(channel, 'method', getDeadline(1)); + assert.throws(function() { + call.startInvoke(); + }, TypeError); + assert.throws(function() { + call.startInvoke(function() {}); + }, TypeError); + assert.throws(function() { + call.startInvoke(function() {}, + function() {}); + }, TypeError); + assert.throws(function() { + call.startInvoke(function() {}, + function() {}, + function() {}); + }, TypeError); + }); + it('should work with 3 args and an int', function(done) { + assert.doesNotThrow(function() { + var call = new grpc.Call(channel, 'method', getDeadline(1)); + call.startInvoke(function() {}, + function() {}, + function() {done();}, + 0); + // Cancel to speed up the test + call.cancel(); + }); + }); + it('should reject incorrectly typed arguments', function() { + var call = new grpc.Call(channel, 'method', getDeadline(1)); + assert.throws(function() { + call.startInvoke(0, 0, 0, 0); + }, TypeError); + assert.throws(function() { + call.startInvoke(function() {}, + function() {}, + function() {}, 'test'); + }); + }); + }); + describe('serverAccept', function() { + it('should fail with fewer than 1 argument1', function() { + var call = new grpc.Call(channel, 'method', getDeadline(1)); + assert.throws(function() { + call.serverAccept(); + }, TypeError); + }); + it('should return an error when called on a client Call', function() { + var call = new grpc.Call(channel, 'method', getDeadline(1)); + assert.throws(function() { + call.serverAccept(function() {}); + }, function(err) { + return err.code === grpc.callError.NOT_ON_CLIENT; + }); + }); + }); + describe('cancel', function() { + it('should succeed', function() { + var call = new grpc.Call(channel, 'method', getDeadline(1)); + assert.doesNotThrow(function() { + call.cancel(); + }); + }); + }); +}); diff --git a/src/node/test/channel_test.js b/src/node/test/channel_test.js new file mode 100644 index 00000000000..4d8cfc4d89c --- /dev/null +++ b/src/node/test/channel_test.js @@ -0,0 +1,88 @@ +/* + * + * Copyright 2014, 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 assert = require('assert'); +var grpc = require('bindings')('grpc.node'); + +describe('channel', function() { + describe('constructor', function() { + it('should require a string for the first argument', function() { + assert.doesNotThrow(function() { + new grpc.Channel('hostname'); + }); + assert.throws(function() { + new grpc.Channel(); + }, TypeError); + assert.throws(function() { + new grpc.Channel(5); + }); + }); + it('should accept an object for the second parameter', function() { + assert.doesNotThrow(function() { + new grpc.Channel('hostname', {}); + }); + assert.throws(function() { + new grpc.Channel('hostname', 5); + }); + }); + it('should only accept objects with string or int values', function() { + assert.doesNotThrow(function() { + new grpc.Channel('hostname', {'key' : 'value'}); + }); + assert.doesNotThrow(function() { + new grpc.Channel('hostname', {'key' : 5}); + }); + assert.throws(function() { + new grpc.Channel('hostname', {'key' : null}); + }); + assert.throws(function() { + new grpc.Channel('hostname', {'key' : new Date()}); + }); + }); + }); + describe('close', function() { + it('should succeed silently', function() { + var channel = new grpc.Channel('hostname', {}); + assert.doesNotThrow(function() { + channel.close(); + }); + }); + it('should be idempotent', function() { + var channel = new grpc.Channel('hostname', {}); + assert.doesNotThrow(function() { + channel.close(); + channel.close(); + }); + }); + }); +}); diff --git a/src/node/test/client_server_test.js b/src/node/test/client_server_test.js new file mode 100644 index 00000000000..534a5c464fb --- /dev/null +++ b/src/node/test/client_server_test.js @@ -0,0 +1,183 @@ +/* + * + * Copyright 2014, 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 assert = require('assert'); +var fs = require('fs'); +var path = require('path'); +var grpc = require('bindings')('grpc.node'); +var Server = require('../server'); +var client = require('../client'); +var port_picker = require('../port_picker'); +var common = require('../common'); +var _ = require('highland'); + +var ca_path = path.join(__dirname, 'data/ca.pem'); + +var key_path = path.join(__dirname, 'data/server1.key'); + +var pem_path = path.join(__dirname, 'data/server1.pem'); + +/** + * Helper function to return an absolute deadline given a relative timeout in + * seconds. + * @param {number} timeout_secs The number of seconds to wait before timing out + * @return {Date} A date timeout_secs in the future + */ +function getDeadline(timeout_secs) { + var deadline = new Date(); + deadline.setSeconds(deadline.getSeconds() + timeout_secs); + return deadline; +} + +/** + * Responds to every request with the same data as a response + * @param {Stream} stream + */ +function echoHandler(stream) { + stream.pipe(stream); +} + +/** + * Responds to every request with an error status + * @param {Stream} stream + */ +function errorHandler(stream) { + throw { + 'code' : grpc.status.UNIMPLEMENTED, + 'details' : 'error details' + }; +} + +describe('echo client', function() { + it('should receive echo responses', function(done) { + port_picker.nextAvailablePort(function(port) { + var server = new Server(); + server.bind(port); + server.register('echo', echoHandler); + server.start(); + + var messages = ['echo1', 'echo2', 'echo3', 'echo4']; + var channel = new grpc.Channel(port); + var stream = client.makeRequest( + channel, + 'echo'); + _(messages).map(function(val) { + return new Buffer(val); + }).pipe(stream); + var index = 0; + stream.on('data', function(chunk) { + assert.equal(messages[index], chunk.toString()); + index += 1; + }); + stream.on('end', function() { + server.shutdown(); + done(); + }); + }); + }); + it('should get an error status that the server throws', function(done) { + port_picker.nextAvailablePort(function(port) { + var server = new Server(); + server.bind(port); + server.register('error', errorHandler); + server.start(); + + var channel = new grpc.Channel(port); + var stream = client.makeRequest( + channel, + 'error', + null, + getDeadline(1)); + + stream.on('data', function() {}); + stream.write(new Buffer('test')); + stream.end(); + stream.on('status', function(status) { + assert.equal(status.code, grpc.status.UNIMPLEMENTED); + assert.equal(status.details, 'error details'); + server.shutdown(); + done(); + }); + + }); + }); +}); +/* TODO(mlumish): explore options for reducing duplication between this test + * and the insecure echo client test */ +describe('secure echo client', function() { + it('should recieve echo responses', function(done) { + port_picker.nextAvailablePort(function(port) { + fs.readFile(ca_path, function(err, ca_data) { + assert.ifError(err); + fs.readFile(key_path, function(err, key_data) { + assert.ifError(err); + fs.readFile(pem_path, function(err, pem_data) { + assert.ifError(err); + var creds = grpc.Credentials.createSsl(ca_data); + var server_creds = grpc.ServerCredentials.createSsl(null, + key_data, + pem_data); + + var server = new Server({'credentials' : server_creds}); + server.bind(port, true); + server.register('echo', echoHandler); + server.start(); + + var messages = ['echo1', 'echo2', 'echo3', 'echo4']; + var channel = new grpc.Channel(port, { + 'grpc.ssl_target_name_override' : 'foo.test.google.com', + 'credentials' : creds + }); + var stream = client.makeRequest( + channel, + 'echo'); + + _(messages).map(function(val) { + return new Buffer(val); + }).pipe(stream); + var index = 0; + stream.on('data', function(chunk) { + assert.equal(messages[index], chunk.toString()); + index += 1; + }); + stream.on('end', function() { + server.shutdown(); + done(); + }); + }); + + }); + }); + }); + }); +}); diff --git a/src/node/test/constant_test.js b/src/node/test/constant_test.js new file mode 100644 index 00000000000..f65eea3cffe --- /dev/null +++ b/src/node/test/constant_test.js @@ -0,0 +1,130 @@ +/* + * + * Copyright 2014, 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 assert = require('assert'); +var grpc = require('bindings')('grpc.node'); + +/** + * List of all status names + * @const + * @type {Array.} + */ +var statusNames = [ + 'OK', + 'CANCELLED', + 'UNKNOWN', + 'INVALID_ARGUMENT', + 'DEADLINE_EXCEEDED', + 'NOT_FOUND', + 'ALREADY_EXISTS', + 'PERMISSION_DENIED', + 'UNAUTHENTICATED', + 'RESOURCE_EXHAUSTED', + 'FAILED_PRECONDITION', + 'ABORTED', + 'OUT_OF_RANGE', + 'UNIMPLEMENTED', + 'INTERNAL', + 'UNAVAILABLE', + 'DATA_LOSS' +]; + +/** + * List of all call error names + * @const + * @type {Array.} + */ +var callErrorNames = [ + 'OK', + 'ERROR', + 'NOT_ON_SERVER', + 'NOT_ON_CLIENT', + 'ALREADY_INVOKED', + 'NOT_INVOKED', + 'ALREADY_FINISHED', + 'TOO_MANY_OPERATIONS', + 'INVALID_FLAGS' +]; + +/** + * List of all op error names + * @const + * @type {Array.} + */ +var opErrorNames = [ + 'OK', + 'ERROR' +]; + +/** + * List of all completion type names + * @const + * @type {Array.} + */ +var completionTypeNames = [ + 'QUEUE_SHUTDOWN', + 'READ', + 'INVOKE_ACCEPTED', + 'WRITE_ACCEPTED', + 'FINISH_ACCEPTED', + 'CLIENT_METADATA_READ', + 'FINISHED', + 'SERVER_RPC_NEW' +]; + +describe('constants', function() { + it('should have all of the status constants', function() { + for (var i = 0; i < statusNames.length; i++) { + assert(grpc.status.hasOwnProperty(statusNames[i]), + 'status missing: ' + statusNames[i]); + } + }); + it('should have all of the call errors', function() { + for (var i = 0; i < callErrorNames.length; i++) { + assert(grpc.callError.hasOwnProperty(callErrorNames[i]), + 'call error missing: ' + callErrorNames[i]); + } + }); + it('should have all of the op errors', function() { + for (var i = 0; i < opErrorNames.length; i++) { + assert(grpc.opError.hasOwnProperty(opErrorNames[i]), + 'op error missing: ' + opErrorNames[i]); + } + }); + it('should have all of the completion types', function() { + for (var i = 0; i < completionTypeNames.length; i++) { + assert(grpc.completionType.hasOwnProperty(completionTypeNames[i]), + 'completion type missing: ' + completionTypeNames[i]); + } + }); +}); diff --git a/src/node/test/data/README b/src/node/test/data/README new file mode 100644 index 00000000000..888d95b9004 --- /dev/null +++ b/src/node/test/data/README @@ -0,0 +1 @@ +CONFIRMEDTESTKEY diff --git a/src/node/test/data/ca.pem b/src/node/test/data/ca.pem new file mode 100644 index 00000000000..6c8511a73c6 --- /dev/null +++ b/src/node/test/data/ca.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSjCCAbOgAwIBAgIJAJHGGR4dGioHMA0GCSqGSIb3DQEBCwUAMFYxCzAJBgNV +BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX +aWRnaXRzIFB0eSBMdGQxDzANBgNVBAMTBnRlc3RjYTAeFw0xNDExMTEyMjMxMjla +Fw0yNDExMDgyMjMxMjlaMFYxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0 +YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDzANBgNVBAMT +BnRlc3RjYTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwEDfBV5MYdlHVHJ7 ++L4nxrZy7mBfAVXpOc5vMYztssUI7mL2/iYujiIXM+weZYNTEpLdjyJdu7R5gGUu +g1jSVK/EPHfc74O7AyZU34PNIP4Sh33N+/A5YexrNgJlPY+E3GdVYi4ldWJjgkAd +Qah2PH5ACLrIIC6tRka9hcaBlIECAwEAAaMgMB4wDAYDVR0TBAUwAwEB/zAOBgNV +HQ8BAf8EBAMCAgQwDQYJKoZIhvcNAQELBQADgYEAHzC7jdYlzAVmddi/gdAeKPau +sPBG/C2HCWqHzpCUHcKuvMzDVkY/MP2o6JIW2DBbY64bO/FceExhjcykgaYtCH/m +oIU63+CFOTtR7otyQAWHqXa7q4SbCDlG7DyRFxqG0txPtGvy12lgldA2+RgcigQG +Dfcog5wrJytaQ6UA0wE= +-----END CERTIFICATE----- diff --git a/src/node/test/data/server1.key b/src/node/test/data/server1.key new file mode 100644 index 00000000000..143a5b87658 --- /dev/null +++ b/src/node/test/data/server1.key @@ -0,0 +1,16 @@ +-----BEGIN PRIVATE KEY----- +MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAOHDFScoLCVJpYDD +M4HYtIdV6Ake/sMNaaKdODjDMsux/4tDydlumN+fm+AjPEK5GHhGn1BgzkWF+slf +3BxhrA/8dNsnunstVA7ZBgA/5qQxMfGAq4wHNVX77fBZOgp9VlSMVfyd9N8YwbBY +AckOeUQadTi2X1S6OgJXgQ0m3MWhAgMBAAECgYAn7qGnM2vbjJNBm0VZCkOkTIWm +V10okw7EPJrdL2mkre9NasghNXbE1y5zDshx5Nt3KsazKOxTT8d0Jwh/3KbaN+YY +tTCbKGW0pXDRBhwUHRcuRzScjli8Rih5UOCiZkhefUTcRb6xIhZJuQy71tjaSy0p +dHZRmYyBYO2YEQ8xoQJBAPrJPhMBkzmEYFtyIEqAxQ/o/A6E+E4w8i+KM7nQCK7q +K4JXzyXVAjLfyBZWHGM2uro/fjqPggGD6QH1qXCkI4MCQQDmdKeb2TrKRh5BY1LR +81aJGKcJ2XbcDu6wMZK4oqWbTX2KiYn9GB0woM6nSr/Y6iy1u145YzYxEV/iMwff +DJULAkB8B2MnyzOg0pNFJqBJuH29bKCcHa8gHJzqXhNO5lAlEbMK95p/P2Wi+4Hd +aiEIAF1BF326QJcvYKmwSmrORp85AkAlSNxRJ50OWrfMZnBgzVjDx3xG6KsFQVk2 +ol6VhqL6dFgKUORFUWBvnKSyhjJxurlPEahV6oo6+A+mPhFY8eUvAkAZQyTdupP3 +XEFQKctGz+9+gKkemDp7LBBMEMBXrGTLPhpEfcjv/7KPdnFHYmhYeBTBnuVmTVWe +F98XJ7tIFfJq +-----END PRIVATE KEY----- diff --git a/src/node/test/data/server1.pem b/src/node/test/data/server1.pem new file mode 100644 index 00000000000..8e582e571f6 --- /dev/null +++ b/src/node/test/data/server1.pem @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE----- +MIICmzCCAgSgAwIBAgIBAzANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJBVTET +MBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQ +dHkgTHRkMQ8wDQYDVQQDDAZ0ZXN0Y2EwHhcNMTQwNzIyMDYwMDU3WhcNMjQwNzE5 +MDYwMDU3WjBkMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV +BAcTB0NoaWNhZ28xFDASBgNVBAoTC0dvb2dsZSBJbmMuMRowGAYDVQQDFBEqLnRl +c3QuZ29vZ2xlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA4cMVJygs +JUmlgMMzgdi0h1XoCR7+ww1pop04OMMyy7H/i0PJ2W6Y35+b4CM8QrkYeEafUGDO +RYX6yV/cHGGsD/x02ye6ey1UDtkGAD/mpDEx8YCrjAc1Vfvt8Fk6Cn1WVIxV/J30 +3xjBsFgByQ55RBp1OLZfVLo6AleBDSbcxaECAwEAAaNrMGkwCQYDVR0TBAIwADAL +BgNVHQ8EBAMCBeAwTwYDVR0RBEgwRoIQKi50ZXN0Lmdvb2dsZS5mcoIYd2F0ZXJ6 +b29pLnRlc3QuZ29vZ2xlLmJlghIqLnRlc3QueW91dHViZS5jb22HBMCoAQMwDQYJ +KoZIhvcNAQEFBQADgYEAM2Ii0LgTGbJ1j4oqX9bxVcxm+/R5Yf8oi0aZqTJlnLYS +wXcBykxTx181s7WyfJ49WwrYXo78zTDAnf1ma0fPq3e4mpspvyndLh1a+OarHa1e +aT0DIIYk7qeEa1YcVljx2KyLd0r1BBAfrwyGaEPVeJQVYWaOJRU2we/KD4ojf9s= +-----END CERTIFICATE----- diff --git a/src/node/test/end_to_end_test.js b/src/node/test/end_to_end_test.js new file mode 100644 index 00000000000..40bb5f3bbde --- /dev/null +++ b/src/node/test/end_to_end_test.js @@ -0,0 +1,201 @@ +/* + * + * Copyright 2014, 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 assert = require('assert'); +var grpc = require('bindings')('grpc.node'); +var port_picker = require('../port_picker'); + +/** + * This is used for testing functions with multiple asynchronous calls that + * can happen in different orders. This should be passed the number of async + * function invocations that can occur last, and each of those should call this + * function's return value + * @param {function()} done The function that should be called when a test is + * complete. + * @param {number} count The number of calls to the resulting function if the + * test passes. + * @return {function()} The function that should be called at the end of each + * sequence of asynchronous functions. + */ +function multiDone(done, count) { + return function() { + count -= 1; + if (count <= 0) { + done(); + } + }; +} + +describe('end-to-end', function() { + it('should start and end a request without error', function(complete) { + port_picker.nextAvailablePort(function(port) { + var server = new grpc.Server(); + var done = multiDone(function() { + complete(); + server.shutdown(); + }, 2); + server.addHttp2Port(port); + var channel = new grpc.Channel(port); + var deadline = new Date(); + deadline.setSeconds(deadline.getSeconds() + 3); + var status_text = 'xyz'; + var call = new grpc.Call(channel, + 'dummy_method', + deadline); + call.startInvoke(function(event) { + assert.strictEqual(event.type, + grpc.completionType.INVOKE_ACCEPTED); + + call.writesDone(function(event) { + assert.strictEqual(event.type, + grpc.completionType.FINISH_ACCEPTED); + assert.strictEqual(event.data, grpc.opError.OK); + }); + },function(event) { + assert.strictEqual(event.type, + grpc.completionType.CLIENT_METADATA_READ); + },function(event) { + assert.strictEqual(event.type, grpc.completionType.FINISHED); + var status = event.data; + assert.strictEqual(status.code, grpc.status.OK); + assert.strictEqual(status.details, status_text); + done(); + }, 0); + + server.start(); + server.requestCall(function(event) { + assert.strictEqual(event.type, grpc.completionType.SERVER_RPC_NEW); + var server_call = event.call; + assert.notEqual(server_call, null); + server_call.serverAccept(function(event) { + assert.strictEqual(event.type, grpc.completionType.FINISHED); + }, 0); + server_call.serverEndInitialMetadata(0); + server_call.startWriteStatus( + grpc.status.OK, + status_text, + function(event) { + assert.strictEqual(event.type, + grpc.completionType.FINISH_ACCEPTED); + assert.strictEqual(event.data, grpc.opError.OK); + done(); + }); + }); + }); + }); + + it('should send and receive data without error', function(complete) { + port_picker.nextAvailablePort(function(port) { + var req_text = 'client_request'; + var reply_text = 'server_response'; + var server = new grpc.Server(); + var done = multiDone(function() { + complete(); + server.shutdown(); + }, 6); + server.addHttp2Port(port); + var channel = new grpc.Channel(port); + var deadline = new Date(); + deadline.setSeconds(deadline.getSeconds() + 3); + var status_text = 'success'; + var call = new grpc.Call(channel, + 'dummy_method', + deadline); + call.startInvoke(function(event) { + assert.strictEqual(event.type, + grpc.completionType.INVOKE_ACCEPTED); + call.startWrite( + new Buffer(req_text), + function(event) { + assert.strictEqual(event.type, + grpc.completionType.WRITE_ACCEPTED); + assert.strictEqual(event.data, grpc.opError.OK); + call.writesDone(function(event) { + assert.strictEqual(event.type, + grpc.completionType.FINISH_ACCEPTED); + assert.strictEqual(event.data, grpc.opError.OK); + done(); + }); + }, 0); + call.startRead(function(event) { + assert.strictEqual(event.type, grpc.completionType.READ); + assert.strictEqual(event.data.toString(), reply_text); + done(); + }); + },function(event) { + assert.strictEqual(event.type, + grpc.completionType.CLIENT_METADATA_READ); + done(); + },function(event) { + assert.strictEqual(event.type, grpc.completionType.FINISHED); + var status = event.data; + assert.strictEqual(status.code, grpc.status.OK); + assert.strictEqual(status.details, status_text); + done(); + }, 0); + + server.start(); + server.requestCall(function(event) { + assert.strictEqual(event.type, grpc.completionType.SERVER_RPC_NEW); + var server_call = event.call; + assert.notEqual(server_call, null); + server_call.serverAccept(function(event) { + assert.strictEqual(event.type, grpc.completionType.FINISHED); + done(); + }); + server_call.serverEndInitialMetadata(0); + server_call.startRead(function(event) { + assert.strictEqual(event.type, grpc.completionType.READ); + assert.strictEqual(event.data.toString(), req_text); + server_call.startWrite( + new Buffer(reply_text), + function(event) { + assert.strictEqual(event.type, + grpc.completionType.WRITE_ACCEPTED); + assert.strictEqual(event.data, + grpc.opError.OK); + server_call.startWriteStatus( + grpc.status.OK, + status_text, + function(event) { + assert.strictEqual(event.type, + grpc.completionType.FINISH_ACCEPTED); + assert.strictEqual(event.data, grpc.opError.OK); + done(); + }); + }, 0); + }); + }); + }); + }); +}); diff --git a/src/node/test/math_client_test.js b/src/node/test/math_client_test.js new file mode 100644 index 00000000000..45c956d1793 --- /dev/null +++ b/src/node/test/math_client_test.js @@ -0,0 +1,121 @@ +/* + * + * Copyright 2014, 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 assert = require('assert'); +var port_picker = require('../port_picker'); + +var grpc = require('..'); +var math = grpc.load(__dirname + '/../examples/math.proto').math; + +/** + * Client to use to make requests to a running server. + */ +var math_client; + +/** + * Server to test against + */ +var server = require('../examples/math_server.js'); + + +describe('Math client', function() { + before(function(done) { + port_picker.nextAvailablePort(function(port) { + server.bind(port).listen(); + math_client = new math.Math(port); + done(); + }); + }); + after(function() { + server.shutdown(); + }); + it('should handle a single request', function(done) { + var arg = {dividend: 7, divisor: 4}; + var call = math_client.Div(arg, function handleDivResult(err, value) { + assert.ifError(err); + assert.equal(value.quotient, 1); + assert.equal(value.remainder, 3); + }); + call.on('status', function checkStatus(status) { + assert.strictEqual(status.code, grpc.status.OK); + done(); + }); + }); + it('should handle a server streaming request', function(done) { + var call = math_client.Fib({limit: 7}); + var expected_results = [1, 1, 2, 3, 5, 8, 13]; + var next_expected = 0; + call.on('data', function checkResponse(value) { + assert.equal(value.num, expected_results[next_expected]); + next_expected += 1; + }); + call.on('status', function checkStatus(status) { + assert.strictEqual(status.code, grpc.status.OK); + done(); + }); + }); + it('should handle a client streaming request', function(done) { + var call = math_client.Sum(function handleSumResult(err, value) { + assert.ifError(err); + assert.equal(value.num, 21); + }); + for (var i = 0; i < 7; i++) { + call.write({'num': i}); + } + call.end(); + call.on('status', function checkStatus(status) { + assert.strictEqual(status.code, grpc.status.OK); + done(); + }); + }); + it('should handle a bidirectional streaming request', function(done) { + function checkResponse(index, value) { + assert.equal(value.quotient, index); + assert.equal(value.remainder, 1); + } + var call = math_client.DivMany(); + var response_index = 0; + call.on('data', function(value) { + checkResponse(response_index, value); + response_index += 1; + }); + for (var i = 0; i < 7; i++) { + call.write({dividend: 2 * i + 1, divisor: 2}); + } + call.end(); + call.on('status', function checkStatus(status) { + assert.strictEqual(status.code, grpc.status.OK); + done(); + }); + }); +}); diff --git a/src/node/test/server_test.js b/src/node/test/server_test.js new file mode 100644 index 00000000000..79f7b329485 --- /dev/null +++ b/src/node/test/server_test.js @@ -0,0 +1,121 @@ +/* + * + * Copyright 2014, 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 assert = require('assert'); +var grpc = require('bindings')('grpc.node'); +var Server = require('../server'); +var port_picker = require('../port_picker'); + +/** + * This is used for testing functions with multiple asynchronous calls that + * can happen in different orders. This should be passed the number of async + * function invocations that can occur last, and each of those should call this + * function's return value + * @param {function()} done The function that should be called when a test is + * complete. + * @param {number} count The number of calls to the resulting function if the + * test passes. + * @return {function()} The function that should be called at the end of each + * sequence of asynchronous functions. + */ +function multiDone(done, count) { + return function() { + count -= 1; + if (count <= 0) { + done(); + } + }; +} + +/** + * Responds to every request with the same data as a response + * @param {Stream} stream + */ +function echoHandler(stream) { + stream.pipe(stream); +} + +describe('echo server', function() { + it('should echo inputs as responses', function(done) { + done = multiDone(done, 4); + port_picker.nextAvailablePort(function(port) { + var server = new Server(); + server.bind(port); + server.register('echo', echoHandler); + server.start(); + + var req_text = 'echo test string'; + var status_text = 'OK'; + + var channel = new grpc.Channel(port); + var deadline = new Date(); + deadline.setSeconds(deadline.getSeconds() + 3); + var call = new grpc.Call(channel, + 'echo', + deadline); + call.startInvoke(function(event) { + assert.strictEqual(event.type, + grpc.completionType.INVOKE_ACCEPTED); + call.startWrite( + new Buffer(req_text), + function(event) { + assert.strictEqual(event.type, + grpc.completionType.WRITE_ACCEPTED); + assert.strictEqual(event.data, grpc.opError.OK); + call.writesDone(function(event) { + assert.strictEqual(event.type, + grpc.completionType.FINISH_ACCEPTED); + assert.strictEqual(event.data, grpc.opError.OK); + done(); + }); + }, 0); + call.startRead(function(event) { + assert.strictEqual(event.type, grpc.completionType.READ); + assert.strictEqual(event.data.toString(), req_text); + done(); + }); + },function(event) { + assert.strictEqual(event.type, + grpc.completionType.CLIENT_METADATA_READ); + done(); + },function(event) { + assert.strictEqual(event.type, grpc.completionType.FINISHED); + var status = event.data; + assert.strictEqual(status.code, grpc.status.OK); + assert.strictEqual(status.details, status_text); + server.shutdown(); + done(); + }, 0); + }); + }); +}); diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js new file mode 100644 index 00000000000..8d0d8ec3bc9 --- /dev/null +++ b/src/node/test/surface_test.js @@ -0,0 +1,75 @@ +/* + * + * Copyright 2014, 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 assert = require('assert'); + +var surface_server = require('../surface_server.js'); + +var ProtoBuf = require('protobufjs'); + +var grpc = require('..'); + +var math_proto = ProtoBuf.loadProtoFile(__dirname + '/../examples/math.proto'); + +var mathService = math_proto.lookup('math.Math'); + +describe('Surface server constructor', function() { + it('Should fail with conflicting method names', function() { + assert.throws(function() { + grpc.buildServer([mathService, mathService]); + }); + }); + it('Should succeed with a single service', function() { + assert.doesNotThrow(function() { + grpc.buildServer([mathService]); + }); + }); + it('Should fail with missing handlers', function() { + var Server = grpc.buildServer([mathService]); + assert.throws(function() { + new Server({ + 'math.Math': { + 'Div': function() {}, + 'DivMany': function() {}, + 'Fib': function() {} + } + }); + }, /math.Math.Sum/); + }); + it('Should fail with no handlers for the service', function() { + var Server = grpc.buildServer([mathService]); + assert.throws(function() { + new Server({}); + }, /math.Math/); + }); +}); diff --git a/src/node/timeval.cc b/src/node/timeval.cc new file mode 100644 index 00000000000..687e33576b4 --- /dev/null +++ b/src/node/timeval.cc @@ -0,0 +1,66 @@ +/* + * + * Copyright 2014, 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 + +#include "grpc/grpc.h" +#include "grpc/support/time.h" +#include "timeval.h" + +namespace grpc { +namespace node { + +gpr_timespec MillisecondsToTimespec(double millis) { + if (millis == std::numeric_limits::infinity()) { + return gpr_inf_future; + } else if (millis == -std::numeric_limits::infinity()) { + return gpr_inf_past; + } else { + return gpr_time_from_micros(static_cast(millis * 1000)); + } +} + +double TimespecToMilliseconds(gpr_timespec timespec) { + if (gpr_time_cmp(timespec, gpr_inf_future) == 0) { + return std::numeric_limits::infinity(); + } else if (gpr_time_cmp(timespec, gpr_inf_past) == 0) { + return -std::numeric_limits::infinity(); + } else { + struct timeval time = gpr_timeval_from_timespec(timespec); + return (static_cast(time.tv_sec) * 1000 + + static_cast(time.tv_usec) / 1000); + } +} + +} // namespace node +} // namespace grpc diff --git a/src/node/timeval.h b/src/node/timeval.h new file mode 100644 index 00000000000..1fb0f2c690f --- /dev/null +++ b/src/node/timeval.h @@ -0,0 +1,48 @@ +/* + * + * Copyright 2014, 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 NET_GRPC_NODE_TIMEVAL_H_ +#define NET_GRPC_NODE_TIMEVAL_H_ + +#include "grpc/support/time.h" + +namespace grpc { +namespace node { + +double TimespecToMilliseconds(gpr_timespec time); +gpr_timespec MillisecondsToTimespec(double millis); + +} // namespace node +} // namespace grpc + +#endif // NET_GRPC_NODE_TIMEVAL_H_ diff --git a/src/php/.gitignore b/src/php/.gitignore old mode 100755 new mode 100644 index 00fbd965dc2..0bb5f8e9566 --- a/src/php/.gitignore +++ b/src/php/.gitignore @@ -15,4 +15,7 @@ run-tests.php install-sh libtool missing -mkinstalldirs \ No newline at end of file +mkinstalldirs + +ext/grpc/ltmain.sh + diff --git a/src/php/bin/run_tests.sh b/src/php/bin/run_tests.sh index cf4cc78a52e..28282c3e37c 100755 --- a/src/php/bin/run_tests.sh +++ b/src/php/bin/run_tests.sh @@ -1,5 +1,17 @@ +#!/bin/sh # Loads the local shared library, and runs all of the test cases in tests/ # against it +set -e cd $(dirname $0) -php -d extension_dir=../ext/grpc/modules/ -d extension=grpc.so \ - /usr/local/bin/phpunit -v --debug --strict ../tests/unit_tests +default_extension_dir=`php -i | grep extension_dir | sed 's/.*=> //g'` + +# sym-link in system supplied extensions +for f in $default_extension_dir/*.so +do + ln -s $f ../ext/grpc/modules/$(basename $f) &> /dev/null || true +done + +php \ + -d extension_dir=../ext/grpc/modules/ \ + -d extension=grpc.so \ + `which phpunit` -v --debug --strict ../tests/unit_tests diff --git a/src/php/ext/grpc/byte_buffer.c b/src/php/ext/grpc/byte_buffer.c old mode 100755 new mode 100644 index db018313a76..e2f63e3413b --- a/src/php/ext/grpc/byte_buffer.c +++ b/src/php/ext/grpc/byte_buffer.c @@ -21,16 +21,15 @@ grpc_byte_buffer *string_to_byte_buffer(char *string, size_t length) { return grpc_byte_buffer_create(&slice, 1); } -void byte_buffer_to_string(grpc_byte_buffer *buffer, - char **out_string, +void byte_buffer_to_string(grpc_byte_buffer *buffer, char **out_string, size_t *out_length) { size_t length = grpc_byte_buffer_length(buffer); - char *string = ecalloc(length+1, sizeof(char)); + char *string = ecalloc(length + 1, sizeof(char)); size_t offset = 0; grpc_byte_buffer_reader *reader = grpc_byte_buffer_reader_create(buffer); gpr_slice next; - while(grpc_byte_buffer_reader_next(reader, &next) != 0) { - memcpy(string+offset, GPR_SLICE_START_PTR(next), GPR_SLICE_LENGTH(next)); + while (grpc_byte_buffer_reader_next(reader, &next) != 0) { + memcpy(string + offset, GPR_SLICE_START_PTR(next), GPR_SLICE_LENGTH(next)); offset += GPR_SLICE_LENGTH(next); } *out_string = string; diff --git a/src/php/ext/grpc/byte_buffer.h b/src/php/ext/grpc/byte_buffer.h old mode 100755 new mode 100644 index 1dd4769de24..b83f734caf3 --- a/src/php/ext/grpc/byte_buffer.h +++ b/src/php/ext/grpc/byte_buffer.h @@ -5,8 +5,7 @@ grpc_byte_buffer *string_to_byte_buffer(char *string, size_t length); -void byte_buffer_to_string(grpc_byte_buffer *buffer, - char **out_string, +void byte_buffer_to_string(grpc_byte_buffer *buffer, char **out_string, size_t *out_length); #endif /* NET_GRPC_PHP_GRPC_BYTE_BUFFER_H_ */ diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c old mode 100755 new mode 100644 index 7f4f221caa0..410efbce681 --- a/src/php/ext/grpc/call.c +++ b/src/php/ext/grpc/call.c @@ -24,9 +24,9 @@ #include "byte_buffer.h" /* Frees and destroys an instance of wrapped_grpc_call */ -void free_wrapped_grpc_call(void *object TSRMLS_DC){ - wrapped_grpc_call *call = (wrapped_grpc_call*)object; - if(call->owned && call->wrapped != NULL){ +void free_wrapped_grpc_call(void *object TSRMLS_DC) { + wrapped_grpc_call *call = (wrapped_grpc_call *)object; + if (call->owned && call->wrapped != NULL) { grpc_call_destroy(call->wrapped); } efree(call); @@ -34,38 +34,36 @@ void free_wrapped_grpc_call(void *object TSRMLS_DC){ /* Initializes an instance of wrapped_grpc_call to be associated with an object * of a class specified by class_type */ -zend_object_value create_wrapped_grpc_call( - zend_class_entry *class_type TSRMLS_DC){ +zend_object_value create_wrapped_grpc_call(zend_class_entry *class_type + TSRMLS_DC) { zend_object_value retval; wrapped_grpc_call *intern; - intern = (wrapped_grpc_call*)emalloc(sizeof(wrapped_grpc_call)); + intern = (wrapped_grpc_call *)emalloc(sizeof(wrapped_grpc_call)); memset(intern, 0, sizeof(wrapped_grpc_call)); zend_object_std_init(&intern->std, class_type TSRMLS_CC); object_properties_init(&intern->std, class_type); retval.handle = zend_objects_store_put( - intern, - (zend_objects_store_dtor_t) zend_objects_destroy_object, - free_wrapped_grpc_call, - NULL TSRMLS_CC); + intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, + free_wrapped_grpc_call, NULL TSRMLS_CC); retval.handlers = zend_get_std_object_handlers(); return retval; } /* Wraps a grpc_call struct in a PHP object. Owned indicates whether the struct should be destroyed at the end of the object's lifecycle */ -zval *grpc_php_wrap_call(grpc_call *wrapped, bool owned){ +zval *grpc_php_wrap_call(grpc_call *wrapped, bool owned) { zval *call_object; MAKE_STD_ZVAL(call_object); object_init_ex(call_object, grpc_ce_call); - wrapped_grpc_call *call = (wrapped_grpc_call*)zend_object_store_get_object( - call_object TSRMLS_CC); + wrapped_grpc_call *call = + (wrapped_grpc_call *)zend_object_store_get_object(call_object TSRMLS_CC); call->wrapped = wrapped; return call_object; } -zval *grpc_call_create_metadata_array(int count, grpc_metadata *elements){ +zval *grpc_call_create_metadata_array(int count, grpc_metadata *elements) { int i; zval *array; zval **data = NULL; @@ -78,18 +76,16 @@ zval *grpc_call_create_metadata_array(int count, grpc_metadata *elements){ array_init(array); array_hash = Z_ARRVAL_P(array); grpc_metadata *elem; - for(i=0; ikey); - str_key = ecalloc(key_len+1, sizeof(char)); + str_key = ecalloc(key_len + 1, sizeof(char)); memcpy(str_key, elem->key, key_len); - str_val = ecalloc(elem->value_length+1, sizeof(char)); + str_val = ecalloc(elem->value_length + 1, sizeof(char)); memcpy(str_val, elem->value, elem->value_length); - if(zend_hash_find(array_hash, - str_key, - key_len, - (void**)data) == SUCCESS){ - switch(Z_TYPE_P(*data)){ + if (zend_hash_find(array_hash, str_key, key_len, (void **)data) == + SUCCESS) { + switch (Z_TYPE_P(*data)) { case IS_STRING: MAKE_STD_ZVAL(inner_array); array_init(inner_array); @@ -107,44 +103,36 @@ zval *grpc_call_create_metadata_array(int count, grpc_metadata *elements){ efree(str_val); return NULL; } - add_next_index_stringl(inner_array, - str_val, - elem->value_length, - false); + add_next_index_stringl(inner_array, str_val, elem->value_length, false); } else { - add_assoc_stringl(array, - str_key, - str_val, - elem->value_length, - false); + add_assoc_stringl(array, str_key, str_val, elem->value_length, false); } } return array; } -int php_grpc_call_add_metadata_array_walk(void *elem TSRMLS_DC, - int num_args, +int php_grpc_call_add_metadata_array_walk(void *elem TSRMLS_DC, int num_args, va_list args, - zend_hash_key *hash_key){ + zend_hash_key *hash_key) { grpc_call_error error_code; - zval **data = (zval**)elem; + zval **data = (zval **)elem; grpc_metadata metadata; - grpc_call *call = va_arg(args, grpc_call*); + grpc_call *call = va_arg(args, grpc_call *); gpr_uint32 flags = va_arg(args, gpr_uint32); const char *key; HashTable *inner_hash; /* We assume that either two args were passed, and we are in the recursive case (and the second argument is the key), or one arg was passed and hash_key is the string key. */ - if(num_args > 2){ - key = va_arg(args, const char*); + if (num_args > 2) { + key = va_arg(args, const char *); } else { /* TODO(mlumish): If possible, check that hash_key is a string */ key = hash_key->arKey; } - switch(Z_TYPE_P(*data)){ + switch (Z_TYPE_P(*data)) { case IS_STRING: - metadata.key = (char*)key; + metadata.key = (char *)key; metadata.value = Z_STRVAL_P(*data); metadata.value_length = Z_STRLEN_P(*data); error_code = grpc_call_add_metadata(call, &metadata, 0u); @@ -153,11 +141,8 @@ int php_grpc_call_add_metadata_array_walk(void *elem TSRMLS_DC, case IS_ARRAY: inner_hash = Z_ARRVAL_P(*data); zend_hash_apply_with_arguments(inner_hash TSRMLS_CC, - php_grpc_call_add_metadata_array_walk, - 3, - call, - flags, - key); + php_grpc_call_add_metadata_array_walk, 3, + call, flags, key); break; default: zend_throw_exception(zend_exception_get_default(), @@ -174,27 +159,26 @@ int php_grpc_call_add_metadata_array_walk(void *elem TSRMLS_DC, * @param string $method The method to call * @param Timeval $absolute_deadline The deadline for completing the call */ -PHP_METHOD(Call, __construct){ - wrapped_grpc_call *call = (wrapped_grpc_call*)zend_object_store_get_object( - getThis() TSRMLS_CC); +PHP_METHOD(Call, __construct) { + wrapped_grpc_call *call = + (wrapped_grpc_call *)zend_object_store_get_object(getThis() TSRMLS_CC); zval *channel_obj; char *method; int method_len; zval *deadline_obj; /* "OsO" == 1 Object, 1 string, 1 Object */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "OsO", - &channel_obj, grpc_ce_channel, - &method, &method_len, - &deadline_obj, grpc_ce_timeval) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OsO", &channel_obj, + grpc_ce_channel, &method, &method_len, + &deadline_obj, grpc_ce_timeval) == FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, "Call expects a Channel, a String, and a Timeval", 1 TSRMLS_CC); return; } wrapped_grpc_channel *channel = - (wrapped_grpc_channel*)zend_object_store_get_object(channel_obj TSRMLS_CC); - if(channel->wrapped == NULL) { + (wrapped_grpc_channel *)zend_object_store_get_object( + channel_obj TSRMLS_CC); + if (channel->wrapped == NULL) { zend_throw_exception(spl_ce_InvalidArgumentException, "Call cannot be constructed from a closed Channel", 1 TSRMLS_CC); @@ -202,11 +186,10 @@ PHP_METHOD(Call, __construct){ } add_property_zval(getThis(), "channel", channel_obj); wrapped_grpc_timeval *deadline = - (wrapped_grpc_timeval*)zend_object_store_get_object(deadline_obj TSRMLS_CC); - call->wrapped = grpc_channel_create_call(channel->wrapped, - method, - channel->target, - deadline->wrapped); + (wrapped_grpc_timeval *)zend_object_store_get_object( + deadline_obj TSRMLS_CC); + call->wrapped = grpc_channel_create_call(channel->wrapped, method, + channel->target, deadline->wrapped); } /** @@ -218,17 +201,15 @@ PHP_METHOD(Call, __construct){ * (optional) * @return Void */ -PHP_METHOD(Call, add_metadata){ - wrapped_grpc_call *call = (wrapped_grpc_call*)zend_object_store_get_object( - getThis() TSRMLS_CC); +PHP_METHOD(Call, add_metadata) { + wrapped_grpc_call *call = + (wrapped_grpc_call *)zend_object_store_get_object(getThis() TSRMLS_CC); zval *array; HashTable *array_hash; long flags = 0; /* "a|l" == 1 array, 1 optional long */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "a|l", - &array, - &flags) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|l", &array, &flags) == + FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, "add_metadata expects an array and an optional long", 1 TSRMLS_CC); @@ -236,10 +217,8 @@ PHP_METHOD(Call, add_metadata){ } array_hash = Z_ARRVAL_P(array); zend_hash_apply_with_arguments(array_hash TSRMLS_CC, - php_grpc_call_add_metadata_array_walk, - 2, - call->wrapped, - (gpr_uint32)flags); + php_grpc_call_add_metadata_array_walk, 2, + call->wrapped, (gpr_uint32)flags); } /** @@ -252,7 +231,7 @@ PHP_METHOD(Call, add_metadata){ * (optional) * @return Void */ -PHP_METHOD(Call, start_invoke){ +PHP_METHOD(Call, start_invoke) { grpc_call_error error_code; long tag1; long tag2; @@ -260,31 +239,24 @@ PHP_METHOD(Call, start_invoke){ zval *queue_obj; long flags = 0; /* "Olll|l" == 1 Object, 3 mandatory longs, 1 optional long */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "Olll|l", - &queue_obj, grpc_ce_completion_queue, - &tag1, - &tag2, - &tag3, - &flags) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Olll|l", &queue_obj, + grpc_ce_completion_queue, &tag1, &tag2, &tag3, + &flags) == FAILURE) { zend_throw_exception( spl_ce_InvalidArgumentException, "start_invoke needs a CompletionQueue, 3 longs, and an optional long", - 1 TSRMLS_CC); + 1 TSRMLS_CC); return; } add_property_zval(getThis(), "completion_queue", queue_obj); - wrapped_grpc_call *call = (wrapped_grpc_call*)zend_object_store_get_object( - getThis() TSRMLS_CC); + wrapped_grpc_call *call = + (wrapped_grpc_call *)zend_object_store_get_object(getThis() TSRMLS_CC); wrapped_grpc_completion_queue *queue = - (wrapped_grpc_completion_queue*)zend_object_store_get_object( - queue_obj TSRMLS_CC); - error_code = grpc_call_start_invoke(call->wrapped, - queue->wrapped, - (void*)tag1, - (void*)tag2, - (void*)tag3, - (gpr_uint32)flags); + (wrapped_grpc_completion_queue *)zend_object_store_get_object( + queue_obj TSRMLS_CC); + error_code = + grpc_call_start_invoke(call->wrapped, queue->wrapped, (void *)tag1, + (void *)tag2, (void *)tag3, (gpr_uint32)flags); MAYBE_THROW_CALL_ERROR(start_invoke, error_code); } @@ -298,15 +270,13 @@ PHP_METHOD(Call, start_invoke){ * (optional) * @return Void */ -PHP_METHOD(Call, server_accept){ +PHP_METHOD(Call, server_accept) { long tag; zval *queue_obj; grpc_call_error error_code; /* "Ol|l" == 1 Object, 1 long */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "Ol", - &queue_obj, grpc_ce_completion_queue, - &tag) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ol", &queue_obj, + grpc_ce_completion_queue, &tag) == FAILURE) { zend_throw_exception( spl_ce_InvalidArgumentException, "server_accept expects a CompletionQueue, a long, and an optional long", @@ -314,14 +284,13 @@ PHP_METHOD(Call, server_accept){ return; } add_property_zval(getThis(), "completion_queue", queue_obj); - wrapped_grpc_call *call = (wrapped_grpc_call*)zend_object_store_get_object( - getThis() TSRMLS_CC); + wrapped_grpc_call *call = + (wrapped_grpc_call *)zend_object_store_get_object(getThis() TSRMLS_CC); wrapped_grpc_completion_queue *queue = - (wrapped_grpc_completion_queue*)zend_object_store_get_object( - queue_obj TSRMLS_CC); - error_code = grpc_call_server_accept(call->wrapped, - queue->wrapped, - (void*)tag); + (wrapped_grpc_completion_queue *)zend_object_store_get_object( + queue_obj TSRMLS_CC); + error_code = + grpc_call_server_accept(call->wrapped, queue->wrapped, (void *)tag); MAYBE_THROW_CALL_ERROR(server_accept, error_code); } @@ -329,16 +298,14 @@ PHP_METHOD(Call, server_end_initial_metadata) { grpc_call_error error_code; long flags = 0; /* "|l" == 1 optional long */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "|l", - &flags) == FAILURE) { - zend_throw_exception( - spl_ce_InvalidArgumentException, - "server_end_initial_metadata expects an optional long", - 1 TSRMLS_CC); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flags) == + FAILURE) { + zend_throw_exception(spl_ce_InvalidArgumentException, + "server_end_initial_metadata expects an optional long", + 1 TSRMLS_CC); } - wrapped_grpc_call *call = (wrapped_grpc_call*)zend_object_store_get_object( - getThis() TSRMLS_CC); + wrapped_grpc_call *call = + (wrapped_grpc_call *)zend_object_store_get_object(getThis() TSRMLS_CC); error_code = grpc_call_server_end_initial_metadata(call->wrapped, flags); MAYBE_THROW_CALL_ERROR(server_end_initial_metadata, error_code); } @@ -347,9 +314,9 @@ PHP_METHOD(Call, server_end_initial_metadata) { * Called by clients to cancel an RPC on the server. * @return Void */ -PHP_METHOD(Call, cancel){ - wrapped_grpc_call *call = (wrapped_grpc_call*)zend_object_store_get_object( - getThis() TSRMLS_CC); +PHP_METHOD(Call, cancel) { + wrapped_grpc_call *call = + (wrapped_grpc_call *)zend_object_store_get_object(getThis() TSRMLS_CC); grpc_call_error error_code = grpc_call_cancel(call->wrapped); MAYBE_THROW_CALL_ERROR(cancel, error_code); } @@ -362,30 +329,25 @@ PHP_METHOD(Call, cancel){ * (optional) * @return Void */ -PHP_METHOD(Call, start_write){ +PHP_METHOD(Call, start_write) { grpc_call_error error_code; - wrapped_grpc_call *call = (wrapped_grpc_call*)zend_object_store_get_object( - getThis() TSRMLS_CC); + wrapped_grpc_call *call = + (wrapped_grpc_call *)zend_object_store_get_object(getThis() TSRMLS_CC); char *buffer; int buffer_len; long tag; long flags = 0; /* "Ol|l" == 1 Object, 1 mandatory long, 1 optional long */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "sl|l", - &buffer, &buffer_len, - &tag, - &flags) == FAILURE){ - zend_throw_exception( - spl_ce_InvalidArgumentException, - "start_write expects a string and an optional long", - 1 TSRMLS_CC); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|l", &buffer, + &buffer_len, &tag, &flags) == FAILURE) { + zend_throw_exception(spl_ce_InvalidArgumentException, + "start_write expects a string and an optional long", + 1 TSRMLS_CC); return; } error_code = grpc_call_start_write(call->wrapped, string_to_byte_buffer(buffer, buffer_len), - (void*)tag, - (gpr_uint32)flags); + (void *)tag, (gpr_uint32)flags); MAYBE_THROW_CALL_ERROR(start_write, error_code); } @@ -396,30 +358,26 @@ PHP_METHOD(Call, start_write){ * @param long $tag The tag to associate with this status * @return Void */ -PHP_METHOD(Call, start_write_status){ +PHP_METHOD(Call, start_write_status) { grpc_call_error error_code; - wrapped_grpc_call *call = (wrapped_grpc_call*)zend_object_store_get_object( - getThis() TSRMLS_CC); + wrapped_grpc_call *call = + (wrapped_grpc_call *)zend_object_store_get_object(getThis() TSRMLS_CC); long status_code; int status_details_length; long tag; char *status_details; /* "lsl" == 1 long, 1 string, 1 long */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "lsl", - &status_code, - &status_details, &status_details_length, - &tag) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lsl", &status_code, + &status_details, &status_details_length, + &tag) == FAILURE) { zend_throw_exception( spl_ce_InvalidArgumentException, - "start_write_status expects a long, a string, and a long", - 1 TSRMLS_CC); + "start_write_status expects a long, a string, and a long", 1 TSRMLS_CC); return; } - error_code = grpc_call_start_write_status(call->wrapped, - (grpc_status_code)status_code, - status_details, - (void*)tag); + error_code = + grpc_call_start_write_status(call->wrapped, (grpc_status_code)status_code, + status_details, (void *)tag); MAYBE_THROW_CALL_ERROR(start_write_status, error_code); } @@ -427,19 +385,18 @@ PHP_METHOD(Call, start_write_status){ * Indicate that there are no more messages to send * @return Void */ -PHP_METHOD(Call, writes_done){ +PHP_METHOD(Call, writes_done) { grpc_call_error error_code; - wrapped_grpc_call *call = (wrapped_grpc_call*)zend_object_store_get_object( - getThis() TSRMLS_CC); + wrapped_grpc_call *call = + (wrapped_grpc_call *)zend_object_store_get_object(getThis() TSRMLS_CC); long tag; /* "l" == 1 long */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &tag) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &tag) == FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, - "writes_done expects a long", - 1 TSRMLS_CC); + "writes_done expects a long", 1 TSRMLS_CC); return; } - error_code = grpc_call_writes_done(call->wrapped, (void*)tag); + error_code = grpc_call_writes_done(call->wrapped, (void *)tag); MAYBE_THROW_CALL_ERROR(writes_done, error_code); } @@ -449,37 +406,34 @@ PHP_METHOD(Call, writes_done){ * @param long $tag The tag to associate with this read * @return Void */ -PHP_METHOD(Call, start_read){ +PHP_METHOD(Call, start_read) { grpc_call_error error_code; - wrapped_grpc_call *call = (wrapped_grpc_call*)zend_object_store_get_object( - getThis() TSRMLS_CC); + wrapped_grpc_call *call = + (wrapped_grpc_call *)zend_object_store_get_object(getThis() TSRMLS_CC); long tag; /* "l" == 1 long */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &tag) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &tag) == FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, - "start_read expects a long", - 1 TSRMLS_CC); + "start_read expects a long", 1 TSRMLS_CC); return; } - error_code = grpc_call_start_read(call->wrapped, (void*)tag); + error_code = grpc_call_start_read(call->wrapped, (void *)tag); MAYBE_THROW_CALL_ERROR(start_read, error_code); } static zend_function_entry call_methods[] = { - PHP_ME(Call, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) - PHP_ME(Call, server_accept, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Call, server_end_initial_metadata, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Call, add_metadata, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Call, cancel, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Call, start_invoke, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Call, start_read, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Call, start_write, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Call, start_write_status, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Call, writes_done, NULL, ZEND_ACC_PUBLIC) - PHP_FE_END -}; + PHP_ME(Call, __construct, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR) + PHP_ME(Call, server_accept, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Call, server_end_initial_metadata, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Call, add_metadata, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Call, cancel, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Call, start_invoke, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Call, start_read, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Call, start_write, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Call, start_write_status, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Call, writes_done, NULL, ZEND_ACC_PUBLIC) PHP_FE_END}; -void grpc_init_call(TSRMLS_D){ +void grpc_init_call(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "Grpc\\Call", call_methods); ce.create_object = create_wrapped_grpc_call; diff --git a/src/php/ext/grpc/call.h b/src/php/ext/grpc/call.h old mode 100755 new mode 100644 index c3b18d66cb6..232c5d7cf29 --- a/src/php/ext/grpc/call.h +++ b/src/php/ext/grpc/call.h @@ -13,15 +13,14 @@ #include "grpc/grpc.h" // Throw an exception if error_code is not OK -#define MAYBE_THROW_CALL_ERROR(func_name, error_code) \ - do{ \ - if(error_code != GRPC_CALL_OK) { \ - zend_throw_exception(spl_ce_LogicException, \ - #func_name " was called incorrectly", \ - (long)error_code TSRMLS_CC); \ - } \ - } while(0) - +#define MAYBE_THROW_CALL_ERROR(func_name, error_code) \ + do { \ + if (error_code != GRPC_CALL_OK) { \ + zend_throw_exception(spl_ce_LogicException, \ + #func_name " was called incorrectly", \ + (long)error_code TSRMLS_CC); \ + } \ + } while (0) /* Class entry for the Call PHP class */ zend_class_entry *grpc_ce_call; diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c old mode 100755 new mode 100644 index c2847b99f1c..2ab229f5e67 --- a/src/php/ext/grpc/channel.c +++ b/src/php/ext/grpc/channel.c @@ -23,9 +23,9 @@ #include "credentials.h" /* Frees and destroys an instance of wrapped_grpc_channel */ -void free_wrapped_grpc_channel(void *object TSRMLS_DC){ - wrapped_grpc_channel *channel = (wrapped_grpc_channel*)object; - if(channel->wrapped != NULL){ +void free_wrapped_grpc_channel(void *object TSRMLS_DC) { + wrapped_grpc_channel *channel = (wrapped_grpc_channel *)object; + if (channel->wrapped != NULL) { grpc_channel_destroy(channel->wrapped); } efree(channel); @@ -33,24 +33,22 @@ void free_wrapped_grpc_channel(void *object TSRMLS_DC){ /* Initializes an instance of wrapped_grpc_channel to be associated with an * object of a class specified by class_type */ -zend_object_value create_wrapped_grpc_channel( - zend_class_entry *class_type TSRMLS_DC){ +zend_object_value create_wrapped_grpc_channel(zend_class_entry *class_type + TSRMLS_DC) { zend_object_value retval; wrapped_grpc_channel *intern; - intern = (wrapped_grpc_channel*)emalloc(sizeof(wrapped_grpc_channel)); + intern = (wrapped_grpc_channel *)emalloc(sizeof(wrapped_grpc_channel)); memset(intern, 0, sizeof(wrapped_grpc_channel)); zend_object_std_init(&intern->std, class_type TSRMLS_CC); object_properties_init(&intern->std, class_type); retval.handle = zend_objects_store_put( - intern, - (zend_objects_store_dtor_t)zend_objects_destroy_object, - free_wrapped_grpc_channel, - NULL TSRMLS_CC); + intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, + free_wrapped_grpc_channel, NULL TSRMLS_CC); retval.handlers = zend_get_std_object_handlers(); return retval; } -void php_grpc_read_args_array(zval *args_array, grpc_channel_args *args){ +void php_grpc_read_args_array(zval *args_array, grpc_channel_args *args) { HashTable *array_hash; HashPosition array_pointer; int args_index; @@ -62,24 +60,18 @@ void php_grpc_read_args_array(zval *args_array, grpc_channel_args *args){ args->num_args = zend_hash_num_elements(array_hash); args->args = ecalloc(args->num_args, sizeof(grpc_arg)); args_index = 0; - for(zend_hash_internal_pointer_reset_ex(array_hash, &array_pointer); - zend_hash_get_current_data_ex(array_hash, - (void**)&data, - &array_pointer) == SUCCESS; - zend_hash_move_forward_ex(array_hash, &array_pointer)){ - if(zend_hash_get_current_key_ex(array_hash, - &key, - &key_len, - &index, - 0, - &array_pointer) != HASH_KEY_IS_STRING){ + for (zend_hash_internal_pointer_reset_ex(array_hash, &array_pointer); + zend_hash_get_current_data_ex(array_hash, (void **)&data, + &array_pointer) == SUCCESS; + zend_hash_move_forward_ex(array_hash, &array_pointer)) { + if (zend_hash_get_current_key_ex(array_hash, &key, &key_len, &index, 0, + &array_pointer) != HASH_KEY_IS_STRING) { zend_throw_exception(spl_ce_InvalidArgumentException, - "args keys must be strings", - 1 TSRMLS_CC); + "args keys must be strings", 1 TSRMLS_CC); return; } args->args[args_index].key = key; - switch(Z_TYPE_P(*data)){ + switch (Z_TYPE_P(*data)) { case IS_LONG: args->args[args_index].value.integer = (int)Z_LVAL_P(*data); break; @@ -88,8 +80,7 @@ void php_grpc_read_args_array(zval *args_array, grpc_channel_args *args){ break; default: zend_throw_exception(spl_ce_InvalidArgumentException, - "args values must be int or string", - 1 TSRMLS_CC); + "args values must be int or string", 1 TSRMLS_CC); return; } args_index++; @@ -103,9 +94,9 @@ void php_grpc_read_args_array(zval *args_array, grpc_channel_args *args){ * @param string $target The hostname to associate with this channel * @param array $args The arguments to pass to the Channel (optional) */ -PHP_METHOD(Channel, __construct){ +PHP_METHOD(Channel, __construct) { wrapped_grpc_channel *channel = - (wrapped_grpc_channel*)zend_object_store_get_object(getThis() TSRMLS_CC); + (wrapped_grpc_channel *)zend_object_store_get_object(getThis() TSRMLS_CC); char *target; int target_length; zval *args_array = NULL; @@ -114,30 +105,25 @@ PHP_METHOD(Channel, __construct){ zval **creds_obj = NULL; wrapped_grpc_credentials *creds = NULL; /* "s|a" == 1 string, 1 optional array */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "s|a", - &target, &target_length, - &args_array) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|a", &target, + &target_length, &args_array) == FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, - "Channel expects a string and an array", - 1 TSRMLS_CC); + "Channel expects a string and an array", 1 TSRMLS_CC); return; } if (args_array == NULL) { channel->wrapped = grpc_channel_create(target, NULL); } else { array_hash = Z_ARRVAL_P(args_array); - if(zend_hash_find(array_hash, - "credentials", - sizeof("credentials"), - (void**)&creds_obj) == SUCCESS) { - if(zend_get_class_entry(*creds_obj TSRMLS_CC) != grpc_ce_credentials) { + if (zend_hash_find(array_hash, "credentials", sizeof("credentials"), + (void **)&creds_obj) == SUCCESS) { + if (zend_get_class_entry(*creds_obj TSRMLS_CC) != grpc_ce_credentials) { zend_throw_exception(spl_ce_InvalidArgumentException, "credentials must be a Credentials object", 1 TSRMLS_CC); return; } - creds = (wrapped_grpc_credentials*)zend_object_store_get_object( + creds = (wrapped_grpc_credentials *)zend_object_store_get_object( *creds_obj TSRMLS_CC); zend_hash_del(array_hash, "credentials", 12); } @@ -146,35 +132,32 @@ PHP_METHOD(Channel, __construct){ channel->wrapped = grpc_channel_create(target, &args); } else { gpr_log(GPR_DEBUG, "Initialized secure channel"); - channel->wrapped = grpc_secure_channel_create(creds->wrapped, - target, - &args); + channel->wrapped = + grpc_secure_channel_create(creds->wrapped, target, &args); } efree(args.args); } - channel->target = ecalloc(target_length+1, sizeof(char)); + channel->target = ecalloc(target_length + 1, sizeof(char)); memcpy(channel->target, target, target_length); } /** * Close the channel */ -PHP_METHOD(Channel, close){ +PHP_METHOD(Channel, close) { wrapped_grpc_channel *channel = - (wrapped_grpc_channel*)zend_object_store_get_object(getThis() TSRMLS_CC); - if(channel->wrapped != NULL) { + (wrapped_grpc_channel *)zend_object_store_get_object(getThis() TSRMLS_CC); + if (channel->wrapped != NULL) { grpc_channel_destroy(channel->wrapped); channel->wrapped = NULL; } } static zend_function_entry channel_methods[] = { - PHP_ME(Channel, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) - PHP_ME(Channel, close, NULL, ZEND_ACC_PUBLIC) - PHP_FE_END -}; + PHP_ME(Channel, __construct, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR) + PHP_ME(Channel, close, NULL, ZEND_ACC_PUBLIC) PHP_FE_END}; -void grpc_init_channel(TSRMLS_D){ +void grpc_init_channel(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "Grpc\\Channel", channel_methods); ce.create_object = create_wrapped_grpc_channel; diff --git a/src/php/ext/grpc/completion_queue.c b/src/php/ext/grpc/completion_queue.c old mode 100755 new mode 100644 index 0570bd50295..3a93bfcff76 --- a/src/php/ext/grpc/completion_queue.c +++ b/src/php/ext/grpc/completion_queue.c @@ -20,15 +20,15 @@ #include "timeval.h" /* Frees and destroys a wrapped instance of grpc_completion_queue */ -void free_wrapped_grpc_completion_queue(void *object TSRMLS_DC){ +void free_wrapped_grpc_completion_queue(void *object TSRMLS_DC) { wrapped_grpc_completion_queue *queue = NULL; grpc_event *event; - queue = (wrapped_grpc_completion_queue*)object; - if(queue->wrapped != NULL){ + queue = (wrapped_grpc_completion_queue *)object; + if (queue->wrapped != NULL) { grpc_completion_queue_shutdown(queue->wrapped); event = grpc_completion_queue_next(queue->wrapped, gpr_inf_future); - while(event != NULL){ - if(event->type == GRPC_QUEUE_SHUTDOWN){ + while (event != NULL) { + if (event->type == GRPC_QUEUE_SHUTDOWN) { break; } event = grpc_completion_queue_next(queue->wrapped, gpr_inf_future); @@ -41,21 +41,19 @@ void free_wrapped_grpc_completion_queue(void *object TSRMLS_DC){ /* Initializes an instance of wrapped_grpc_channel to be associated with an * object of a class specified by class_type */ zend_object_value create_wrapped_grpc_completion_queue( - zend_class_entry *class_type TSRMLS_DC){ + zend_class_entry *class_type TSRMLS_DC) { zend_object_value retval; wrapped_grpc_completion_queue *intern; - intern = (wrapped_grpc_completion_queue*)emalloc( + intern = (wrapped_grpc_completion_queue *)emalloc( sizeof(wrapped_grpc_completion_queue)); memset(intern, 0, sizeof(wrapped_grpc_completion_queue)); zend_object_std_init(&intern->std, class_type TSRMLS_CC); object_properties_init(&intern->std, class_type); retval.handle = zend_objects_store_put( - intern, - (zend_objects_store_dtor_t) zend_objects_destroy_object, - free_wrapped_grpc_completion_queue, - NULL TSRMLS_CC); + intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, + free_wrapped_grpc_completion_queue, NULL TSRMLS_CC); retval.handlers = zend_get_std_object_handlers(); return retval; } @@ -63,10 +61,10 @@ zend_object_value create_wrapped_grpc_completion_queue( /** * Construct an instance of CompletionQueue */ -PHP_METHOD(CompletionQueue, __construct){ +PHP_METHOD(CompletionQueue, __construct) { wrapped_grpc_completion_queue *queue = - (wrapped_grpc_completion_queue*)zend_object_store_get_object( - getThis() TSRMLS_CC); + (wrapped_grpc_completion_queue *)zend_object_store_get_object(getThis() + TSRMLS_CC); queue->wrapped = grpc_completion_queue_create(); } @@ -78,52 +76,46 @@ PHP_METHOD(CompletionQueue, __construct){ * @param Timeval $timeout The timeout for the event * @return Event The event that occurred */ -PHP_METHOD(CompletionQueue, next){ +PHP_METHOD(CompletionQueue, next) { zval *timeout; /* "O" == 1 Object */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "O", - &timeout, grpc_ce_timeval)==FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &timeout, + grpc_ce_timeval) == FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, - "next needs a Timeval", - 1 TSRMLS_CC); + "next needs a Timeval", 1 TSRMLS_CC); return; } wrapped_grpc_completion_queue *completion_queue = - (wrapped_grpc_completion_queue*)zend_object_store_get_object( - getThis() TSRMLS_CC); + (wrapped_grpc_completion_queue *)zend_object_store_get_object(getThis() + TSRMLS_CC); wrapped_grpc_timeval *wrapped_timeout = - (wrapped_grpc_timeval*)zend_object_store_get_object(timeout TSRMLS_CC); + (wrapped_grpc_timeval *)zend_object_store_get_object(timeout TSRMLS_CC); grpc_event *event = grpc_completion_queue_next(completion_queue->wrapped, wrapped_timeout->wrapped); - if(event == NULL){ + if (event == NULL) { RETURN_NULL(); } zval *wrapped_event = grpc_php_convert_event(event); RETURN_DESTROY_ZVAL(wrapped_event); } -PHP_METHOD(CompletionQueue, pluck){ +PHP_METHOD(CompletionQueue, pluck) { long tag; zval *timeout; /* "lO" == 1 long, 1 Object */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "lO", - &tag, - &timeout, grpc_ce_timeval)==FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lO", &tag, &timeout, + grpc_ce_timeval) == FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, - "pluck needs a long and a Timeval", - 1 TSRMLS_CC); + "pluck needs a long and a Timeval", 1 TSRMLS_CC); } wrapped_grpc_completion_queue *completion_queue = - (wrapped_grpc_completion_queue*)zend_object_store_get_object( - getThis() TSRMLS_CC); + (wrapped_grpc_completion_queue *)zend_object_store_get_object(getThis() + TSRMLS_CC); wrapped_grpc_timeval *wrapped_timeout = - (wrapped_grpc_timeval*)zend_object_store_get_object(timeout TSRMLS_CC); - grpc_event *event = grpc_completion_queue_pluck(completion_queue->wrapped, - (void*)tag, - wrapped_timeout->wrapped); - if(event == NULL){ + (wrapped_grpc_timeval *)zend_object_store_get_object(timeout TSRMLS_CC); + grpc_event *event = grpc_completion_queue_pluck( + completion_queue->wrapped, (void *)tag, wrapped_timeout->wrapped); + if (event == NULL) { RETURN_NULL(); } zval *wrapped_event = grpc_php_convert_event(event); @@ -131,13 +123,11 @@ PHP_METHOD(CompletionQueue, pluck){ } static zend_function_entry completion_queue_methods[] = { - PHP_ME(CompletionQueue, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) - PHP_ME(CompletionQueue, next, NULL, ZEND_ACC_PUBLIC) - PHP_ME(CompletionQueue, pluck, NULL, ZEND_ACC_PUBLIC) - PHP_FE_END -}; + PHP_ME(CompletionQueue, __construct, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR) + PHP_ME(CompletionQueue, next, NULL, ZEND_ACC_PUBLIC) + PHP_ME(CompletionQueue, pluck, NULL, ZEND_ACC_PUBLIC) PHP_FE_END}; -void grpc_init_completion_queue(TSRMLS_D){ +void grpc_init_completion_queue(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "Grpc\\CompletionQueue", completion_queue_methods); ce.create_object = create_wrapped_grpc_completion_queue; diff --git a/src/php/ext/grpc/config.m4 b/src/php/ext/grpc/config.m4 index 40e4dd33792..27c67781e78 100755 --- a/src/php/ext/grpc/config.m4 +++ b/src/php/ext/grpc/config.m4 @@ -32,10 +32,15 @@ if test "$PHP_GRPC" != "no"; then GRPC_SHARED_LIBADD="-lpthread $GRPC_SHARED_LIBADD" PHP_ADD_LIBRARY(pthread) + PHP_ADD_LIBRARY(dl,,GRPC_SHARED_LIBADD) + PHP_ADD_LIBRARY(dl) + PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD) PHP_ADD_LIBRARY(rt) - PHP_ADD_LIBPATH($GRPC_DIR/lib) + GRPC_LIBDIR=$GRPC_DIR/${GRPC_LIB_SUBDIR-lib} + + PHP_ADD_LIBPATH($GRPC_LIBDIR) PHP_CHECK_LIBRARY(gpr,gpr_now, [ @@ -45,18 +50,9 @@ if test "$PHP_GRPC" != "no"; then ],[ AC_MSG_ERROR([wrong gpr lib version or lib not found]) ],[ - -L$GRPC_DIR/lib + -L$GRPC_LIBDIR ]) - PHP_ADD_LIBRARY(event,,GRPC_SHARED_LIBADD) - PHP_ADD_LIBRARY(event) - - PHP_ADD_LIBRARY(event_pthreads,,GRPC_SHARED_LIBADD) - PHP_ADD_LIBRARY(event_pthreads) - - PHP_ADD_LIBRARY(event_core,,GRPC_SHARED_LIBADD) - PHP_ADD_LIBRARY(event_core) - PHP_CHECK_LIBRARY(grpc,grpc_channel_destroy, [ PHP_ADD_LIBRARY(grpc,,GRPC_SHARED_LIBADD) @@ -65,7 +61,7 @@ if test "$PHP_GRPC" != "no"; then ],[ AC_MSG_ERROR([wrong grpc lib version or lib not found]) ],[ - -L$GRPC_DIR/lib + -L$GRPC_LIBDIR ]) PHP_SUBST(GRPC_SHARED_LIBADD) diff --git a/src/php/ext/grpc/credentials.c b/src/php/ext/grpc/credentials.c old mode 100755 new mode 100644 index ffafddae5f2..2a83d1cbc1e --- a/src/php/ext/grpc/credentials.c +++ b/src/php/ext/grpc/credentials.c @@ -17,9 +17,9 @@ #include "grpc/grpc_security.h" /* Frees and destroys an instance of wrapped_grpc_credentials */ -void free_wrapped_grpc_credentials(void *object TSRMLS_DC){ - wrapped_grpc_credentials *creds = (wrapped_grpc_credentials*)object; - if(creds->wrapped != NULL) { +void free_wrapped_grpc_credentials(void *object TSRMLS_DC) { + wrapped_grpc_credentials *creds = (wrapped_grpc_credentials *)object; + if (creds->wrapped != NULL) { grpc_credentials_release(creds->wrapped); } efree(creds); @@ -27,32 +27,31 @@ void free_wrapped_grpc_credentials(void *object TSRMLS_DC){ /* Initializes an instance of wrapped_grpc_credentials to be associated with an * object of a class specified by class_type */ -zend_object_value create_wrapped_grpc_credentials( - zend_class_entry *class_type TSRMLS_DC){ +zend_object_value create_wrapped_grpc_credentials(zend_class_entry *class_type + TSRMLS_DC) { zend_object_value retval; wrapped_grpc_credentials *intern; - intern = (wrapped_grpc_credentials*)emalloc(sizeof(wrapped_grpc_credentials)); + intern = + (wrapped_grpc_credentials *)emalloc(sizeof(wrapped_grpc_credentials)); memset(intern, 0, sizeof(wrapped_grpc_credentials)); zend_object_std_init(&intern->std, class_type TSRMLS_CC); object_properties_init(&intern->std, class_type); retval.handle = zend_objects_store_put( - intern, - (zend_objects_store_dtor_t) zend_objects_destroy_object, - free_wrapped_grpc_credentials, - NULL TSRMLS_CC); + intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, + free_wrapped_grpc_credentials, NULL TSRMLS_CC); retval.handlers = zend_get_std_object_handlers(); return retval; } -zval *grpc_php_wrap_credentials(grpc_credentials *wrapped){ +zval *grpc_php_wrap_credentials(grpc_credentials *wrapped) { zval *credentials_object; MAKE_STD_ZVAL(credentials_object); object_init_ex(credentials_object, grpc_ce_credentials); wrapped_grpc_credentials *credentials = - (wrapped_grpc_credentials*)zend_object_store_get_object( - credentials_object TSRMLS_CC); + (wrapped_grpc_credentials *)zend_object_store_get_object( + credentials_object TSRMLS_CC); credentials->wrapped = wrapped; return credentials_object; } @@ -61,7 +60,7 @@ zval *grpc_php_wrap_credentials(grpc_credentials *wrapped){ * Create a default credentials object. * @return Credentials The new default credentials object */ -PHP_METHOD(Credentials, createDefault){ +PHP_METHOD(Credentials, createDefault) { grpc_credentials *creds = grpc_default_credentials_create(); zval *creds_object = grpc_php_wrap_credentials(creds); RETURN_DESTROY_ZVAL(creds_object); @@ -76,7 +75,7 @@ PHP_METHOD(Credentials, createDefault){ * (optional) * @return Credentials The new SSL credentials object */ -PHP_METHOD(Credentials, createSsl){ +PHP_METHOD(Credentials, createSsl) { char *pem_root_certs; char *pem_private_key = NULL; char *pem_cert_chain = NULL; @@ -84,20 +83,18 @@ PHP_METHOD(Credentials, createSsl){ int root_certs_length, private_key_length = 0, cert_chain_length = 0; /* "s|s!s! == 1 string, 2 optional nullable strings */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "s|s!s!", - &pem_root_certs, &root_certs_length, - &pem_private_key, &private_key_length, - &pem_cert_chain, &cert_chain_length) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s!s!", + &pem_root_certs, &root_certs_length, + &pem_private_key, &private_key_length, + &pem_cert_chain, &cert_chain_length) == FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, - "createSsl expects 1 to 3 strings", - 1 TSRMLS_CC); + "createSsl expects 1 to 3 strings", 1 TSRMLS_CC); return; } grpc_credentials *creds = grpc_ssl_credentials_create( - (unsigned char*)pem_root_certs, (size_t)root_certs_length, - (unsigned char*)pem_private_key, (size_t)private_key_length, - (unsigned char*)pem_cert_chain, (size_t)cert_chain_length); + (unsigned char *)pem_root_certs, (size_t)root_certs_length, + (unsigned char *)pem_private_key, (size_t)private_key_length, + (unsigned char *)pem_cert_chain, (size_t)cert_chain_length); zval *creds_object = grpc_php_wrap_credentials(creds); RETURN_DESTROY_ZVAL(creds_object); } @@ -108,28 +105,26 @@ PHP_METHOD(Credentials, createSsl){ * @param Credentials cred2 The second credential * @return Credentials The new composite credentials object */ -PHP_METHOD(Credentials, createComposite){ +PHP_METHOD(Credentials, createComposite) { zval *cred1_obj; zval *cred2_obj; /* "OO" == 3 Objects */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "OO", - &cred1_obj, grpc_ce_credentials, - &cred2_obj, grpc_ce_credentials) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OO", &cred1_obj, + grpc_ce_credentials, &cred2_obj, + grpc_ce_credentials) == FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, - "createComposite expects 2 Credentials", - 1 TSRMLS_CC); + "createComposite expects 2 Credentials", 1 TSRMLS_CC); return; } wrapped_grpc_credentials *cred1 = - (wrapped_grpc_credentials*)zend_object_store_get_object( + (wrapped_grpc_credentials *)zend_object_store_get_object( cred1_obj TSRMLS_CC); wrapped_grpc_credentials *cred2 = - (wrapped_grpc_credentials*)zend_object_store_get_object( + (wrapped_grpc_credentials *)zend_object_store_get_object( cred2_obj TSRMLS_CC); - grpc_credentials *creds = grpc_composite_credentials_create(cred1->wrapped, - cred2->wrapped); + grpc_credentials *creds = + grpc_composite_credentials_create(cred1->wrapped, cred2->wrapped); zval *creds_object = grpc_php_wrap_credentials(creds); RETURN_DESTROY_ZVAL(creds_object); } @@ -155,15 +150,15 @@ PHP_METHOD(Credentials, createFake) { } static zend_function_entry credentials_methods[] = { - PHP_ME(Credentials, createDefault, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(Credentials, createSsl, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(Credentials, createComposite, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(Credentials, createGce, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(Credentials, createFake, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_FE_END -}; - -void grpc_init_credentials(TSRMLS_D){ + PHP_ME(Credentials, createDefault, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + PHP_ME(Credentials, createSsl, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + PHP_ME(Credentials, createComposite, NULL, + ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + PHP_ME(Credentials, createGce, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + PHP_ME(Credentials, createFake, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + PHP_FE_END}; + +void grpc_init_credentials(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "Grpc\\Credentials", credentials_methods); ce.create_object = create_wrapped_grpc_credentials; diff --git a/src/php/ext/grpc/event.c b/src/php/ext/grpc/event.c old mode 100755 new mode 100644 index c15f479448d..b4069f72f00 --- a/src/php/ext/grpc/event.c +++ b/src/php/ext/grpc/event.c @@ -32,24 +32,25 @@ zval *grpc_php_convert_event(grpc_event *event) { zval *event_object; - if(event == NULL) { + if (event == NULL) { return NULL; } MAKE_STD_ZVAL(event_object); object_init(event_object); - add_property_zval(event_object, - "call", - grpc_php_wrap_call(event->call, - event->type==GRPC_SERVER_RPC_NEW)); + add_property_zval( + event_object, "call", + grpc_php_wrap_call(event->call, event->type == GRPC_SERVER_RPC_NEW)); add_property_long(event_object, "type", event->type); add_property_long(event_object, "tag", (long)event->tag); - switch(event->type){ - case GRPC_QUEUE_SHUTDOWN: add_property_null(event_object, "data"); break; + switch (event->type) { + case GRPC_QUEUE_SHUTDOWN: + add_property_null(event_object, "data"); + break; case GRPC_READ: - if(event->data.read == NULL){ + if (event->data.read == NULL) { add_property_null(event_object, "data"); } else { byte_buffer_to_string(event->data.read, &read_string, &read_len); @@ -57,16 +58,14 @@ zval *grpc_php_convert_event(grpc_event *event) { } break; case GRPC_INVOKE_ACCEPTED: - add_property_long(event_object, - "data", + add_property_long(event_object, "data", (long)event->data.invoke_accepted); break; case GRPC_WRITE_ACCEPTED: add_property_long(event_object, "data", (long)event->data.write_accepted); break; case GRPC_FINISH_ACCEPTED: - add_property_long(event_object, - "data", + add_property_long(event_object, "data", (long)event->data.finish_accepted); break; case GRPC_CLIENT_METADATA_READ: @@ -79,19 +78,15 @@ zval *grpc_php_convert_event(grpc_event *event) { MAKE_STD_ZVAL(data_object); object_init(data_object); add_property_long(data_object, "code", event->data.finished.status); - if(event->data.finished.details == NULL){ + if (event->data.finished.details == NULL) { add_property_null(data_object, "details"); } else { detail_len = strlen(event->data.finished.details); - detail_string = ecalloc(detail_len+1, sizeof(char)); + detail_string = ecalloc(detail_len + 1, sizeof(char)); memcpy(detail_string, event->data.finished.details, detail_len); - add_property_string(data_object, - "details", - detail_string, - true); + add_property_string(data_object, "details", detail_string, true); } - add_property_zval(data_object, - "metadata", + add_property_zval(data_object, "metadata", grpc_call_create_metadata_array( event->data.finished.metadata_count, event->data.finished.metadata_elements)); @@ -101,31 +96,25 @@ zval *grpc_php_convert_event(grpc_event *event) { MAKE_STD_ZVAL(data_object); object_init(data_object); method_len = strlen(event->data.server_rpc_new.method); - method_string = ecalloc(method_len+1, sizeof(char)); + method_string = ecalloc(method_len + 1, sizeof(char)); memcpy(method_string, event->data.server_rpc_new.method, method_len); - add_property_string(data_object, - "method", - method_string, - false); + add_property_string(data_object, "method", method_string, false); host_len = strlen(event->data.server_rpc_new.host); - host_string = ecalloc(host_len+1, sizeof(char)); + host_string = ecalloc(host_len + 1, sizeof(char)); memcpy(host_string, event->data.server_rpc_new.host, host_len); - add_property_string(data_object, - "host", - host_string, - false); - add_property_zval(data_object, - "absolute_timeout", - grpc_php_wrap_timeval( - event->data.server_rpc_new.deadline)); - add_property_zval(data_object, - "metadata", + add_property_string(data_object, "host", host_string, false); + add_property_zval( + data_object, "absolute_timeout", + grpc_php_wrap_timeval(event->data.server_rpc_new.deadline)); + add_property_zval(data_object, "metadata", grpc_call_create_metadata_array( event->data.server_rpc_new.metadata_count, event->data.server_rpc_new.metadata_elements)); add_property_zval(event_object, "data", data_object); break; - default: add_property_null(event_object, "data"); break; + default: + add_property_null(event_object, "data"); + break; } grpc_event_finish(event); return event_object; diff --git a/src/php/ext/grpc/php_grpc.c b/src/php/ext/grpc/php_grpc.c old mode 100755 new mode 100644 index 71449bfd06d..e8b4643a582 --- a/src/php/ext/grpc/php_grpc.c +++ b/src/php/ext/grpc/php_grpc.c @@ -16,14 +16,14 @@ #include "ext/standard/info.h" #include "php_grpc.h" -//ZEND_DECLARE_MODULE_GLOBALS(grpc) +// ZEND_DECLARE_MODULE_GLOBALS(grpc) /* {{{ grpc_functions[] * * Every user visible function must have an entry in grpc_functions[]. */ const zend_function_entry grpc_functions[] = { - PHP_FE_END /* Must be the last line in grpc_functions[] */ + PHP_FE_END /* Must be the last line in grpc_functions[] */ }; /* }}} */ @@ -33,18 +33,13 @@ zend_module_entry grpc_module_entry = { #if ZEND_MODULE_API_NO >= 20010901 STANDARD_MODULE_HEADER, #endif - "grpc", - grpc_functions, - PHP_MINIT(grpc), - PHP_MSHUTDOWN(grpc), - NULL, - NULL, + "grpc", grpc_functions, PHP_MINIT(grpc), + PHP_MSHUTDOWN(grpc), NULL, NULL, PHP_MINFO(grpc), #if ZEND_MODULE_API_NO >= 20010901 PHP_GRPC_VERSION, #endif - STANDARD_MODULE_PROPERTIES -}; + STANDARD_MODULE_PROPERTIES}; /* }}} */ #ifdef COMPILE_DL_GRPC @@ -55,8 +50,10 @@ ZEND_GET_MODULE(grpc) */ /* Remove comments and fill if you need to have entries in php.ini PHP_INI_BEGIN() - STD_PHP_INI_ENTRY("grpc.global_value", "42", PHP_INI_ALL, OnUpdateLong, global_value, zend_grpc_globals, grpc_globals) - STD_PHP_INI_ENTRY("grpc.global_string", "foobar", PHP_INI_ALL, OnUpdateString, global_string, zend_grpc_globals, grpc_globals) + STD_PHP_INI_ENTRY("grpc.global_value", "42", PHP_INI_ALL, OnUpdateLong, +global_value, zend_grpc_globals, grpc_globals) + STD_PHP_INI_ENTRY("grpc.global_string", "foobar", PHP_INI_ALL, +OnUpdateString, global_string, zend_grpc_globals, grpc_globals) PHP_INI_END() */ /* }}} */ @@ -74,159 +71,118 @@ static void php_grpc_init_globals(zend_grpc_globals *grpc_globals) /* {{{ PHP_MINIT_FUNCTION */ -PHP_MINIT_FUNCTION(grpc) -{ - /* If you have INI entries, uncomment these lines - REGISTER_INI_ENTRIES(); - */ - /* Register call error constants */ - grpc_init(); - REGISTER_LONG_CONSTANT("Grpc\\CALL_OK", GRPC_CALL_OK, CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR", GRPC_CALL_ERROR, CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_NOT_ON_SERVER", - GRPC_CALL_ERROR_NOT_ON_SERVER, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_NOT_ON_CLIENT", - GRPC_CALL_ERROR_NOT_ON_CLIENT, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_ALREADY_INVOKED", - GRPC_CALL_ERROR_ALREADY_INVOKED, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_NOT_INVOKED", - GRPC_CALL_ERROR_NOT_INVOKED, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_ALREADY_FINISHED", - GRPC_CALL_ERROR_ALREADY_FINISHED, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_TOO_MANY_OPERATIONS", - GRPC_CALL_ERROR_TOO_MANY_OPERATIONS, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_INVALID_FLAGS", - GRPC_CALL_ERROR_INVALID_FLAGS, - CONST_CS); - - /* Register op error constants */ - REGISTER_LONG_CONSTANT("Grpc\\OP_OK", GRPC_OP_OK, CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\OP_ERROR", GRPC_OP_ERROR, CONST_CS); - - /* Register flag constants */ - REGISTER_LONG_CONSTANT("Grpc\\WRITE_BUFFER_HINT", - GRPC_WRITE_BUFFER_HINT, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\WRITE_NO_COMPRESS", - GRPC_WRITE_NO_COMPRESS, - CONST_CS); - - /* Register completion type constants */ - REGISTER_LONG_CONSTANT("Grpc\\QUEUE_SHUTDOWN", - GRPC_QUEUE_SHUTDOWN, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\READ", GRPC_READ, CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\INVOKE_ACCEPTED", - GRPC_INVOKE_ACCEPTED, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\WRITE_ACCEPTED", - GRPC_WRITE_ACCEPTED, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\FINISH_ACCEPTED", - GRPC_FINISH_ACCEPTED, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\CLIENT_METADATA_READ", - GRPC_CLIENT_METADATA_READ, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\FINISHED", GRPC_FINISHED, CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\SERVER_RPC_NEW", - GRPC_SERVER_RPC_NEW, - CONST_CS); - - /* Register status constants */ - REGISTER_LONG_CONSTANT("Grpc\\STATUS_OK", - GRPC_STATUS_OK, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_CANCELLED", - GRPC_STATUS_CANCELLED, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNKNOWN", - GRPC_STATUS_UNKNOWN, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_INVALID_ARGUMENT", - GRPC_STATUS_INVALID_ARGUMENT, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_DEADLINE_EXCEEDED", - GRPC_STATUS_DEADLINE_EXCEEDED, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_NOT_FOUND", - GRPC_STATUS_NOT_FOUND, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_ALREADY_EXISTS", - GRPC_STATUS_ALREADY_EXISTS, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_PERMISSION_DENIED", - GRPC_STATUS_PERMISSION_DENIED, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNAUTHENTICATED", - GRPC_STATUS_UNAUTHENTICATED, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_RESOURCE_EXHAUSTED", - GRPC_STATUS_RESOURCE_EXHAUSTED, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_FAILED_PRECONDITION", - GRPC_STATUS_FAILED_PRECONDITION, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_ABORTED", - GRPC_STATUS_ABORTED, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_OUT_OF_RANGE", - GRPC_STATUS_OUT_OF_RANGE, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNIMPLEMENTED", - GRPC_STATUS_UNIMPLEMENTED, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_INTERNAL", - GRPC_STATUS_INTERNAL, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNAVAILABLE", - GRPC_STATUS_UNAVAILABLE, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_DATA_LOSS", - GRPC_STATUS_DATA_LOSS, - CONST_CS); - - grpc_init_call(TSRMLS_C); - grpc_init_channel(TSRMLS_C); - grpc_init_server(TSRMLS_C); - grpc_init_completion_queue(TSRMLS_C); - grpc_init_timeval(TSRMLS_C); - grpc_init_credentials(TSRMLS_C); - grpc_init_server_credentials(TSRMLS_C); - return SUCCESS; +PHP_MINIT_FUNCTION(grpc) { + /* If you have INI entries, uncomment these lines + REGISTER_INI_ENTRIES(); + */ + /* Register call error constants */ + grpc_init(); + REGISTER_LONG_CONSTANT("Grpc\\CALL_OK", GRPC_CALL_OK, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR", GRPC_CALL_ERROR, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_NOT_ON_SERVER", + GRPC_CALL_ERROR_NOT_ON_SERVER, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_NOT_ON_CLIENT", + GRPC_CALL_ERROR_NOT_ON_CLIENT, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_ALREADY_INVOKED", + GRPC_CALL_ERROR_ALREADY_INVOKED, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_NOT_INVOKED", + GRPC_CALL_ERROR_NOT_INVOKED, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_ALREADY_FINISHED", + GRPC_CALL_ERROR_ALREADY_FINISHED, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_TOO_MANY_OPERATIONS", + GRPC_CALL_ERROR_TOO_MANY_OPERATIONS, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_INVALID_FLAGS", + GRPC_CALL_ERROR_INVALID_FLAGS, CONST_CS); + + /* Register op error constants */ + REGISTER_LONG_CONSTANT("Grpc\\OP_OK", GRPC_OP_OK, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\OP_ERROR", GRPC_OP_ERROR, CONST_CS); + + /* Register flag constants */ + REGISTER_LONG_CONSTANT("Grpc\\WRITE_BUFFER_HINT", GRPC_WRITE_BUFFER_HINT, + CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\WRITE_NO_COMPRESS", GRPC_WRITE_NO_COMPRESS, + CONST_CS); + + /* Register completion type constants */ + REGISTER_LONG_CONSTANT("Grpc\\QUEUE_SHUTDOWN", GRPC_QUEUE_SHUTDOWN, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\READ", GRPC_READ, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\INVOKE_ACCEPTED", GRPC_INVOKE_ACCEPTED, + CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\WRITE_ACCEPTED", GRPC_WRITE_ACCEPTED, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\FINISH_ACCEPTED", GRPC_FINISH_ACCEPTED, + CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\CLIENT_METADATA_READ", + GRPC_CLIENT_METADATA_READ, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\FINISHED", GRPC_FINISHED, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\SERVER_RPC_NEW", GRPC_SERVER_RPC_NEW, CONST_CS); + + /* Register status constants */ + REGISTER_LONG_CONSTANT("Grpc\\STATUS_OK", GRPC_STATUS_OK, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_CANCELLED", GRPC_STATUS_CANCELLED, + CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNKNOWN", GRPC_STATUS_UNKNOWN, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_INVALID_ARGUMENT", + GRPC_STATUS_INVALID_ARGUMENT, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_DEADLINE_EXCEEDED", + GRPC_STATUS_DEADLINE_EXCEEDED, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_NOT_FOUND", GRPC_STATUS_NOT_FOUND, + CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_ALREADY_EXISTS", + GRPC_STATUS_ALREADY_EXISTS, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_PERMISSION_DENIED", + GRPC_STATUS_PERMISSION_DENIED, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNAUTHENTICATED", + GRPC_STATUS_UNAUTHENTICATED, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_RESOURCE_EXHAUSTED", + GRPC_STATUS_RESOURCE_EXHAUSTED, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_FAILED_PRECONDITION", + GRPC_STATUS_FAILED_PRECONDITION, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_ABORTED", GRPC_STATUS_ABORTED, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_OUT_OF_RANGE", GRPC_STATUS_OUT_OF_RANGE, + CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNIMPLEMENTED", + GRPC_STATUS_UNIMPLEMENTED, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_INTERNAL", GRPC_STATUS_INTERNAL, + CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNAVAILABLE", GRPC_STATUS_UNAVAILABLE, + CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_DATA_LOSS", GRPC_STATUS_DATA_LOSS, + CONST_CS); + + grpc_init_call(TSRMLS_C); + grpc_init_channel(TSRMLS_C); + grpc_init_server(TSRMLS_C); + grpc_init_completion_queue(TSRMLS_C); + grpc_init_timeval(TSRMLS_C); + grpc_init_credentials(TSRMLS_C); + grpc_init_server_credentials(TSRMLS_C); + return SUCCESS; } /* }}} */ /* {{{ PHP_MSHUTDOWN_FUNCTION */ -PHP_MSHUTDOWN_FUNCTION(grpc) -{ - /* uncomment this line if you have INI entries - UNREGISTER_INI_ENTRIES(); - */ - grpc_shutdown_timeval(TSRMLS_C); - grpc_shutdown(); - return SUCCESS; +PHP_MSHUTDOWN_FUNCTION(grpc) { + /* uncomment this line if you have INI entries + UNREGISTER_INI_ENTRIES(); + */ + grpc_shutdown_timeval(TSRMLS_C); + grpc_shutdown(); + return SUCCESS; } /* }}} */ /* {{{ PHP_MINFO_FUNCTION */ -PHP_MINFO_FUNCTION(grpc) -{ - php_info_print_table_start(); - php_info_print_table_header(2, "grpc support", "enabled"); - php_info_print_table_end(); - - /* Remove comments if you have entries in php.ini - DISPLAY_INI_ENTRIES(); - */ +PHP_MINFO_FUNCTION(grpc) { + php_info_print_table_start(); + php_info_print_table_header(2, "grpc support", "enabled"); + php_info_print_table_end(); + + /* Remove comments if you have entries in php.ini + DISPLAY_INI_ENTRIES(); + */ } /* }}} */ /* The previous line is meant for vim and emacs, so it can correctly fold and @@ -235,7 +191,6 @@ PHP_MINFO_FUNCTION(grpc) follow this convention for the convenience of others editing your code. */ - /* * Local variables: * tab-width: 4 diff --git a/src/php/ext/grpc/php_grpc.h b/src/php/ext/grpc/php_grpc.h old mode 100755 new mode 100644 index 777e0c43687..53cc5dcf6e3 --- a/src/php/ext/grpc/php_grpc.h +++ b/src/php/ext/grpc/php_grpc.h @@ -7,14 +7,15 @@ extern zend_module_entry grpc_module_entry; #define phpext_grpc_ptr &grpc_module_entry -#define PHP_GRPC_VERSION "0.1.0" /* Replace with version number for your extension */ +#define PHP_GRPC_VERSION \ + "0.1.0" /* Replace with version number for your extension */ #ifdef PHP_WIN32 -# define PHP_GRPC_API __declspec(dllexport) +#define PHP_GRPC_API __declspec(dllexport) #elif defined(__GNUC__) && __GNUC__ >= 4 -# define PHP_GRPC_API __attribute__ ((visibility("default"))) +#define PHP_GRPC_API __attribute__((visibility("default"))) #else -# define PHP_GRPC_API +#define PHP_GRPC_API #endif #ifdef ZTS @@ -25,11 +26,9 @@ extern zend_module_entry grpc_module_entry; #include "grpc/grpc.h" -#define RETURN_DESTROY_ZVAL(val) \ - RETURN_ZVAL( \ - val, \ - false /* Don't execute copy constructor */, \ - true /* Dealloc original before returning */) +#define RETURN_DESTROY_ZVAL(val) \ + RETURN_ZVAL(val, false /* Don't execute copy constructor */, \ + true /* Dealloc original before returning */) /* These are all function declarations */ /* Code that runs at module initialization */ @@ -40,8 +39,8 @@ PHP_MSHUTDOWN_FUNCTION(grpc); PHP_MINFO_FUNCTION(grpc); /* - Declare any global variables you may need between the BEGIN - and END macros here: + Declare any global variables you may need between the BEGIN + and END macros here: ZEND_BEGIN_MODULE_GLOBALS(grpc) ZEND_END_MODULE_GLOBALS(grpc) @@ -63,4 +62,4 @@ ZEND_END_MODULE_GLOBALS(grpc) #define GRPC_G(v) (grpc_globals.v) #endif -#endif /* PHP_GRPC_H */ +#endif /* PHP_GRPC_H */ diff --git a/src/php/ext/grpc/server.c b/src/php/ext/grpc/server.c old mode 100755 new mode 100644 index 5af42f76ee0..38777f3d541 --- a/src/php/ext/grpc/server.c +++ b/src/php/ext/grpc/server.c @@ -24,9 +24,9 @@ #include "server_credentials.h" /* Frees and destroys an instance of wrapped_grpc_server */ -void free_wrapped_grpc_server(void *object TSRMLS_DC){ - wrapped_grpc_server *server = (wrapped_grpc_server*)object; - if(server->wrapped != NULL){ +void free_wrapped_grpc_server(void *object TSRMLS_DC) { + wrapped_grpc_server *server = (wrapped_grpc_server *)object; + if (server->wrapped != NULL) { grpc_server_shutdown(server->wrapped); grpc_server_destroy(server->wrapped); } @@ -35,21 +35,19 @@ void free_wrapped_grpc_server(void *object TSRMLS_DC){ /* Initializes an instance of wrapped_grpc_call to be associated with an object * of a class specified by class_type */ -zend_object_value create_wrapped_grpc_server( - zend_class_entry *class_type TSRMLS_DC){ +zend_object_value create_wrapped_grpc_server(zend_class_entry *class_type + TSRMLS_DC) { zend_object_value retval; wrapped_grpc_server *intern; - intern = (wrapped_grpc_server*)emalloc(sizeof(wrapped_grpc_server)); + intern = (wrapped_grpc_server *)emalloc(sizeof(wrapped_grpc_server)); memset(intern, 0, sizeof(wrapped_grpc_server)); zend_object_std_init(&intern->std, class_type TSRMLS_CC); object_properties_init(&intern->std, class_type); retval.handle = zend_objects_store_put( - intern, - (zend_objects_store_dtor_t) zend_objects_destroy_object, - free_wrapped_grpc_server, - NULL TSRMLS_CC); + intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, + free_wrapped_grpc_server, NULL TSRMLS_CC); retval.handlers = zend_get_std_object_handlers(); return retval; } @@ -59,9 +57,9 @@ zend_object_value create_wrapped_grpc_server( * @param CompletionQueue $queue The completion queue to use with the server * @param array $args The arguments to pass to the server (optional) */ -PHP_METHOD(Server, __construct){ +PHP_METHOD(Server, __construct) { wrapped_grpc_server *server = - (wrapped_grpc_server*)zend_object_store_get_object(getThis() TSRMLS_CC); + (wrapped_grpc_server *)zend_object_store_get_object(getThis() TSRMLS_CC); zval *queue_obj; zval *args_array = NULL; grpc_channel_args args; @@ -69,10 +67,8 @@ PHP_METHOD(Server, __construct){ zval **creds_obj = NULL; wrapped_grpc_server_credentials *creds = NULL; /* "O|a" == 1 Object, 1 optional array */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "O|a", - &queue_obj, grpc_ce_completion_queue, - &args_array) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|a", &queue_obj, + grpc_ce_completion_queue, &args_array) == FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, "Server expects a CompletionQueue and an array", 1 TSRMLS_CC); @@ -80,24 +76,22 @@ PHP_METHOD(Server, __construct){ } add_property_zval(getThis(), "completion_queue", queue_obj); wrapped_grpc_completion_queue *queue = - (wrapped_grpc_completion_queue*)zend_object_store_get_object( - queue_obj TSRMLS_CC); + (wrapped_grpc_completion_queue *)zend_object_store_get_object( + queue_obj TSRMLS_CC); if (args_array == NULL) { server->wrapped = grpc_server_create(queue->wrapped, NULL); } else { array_hash = Z_ARRVAL_P(args_array); - if(zend_hash_find(array_hash, - "credentials", - sizeof("credentials"), - (void**)&creds_obj) == SUCCESS) { - if(zend_get_class_entry(*creds_obj TSRMLS_CC) != - grpc_ce_server_credentials) { + if (zend_hash_find(array_hash, "credentials", sizeof("credentials"), + (void **)&creds_obj) == SUCCESS) { + if (zend_get_class_entry(*creds_obj TSRMLS_CC) != + grpc_ce_server_credentials) { zend_throw_exception(spl_ce_InvalidArgumentException, "credentials must be a ServerCredentials object", 1 TSRMLS_CC); return; } - creds = (wrapped_grpc_server_credentials*)zend_object_store_get_object( + creds = (wrapped_grpc_server_credentials *)zend_object_store_get_object( *creds_obj TSRMLS_CC); zend_hash_del(array_hash, "credentials", sizeof("credentials")); } @@ -106,9 +100,8 @@ PHP_METHOD(Server, __construct){ server->wrapped = grpc_server_create(queue->wrapped, &args); } else { gpr_log(GPR_DEBUG, "Initialized secure server"); - server->wrapped = grpc_secure_server_create(creds->wrapped, - queue->wrapped, - &args); + server->wrapped = + grpc_secure_server_create(creds->wrapped, queue->wrapped, &args); } efree(args.args); } @@ -120,21 +113,19 @@ PHP_METHOD(Server, __construct){ * @param long $tag_cancel The tag to use if the call is cancelled * @return Void */ -PHP_METHOD(Server, request_call){ +PHP_METHOD(Server, request_call) { grpc_call_error error_code; wrapped_grpc_server *server = - (wrapped_grpc_server*)zend_object_store_get_object(getThis() TSRMLS_CC); + (wrapped_grpc_server *)zend_object_store_get_object(getThis() TSRMLS_CC); long tag_new; /* "l" == 1 long */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "l", - &tag_new) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &tag_new) == + FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, - "request_call expects a long", - 1 TSRMLS_CC); + "request_call expects a long", 1 TSRMLS_CC); return; } - error_code = grpc_server_request_call(server->wrapped, (void*)tag_new); + error_code = grpc_server_request_call(server->wrapped, (void *)tag_new); MAYBE_THROW_CALL_ERROR(request_call, error_code); } @@ -143,35 +134,31 @@ PHP_METHOD(Server, request_call){ * @param string $addr The address to add * @return true on success, false on failure */ -PHP_METHOD(Server, add_http2_port){ +PHP_METHOD(Server, add_http2_port) { wrapped_grpc_server *server = - (wrapped_grpc_server*)zend_object_store_get_object(getThis() TSRMLS_CC); + (wrapped_grpc_server *)zend_object_store_get_object(getThis() TSRMLS_CC); const char *addr; int addr_len; /* "s" == 1 string */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "s", - &addr, &addr_len) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &addr, &addr_len) == + FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, - "add_http2_port expects a string", - 1 TSRMLS_CC); + "add_http2_port expects a string", 1 TSRMLS_CC); return; } RETURN_BOOL(grpc_server_add_http2_port(server->wrapped, addr)); } -PHP_METHOD(Server, add_secure_http2_port){ +PHP_METHOD(Server, add_secure_http2_port) { wrapped_grpc_server *server = - (wrapped_grpc_server*)zend_object_store_get_object(getThis() TSRMLS_CC); + (wrapped_grpc_server *)zend_object_store_get_object(getThis() TSRMLS_CC); const char *addr; int addr_len; /* "s" == 1 string */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "s", - &addr, &addr_len) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &addr, &addr_len) == + FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, - "add_http2_port expects a string", - 1 TSRMLS_CC); + "add_http2_port expects a string", 1 TSRMLS_CC); return; } RETURN_BOOL(grpc_server_add_secure_http2_port(server->wrapped, addr)); @@ -181,22 +168,20 @@ PHP_METHOD(Server, add_secure_http2_port){ * Start a server - tells all listeners to start listening * @return Void */ -PHP_METHOD(Server, start){ +PHP_METHOD(Server, start) { wrapped_grpc_server *server = - (wrapped_grpc_server*)zend_object_store_get_object(getThis() TSRMLS_CC); + (wrapped_grpc_server *)zend_object_store_get_object(getThis() TSRMLS_CC); grpc_server_start(server->wrapped); } static zend_function_entry server_methods[] = { - PHP_ME(Server, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) - PHP_ME(Server, request_call, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Server, add_http2_port, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Server, add_secure_http2_port, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Server, start, NULL, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - -void grpc_init_server(TSRMLS_D){ + PHP_ME(Server, __construct, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR) + PHP_ME(Server, request_call, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Server, add_http2_port, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Server, add_secure_http2_port, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Server, start, NULL, ZEND_ACC_PUBLIC) PHP_FE_END}; + +void grpc_init_server(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "Grpc\\Server", server_methods); ce.create_object = create_wrapped_grpc_server; diff --git a/src/php/ext/grpc/server_credentials.c b/src/php/ext/grpc/server_credentials.c old mode 100755 new mode 100644 index b07790b4be9..1f8e58aa4d1 --- a/src/php/ext/grpc/server_credentials.c +++ b/src/php/ext/grpc/server_credentials.c @@ -17,10 +17,10 @@ #include "grpc/grpc_security.h" /* Frees and destroys an instace of wrapped_grpc_server_credentials */ -void free_wrapped_grpc_server_credentials(void *object TSRMLS_DC){ +void free_wrapped_grpc_server_credentials(void *object TSRMLS_DC) { wrapped_grpc_server_credentials *creds = - (wrapped_grpc_server_credentials*)object; - if(creds->wrapped != NULL) { + (wrapped_grpc_server_credentials *)object; + if (creds->wrapped != NULL) { grpc_server_credentials_release(creds->wrapped); } efree(creds); @@ -29,32 +29,30 @@ void free_wrapped_grpc_server_credentials(void *object TSRMLS_DC){ /* Initializes an instace of wrapped_grpc_server_credentials to be associated * with an object of a class specified by class_type */ zend_object_value create_wrapped_grpc_server_credentials( - zend_class_entry *class_type TSRMLS_DC){ + zend_class_entry *class_type TSRMLS_DC) { zend_object_value retval; wrapped_grpc_server_credentials *intern; - intern = (wrapped_grpc_server_credentials*)emalloc(sizeof( - wrapped_grpc_server_credentials)); + intern = (wrapped_grpc_server_credentials *)emalloc( + sizeof(wrapped_grpc_server_credentials)); memset(intern, 0, sizeof(wrapped_grpc_server_credentials)); zend_object_std_init(&intern->std, class_type TSRMLS_CC); object_properties_init(&intern->std, class_type); retval.handle = zend_objects_store_put( - intern, - (zend_objects_store_dtor_t) zend_objects_destroy_object, - free_wrapped_grpc_server_credentials, - NULL TSRMLS_CC); + intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, + free_wrapped_grpc_server_credentials, NULL TSRMLS_CC); retval.handlers = zend_get_std_object_handlers(); return retval; } -zval *grpc_php_wrap_server_credentials(grpc_server_credentials *wrapped){ +zval *grpc_php_wrap_server_credentials(grpc_server_credentials *wrapped) { zval *server_credentials_object; MAKE_STD_ZVAL(server_credentials_object); object_init_ex(server_credentials_object, grpc_ce_server_credentials); wrapped_grpc_server_credentials *server_credentials = - (wrapped_grpc_server_credentials*)zend_object_store_get_object( - server_credentials_object TSRMLS_CC); + (wrapped_grpc_server_credentials *)zend_object_store_get_object( + server_credentials_object TSRMLS_CC); server_credentials->wrapped = wrapped; return server_credentials_object; } @@ -66,7 +64,7 @@ zval *grpc_php_wrap_server_credentials(grpc_server_credentials *wrapped){ * @param string pem_cert_chain PEM encoding of the client's certificate chain * @return Credentials The new SSL credentials object */ -PHP_METHOD(ServerCredentials, createSsl){ +PHP_METHOD(ServerCredentials, createSsl) { char *pem_root_certs = 0; char *pem_private_key; char *pem_cert_chain; @@ -74,20 +72,18 @@ PHP_METHOD(ServerCredentials, createSsl){ int root_certs_length = 0, private_key_length, cert_chain_length; /* "s!ss" == 1 nullable string, 2 strings */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "s!ss", - &pem_root_certs, &root_certs_length, - &pem_private_key, &private_key_length, - &pem_cert_chain, &cert_chain_length) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!ss", &pem_root_certs, + &root_certs_length, &pem_private_key, + &private_key_length, &pem_cert_chain, + &cert_chain_length) == FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, - "createSsl expects 3 strings", - 1 TSRMLS_CC); + "createSsl expects 3 strings", 1 TSRMLS_CC); return; } grpc_server_credentials *creds = grpc_ssl_server_credentials_create( - (unsigned char*)pem_root_certs, (size_t)root_certs_length, - (unsigned char*)pem_private_key, (size_t)private_key_length, - (unsigned char*)pem_cert_chain, (size_t)cert_chain_length); + (unsigned char *)pem_root_certs, (size_t)root_certs_length, + (unsigned char *)pem_private_key, (size_t)private_key_length, + (unsigned char *)pem_cert_chain, (size_t)cert_chain_length); zval *creds_object = grpc_php_wrap_server_credentials(creds); RETURN_DESTROY_ZVAL(creds_object); } @@ -96,7 +92,7 @@ PHP_METHOD(ServerCredentials, createSsl){ * Create fake credentials. Only to be used for testing. * @return ServerCredentials The new fake credentials object */ -PHP_METHOD(ServerCredentials, createFake){ +PHP_METHOD(ServerCredentials, createFake) { grpc_server_credentials *creds = grpc_fake_transport_security_server_credentials_create(); zval *creds_object = grpc_php_wrap_server_credentials(creds); @@ -104,12 +100,12 @@ PHP_METHOD(ServerCredentials, createFake){ } static zend_function_entry server_credentials_methods[] = { - PHP_ME(ServerCredentials, createSsl, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(ServerCredentials, createFake, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_FE_END -}; + PHP_ME(ServerCredentials, createSsl, NULL, + ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + PHP_ME(ServerCredentials, createFake, NULL, + ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) PHP_FE_END}; -void grpc_init_server_credentials(TSRMLS_D){ +void grpc_init_server_credentials(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "Grpc\\ServerCredentials", server_credentials_methods); ce.create_object = create_wrapped_grpc_server_credentials; diff --git a/src/php/ext/grpc/timeval.c b/src/php/ext/grpc/timeval.c old mode 100755 new mode 100644 index 7b7e0e6443b..cbbbf379156 --- a/src/php/ext/grpc/timeval.c +++ b/src/php/ext/grpc/timeval.c @@ -18,36 +18,32 @@ #include "grpc/support/time.h" /* Frees and destroys an instance of wrapped_grpc_call */ -void free_wrapped_grpc_timeval(void *object TSRMLS_DC){ - efree(object); -} +void free_wrapped_grpc_timeval(void *object TSRMLS_DC) { efree(object); } /* Initializes an instance of wrapped_grpc_timeval to be associated with an * object of a class specified by class_type */ -zend_object_value create_wrapped_grpc_timeval( - zend_class_entry *class_type TSRMLS_DC){ +zend_object_value create_wrapped_grpc_timeval(zend_class_entry *class_type + TSRMLS_DC) { zend_object_value retval; wrapped_grpc_timeval *intern; - intern = (wrapped_grpc_timeval*)emalloc(sizeof(wrapped_grpc_timeval)); + intern = (wrapped_grpc_timeval *)emalloc(sizeof(wrapped_grpc_timeval)); memset(intern, 0, sizeof(wrapped_grpc_timeval)); zend_object_std_init(&intern->std, class_type TSRMLS_CC); object_properties_init(&intern->std, class_type); retval.handle = zend_objects_store_put( - intern, - (zend_objects_store_dtor_t)zend_objects_destroy_object, - free_wrapped_grpc_timeval, - NULL TSRMLS_CC); + intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, + free_wrapped_grpc_timeval, NULL TSRMLS_CC); retval.handlers = zend_get_std_object_handlers(); return retval; } -zval *grpc_php_wrap_timeval(gpr_timespec wrapped){ +zval *grpc_php_wrap_timeval(gpr_timespec wrapped) { zval *timeval_object; MAKE_STD_ZVAL(timeval_object); object_init_ex(timeval_object, grpc_ce_timeval); wrapped_grpc_timeval *timeval = - (wrapped_grpc_timeval*)zend_object_store_get_object( - timeval_object TSRMLS_CC); + (wrapped_grpc_timeval *)zend_object_store_get_object( + timeval_object TSRMLS_CC); memcpy(&timeval->wrapped, &wrapped, sizeof(gpr_timespec)); return timeval_object; } @@ -56,17 +52,15 @@ zval *grpc_php_wrap_timeval(gpr_timespec wrapped){ * Constructs a new instance of the Timeval class * @param long $usec The number of microseconds in the interval */ -PHP_METHOD(Timeval, __construct){ +PHP_METHOD(Timeval, __construct) { wrapped_grpc_timeval *timeval = - (wrapped_grpc_timeval*)zend_object_store_get_object(getThis() TSRMLS_CC); + (wrapped_grpc_timeval *)zend_object_store_get_object(getThis() TSRMLS_CC); long microseconds; /* "l" == 1 long */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "l", - µseconds) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", µseconds) == + FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, - "Timeval expects a long", - 1 TSRMLS_CC); + "Timeval expects a long", 1 TSRMLS_CC); return; } gpr_timespec time = gpr_time_from_micros(microseconds); @@ -79,23 +73,21 @@ PHP_METHOD(Timeval, __construct){ * @param Timeval $other The other Timeval object to add * @return Timeval A new Timeval object containing the sum */ -PHP_METHOD(Timeval, add){ +PHP_METHOD(Timeval, add) { zval *other_obj; /* "O" == 1 Object */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "O", - &other_obj, grpc_ce_timeval) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &other_obj, + grpc_ce_timeval) == FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, - "add expects a Timeval", - 1 TSRMLS_CC); + "add expects a Timeval", 1 TSRMLS_CC); return; } wrapped_grpc_timeval *self = - (wrapped_grpc_timeval*)zend_object_store_get_object(getThis() TSRMLS_CC); + (wrapped_grpc_timeval *)zend_object_store_get_object(getThis() TSRMLS_CC); wrapped_grpc_timeval *other = - (wrapped_grpc_timeval*)zend_object_store_get_object(other_obj TSRMLS_CC); - zval *sum = grpc_php_wrap_timeval(gpr_time_add(self->wrapped, - other->wrapped)); + (wrapped_grpc_timeval *)zend_object_store_get_object(other_obj TSRMLS_CC); + zval *sum = + grpc_php_wrap_timeval(gpr_time_add(self->wrapped, other->wrapped)); RETURN_DESTROY_ZVAL(sum); } @@ -105,23 +97,21 @@ PHP_METHOD(Timeval, add){ * @param Timeval $other The other Timeval object to subtract * @param Timeval A new Timeval object containing the sum */ -PHP_METHOD(Timeval, subtract){ +PHP_METHOD(Timeval, subtract) { zval *other_obj; /* "O" == 1 Object */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "O", - &other_obj, grpc_ce_timeval) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &other_obj, + grpc_ce_timeval) == FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, - "subtract expects a Timeval", - 1 TSRMLS_CC); + "subtract expects a Timeval", 1 TSRMLS_CC); return; } wrapped_grpc_timeval *self = - (wrapped_grpc_timeval*)zend_object_store_get_object(getThis() TSRMLS_CC); + (wrapped_grpc_timeval *)zend_object_store_get_object(getThis() TSRMLS_CC); wrapped_grpc_timeval *other = - (wrapped_grpc_timeval*)zend_object_store_get_object(other_obj TSRMLS_CC); - zval *diff = grpc_php_wrap_timeval(gpr_time_sub(self->wrapped, - other->wrapped)); + (wrapped_grpc_timeval *)zend_object_store_get_object(other_obj TSRMLS_CC); + zval *diff = + grpc_php_wrap_timeval(gpr_time_sub(self->wrapped, other->wrapped)); RETURN_DESTROY_ZVAL(diff); } @@ -132,22 +122,20 @@ PHP_METHOD(Timeval, subtract){ * @param Timeval $b The second time to compare * @return long */ -PHP_METHOD(Timeval, compare){ +PHP_METHOD(Timeval, compare) { zval *a_obj, *b_obj; /* "OO" == 2 Objects */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "OO", - &a_obj, grpc_ce_timeval, - &b_obj, grpc_ce_timeval) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OO", &a_obj, + grpc_ce_timeval, &b_obj, + grpc_ce_timeval) == FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, - "compare expects two Timevals", - 1 TSRMLS_CC); + "compare expects two Timevals", 1 TSRMLS_CC); return; } wrapped_grpc_timeval *a = - (wrapped_grpc_timeval*)zend_object_store_get_object(a_obj TSRMLS_CC); + (wrapped_grpc_timeval *)zend_object_store_get_object(a_obj TSRMLS_CC); wrapped_grpc_timeval *b = - (wrapped_grpc_timeval*)zend_object_store_get_object(b_obj TSRMLS_CC); + (wrapped_grpc_timeval *)zend_object_store_get_object(b_obj TSRMLS_CC); long result = gpr_time_cmp(a->wrapped, b->wrapped); RETURN_LONG(result); } @@ -159,25 +147,23 @@ PHP_METHOD(Timeval, compare){ * @param Timeval $threshold The threshold to check against * @return bool True if $a and $b are within $threshold, False otherwise */ -PHP_METHOD(Timeval, similar){ +PHP_METHOD(Timeval, similar) { zval *a_obj, *b_obj, *thresh_obj; /* "OOO" == 3 Objects */ - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, - "OOO", - &a_obj, grpc_ce_timeval, - &b_obj, grpc_ce_timeval, - &thresh_obj, grpc_ce_timeval) == FAILURE){ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OOO", &a_obj, + grpc_ce_timeval, &b_obj, grpc_ce_timeval, + &thresh_obj, grpc_ce_timeval) == FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, - "compare expects three Timevals", - 1 TSRMLS_CC); + "compare expects three Timevals", 1 TSRMLS_CC); return; } wrapped_grpc_timeval *a = - (wrapped_grpc_timeval*)zend_object_store_get_object(a_obj TSRMLS_CC); + (wrapped_grpc_timeval *)zend_object_store_get_object(a_obj TSRMLS_CC); wrapped_grpc_timeval *b = - (wrapped_grpc_timeval*)zend_object_store_get_object(b_obj TSRMLS_CC); + (wrapped_grpc_timeval *)zend_object_store_get_object(b_obj TSRMLS_CC); wrapped_grpc_timeval *thresh = - (wrapped_grpc_timeval*)zend_object_store_get_object(thresh_obj TSRMLS_CC); + (wrapped_grpc_timeval *)zend_object_store_get_object( + thresh_obj TSRMLS_CC); int result = gpr_time_similar(a->wrapped, b->wrapped, thresh->wrapped); RETURN_BOOL(result); } @@ -186,7 +172,7 @@ PHP_METHOD(Timeval, similar){ * Returns the current time as a timeval object * @return Timeval The current time */ -PHP_METHOD(Timeval, now){ +PHP_METHOD(Timeval, now) { zval *now = grpc_php_wrap_timeval(gpr_now()); RETURN_DESTROY_ZVAL(now); } @@ -195,7 +181,7 @@ PHP_METHOD(Timeval, now){ * Returns the zero time interval as a timeval object * @return Timeval Zero length time interval */ -PHP_METHOD(Timeval, zero){ +PHP_METHOD(Timeval, zero) { zval *grpc_php_timeval_zero = grpc_php_wrap_timeval(gpr_time_0); RETURN_ZVAL(grpc_php_timeval_zero, false, /* Copy original before returning? */ @@ -206,7 +192,7 @@ PHP_METHOD(Timeval, zero){ * Returns the infinite future time value as a timeval object * @return Timeval Infinite future time value */ -PHP_METHOD(Timeval, inf_future){ +PHP_METHOD(Timeval, inf_future) { zval *grpc_php_timeval_inf_future = grpc_php_wrap_timeval(gpr_inf_future); RETURN_DESTROY_ZVAL(grpc_php_timeval_inf_future); } @@ -215,7 +201,7 @@ PHP_METHOD(Timeval, inf_future){ * Returns the infinite past time value as a timeval object * @return Timeval Infinite past time value */ -PHP_METHOD(Timeval, inf_past){ +PHP_METHOD(Timeval, inf_past) { zval *grpc_php_timeval_inf_past = grpc_php_wrap_timeval(gpr_inf_past); RETURN_DESTROY_ZVAL(grpc_php_timeval_inf_past); } @@ -224,32 +210,29 @@ PHP_METHOD(Timeval, inf_past){ * Sleep until this time, interpreted as an absolute timeout * @return void */ -PHP_METHOD(Timeval, sleep_until){ +PHP_METHOD(Timeval, sleep_until) { wrapped_grpc_timeval *this = - (wrapped_grpc_timeval*)zend_object_store_get_object(getThis() TSRMLS_CC); + (wrapped_grpc_timeval *)zend_object_store_get_object(getThis() TSRMLS_CC); gpr_sleep_until(this->wrapped); } static zend_function_entry timeval_methods[] = { - PHP_ME(Timeval, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) - PHP_ME(Timeval, add, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Timeval, compare, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(Timeval, inf_future, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(Timeval, inf_past, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(Timeval, now, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(Timeval, similar, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(Timeval, sleep_until, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Timeval, subtract, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Timeval, zero, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_FE_END -}; - -void grpc_init_timeval(TSRMLS_D){ + PHP_ME(Timeval, __construct, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR) + PHP_ME(Timeval, add, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Timeval, compare, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + PHP_ME(Timeval, inf_future, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + PHP_ME(Timeval, inf_past, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + PHP_ME(Timeval, now, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + PHP_ME(Timeval, similar, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + PHP_ME(Timeval, sleep_until, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Timeval, subtract, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Timeval, zero, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) PHP_FE_END}; + +void grpc_init_timeval(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "Grpc\\Timeval", timeval_methods); ce.create_object = create_wrapped_grpc_timeval; grpc_ce_timeval = zend_register_internal_class(&ce TSRMLS_CC); } -void grpc_shutdown_timeval(TSRMLS_D){ -} +void grpc_shutdown_timeval(TSRMLS_D) {} diff --git a/src/ruby/.rubocop.yml b/src/ruby/.rubocop.yml new file mode 100644 index 00000000000..47e382afa70 --- /dev/null +++ b/src/ruby/.rubocop.yml @@ -0,0 +1,10 @@ +# This is the configuration used to check the rubocop source code. + +inherit_from: .rubocop_todo.yml + +AllCops: + Exclude: + - 'bin/apis/**/*' + - 'bin/interop/test/**/*' + - 'bin/math.rb' + - 'bin/math_services.rb' diff --git a/src/ruby/.rubocop_todo.yml b/src/ruby/.rubocop_todo.yml new file mode 100644 index 00000000000..d5bb55e5a84 --- /dev/null +++ b/src/ruby/.rubocop_todo.yml @@ -0,0 +1,52 @@ +# This configuration was generated by `rubocop --auto-gen-config` +# on 2015-01-16 02:30:04 -0800 using RuboCop version 0.28.0. +# The point is for the user to remove these configuration records +# one by one as the offenses are removed from the code base. +# Note that changes in the inspected code, or installation of new +# versions of RuboCop, may require this file to be generated again. + +# Offense count: 3 +# Lint/UselessAssignment: +# Enabled: false + +# Offense count: 33 +Metrics/AbcSize: + Max: 39 + +# Offense count: 3 +# Configuration parameters: CountComments. +Metrics/ClassLength: + Max: 231 + +# Offense count: 2 +Metrics/CyclomaticComplexity: + Max: 8 + +# Offense count: 36 +# Configuration parameters: CountComments. +Metrics/MethodLength: + Max: 37 + +# Offense count: 8 +# Configuration parameters: CountKeywordArgs. +Metrics/ParameterLists: + Max: 8 + +# Offense count: 2 +Metrics/PerceivedComplexity: + Max: 10 + +# Offense count: 7 +# Configuration parameters: AllowedVariables. +Style/GlobalVars: + Enabled: false + +# Offense count: 1 +# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles. +Style/Next: + Enabled: false + +# Offense count: 2 +# Configuration parameters: Methods. +Style/SingleLineBlockParams: + Enabled: false diff --git a/src/ruby/Rakefile b/src/ruby/Rakefile index 0a0fbceccac..6ba9a97c893 100755 --- a/src/ruby/Rakefile +++ b/src/ruby/Rakefile @@ -1,46 +1,44 @@ # -*- ruby -*- require 'rake/extensiontask' require 'rspec/core/rake_task' +require 'rubocop/rake_task' +desc 'Run Rubocop to check for style violations' +RuboCop::RakeTask.new Rake::ExtensionTask.new 'grpc' do |ext| ext.lib_dir = File.join('lib', 'grpc') end SPEC_SUITES = [ - { :id => :wrapper, :title => 'wrapper layer', :files => %w(spec/*.rb) }, - { :id => :idiomatic, :title => 'idiomatic layer', :dir => %w(spec/generic), - :tag => '~bidi' }, - { :id => :bidi, :title => 'bidi tests', :dir => %w(spec/generic), - :tag => 'bidi' } + { id: :wrapper, title: 'wrapper layer', files: %w(spec/*.rb) }, + { id: :idiomatic, title: 'idiomatic layer', dir: %w(spec/generic), + tag: '~bidi' }, + { id: :bidi, title: 'bidi tests', dir: %w(spec/generic), + tag: 'bidi' } ] -desc "Run all RSpec tests" +desc 'Run all RSpec tests' namespace :spec do namespace :suite do SPEC_SUITES.each do |suite| desc "Run all specs in #{suite[:title]} spec suite" RSpec::Core::RakeTask.new(suite[:id]) do |t| spec_files = [] - if suite[:files] - suite[:files].each { |f| spec_files += Dir[f] } - end + suite[:files].each { |f| spec_files += Dir[f] } if suite[:files] if suite[:dirs] suite[:dirs].each { |f| spec_files += Dir["#{f}/**/*_spec.rb"] } end t.pattern = spec_files - - if suite[:tag] - t.rspec_opts = "--tag #{suite[:tag]}" - end + t.rspec_opts = "--tag #{suite[:tag]}" if suite[:tag] end end end end -task :default => "spec:suite:idiomatic" # this should be spec:suite:bidi -task "spec:suite:wrapper" => :compile -task "spec:suite:idiomatic" => "spec:suite:wrapper" -task "spec:suite:bidi" => "spec:suite:idiomatic" +task default: 'spec:suite:idiomatic' # this should be spec:suite:bidi +task 'spec:suite:wrapper' => :compile +task 'spec:suite:idiomatic' => 'spec:suite:wrapper' +task 'spec:suite:bidi' => 'spec:suite:idiomatic' diff --git a/src/ruby/bin/interop/interop_client.rb b/src/ruby/bin/interop/interop_client.rb old mode 100644 new mode 100755 index d0478bb4d1c..0ce10d9e30b --- a/src/ruby/bin/interop/interop_client.rb +++ b/src/ruby/bin/interop/interop_client.rb @@ -1,3 +1,5 @@ +#!/usr/bin/env ruby + # Copyright 2014, Google Inc. # All rights reserved. # @@ -27,7 +29,6 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#!/usr/bin/env ruby # interop_client is a testing tool that accesses a gRPC interop testing # server and runs a test on it. # @@ -64,7 +65,7 @@ end # creates a Credentials from the test certificates. def test_creds certs = load_test_certs - creds = GRPC::Core::Credentials.new(certs[0]) + GRPC::Core::Credentials.new(certs[0]) end # creates a test stub that accesses host:port securely. @@ -72,15 +73,15 @@ def create_stub(host, port) address = "#{host}:#{port}" stub_opts = { :creds => test_creds, - GRPC::Core::Channel::SSL_TARGET => 'foo.test.google.com', + GRPC::Core::Channel::SSL_TARGET => 'foo.test.google.com' } logger.info("... connecting securely to #{address}") - stub = Grpc::Testing::TestService::Stub.new(address, **stub_opts) + Grpc::Testing::TestService::Stub.new(address, **stub_opts) end # produces a string of null chars (\0) of length l. def nulls(l) - raise 'requires #{l} to be +ve' if l < 0 + fail 'requires #{l} to be +ve' if l < 0 [].pack('x' * l).force_encoding('utf-8') end @@ -101,13 +102,13 @@ class PingPongPlayer def each_item return enum_for(:each_item) unless block_given? - req_cls, p_cls= StreamingOutputCallRequest, ResponseParameters # short + req_cls, p_cls = StreamingOutputCallRequest, ResponseParameters # short count = 0 @msg_sizes.each do |m| req_size, resp_size = m - req = req_cls.new(:payload => Payload.new(:body => nulls(req_size)), - :response_type => COMPRESSABLE, - :response_parameters => [p_cls.new(:size => resp_size)]) + req = req_cls.new(payload: Payload.new(body: nulls(req_size)), + response_type: COMPRESSABLE, + response_parameters: [p_cls.new(size: resp_size)]) yield req resp = @queue.pop assert_equal(PayloadType.lookup(COMPRESSABLE), resp.payload.type, @@ -147,11 +148,11 @@ class NamedTests # ruby server # FAILED def large_unary - req_size, wanted_response_size = 271828, 314159 - payload = Payload.new(:type => COMPRESSABLE, :body => nulls(req_size)) - req = SimpleRequest.new(:response_type => COMPRESSABLE, - :response_size => wanted_response_size, - :payload => payload) + req_size, wanted_response_size = 271_828, 314_159 + payload = Payload.new(type: COMPRESSABLE, body: nulls(req_size)) + req = SimpleRequest.new(response_type: COMPRESSABLE, + response_size: wanted_response_size, + payload: payload) resp = @stub.unary_call(req) assert_equal(wanted_response_size, resp.payload.body.length, 'large_unary: payload had the wrong length') @@ -165,27 +166,27 @@ class NamedTests # ruby server # FAILED def client_streaming - msg_sizes = [27182, 8, 1828, 45904] - wanted_aggregate_size = 74922 + msg_sizes = [27_182, 8, 1828, 45_904] + wanted_aggregate_size = 74_922 reqs = msg_sizes.map do |x| - req = Payload.new(:body => nulls(x)) - StreamingInputCallRequest.new(:payload => req) + req = Payload.new(body: nulls(x)) + StreamingInputCallRequest.new(payload: req) end resp = @stub.streaming_input_call(reqs) assert_equal(wanted_aggregate_size, resp.aggregated_payload_size, 'client_streaming: aggregate payload size is incorrect') p 'OK: client_streaming' - end + end # TESTING: # PASSED # ruby server # FAILED def server_streaming - msg_sizes = [31415, 9, 2653, 58979] - response_spec = msg_sizes.map { |s| ResponseParameters.new(:size => s) } - req = StreamingOutputCallRequest.new(:response_type => COMPRESSABLE, - :response_parameters => response_spec) + msg_sizes = [31_415, 9, 2653, 58_979] + response_spec = msg_sizes.map { |s| ResponseParameters.new(size: s) } + req = StreamingOutputCallRequest.new(response_type: COMPRESSABLE, + response_parameters: response_spec) resps = @stub.streaming_output_call(req) resps.each_with_index do |r, i| assert i < msg_sizes.length, 'too many responses' @@ -202,13 +203,12 @@ class NamedTests # ruby server # FAILED def ping_pong - msg_sizes = [[27182, 31415], [8, 9], [1828, 2653], [45904, 58979]] + msg_sizes = [[27_182, 31_415], [8, 9], [1828, 2653], [45_904, 58_979]] ppp = PingPongPlayer.new(msg_sizes) resps = @stub.full_duplex_call(ppp.each_item) resps.each { |r| ppp.queue.push(r) } p 'OK: ping_pong' end - end # validates the the command line options, returning them as a Hash. @@ -216,7 +216,7 @@ def parse_options options = { 'server_host' => nil, 'server_port' => nil, - 'test_case' => nil, + 'test_case' => nil } OptionParser.new do |opts| opts.banner = 'Usage: --server_host --server_port server_port' @@ -227,17 +227,17 @@ def parse_options options['server_port'] = v end # instance_methods(false) gives only the methods defined in that class - test_cases = NamedTests.instance_methods(false).map { |t| t.to_s } + test_cases = NamedTests.instance_methods(false).map(&:to_s) test_case_list = test_cases.join(',') - opts.on("--test_case CODE", test_cases, {}, "select a test_case", + opts.on('--test_case CODE', test_cases, {}, 'select a test_case', " (#{test_case_list})") do |v| options['test_case'] = v end end.parse! - ['server_host', 'server_port', 'test_case'].each do |arg| + %w(server_host, server_port, test_case).each do |arg| if options[arg].nil? - raise OptionParser::MissingArgument.new("please specify --#{arg}") + fail(OptionParser::MissingArgument, "please specify --#{arg}") end end options diff --git a/src/ruby/bin/interop/interop_server.rb b/src/ruby/bin/interop/interop_server.rb old mode 100644 new mode 100755 index 53e271e80d5..9273dcdf911 --- a/src/ruby/bin/interop/interop_server.rb +++ b/src/ruby/bin/interop/interop_server.rb @@ -1,3 +1,5 @@ +#!/usr/bin/env ruby + # Copyright 2014, Google Inc. # All rights reserved. # @@ -27,8 +29,6 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#!/usr/bin/env ruby -# # interop_server is a Testing app that runs a gRPC interop testing server. # # It helps validate interoperation b/w gRPC in different environments @@ -62,12 +62,12 @@ end # creates a ServerCredentials from the test certificates. def test_server_creds certs = load_test_certs - server_creds = GRPC::Core::ServerCredentials.new(nil, certs[1], certs[2]) + GRPC::Core::ServerCredentials.new(nil, certs[1], certs[2]) end # produces a string of null chars (\0) of length l. def nulls(l) - raise 'requires #{l} to be +ve' if l < 0 + fail 'requires #{l} to be +ve' if l < 0 [].pack('x' * l).force_encoding('utf-8') end @@ -86,7 +86,7 @@ class EnumeratorQueue loop do r = @q.pop break if r.equal?(@sentinel) - raise r if r.is_a?Exception + fail r if r.is_a? Exception yield r end end @@ -98,27 +98,27 @@ class TestTarget < Grpc::Testing::TestService::Service include Grpc::Testing include Grpc::Testing::PayloadType - def empty_call(empty, call) + def empty_call(_empty, _call) Empty.new end - def unary_call(simple_req, call) + def unary_call(simple_req, _call) req_size = simple_req.response_size - SimpleResponse.new(:payload => Payload.new(:type => COMPRESSABLE, - :body => nulls(req_size))) + SimpleResponse.new(payload: Payload.new(type: COMPRESSABLE, + body: nulls(req_size))) end def streaming_input_call(call) sizes = call.each_remote_read.map { |x| x.payload.body.length } - sum = sizes.inject { |sum,x| sum + x } - StreamingInputCallResponse.new(:aggregated_payload_size => sum) + sum = sizes.inject { |s, x| s + x } + StreamingInputCallResponse.new(aggregated_payload_size: sum) end - def streaming_output_call(req, call) + def streaming_output_call(req, _call) cls = StreamingOutputCallResponse req.response_parameters.map do |p| - cls.new(:payload => Payload.new(:type => req.response_type, - :body => nulls(p.size))) + cls.new(payload: Payload.new(type: req.response_type, + body: nulls(p.size))) end end @@ -126,13 +126,13 @@ class TestTarget < Grpc::Testing::TestService::Service # reqs is a lazy Enumerator of the requests sent by the client. q = EnumeratorQueue.new(self) cls = StreamingOutputCallResponse - t = Thread.new do + Thread.new do begin reqs.each do |req| 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))) + resp = cls.new(payload: Payload.new(type: req.response_type, + body: nulls(resp_size))) q.push(resp) end logger.info('finished reads') @@ -149,13 +149,12 @@ class TestTarget < Grpc::Testing::TestService::Service # currently used in any tests full_duplex_call(reqs) end - end # validates the the command line options, returning them as a Hash. def parse_options options = { - 'port' => nil, + 'port' => nil } OptionParser.new do |opts| opts.banner = 'Usage: --port port' @@ -165,7 +164,7 @@ def parse_options end.parse! if options['port'].nil? - raise OptionParser::MissingArgument.new("please specify --port") + fail(OptionParser::MissingArgument, 'please specify --port') end options end diff --git a/src/ruby/bin/math_client.rb b/src/ruby/bin/math_client.rb old mode 100644 new mode 100755 index 5cba9317f4f..195406c8b36 --- a/src/ruby/bin/math_client.rb +++ b/src/ruby/bin/math_client.rb @@ -1,3 +1,5 @@ +#!/usr/bin/env ruby + # Copyright 2014, Google Inc. # All rights reserved. # @@ -27,8 +29,6 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#!/usr/bin/env ruby -# # Sample app that accesses a Calc service running on a Ruby gRPC server and # helps validate RpcServer as a gRPC server using proto2 serialization. # @@ -48,9 +48,9 @@ include GRPC::Core::TimeConsts def do_div(stub) logger.info('request_response') logger.info('----------------') - req = Math::DivArgs.new(:dividend => 7, :divisor => 3) + req = Math::DivArgs.new(dividend: 7, divisor: 3) logger.info("div(7/3): req=#{req.inspect}") - resp = stub.div(req, deadline=INFINITE_FUTURE) + resp = stub.div(req, INFINITE_FUTURE) logger.info("Answer: #{resp.inspect}") logger.info('----------------') end @@ -59,7 +59,7 @@ def do_sum(stub) # to make client streaming requests, pass an enumerable of the inputs logger.info('client_streamer') logger.info('---------------') - reqs = [1, 2, 3, 4, 5].map { |x| Math::Num.new(:num => x) } + reqs = [1, 2, 3, 4, 5].map { |x| Math::Num.new(num: x) } logger.info("sum(1, 2, 3, 4, 5): reqs=#{reqs.inspect}") resp = stub.sum(reqs) # reqs.is_a?(Enumerable) logger.info("Answer: #{resp.inspect}") @@ -69,9 +69,9 @@ end def do_fib(stub) logger.info('server_streamer') logger.info('----------------') - req = Math::FibArgs.new(:limit => 11) + req = Math::FibArgs.new(limit: 11) logger.info("fib(11): req=#{req.inspect}") - resp = stub.fib(req, deadline=INFINITE_FUTURE) + resp = stub.fib(req, INFINITE_FUTURE) resp.each do |r| logger.info("Answer: #{r.inspect}") end @@ -82,11 +82,11 @@ def do_div_many(stub) logger.info('bidi_streamer') 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) + reqs << Math::DivArgs.new(dividend: 7, divisor: 3) + reqs << Math::Di5AvArgs.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}") - resp = stub.div_many(reqs, deadline=10) + resp = stub.div_many(reqs, 10) resp.each do |r| logger.info("Answer: #{r.inspect}") end @@ -102,7 +102,7 @@ end def test_creds certs = load_test_certs - creds = GRPC::Core::Credentials.new(certs[0]) + GRPC::Core::Credentials.new(certs[0]) end def main @@ -116,7 +116,7 @@ def main options['host'] = v end opts.on('-s', '--secure', 'access using test creds') do |v| - options['secure'] = true + options['secure'] = v end end.parse! @@ -127,7 +127,7 @@ def main if options['secure'] stub_opts = { :creds => test_creds, - GRPC::Core::Channel::SSL_TARGET => 'foo.test.google.com', + GRPC::Core::Channel::SSL_TARGET => 'foo.test.google.com' } p stub_opts p options['host'] diff --git a/src/ruby/bin/math_server.rb b/src/ruby/bin/math_server.rb old mode 100644 new mode 100755 index a0f301c3e79..55ee1d33141 --- a/src/ruby/bin/math_server.rb +++ b/src/ruby/bin/math_server.rb @@ -1,3 +1,5 @@ +#!/usr/bin/env ruby + # Copyright 2014, Google Inc. # All rights reserved. # @@ -27,8 +29,6 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#!/usr/bin/env ruby -# # Sample gRPC Ruby server that implements the Math::Calc service and helps # validate GRPC::RpcServer as GRPC implementation using proto2 serialization. # @@ -46,9 +46,8 @@ require 'optparse' # Holds state for a fibonacci series class Fibber - def initialize(limit) - raise "bad limit: got #{limit}, want limit > 0" if limit < 1 + fail "bad limit: got #{limit}, want limit > 0" if limit < 1 @limit = limit end @@ -57,14 +56,14 @@ class Fibber idx, current, previous = 0, 1, 1 until idx == @limit if idx == 0 || idx == 1 - yield Math::Num.new(:num => 1) + yield Math::Num.new(num: 1) idx += 1 next end tmp = current current = previous + current previous = tmp - yield Math::Num.new(:num => current) + yield Math::Num.new(num: current) idx += 1 end end @@ -85,43 +84,41 @@ class EnumeratorQueue loop do r = @q.pop break if r.equal?(@sentinel) - raise r if r.is_a?Exception + fail r if r.is_a? Exception yield r end end - end # The Math::Math:: module occurs because the service has the same name as its # package. That practice should be avoided by defining real services. class Calculator < Math::Math::Service - - def div(div_args, call) + def div(div_args, _call) if div_args.divisor == 0 # To send non-OK status handlers raise a StatusError with the code and # and detail they want sent as a Status. - raise GRPC::StatusError.new(GRPC::Status::INVALID_ARGUMENT, - 'divisor cannot be 0') + fail GRPC::StatusError.new(GRPC::Status::INVALID_ARGUMENT, + 'divisor cannot be 0') end - Math::DivReply.new(:quotient => div_args.dividend/div_args.divisor, - :remainder => div_args.dividend % div_args.divisor) + Math::DivReply.new(quotient: div_args.dividend / div_args.divisor, + remainder: div_args.dividend % div_args.divisor) end def sum(call) # the requests are accesible as the Enumerator call#each_request - nums = call.each_remote_read.collect { |x| x.num } - sum = nums.inject { |sum,x| sum + x } - Math::Num.new(:num => sum) + nums = call.each_remote_read.collect(&:num) + sum = nums.inject { |s, x| s + x } + Math::Num.new(num: sum) end - def fib(fib_args, call) + def fib(fib_args, _call) if fib_args.limit < 1 - raise StatusError.new(Status::INVALID_ARGUMENT, 'limit must be >= 0') + fail StatusError.new(Status::INVALID_ARGUMENT, 'limit must be >= 0') end # return an Enumerator of Nums - Fibber.new(fib_args.limit).generator() + Fibber.new(fib_args.limit).generator # just return the generator, GRPC::GenericServer sends each actual response end @@ -132,10 +129,10 @@ class Calculator < Math::Math::Service begin requests.each do |req| logger.info("read #{req.inspect}") - resp = Math::DivReply.new(:quotient => req.dividend/req.divisor, - :remainder => req.dividend % req.divisor) + 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 + Thread.pass # let the internal Bidi threads run end logger.info('finished reads') q.push(self) @@ -147,7 +144,6 @@ class Calculator < Math::Math::Service t.priority = -2 # hint that the div_many thread should not be favoured q.each_item end - end def load_test_certs @@ -159,7 +155,7 @@ end def test_server_creds certs = load_test_certs - server_creds = GRPC::Core::ServerCredentials.new(nil, certs[1], certs[2]) + GRPC::Core::ServerCredentials.new(nil, certs[1], certs[2]) end def main @@ -173,7 +169,7 @@ def main options['host'] = v end opts.on('-s', '--secure', 'access using test creds') do |v| - options['secure'] = true + options['secure'] = v end end.parse! diff --git a/src/ruby/bin/noproto_client.rb b/src/ruby/bin/noproto_client.rb old mode 100644 new mode 100755 index 50ae9fb68f8..74bdfbb93a7 --- a/src/ruby/bin/noproto_client.rb +++ b/src/ruby/bin/noproto_client.rb @@ -1,3 +1,5 @@ +#!/usr/bin/env ruby + # Copyright 2014, Google Inc. # All rights reserved. # @@ -27,7 +29,6 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#!/usr/bin/env ruby # Sample app that helps validate RpcServer without protobuf serialization. # # Usage: $ ruby -S path/to/noproto_client.rb @@ -39,16 +40,18 @@ $LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir) require 'grpc' require 'optparse' +# a simple non-protobuf message class. class NoProtoMsg - def self.marshal(o) + def self.marshal(_o) '' end - def self.unmarshal(o) + def self.unmarshal(_o) NoProtoMsg.new end end +# service the uses the non-protobuf message class. class NoProtoService include GRPC::GenericService rpc :AnRPC, NoProtoMsg, NoProtoMsg @@ -65,7 +68,7 @@ end def test_creds certs = load_test_certs - creds = GRPC::Core::Credentials.new(certs[0]) + GRPC::Core::Credentials.new(certs[0]) end def main @@ -79,14 +82,14 @@ def main options['host'] = v end opts.on('-s', '--secure', 'access using test creds') do |v| - options['secure'] = true + options['secure'] = v end end.parse! if options['secure'] stub_opts = { :creds => test_creds, - GRPC::Core::Channel::SSL_TARGET => 'foo.test.google.com', + GRPC::Core::Channel::SSL_TARGET => 'foo.test.google.com' } p stub_opts p options['host'] diff --git a/src/ruby/bin/noproto_server.rb b/src/ruby/bin/noproto_server.rb old mode 100644 new mode 100755 index d410827b22d..e34075c1f0c --- a/src/ruby/bin/noproto_server.rb +++ b/src/ruby/bin/noproto_server.rb @@ -1,3 +1,5 @@ +#!/usr/bin/env ruby + # Copyright 2014, Google Inc. # All rights reserved. # @@ -27,7 +29,6 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#!/usr/bin/env ruby # Sample app that helps validate RpcServer without protobuf serialization. # # Usage: $ path/to/noproto_server.rb @@ -39,26 +40,29 @@ $LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir) require 'grpc' require 'optparse' +# a simple non-protobuf message class. class NoProtoMsg - def self.marshal(o) + def self.marshal(_o) '' end - def self.unmarshal(o) + def self.unmarshal(_o) NoProtoMsg.new end end +# service the uses the non-protobuf message class. class NoProtoService include GRPC::GenericService rpc :AnRPC, NoProtoMsg, NoProtoMsg end +# an implementation of the non-protobuf service. class NoProto < NoProtoService - def initialize(default_var='ignored') + def initialize(_default_var = 'ignored') end - def an_rpc(req, call) + def an_rpc(req, _call) logger.info('echo service received a request') req end @@ -73,7 +77,7 @@ end def test_server_creds certs = load_test_certs - server_creds = GRPC::Core::ServerCredentials.new(nil, certs[1], certs[2]) + GRPC::Core::ServerCredentials.new(nil, certs[1], certs[2]) end def main @@ -87,7 +91,7 @@ def main options['host'] = v end opts.on('-s', '--secure', 'access using test creds') do |v| - options['secure'] = true + options['secure'] = v end end.parse! @@ -105,5 +109,4 @@ def main s.run end - main diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb index a828b472948..e948504e9e6 100644 --- a/src/ruby/ext/grpc/extconf.rb +++ b/src/ruby/ext/grpc/extconf.rb @@ -33,29 +33,29 @@ LIBDIR = RbConfig::CONFIG['libdir'] INCLUDEDIR = RbConfig::CONFIG['includedir'] HEADER_DIRS = [ - # Search /opt/local (Mac source install) - '/opt/local/include', + # Search /opt/local (Mac source install) + '/opt/local/include', - # Search /usr/local (Source install) - '/usr/local/include', + # Search /usr/local (Source install) + '/usr/local/include', - # Check the ruby install locations - INCLUDEDIR, + # Check the ruby install locations + INCLUDEDIR ] LIB_DIRS = [ - # Search /opt/local (Mac source install) - '/opt/local/lib', + # Search /opt/local (Mac source install) + '/opt/local/lib', - # Search /usr/local (Source install) - '/usr/local/lib', + # Search /usr/local (Source install) + '/usr/local/lib', - # Check the ruby install locations - LIBDIR, + # Check the ruby install locations + LIBDIR ] def crash(msg) - print(" extconf failure: %s\n" % msg) + print(" extconf failure: #{msg}\n") exit 1 end diff --git a/src/ruby/ext/grpc/rb_byte_buffer.c b/src/ruby/ext/grpc/rb_byte_buffer.c index b75e853d6bf..f73b12c417f 100644 --- a/src/ruby/ext/grpc/rb_byte_buffer.c +++ b/src/ruby/ext/grpc/rb_byte_buffer.c @@ -49,7 +49,6 @@ typedef struct grpc_rb_byte_buffer { grpc_byte_buffer *wrapped; } grpc_rb_byte_buffer; - /* Destroys ByteBuffer instances. */ static void grpc_rb_byte_buffer_free(void *p) { grpc_rb_byte_buffer *bb = NULL; @@ -169,7 +168,6 @@ static VALUE grpc_rb_byte_buffer_to_s(VALUE self) { return output_obj; } - /* Initializes ByteBuffer instances. */ static VALUE grpc_rb_byte_buffer_init(VALUE self, VALUE src) { gpr_slice a_slice; @@ -205,8 +203,8 @@ static VALUE grpc_rb_byte_buffer_init(VALUE self, VALUE src) { VALUE rb_cByteBuffer = Qnil; void Init_google_rpc_byte_buffer() { - rb_cByteBuffer = rb_define_class_under(rb_mGoogleRpcCore, "ByteBuffer", - rb_cObject); + rb_cByteBuffer = + rb_define_class_under(rb_mGoogleRpcCore, "ByteBuffer", rb_cObject); /* Allocates an object managed by the ruby runtime */ rb_define_alloc_func(rb_cByteBuffer, grpc_rb_byte_buffer_alloc); @@ -223,7 +221,7 @@ void Init_google_rpc_byte_buffer() { id_empty = rb_intern(""); } -VALUE grpc_rb_byte_buffer_create_with_mark(VALUE mark, grpc_byte_buffer* bb) { +VALUE grpc_rb_byte_buffer_create_with_mark(VALUE mark, grpc_byte_buffer *bb) { grpc_rb_byte_buffer *byte_buffer = NULL; if (bb == NULL) { return Qnil; @@ -236,7 +234,7 @@ VALUE grpc_rb_byte_buffer_create_with_mark(VALUE mark, grpc_byte_buffer* bb) { } /* Gets the wrapped byte_buffer from the ruby wrapper */ -grpc_byte_buffer* grpc_rb_get_wrapped_byte_buffer(VALUE v) { +grpc_byte_buffer *grpc_rb_get_wrapped_byte_buffer(VALUE v) { grpc_rb_byte_buffer *wrapper = NULL; Data_Get_Struct(v, grpc_rb_byte_buffer, wrapper); return wrapper->wrapped; diff --git a/src/ruby/ext/grpc/rb_byte_buffer.h b/src/ruby/ext/grpc/rb_byte_buffer.h index 1bdcfe40199..322c268f377 100644 --- a/src/ruby/ext/grpc/rb_byte_buffer.h +++ b/src/ruby/ext/grpc/rb_byte_buffer.h @@ -51,4 +51,4 @@ VALUE grpc_rb_byte_buffer_create_with_mark(VALUE mark, grpc_byte_buffer* bb); /* Gets the wrapped byte_buffer from its ruby object. */ grpc_byte_buffer* grpc_rb_get_wrapped_byte_buffer(VALUE v); -#endif /* GRPC_RB_BYTE_BUFFER_H_ */ +#endif /* GRPC_RB_BYTE_BUFFER_H_ */ diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c index bf292fac757..76b80bcaa16 100644 --- a/src/ruby/ext/grpc/rb_call.c +++ b/src/ruby/ext/grpc/rb_call.c @@ -78,7 +78,7 @@ void grpc_rb_call_destroy(void *p) { ref_count = rb_hash_aref(hash_all_calls, OFFT2NUM((VALUE)call)); if (ref_count == Qnil) { - return; /* No longer in the hash, so already deleted */ + return; /* No longer in the hash, so already deleted */ } else if (NUM2UINT(ref_count) == 1) { rb_hash_delete(hash_all_calls, OFFT2NUM((VALUE)call)); grpc_call_destroy(call); @@ -92,9 +92,9 @@ void grpc_rb_call_destroy(void *p) { VALUE rb_error_code_details; /* Obtains the error detail string for given error code */ -const char* grpc_call_error_detail_of(grpc_call_error err) { +const char *grpc_call_error_detail_of(grpc_call_error err) { VALUE detail_ref = rb_hash_aref(rb_error_code_details, UINT2NUM(err)); - const char* detail = "unknown error code!"; + const char *detail = "unknown error code!"; if (detail_ref != Qnil) { detail = StringValueCStr(detail_ref); } @@ -164,7 +164,7 @@ static VALUE grpc_rb_call_add_metadata(int argc, VALUE *argv, VALUE self) { /* "11" == 1 mandatory args, 1 (flags) is optional */ rb_scan_args(argc, argv, "11", &metadata, &flags); if (NIL_P(flags)) { - flags = UINT2NUM(0); /* Default to no flags */ + flags = UINT2NUM(0); /* Default to no flags */ } if (TYPE(metadata) != T_HASH) { rb_raise(rb_eTypeError, "add metadata failed: metadata should be a hash"); @@ -217,14 +217,13 @@ static VALUE grpc_rb_call_start_invoke(int argc, VALUE *argv, VALUE self) { rb_scan_args(argc, argv, "41", &cqueue, &invoke_accepted_tag, &metadata_read_tag, &finished_tag, &flags); if (NIL_P(flags)) { - flags = UINT2NUM(0); /* Default to no flags */ + flags = UINT2NUM(0); /* Default to no flags */ } cq = grpc_rb_get_wrapped_completion_queue(cqueue); Data_Get_Struct(self, grpc_call, call); err = grpc_call_start_invoke(call, cq, ROBJECT(invoke_accepted_tag), ROBJECT(metadata_read_tag), - ROBJECT(finished_tag), - NUM2UINT(flags)); + ROBJECT(finished_tag), NUM2UINT(flags)); if (err != GRPC_CALL_OK) { rb_raise(rb_eCallError, "invoke failed: %s (code=%d)", grpc_call_error_detail_of(err), err); @@ -329,7 +328,7 @@ static VALUE grpc_rb_call_start_write(int argc, VALUE *argv, VALUE self) { /* "21" == 2 mandatory args, 1 (flags) is optional */ rb_scan_args(argc, argv, "21", &byte_buffer, &tag, &flags); if (NIL_P(flags)) { - flags = UINT2NUM(0); /* Default to no flags */ + flags = UINT2NUM(0); /* Default to no flags */ } bfr = grpc_rb_get_wrapped_byte_buffer(byte_buffer); Data_Get_Struct(self, grpc_call, call); @@ -405,7 +404,7 @@ static VALUE grpc_rb_call_server_end_initial_metadata(int argc, VALUE *argv, /* "01" == 1 (flags) is optional */ rb_scan_args(argc, argv, "01", &flags); if (NIL_P(flags)) { - flags = UINT2NUM(0); /* Default to no flags */ + flags = UINT2NUM(0); /* Default to no flags */ } Data_Get_Struct(self, grpc_call, call); err = grpc_call_server_end_initial_metadata(call, NUM2UINT(flags)); @@ -445,7 +444,6 @@ static VALUE grpc_rb_call_server_accept(VALUE self, VALUE cqueue, return Qnil; } - /* rb_cCall is the ruby class that proxies grpc_call. */ VALUE rb_cCall = Qnil; @@ -477,8 +475,8 @@ void Init_google_rpc_error_codes() { /* Add the detail strings to a Hash */ rb_error_code_details = rb_hash_new(); - rb_hash_aset(rb_error_code_details, - UINT2NUM(GRPC_CALL_OK), rb_str_new2("ok")); + rb_hash_aset(rb_error_code_details, UINT2NUM(GRPC_CALL_OK), + rb_str_new2("ok")); rb_hash_aset(rb_error_code_details, UINT2NUM(GRPC_CALL_ERROR), rb_str_new2("unknown error")); rb_hash_aset(rb_error_code_details, UINT2NUM(GRPC_CALL_ERROR_NOT_ON_SERVER), @@ -506,8 +504,8 @@ void Init_google_rpc_error_codes() { void Init_google_rpc_call() { /* CallError inherits from Exception to signal that it is non-recoverable */ - rb_eCallError = rb_define_class_under(rb_mGoogleRpcCore, "CallError", - rb_eException); + rb_eCallError = + rb_define_class_under(rb_mGoogleRpcCore, "CallError", rb_eException); rb_cCall = rb_define_class_under(rb_mGoogleRpcCore, "Call", rb_cObject); /* Prevent allocation or inialization of the Call class */ @@ -519,8 +517,7 @@ void Init_google_rpc_call() { rb_define_method(rb_cCall, "server_accept", grpc_rb_call_server_accept, 2); rb_define_method(rb_cCall, "server_end_initial_metadata", grpc_rb_call_server_end_initial_metadata, -1); - rb_define_method(rb_cCall, "add_metadata", grpc_rb_call_add_metadata, - -1); + rb_define_method(rb_cCall, "add_metadata", grpc_rb_call_add_metadata, -1); rb_define_method(rb_cCall, "cancel", grpc_rb_call_cancel, 0); rb_define_method(rb_cCall, "start_invoke", grpc_rb_call_start_invoke, -1); rb_define_method(rb_cCall, "start_read", grpc_rb_call_start_read, 1); @@ -551,25 +548,24 @@ void Init_google_rpc_call() { } /* Gets the call from the ruby object */ -grpc_call* grpc_rb_get_wrapped_call(VALUE v) { +grpc_call *grpc_rb_get_wrapped_call(VALUE v) { grpc_call *c = NULL; Data_Get_Struct(v, grpc_call, c); return c; } /* Obtains the wrapped object for a given call */ -VALUE grpc_rb_wrap_call(grpc_call* c) { +VALUE grpc_rb_wrap_call(grpc_call *c) { VALUE obj = Qnil; if (c == NULL) { return Qnil; } obj = rb_hash_aref(hash_all_calls, OFFT2NUM((VALUE)c)); - if (obj == Qnil) { /* Not in the hash add it */ + if (obj == Qnil) { /* Not in the hash add it */ rb_hash_aset(hash_all_calls, OFFT2NUM((VALUE)c), UINT2NUM(1)); } else { rb_hash_aset(hash_all_calls, OFFT2NUM((VALUE)c), UINT2NUM(NUM2UINT(obj) + 1)); } - return Data_Wrap_Struct(rb_cCall, GC_NOT_MARKED, grpc_rb_call_destroy, - c); + return Data_Wrap_Struct(rb_cCall, GC_NOT_MARKED, grpc_rb_call_destroy, c); } diff --git a/src/ruby/ext/grpc/rb_call.h b/src/ruby/ext/grpc/rb_call.h index 422e7e7a6cc..965e9eef409 100644 --- a/src/ruby/ext/grpc/rb_call.h +++ b/src/ruby/ext/grpc/rb_call.h @@ -56,4 +56,4 @@ extern VALUE rb_eCallError; /* Initializes the Call class. */ void Init_google_rpc_call(); -#endif /* GRPC_RB_CALL_H_ */ +#endif /* GRPC_RB_CALL_H_ */ diff --git a/src/ruby/ext/grpc/rb_channel.c b/src/ruby/ext/grpc/rb_channel.c index d9518476621..c0187d2d117 100644 --- a/src/ruby/ext/grpc/rb_channel.c +++ b/src/ruby/ext/grpc/rb_channel.c @@ -137,7 +137,7 @@ static VALUE grpc_rb_channel_init(int argc, VALUE *argv, VALUE self) { ch = grpc_secure_channel_create(creds, target_chars, &args); } if (args.args != NULL) { - xfree(args.args); /* Allocated by grpc_rb_hash_convert_to_channel_args */ + xfree(args.args); /* Allocated by grpc_rb_hash_convert_to_channel_args */ } if (ch == NULL) { rb_raise(rb_eRuntimeError, "could not create an rpc channel to target:%s", @@ -256,7 +256,7 @@ void Init_google_rpc_channel() { } /* Gets the wrapped channel from the ruby wrapper */ -grpc_channel* grpc_rb_get_wrapped_channel(VALUE v) { +grpc_channel *grpc_rb_get_wrapped_channel(VALUE v) { grpc_rb_channel *wrapper = NULL; Data_Get_Struct(v, grpc_rb_channel, wrapper); return wrapper->wrapped; diff --git a/src/ruby/ext/grpc/rb_channel.h b/src/ruby/ext/grpc/rb_channel.h index b0a36344746..6c1210e812d 100644 --- a/src/ruby/ext/grpc/rb_channel.h +++ b/src/ruby/ext/grpc/rb_channel.h @@ -46,4 +46,4 @@ void Init_google_rpc_channel(); /* Gets the wrapped channel from the ruby wrapper */ grpc_channel* grpc_rb_get_wrapped_channel(VALUE v); -#endif /* GRPC_RB_CHANNEL_H_ */ +#endif /* GRPC_RB_CHANNEL_H_ */ diff --git a/src/ruby/ext/grpc/rb_channel_args.c b/src/ruby/ext/grpc/rb_channel_args.c index eebced0bd80..b918e1264ed 100644 --- a/src/ruby/ext/grpc/rb_channel_args.c +++ b/src/ruby/ext/grpc/rb_channel_args.c @@ -46,7 +46,6 @@ static int grpc_rb_channel_create_in_process_add_args_hash_cb(VALUE key, grpc_channel_args* args; switch (TYPE(key)) { - case T_STRING: the_key = StringValuePtr(key); break; @@ -68,13 +67,12 @@ static int grpc_rb_channel_create_in_process_add_args_hash_cb(VALUE key, return ST_STOP; } - args->args[args->num_args - 1].key = (char *)the_key; + args->args[args->num_args - 1].key = (char*)the_key; switch (TYPE(val)) { - case T_SYMBOL: args->args[args->num_args - 1].type = GRPC_ARG_STRING; args->args[args->num_args - 1].value.string = - (char *)rb_id2name(SYM2ID(val)); + (char*)rb_id2name(SYM2ID(val)); --args->num_args; return ST_CONTINUE; @@ -109,11 +107,10 @@ typedef struct channel_convert_params { grpc_channel_args* dst; } channel_convert_params; - static VALUE grpc_rb_hash_convert_to_channel_args0(VALUE as_value) { ID id_size = rb_intern("size"); VALUE rb_cChannelArgs = rb_define_class("TmpChannelArgs", rb_cObject); - channel_convert_params* params = (channel_convert_params *)as_value; + channel_convert_params* params = (channel_convert_params*)as_value; size_t num_args = 0; if (!NIL_P(params->src_hash) && TYPE(params->src_hash) != T_HASH) { @@ -146,7 +143,7 @@ void grpc_rb_hash_convert_to_channel_args(VALUE src_hash, /* Make a protected call to grpc_rb_hash_convert_channel_args */ params.src_hash = src_hash; params.dst = dst; - rb_protect(grpc_rb_hash_convert_to_channel_args0, (VALUE) ¶ms, &status); + rb_protect(grpc_rb_hash_convert_to_channel_args0, (VALUE)¶ms, &status); if (status != 0) { if (dst->args != NULL) { /* Free any allocated memory before propagating the error */ diff --git a/src/ruby/ext/grpc/rb_channel_args.h b/src/ruby/ext/grpc/rb_channel_args.h index bbff017c1ec..07be6627930 100644 --- a/src/ruby/ext/grpc/rb_channel_args.h +++ b/src/ruby/ext/grpc/rb_channel_args.h @@ -49,5 +49,4 @@ void grpc_rb_hash_convert_to_channel_args(VALUE src_hash, grpc_channel_args* dst); - -#endif /* GRPC_RB_CHANNEL_ARGS_H_ */ +#endif /* GRPC_RB_CHANNEL_ARGS_H_ */ diff --git a/src/ruby/ext/grpc/rb_completion_queue.c b/src/ruby/ext/grpc/rb_completion_queue.c index dc95838ef58..c1b74e2606d 100644 --- a/src/ruby/ext/grpc/rb_completion_queue.c +++ b/src/ruby/ext/grpc/rb_completion_queue.c @@ -45,33 +45,28 @@ typedef struct next_call_stack { grpc_completion_queue *cq; grpc_event *event; gpr_timespec timeout; - void* tag; + void *tag; } next_call_stack; /* Calls grpc_completion_queue_next without holding the ruby GIL */ -static void *grpc_rb_completion_queue_next_no_gil( - next_call_stack *next_call) { - next_call->event = grpc_completion_queue_next(next_call->cq, - next_call->timeout); +static void *grpc_rb_completion_queue_next_no_gil(next_call_stack *next_call) { + next_call->event = + grpc_completion_queue_next(next_call->cq, next_call->timeout); return NULL; } /* Calls grpc_completion_queue_pluck without holding the ruby GIL */ -static void *grpc_rb_completion_queue_pluck_no_gil( - next_call_stack *next_call) { - next_call->event = grpc_completion_queue_pluck(next_call->cq, - next_call->tag, +static void *grpc_rb_completion_queue_pluck_no_gil(next_call_stack *next_call) { + next_call->event = grpc_completion_queue_pluck(next_call->cq, next_call->tag, next_call->timeout); return NULL; } - /* Shuts down and drains the completion queue if necessary. * * This is done when the ruby completion queue object is about to be GCed. */ -static void grpc_rb_completion_queue_shutdown_drain( - grpc_completion_queue* cq) { +static void grpc_rb_completion_queue_shutdown_drain(grpc_completion_queue *cq) { next_call_stack next_call; grpc_completion_type type; int drained = 0; @@ -120,13 +115,12 @@ static void grpc_rb_completion_queue_destroy(void *p) { /* Allocates a completion queue. */ static VALUE grpc_rb_completion_queue_alloc(VALUE cls) { - grpc_completion_queue* cq = grpc_completion_queue_create(); + grpc_completion_queue *cq = grpc_completion_queue_create(); if (cq == NULL) { - rb_raise(rb_eArgError, - "could not create a completion queue: not sure why"); + rb_raise(rb_eArgError, "could not create a completion queue: not sure why"); } - return Data_Wrap_Struct(cls, GC_NOT_MARKED, - grpc_rb_completion_queue_destroy, cq); + return Data_Wrap_Struct(cls, GC_NOT_MARKED, grpc_rb_completion_queue_destroy, + cq); } /* Blocks until the next event is available, and returns the event. */ @@ -166,9 +160,8 @@ static VALUE grpc_rb_completion_queue_pluck(VALUE self, VALUE tag, VALUE rb_cCompletionQueue = Qnil; void Init_google_rpc_completion_queue() { - rb_cCompletionQueue = rb_define_class_under(rb_mGoogleRpcCore, - "CompletionQueue", - rb_cObject); + rb_cCompletionQueue = + rb_define_class_under(rb_mGoogleRpcCore, "CompletionQueue", rb_cObject); /* constructor: uses an alloc func without an initializer. Using a simple alloc func works here as the grpc header does not specify any args for @@ -176,16 +169,16 @@ void Init_google_rpc_completion_queue() { rb_define_alloc_func(rb_cCompletionQueue, grpc_rb_completion_queue_alloc); /* Add the next method that waits for the next event. */ - rb_define_method(rb_cCompletionQueue, "next", - grpc_rb_completion_queue_next, 1); + rb_define_method(rb_cCompletionQueue, "next", grpc_rb_completion_queue_next, + 1); /* Add the pluck method that waits for the next event of given tag */ - rb_define_method(rb_cCompletionQueue, "pluck", - grpc_rb_completion_queue_pluck, 2); + rb_define_method(rb_cCompletionQueue, "pluck", grpc_rb_completion_queue_pluck, + 2); } /* Gets the wrapped completion queue from the ruby wrapper */ -grpc_completion_queue* grpc_rb_get_wrapped_completion_queue(VALUE v) { +grpc_completion_queue *grpc_rb_get_wrapped_completion_queue(VALUE v) { grpc_completion_queue *cq = NULL; Data_Get_Struct(v, grpc_completion_queue, cq); return cq; diff --git a/src/ruby/ext/grpc/rb_completion_queue.h b/src/ruby/ext/grpc/rb_completion_queue.h index 1ec2718ed4e..c563662c2d4 100644 --- a/src/ruby/ext/grpc/rb_completion_queue.h +++ b/src/ruby/ext/grpc/rb_completion_queue.h @@ -47,4 +47,4 @@ extern VALUE rb_cCompletionQueue; /* Initializes the CompletionQueue class. */ void Init_google_rpc_completion_queue(); -#endif /* GRPC_RB_COMPLETION_QUEUE_H_ */ +#endif /* GRPC_RB_COMPLETION_QUEUE_H_ */ diff --git a/src/ruby/ext/grpc/rb_credentials.c b/src/ruby/ext/grpc/rb_credentials.c index 658adacc062..5dec51824d9 100644 --- a/src/ruby/ext/grpc/rb_credentials.c +++ b/src/ruby/ext/grpc/rb_credentials.c @@ -40,7 +40,6 @@ #include "rb_grpc.h" - /* grpc_rb_credentials wraps a grpc_credentials. It provides a * peer ruby object, 'mark' to minimize copying when a credential is * created from ruby. */ @@ -92,8 +91,7 @@ static VALUE grpc_rb_credentials_alloc(VALUE cls) { wrapper->wrapped = NULL; wrapper->mark = Qnil; return Data_Wrap_Struct(cls, grpc_rb_credentials_mark, - grpc_rb_credentials_free, - wrapper); + grpc_rb_credentials_free, wrapper); } /* Clones Credentials instances. @@ -111,8 +109,7 @@ static VALUE grpc_rb_credentials_init_copy(VALUE copy, VALUE orig) { /* Raise an error if orig is not a credentials object or a subclass. */ if (TYPE(orig) != T_DATA || RDATA(orig)->dfree != (RUBY_DATA_FUNC)grpc_rb_credentials_free) { - rb_raise(rb_eTypeError, "not a %s", - rb_obj_classname(rb_cCredentials)); + rb_raise(rb_eTypeError, "not a %s", rb_obj_classname(rb_cCredentials)); } Data_Get_Struct(orig, grpc_rb_credentials, orig_cred); @@ -238,14 +235,12 @@ static VALUE grpc_rb_credentials_init(int argc, VALUE *argv, VALUE self) { RSTRING_PTR(pem_cert_chain), RSTRING_LEN(pem_cert_chain)); } else if (pem_private_key == Qnil) { creds = grpc_ssl_credentials_create( - RSTRING_PTR(pem_root_certs), RSTRING_LEN(pem_root_certs), - NULL, 0, + RSTRING_PTR(pem_root_certs), RSTRING_LEN(pem_root_certs), NULL, 0, RSTRING_PTR(pem_cert_chain), RSTRING_LEN(pem_cert_chain)); } else { creds = grpc_ssl_credentials_create( RSTRING_PTR(pem_root_certs), RSTRING_LEN(pem_root_certs), - RSTRING_PTR(pem_private_key), RSTRING_LEN(pem_private_key), - NULL, 0); + RSTRING_PTR(pem_private_key), RSTRING_LEN(pem_private_key), NULL, 0); } if (creds == NULL) { rb_raise(rb_eRuntimeError, "could not create a credentials, not sure why"); @@ -265,15 +260,14 @@ static VALUE grpc_rb_credentials_init(int argc, VALUE *argv, VALUE self) { VALUE rb_cCredentials = Qnil; void Init_google_rpc_credentials() { - rb_cCredentials = rb_define_class_under(rb_mGoogleRpcCore, "Credentials", - rb_cObject); + rb_cCredentials = + rb_define_class_under(rb_mGoogleRpcCore, "Credentials", rb_cObject); /* Allocates an object managed by the ruby runtime */ rb_define_alloc_func(rb_cCredentials, grpc_rb_credentials_alloc); /* Provides a ruby constructor and support for dup/clone. */ - rb_define_method(rb_cCredentials, "initialize", - grpc_rb_credentials_init, -1); + rb_define_method(rb_cCredentials, "initialize", grpc_rb_credentials_init, -1); rb_define_method(rb_cCredentials, "initialize_copy", grpc_rb_credentials_init_copy, 1); @@ -294,7 +288,7 @@ void Init_google_rpc_credentials() { } /* Gets the wrapped grpc_credentials from the ruby wrapper */ -grpc_credentials* grpc_rb_get_wrapped_credentials(VALUE v) { +grpc_credentials *grpc_rb_get_wrapped_credentials(VALUE v) { grpc_rb_credentials *wrapper = NULL; Data_Get_Struct(v, grpc_rb_credentials, wrapper); return wrapper->wrapped; diff --git a/src/ruby/ext/grpc/rb_credentials.h b/src/ruby/ext/grpc/rb_credentials.h index d18c88ac34e..fada3639d58 100644 --- a/src/ruby/ext/grpc/rb_credentials.h +++ b/src/ruby/ext/grpc/rb_credentials.h @@ -47,4 +47,4 @@ void Init_google_rpc_credentials(); /* Gets the wrapped credentials from the ruby wrapper */ grpc_credentials* grpc_rb_get_wrapped_credentials(VALUE v); -#endif /* GRPC_RB_CREDENTIALS_H_ */ +#endif /* GRPC_RB_CREDENTIALS_H_ */ diff --git a/src/ruby/ext/grpc/rb_event.c b/src/ruby/ext/grpc/rb_event.c index 9200f923cc7..0fae9502c30 100644 --- a/src/ruby/ext/grpc/rb_event.c +++ b/src/ruby/ext/grpc/rb_event.c @@ -50,7 +50,6 @@ typedef struct grpc_rb_event { grpc_event *wrapped; } grpc_rb_event; - /* rb_mCompletionType is a ruby module that holds the completion type values */ VALUE rb_mCompletionType = Qnil; @@ -107,15 +106,15 @@ static VALUE grpc_rb_event_type(VALUE self) { return rb_const_get(rb_mCompletionType, rb_intern("READ")); case GRPC_INVOKE_ACCEPTED: - grpc_rb_event_result(self); /* validates the result */ + grpc_rb_event_result(self); /* validates the result */ return rb_const_get(rb_mCompletionType, rb_intern("INVOKE_ACCEPTED")); case GRPC_WRITE_ACCEPTED: - grpc_rb_event_result(self); /* validates the result */ + grpc_rb_event_result(self); /* validates the result */ return rb_const_get(rb_mCompletionType, rb_intern("WRITE_ACCEPTED")); case GRPC_FINISH_ACCEPTED: - grpc_rb_event_result(self); /* validates the result */ + grpc_rb_event_result(self); /* validates the result */ return rb_const_get(rb_mCompletionType, rb_intern("FINISH_ACCEPTED")); case GRPC_CLIENT_METADATA_READ: @@ -129,8 +128,8 @@ static VALUE grpc_rb_event_type(VALUE self) { return rb_const_get(rb_mCompletionType, rb_intern("SERVER_RPC_NEW")); default: - rb_raise(rb_eRuntimeError, - "unrecognized event code for an rpc event:%d", event->type); + rb_raise(rb_eRuntimeError, "unrecognized event code for an rpc event:%d", + event->type); } return Qnil; /* should not be reached */ } @@ -189,7 +188,6 @@ static VALUE grpc_rb_event_metadata(VALUE self) { /* Figure out which metadata to read. */ event = wrapper->wrapped; switch (event->type) { - case GRPC_CLIENT_METADATA_READ: count = event->data.client_metadata_read.count; metadata = event->data.client_metadata_read.elements; @@ -218,22 +216,18 @@ static VALUE grpc_rb_event_metadata(VALUE self) { key = rb_str_new2(metadata[i].key); value = rb_hash_aref(result, key); if (value == Qnil) { - value = rb_str_new( - metadata[i].value, - metadata[i].value_length); + value = rb_str_new(metadata[i].value, metadata[i].value_length); rb_hash_aset(result, key, value); } else if (TYPE(value) == T_ARRAY) { /* Add the string to the returned array */ - rb_ary_push(value, rb_str_new( - metadata[i].value, - metadata[i].value_length)); + rb_ary_push(value, + rb_str_new(metadata[i].value, metadata[i].value_length)); } else { /* Add the current value with this key and the new one to an array */ new_ary = rb_ary_new(); rb_ary_push(new_ary, value); - rb_ary_push(new_ary, rb_str_new( - metadata[i].value, - metadata[i].value_length)); + rb_ary_push(new_ary, + rb_str_new(metadata[i].value, metadata[i].value_length)); rb_hash_aset(result, key, new_ary); } } @@ -252,7 +246,6 @@ static VALUE grpc_rb_event_result(VALUE self) { event = wrapper->wrapped; switch (event->type) { - case GRPC_QUEUE_SHUTDOWN: return Qnil; @@ -287,29 +280,24 @@ static VALUE grpc_rb_event_result(VALUE self) { return grpc_rb_event_metadata(self); case GRPC_FINISHED: - return rb_struct_new( - rb_sStatus, - UINT2NUM(event->data.finished.status), - (event->data.finished.details == NULL ? - Qnil : rb_str_new2(event->data.finished.details)), - grpc_rb_event_metadata(self), - NULL); + return rb_struct_new(rb_sStatus, UINT2NUM(event->data.finished.status), + (event->data.finished.details == NULL + ? Qnil + : rb_str_new2(event->data.finished.details)), + grpc_rb_event_metadata(self), NULL); break; case GRPC_SERVER_RPC_NEW: return rb_struct_new( - rb_sNewServerRpc, - rb_str_new2(event->data.server_rpc_new.method), + rb_sNewServerRpc, rb_str_new2(event->data.server_rpc_new.method), rb_str_new2(event->data.server_rpc_new.host), - Data_Wrap_Struct( - rb_cTimeVal, GC_NOT_MARKED, GC_DONT_FREE, - (void *)&event->data.server_rpc_new.deadline), - grpc_rb_event_metadata(self), - NULL); + Data_Wrap_Struct(rb_cTimeVal, GC_NOT_MARKED, GC_DONT_FREE, + (void *)&event->data.server_rpc_new.deadline), + grpc_rb_event_metadata(self), NULL); default: - rb_raise(rb_eRuntimeError, - "unrecognized event code for an rpc event:%d", event->type); + rb_raise(rb_eRuntimeError, "unrecognized event code for an rpc event:%d", + event->type); } return Qfalse; @@ -319,7 +307,7 @@ static VALUE grpc_rb_event_finish(VALUE self) { grpc_event *event = NULL; grpc_rb_event *wrapper = NULL; Data_Get_Struct(self, grpc_rb_event, wrapper); - if (wrapper->wrapped == NULL) { /* already closed */ + if (wrapper->wrapped == NULL) { /* already closed */ return Qnil; } event = wrapper->wrapped; @@ -337,8 +325,8 @@ VALUE rb_cEvent = Qnil; VALUE rb_eEventError = Qnil; void Init_google_rpc_event() { - rb_eEventError = rb_define_class_under(rb_mGoogleRpcCore, "EventError", - rb_eStandardError); + rb_eEventError = + rb_define_class_under(rb_mGoogleRpcCore, "EventError", rb_eStandardError); rb_cEvent = rb_define_class_under(rb_mGoogleRpcCore, "Event", rb_cObject); /* Prevent allocation or inialization from ruby. */ @@ -355,8 +343,8 @@ void Init_google_rpc_event() { rb_define_alias(rb_cEvent, "close", "finish"); /* Constants representing the completion types */ - rb_mCompletionType = rb_define_module_under(rb_mGoogleRpcCore, - "CompletionType"); + rb_mCompletionType = + rb_define_module_under(rb_mGoogleRpcCore, "CompletionType"); rb_define_const(rb_mCompletionType, "QUEUE_SHUTDOWN", INT2NUM(GRPC_QUEUE_SHUTDOWN)); rb_define_const(rb_mCompletionType, "READ", INT2NUM(GRPC_READ)); @@ -368,8 +356,7 @@ void Init_google_rpc_event() { INT2NUM(GRPC_FINISH_ACCEPTED)); rb_define_const(rb_mCompletionType, "CLIENT_METADATA_READ", INT2NUM(GRPC_CLIENT_METADATA_READ)); - rb_define_const(rb_mCompletionType, "FINISHED", - INT2NUM(GRPC_FINISHED)); + rb_define_const(rb_mCompletionType, "FINISHED", INT2NUM(GRPC_FINISHED)); rb_define_const(rb_mCompletionType, "SERVER_RPC_NEW", INT2NUM(GRPC_SERVER_RPC_NEW)); rb_define_const(rb_mCompletionType, "RESERVED", diff --git a/src/ruby/ext/grpc/rb_event.h b/src/ruby/ext/grpc/rb_event.h index e4e4a796c22..a406e9e9f17 100644 --- a/src/ruby/ext/grpc/rb_event.h +++ b/src/ruby/ext/grpc/rb_event.h @@ -50,4 +50,4 @@ VALUE grpc_rb_new_event(grpc_event *ev); /* Initializes the Event and EventError classes. */ void Init_google_rpc_event(); -#endif /* GRPC_RB_EVENT_H_ */ +#endif /* GRPC_RB_EVENT_H_ */ diff --git a/src/ruby/ext/grpc/rb_grpc.c b/src/ruby/ext/grpc/rb_grpc.c index eae011d33bd..8feefb047cc 100644 --- a/src/ruby/ext/grpc/rb_grpc.c +++ b/src/ruby/ext/grpc/rb_grpc.c @@ -98,18 +98,16 @@ gpr_timespec grpc_rb_time_timeval(VALUE time, int interval) { const char *want = " want |