diff options
author | Vijay Pai <vpai@google.com> | 2018-02-08 12:18:09 -0800 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2018-02-08 12:18:09 -0800 |
commit | 18b9133f31e394ea81c6ae5a44efe802904b3140 (patch) | |
tree | 14cd93ac3ee2964f3b185a5c02b456283e2fd515 | |
parent | 804f339338695879b7529c6d7f1d46c6bfdec19d (diff) | |
parent | d3fb421ffacfef92af692c9753a97344f9812559 (diff) |
Merge branch 'master' into gpr_review
51 files changed, 413 insertions, 400 deletions
@@ -66,13 +66,11 @@ GPR_PUBLIC_HDRS = [ "include/grpc/support/atm_gcc_atomic.h", "include/grpc/support/atm_gcc_sync.h", "include/grpc/support/atm_windows.h", - "include/grpc/support/cmdline.h", "include/grpc/support/cpu.h", "include/grpc/support/log.h", "include/grpc/support/log_windows.h", "include/grpc/support/port_platform.h", "include/grpc/support/string_util.h", - "include/grpc/support/subprocess.h", "include/grpc/support/sync.h", "include/grpc/support/sync_custom.h", "include/grpc/support/sync_generic.h", @@ -452,7 +450,6 @@ grpc_cc_library( "src/core/lib/gpr/alloc.cc", "src/core/lib/gpr/arena.cc", "src/core/lib/gpr/atm.cc", - "src/core/lib/gpr/cmdline.cc", "src/core/lib/gpr/cpu_iphone.cc", "src/core/lib/gpr/cpu_linux.cc", "src/core/lib/gpr/cpu_posix.cc", @@ -473,8 +470,6 @@ grpc_cc_library( "src/core/lib/gpr/string_posix.cc", "src/core/lib/gpr/string_util_windows.cc", "src/core/lib/gpr/string_windows.cc", - "src/core/lib/gpr/subprocess_posix.cc", - "src/core/lib/gpr/subprocess_windows.cc", "src/core/lib/gpr/sync.cc", "src/core/lib/gpr/sync_posix.cc", "src/core/lib/gpr/sync_windows.cc", diff --git a/CMakeLists.txt b/CMakeLists.txt index fe67dd8216..8831c18117 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,6 +222,7 @@ add_dependencies(buildtests_c channel_create_test) add_dependencies(buildtests_c chttp2_hpack_encoder_test) add_dependencies(buildtests_c chttp2_stream_map_test) add_dependencies(buildtests_c chttp2_varint_test) +add_dependencies(buildtests_c cmdline_test) add_dependencies(buildtests_c combiner_test) add_dependencies(buildtests_c compression_test) add_dependencies(buildtests_c concurrent_connectivity_test) @@ -258,7 +259,6 @@ endif() if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_c goaway_server_test) endif() -add_dependencies(buildtests_c gpr_cmdline_test) add_dependencies(buildtests_c gpr_cpu_test) add_dependencies(buildtests_c gpr_env_test) add_dependencies(buildtests_c gpr_host_port_test) @@ -628,7 +628,6 @@ add_library(gpr src/core/lib/gpr/alloc.cc src/core/lib/gpr/arena.cc src/core/lib/gpr/atm.cc - src/core/lib/gpr/cmdline.cc src/core/lib/gpr/cpu_iphone.cc src/core/lib/gpr/cpu_linux.cc src/core/lib/gpr/cpu_posix.cc @@ -649,8 +648,6 @@ add_library(gpr src/core/lib/gpr/string_posix.cc src/core/lib/gpr/string_util_windows.cc src/core/lib/gpr/string_windows.cc - src/core/lib/gpr/subprocess_posix.cc - src/core/lib/gpr/subprocess_windows.cc src/core/lib/gpr/sync.cc src/core/lib/gpr/sync_posix.cc src/core/lib/gpr/sync_windows.cc @@ -703,13 +700,11 @@ foreach(_hdr include/grpc/support/atm_gcc_atomic.h include/grpc/support/atm_gcc_sync.h include/grpc/support/atm_windows.h - include/grpc/support/cmdline.h include/grpc/support/cpu.h include/grpc/support/log.h include/grpc/support/log_windows.h include/grpc/support/port_platform.h include/grpc/support/string_util.h - include/grpc/support/subprocess.h include/grpc/support/sync.h include/grpc/support/sync_custom.h include/grpc/support/sync_generic.h @@ -1453,8 +1448,11 @@ add_library(grpc_test_util test/core/util/port_isolated_runtime_environment.cc test/core/util/port_server_client.cc test/core/util/slice_splitter.cc + test/core/util/subprocess_posix.cc + test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc test/core/util/trickle_endpoint.cc + test/core/util/cmdline.cc src/core/lib/avl/avl.cc src/core/lib/backoff/backoff.cc src/core/lib/channel/channel_args.cc @@ -1672,14 +1670,27 @@ target_link_libraries(grpc_test_util ) foreach(_hdr - include/grpc/impl/codegen/byte_buffer.h - include/grpc/impl/codegen/byte_buffer_reader.h - include/grpc/impl/codegen/compression_types.h - include/grpc/impl/codegen/connectivity_state.h - include/grpc/impl/codegen/grpc_types.h - include/grpc/impl/codegen/propagation_bits.h - include/grpc/impl/codegen/slice.h - include/grpc/impl/codegen/status.h + include/grpc/support/alloc.h + include/grpc/support/atm.h + include/grpc/support/atm_gcc_atomic.h + include/grpc/support/atm_gcc_sync.h + include/grpc/support/atm_windows.h + include/grpc/support/cpu.h + include/grpc/support/log.h + include/grpc/support/log_windows.h + include/grpc/support/port_platform.h + include/grpc/support/string_util.h + include/grpc/support/sync.h + include/grpc/support/sync_custom.h + include/grpc/support/sync_generic.h + include/grpc/support/sync_posix.h + include/grpc/support/sync_windows.h + include/grpc/support/thd.h + include/grpc/support/time.h + include/grpc/support/tls.h + include/grpc/support/tls_gcc.h + include/grpc/support/tls_msvc.h + include/grpc/support/tls_pthread.h include/grpc/impl/codegen/atm.h include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h @@ -1693,6 +1704,14 @@ foreach(_hdr include/grpc/impl/codegen/sync_generic.h include/grpc/impl/codegen/sync_posix.h include/grpc/impl/codegen/sync_windows.h + include/grpc/impl/codegen/byte_buffer.h + include/grpc/impl/codegen/byte_buffer_reader.h + include/grpc/impl/codegen/compression_types.h + include/grpc/impl/codegen/connectivity_state.h + include/grpc/impl/codegen/grpc_types.h + include/grpc/impl/codegen/propagation_bits.h + include/grpc/impl/codegen/slice.h + include/grpc/impl/codegen/status.h ) string(REPLACE "include/" "" _path ${_hdr}) get_filename_component(_path ${_path} PATH) @@ -1721,8 +1740,11 @@ add_library(grpc_test_util_unsecure test/core/util/port_isolated_runtime_environment.cc test/core/util/port_server_client.cc test/core/util/slice_splitter.cc + test/core/util/subprocess_posix.cc + test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc test/core/util/trickle_endpoint.cc + test/core/util/cmdline.cc src/core/lib/avl/avl.cc src/core/lib/backoff/backoff.cc src/core/lib/channel/channel_args.cc @@ -1940,14 +1962,27 @@ target_link_libraries(grpc_test_util_unsecure ) foreach(_hdr - include/grpc/impl/codegen/byte_buffer.h - include/grpc/impl/codegen/byte_buffer_reader.h - include/grpc/impl/codegen/compression_types.h - include/grpc/impl/codegen/connectivity_state.h - include/grpc/impl/codegen/grpc_types.h - include/grpc/impl/codegen/propagation_bits.h - include/grpc/impl/codegen/slice.h - include/grpc/impl/codegen/status.h + include/grpc/support/alloc.h + include/grpc/support/atm.h + include/grpc/support/atm_gcc_atomic.h + include/grpc/support/atm_gcc_sync.h + include/grpc/support/atm_windows.h + include/grpc/support/cpu.h + include/grpc/support/log.h + include/grpc/support/log_windows.h + include/grpc/support/port_platform.h + include/grpc/support/string_util.h + include/grpc/support/sync.h + include/grpc/support/sync_custom.h + include/grpc/support/sync_generic.h + include/grpc/support/sync_posix.h + include/grpc/support/sync_windows.h + include/grpc/support/thd.h + include/grpc/support/time.h + include/grpc/support/tls.h + include/grpc/support/tls_gcc.h + include/grpc/support/tls_msvc.h + include/grpc/support/tls_pthread.h include/grpc/impl/codegen/atm.h include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h @@ -1961,6 +1996,14 @@ foreach(_hdr include/grpc/impl/codegen/sync_generic.h include/grpc/impl/codegen/sync_posix.h include/grpc/impl/codegen/sync_windows.h + include/grpc/impl/codegen/byte_buffer.h + include/grpc/impl/codegen/byte_buffer_reader.h + include/grpc/impl/codegen/compression_types.h + include/grpc/impl/codegen/connectivity_state.h + include/grpc/impl/codegen/grpc_types.h + include/grpc/impl/codegen/propagation_bits.h + include/grpc/impl/codegen/slice.h + include/grpc/impl/codegen/status.h ) string(REPLACE "include/" "" _path ${_hdr}) get_filename_component(_path ${_path} PATH) @@ -2488,13 +2531,11 @@ foreach(_hdr include/grpc/support/atm_gcc_atomic.h include/grpc/support/atm_gcc_sync.h include/grpc/support/atm_windows.h - include/grpc/support/cmdline.h include/grpc/support/cpu.h include/grpc/support/log.h include/grpc/support/log_windows.h include/grpc/support/port_platform.h include/grpc/support/string_util.h - include/grpc/support/subprocess.h include/grpc/support/sync.h include/grpc/support/sync_custom.h include/grpc/support/sync_generic.h @@ -2959,13 +3000,11 @@ foreach(_hdr include/grpc/support/atm_gcc_atomic.h include/grpc/support/atm_gcc_sync.h include/grpc/support/atm_windows.h - include/grpc/support/cmdline.h include/grpc/support/cpu.h include/grpc/support/log.h include/grpc/support/log_windows.h include/grpc/support/port_platform.h include/grpc/support/string_util.h - include/grpc/support/subprocess.h include/grpc/support/sync.h include/grpc/support/sync_custom.h include/grpc/support/sync_generic.h @@ -3686,13 +3725,11 @@ foreach(_hdr include/grpc/support/atm_gcc_atomic.h include/grpc/support/atm_gcc_sync.h include/grpc/support/atm_windows.h - include/grpc/support/cmdline.h include/grpc/support/cpu.h include/grpc/support/log.h include/grpc/support/log_windows.h include/grpc/support/port_platform.h include/grpc/support/string_util.h - include/grpc/support/subprocess.h include/grpc/support/sync.h include/grpc/support/sync_custom.h include/grpc/support/sync_generic.h @@ -5093,6 +5130,32 @@ target_link_libraries(chttp2_varint_test endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) +add_executable(cmdline_test + test/core/util/cmdline_test.cc +) + + +target_include_directories(cmdline_test + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${_gRPC_SSL_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} + PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} + PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} + PRIVATE ${_gRPC_CARES_INCLUDE_DIR} + PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} +) + +target_link_libraries(cmdline_test + ${_gRPC_ALLTARGETS_LIBRARIES} + gpr + gpr_test_util + grpc_test_util +) + +endif (gRPC_BUILD_TESTS) +if (gRPC_BUILD_TESTS) + add_executable(combiner_test test/core/iomgr/combiner_test.cc ) @@ -5649,31 +5712,6 @@ endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) -add_executable(gpr_cmdline_test - test/core/gpr/cmdline_test.cc -) - - -target_include_directories(gpr_cmdline_test - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include - PRIVATE ${_gRPC_SSL_INCLUDE_DIR} - PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} - PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} - PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} - PRIVATE ${_gRPC_CARES_INCLUDE_DIR} - PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} -) - -target_link_libraries(gpr_cmdline_test - ${_gRPC_ALLTARGETS_LIBRARIES} - gpr_test_util - gpr -) - -endif (gRPC_BUILD_TESTS) -if (gRPC_BUILD_TESTS) - add_executable(gpr_cpu_test test/core/gpr/cpu_test.cc ) @@ -6216,6 +6254,7 @@ endif (gRPC_BUILD_TESTS) add_executable(grpc_create_jwt test/core/security/create_jwt.cc + test/core/util/cmdline.cc ) @@ -6386,6 +6425,7 @@ endif (gRPC_BUILD_TESTS) add_executable(grpc_print_google_default_creds_token test/core/security/print_google_default_creds_token.cc + test/core/util/cmdline.cc ) @@ -6472,6 +6512,7 @@ endif (gRPC_BUILD_TESTS) add_executable(grpc_verify_jwt test/core/security/verify_jwt.cc + test/core/util/cmdline.cc ) @@ -6858,7 +6899,9 @@ target_include_directories(json_rewrite target_link_libraries(json_rewrite ${_gRPC_ALLTARGETS_LIBRARIES} + grpc_test_util grpc + gpr_test_util gpr ) @@ -966,6 +966,7 @@ chttp2_hpack_encoder_test: $(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test chttp2_stream_map_test: $(BINDIR)/$(CONFIG)/chttp2_stream_map_test chttp2_varint_test: $(BINDIR)/$(CONFIG)/chttp2_varint_test client_fuzzer: $(BINDIR)/$(CONFIG)/client_fuzzer +cmdline_test: $(BINDIR)/$(CONFIG)/cmdline_test combiner_test: $(BINDIR)/$(CONFIG)/combiner_test compression_test: $(BINDIR)/$(CONFIG)/compression_test concurrent_connectivity_test: $(BINDIR)/$(CONFIG)/concurrent_connectivity_test @@ -986,7 +987,6 @@ fling_server: $(BINDIR)/$(CONFIG)/fling_server fling_stream_test: $(BINDIR)/$(CONFIG)/fling_stream_test fling_test: $(BINDIR)/$(CONFIG)/fling_test goaway_server_test: $(BINDIR)/$(CONFIG)/goaway_server_test -gpr_cmdline_test: $(BINDIR)/$(CONFIG)/gpr_cmdline_test gpr_cpu_test: $(BINDIR)/$(CONFIG)/gpr_cpu_test gpr_env_test: $(BINDIR)/$(CONFIG)/gpr_env_test gpr_host_port_test: $(BINDIR)/$(CONFIG)/gpr_host_port_test @@ -1381,6 +1381,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test \ $(BINDIR)/$(CONFIG)/chttp2_stream_map_test \ $(BINDIR)/$(CONFIG)/chttp2_varint_test \ + $(BINDIR)/$(CONFIG)/cmdline_test \ $(BINDIR)/$(CONFIG)/combiner_test \ $(BINDIR)/$(CONFIG)/compression_test \ $(BINDIR)/$(CONFIG)/concurrent_connectivity_test \ @@ -1401,7 +1402,6 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/fling_stream_test \ $(BINDIR)/$(CONFIG)/fling_test \ $(BINDIR)/$(CONFIG)/goaway_server_test \ - $(BINDIR)/$(CONFIG)/gpr_cmdline_test \ $(BINDIR)/$(CONFIG)/gpr_cpu_test \ $(BINDIR)/$(CONFIG)/gpr_env_test \ $(BINDIR)/$(CONFIG)/gpr_host_port_test \ @@ -1830,6 +1830,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/chttp2_stream_map_test || ( echo test chttp2_stream_map_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_varint_test" $(Q) $(BINDIR)/$(CONFIG)/chttp2_varint_test || ( echo test chttp2_varint_test failed ; exit 1 ) + $(E) "[RUN] Testing cmdline_test" + $(Q) $(BINDIR)/$(CONFIG)/cmdline_test || ( echo test cmdline_test failed ; exit 1 ) $(E) "[RUN] Testing combiner_test" $(Q) $(BINDIR)/$(CONFIG)/combiner_test || ( echo test combiner_test failed ; exit 1 ) $(E) "[RUN] Testing compression_test" @@ -1866,8 +1868,6 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/fling_test || ( echo test fling_test failed ; exit 1 ) $(E) "[RUN] Testing goaway_server_test" $(Q) $(BINDIR)/$(CONFIG)/goaway_server_test || ( echo test goaway_server_test failed ; exit 1 ) - $(E) "[RUN] Testing gpr_cmdline_test" - $(Q) $(BINDIR)/$(CONFIG)/gpr_cmdline_test || ( echo test gpr_cmdline_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_cpu_test" $(Q) $(BINDIR)/$(CONFIG)/gpr_cpu_test || ( echo test gpr_cpu_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_env_test" @@ -2876,7 +2876,6 @@ LIBGPR_SRC = \ src/core/lib/gpr/alloc.cc \ src/core/lib/gpr/arena.cc \ src/core/lib/gpr/atm.cc \ - src/core/lib/gpr/cmdline.cc \ src/core/lib/gpr/cpu_iphone.cc \ src/core/lib/gpr/cpu_linux.cc \ src/core/lib/gpr/cpu_posix.cc \ @@ -2897,8 +2896,6 @@ LIBGPR_SRC = \ src/core/lib/gpr/string_posix.cc \ src/core/lib/gpr/string_util_windows.cc \ src/core/lib/gpr/string_windows.cc \ - src/core/lib/gpr/subprocess_posix.cc \ - src/core/lib/gpr/subprocess_windows.cc \ src/core/lib/gpr/sync.cc \ src/core/lib/gpr/sync_posix.cc \ src/core/lib/gpr/sync_windows.cc \ @@ -2923,13 +2920,11 @@ PUBLIC_HEADERS_C += \ include/grpc/support/atm_gcc_atomic.h \ include/grpc/support/atm_gcc_sync.h \ include/grpc/support/atm_windows.h \ - include/grpc/support/cmdline.h \ include/grpc/support/cpu.h \ include/grpc/support/log.h \ include/grpc/support/log_windows.h \ include/grpc/support/port_platform.h \ include/grpc/support/string_util.h \ - include/grpc/support/subprocess.h \ include/grpc/support/sync.h \ include/grpc/support/sync_custom.h \ include/grpc/support/sync_generic.h \ @@ -3685,8 +3680,11 @@ LIBGRPC_TEST_UTIL_SRC = \ test/core/util/port_isolated_runtime_environment.cc \ test/core/util/port_server_client.cc \ test/core/util/slice_splitter.cc \ + test/core/util/subprocess_posix.cc \ + test/core/util/subprocess_windows.cc \ test/core/util/tracer_util.cc \ test/core/util/trickle_endpoint.cc \ + test/core/util/cmdline.cc \ src/core/lib/avl/avl.cc \ src/core/lib/backoff/backoff.cc \ src/core/lib/channel/channel_args.cc \ @@ -3873,14 +3871,27 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/ext/filters/http/server/http_server_filter.cc \ PUBLIC_HEADERS_C += \ - include/grpc/impl/codegen/byte_buffer.h \ - include/grpc/impl/codegen/byte_buffer_reader.h \ - include/grpc/impl/codegen/compression_types.h \ - include/grpc/impl/codegen/connectivity_state.h \ - include/grpc/impl/codegen/grpc_types.h \ - include/grpc/impl/codegen/propagation_bits.h \ - include/grpc/impl/codegen/slice.h \ - include/grpc/impl/codegen/status.h \ + include/grpc/support/alloc.h \ + include/grpc/support/atm.h \ + include/grpc/support/atm_gcc_atomic.h \ + include/grpc/support/atm_gcc_sync.h \ + include/grpc/support/atm_windows.h \ + include/grpc/support/cpu.h \ + include/grpc/support/log.h \ + include/grpc/support/log_windows.h \ + include/grpc/support/port_platform.h \ + include/grpc/support/string_util.h \ + include/grpc/support/sync.h \ + include/grpc/support/sync_custom.h \ + include/grpc/support/sync_generic.h \ + include/grpc/support/sync_posix.h \ + include/grpc/support/sync_windows.h \ + include/grpc/support/thd.h \ + include/grpc/support/time.h \ + include/grpc/support/tls.h \ + include/grpc/support/tls_gcc.h \ + include/grpc/support/tls_msvc.h \ + include/grpc/support/tls_pthread.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ @@ -3894,6 +3905,14 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ + include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/byte_buffer_reader.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/status.h \ LIBGRPC_TEST_UTIL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_TEST_UTIL_SRC)))) @@ -3946,8 +3965,11 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ test/core/util/port_isolated_runtime_environment.cc \ test/core/util/port_server_client.cc \ test/core/util/slice_splitter.cc \ + test/core/util/subprocess_posix.cc \ + test/core/util/subprocess_windows.cc \ test/core/util/tracer_util.cc \ test/core/util/trickle_endpoint.cc \ + test/core/util/cmdline.cc \ src/core/lib/avl/avl.cc \ src/core/lib/backoff/backoff.cc \ src/core/lib/channel/channel_args.cc \ @@ -4134,14 +4156,27 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ src/core/ext/filters/http/server/http_server_filter.cc \ PUBLIC_HEADERS_C += \ - include/grpc/impl/codegen/byte_buffer.h \ - include/grpc/impl/codegen/byte_buffer_reader.h \ - include/grpc/impl/codegen/compression_types.h \ - include/grpc/impl/codegen/connectivity_state.h \ - include/grpc/impl/codegen/grpc_types.h \ - include/grpc/impl/codegen/propagation_bits.h \ - include/grpc/impl/codegen/slice.h \ - include/grpc/impl/codegen/status.h \ + include/grpc/support/alloc.h \ + include/grpc/support/atm.h \ + include/grpc/support/atm_gcc_atomic.h \ + include/grpc/support/atm_gcc_sync.h \ + include/grpc/support/atm_windows.h \ + include/grpc/support/cpu.h \ + include/grpc/support/log.h \ + include/grpc/support/log_windows.h \ + include/grpc/support/port_platform.h \ + include/grpc/support/string_util.h \ + include/grpc/support/sync.h \ + include/grpc/support/sync_custom.h \ + include/grpc/support/sync_generic.h \ + include/grpc/support/sync_posix.h \ + include/grpc/support/sync_windows.h \ + include/grpc/support/thd.h \ + include/grpc/support/time.h \ + include/grpc/support/tls.h \ + include/grpc/support/tls_gcc.h \ + include/grpc/support/tls_msvc.h \ + include/grpc/support/tls_pthread.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ @@ -4155,6 +4190,14 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ + include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/byte_buffer_reader.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/status.h \ LIBGRPC_TEST_UTIL_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_TEST_UTIL_UNSECURE_SRC)))) @@ -4646,13 +4689,11 @@ PUBLIC_HEADERS_CXX += \ include/grpc/support/atm_gcc_atomic.h \ include/grpc/support/atm_gcc_sync.h \ include/grpc/support/atm_windows.h \ - include/grpc/support/cmdline.h \ include/grpc/support/cpu.h \ include/grpc/support/log.h \ include/grpc/support/log_windows.h \ include/grpc/support/port_platform.h \ include/grpc/support/string_util.h \ - include/grpc/support/subprocess.h \ include/grpc/support/sync.h \ include/grpc/support/sync_custom.h \ include/grpc/support/sync_generic.h \ @@ -5130,13 +5171,11 @@ PUBLIC_HEADERS_CXX += \ include/grpc/support/atm_gcc_atomic.h \ include/grpc/support/atm_gcc_sync.h \ include/grpc/support/atm_windows.h \ - include/grpc/support/cmdline.h \ include/grpc/support/cpu.h \ include/grpc/support/log.h \ include/grpc/support/log_windows.h \ include/grpc/support/port_platform.h \ include/grpc/support/string_util.h \ - include/grpc/support/subprocess.h \ include/grpc/support/sync.h \ include/grpc/support/sync_custom.h \ include/grpc/support/sync_generic.h \ @@ -5846,13 +5885,11 @@ PUBLIC_HEADERS_CXX += \ include/grpc/support/atm_gcc_atomic.h \ include/grpc/support/atm_gcc_sync.h \ include/grpc/support/atm_windows.h \ - include/grpc/support/cmdline.h \ include/grpc/support/cpu.h \ include/grpc/support/log.h \ include/grpc/support/log_windows.h \ include/grpc/support/port_platform.h \ include/grpc/support/string_util.h \ - include/grpc/support/subprocess.h \ include/grpc/support/sync.h \ include/grpc/support/sync_custom.h \ include/grpc/support/sync_generic.h \ @@ -9748,6 +9785,38 @@ endif endif +CMDLINE_TEST_SRC = \ + test/core/util/cmdline_test.cc \ + +CMDLINE_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CMDLINE_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/cmdline_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/cmdline_test: $(CMDLINE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(CMDLINE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/cmdline_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/util/cmdline_test.o: $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a + +deps_cmdline_test: $(CMDLINE_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(CMDLINE_TEST_OBJS:.o=.dep) +endif +endif + + COMBINER_TEST_SRC = \ test/core/iomgr/combiner_test.cc \ @@ -10391,38 +10460,6 @@ endif endif -GPR_CMDLINE_TEST_SRC = \ - test/core/gpr/cmdline_test.cc \ - -GPR_CMDLINE_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_CMDLINE_TEST_SRC)))) -ifeq ($(NO_SECURE),true) - -# You can't build secure targets if you don't have OpenSSL. - -$(BINDIR)/$(CONFIG)/gpr_cmdline_test: openssl_dep_error - -else - - - -$(BINDIR)/$(CONFIG)/gpr_cmdline_test: $(GPR_CMDLINE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_CMDLINE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_cmdline_test - -endif - -$(OBJDIR)/$(CONFIG)/test/core/gpr/cmdline_test.o: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - -deps_gpr_cmdline_test: $(GPR_CMDLINE_TEST_OBJS:.o=.dep) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(GPR_CMDLINE_TEST_OBJS:.o=.dep) -endif -endif - - GPR_CPU_TEST_SRC = \ test/core/gpr/cpu_test.cc \ @@ -11097,6 +11134,7 @@ endif GRPC_CREATE_JWT_SRC = \ test/core/security/create_jwt.cc \ + test/core/util/cmdline.cc \ GRPC_CREATE_JWT_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_CREATE_JWT_SRC)))) ifeq ($(NO_SECURE),true) @@ -11118,6 +11156,8 @@ endif $(OBJDIR)/$(CONFIG)/test/core/security/create_jwt.o: $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/util/cmdline.o: $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_grpc_create_jwt: $(GRPC_CREATE_JWT_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -11289,6 +11329,7 @@ endif GRPC_PRINT_GOOGLE_DEFAULT_CREDS_TOKEN_SRC = \ test/core/security/print_google_default_creds_token.cc \ + test/core/util/cmdline.cc \ GRPC_PRINT_GOOGLE_DEFAULT_CREDS_TOKEN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_PRINT_GOOGLE_DEFAULT_CREDS_TOKEN_SRC)))) ifeq ($(NO_SECURE),true) @@ -11310,6 +11351,8 @@ endif $(OBJDIR)/$(CONFIG)/test/core/security/print_google_default_creds_token.o: $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/util/cmdline.o: $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_grpc_print_google_default_creds_token: $(GRPC_PRINT_GOOGLE_DEFAULT_CREDS_TOKEN_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -11385,6 +11428,7 @@ endif GRPC_VERIFY_JWT_SRC = \ test/core/security/verify_jwt.cc \ + test/core/util/cmdline.cc \ GRPC_VERIFY_JWT_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_VERIFY_JWT_SRC)))) ifeq ($(NO_SECURE),true) @@ -11406,6 +11450,8 @@ endif $(OBJDIR)/$(CONFIG)/test/core/security/verify_jwt.o: $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/util/cmdline.o: $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a + deps_grpc_verify_jwt: $(GRPC_VERIFY_JWT_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -11947,14 +11993,14 @@ else -$(BINDIR)/$(CONFIG)/json_rewrite: $(JSON_REWRITE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/json_rewrite: $(JSON_REWRITE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(JSON_REWRITE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/json_rewrite + $(Q) $(LD) $(LDFLAGS) $(JSON_REWRITE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/json_rewrite endif -$(OBJDIR)/$(CONFIG)/test/core/json/json_rewrite.o: $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/json/json_rewrite.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_json_rewrite: $(JSON_REWRITE_OBJS:.o=.dep) diff --git a/build.yaml b/build.yaml index 77c1d60f92..59915dccae 100644 --- a/build.yaml +++ b/build.yaml @@ -24,12 +24,18 @@ filegroups: uses: - grpc_base - nanopb +- name: cmdline + headers: + - test/core/util/cmdline.h + src: + - test/core/util/cmdline.cc + uses: + - gpr_base_headers - name: gpr_base src: - src/core/lib/gpr/alloc.cc - src/core/lib/gpr/arena.cc - src/core/lib/gpr/atm.cc - - src/core/lib/gpr/cmdline.cc - src/core/lib/gpr/cpu_iphone.cc - src/core/lib/gpr/cpu_linux.cc - src/core/lib/gpr/cpu_posix.cc @@ -50,8 +56,6 @@ filegroups: - src/core/lib/gpr/string_posix.cc - src/core/lib/gpr/string_util_windows.cc - src/core/lib/gpr/string_windows.cc - - src/core/lib/gpr/subprocess_posix.cc - - src/core/lib/gpr/subprocess_windows.cc - src/core/lib/gpr/sync.cc - src/core/lib/gpr/sync_posix.cc - src/core/lib/gpr/sync_windows.cc @@ -78,13 +82,11 @@ filegroups: - include/grpc/support/atm_gcc_atomic.h - include/grpc/support/atm_gcc_sync.h - include/grpc/support/atm_windows.h - - include/grpc/support/cmdline.h - include/grpc/support/cpu.h - include/grpc/support/log.h - include/grpc/support/log_windows.h - include/grpc/support/port_platform.h - include/grpc/support/string_util.h - - include/grpc/support/subprocess.h - include/grpc/support/sync.h - include/grpc/support/sync_custom.h - include/grpc/support/sync_generic.h @@ -721,6 +723,7 @@ filegroups: - test/core/util/port.h - test/core/util/port_server_client.h - test/core/util/slice_splitter.h + - test/core/util/subprocess.h - test/core/util/tracer_util.h - test/core/util/trickle_endpoint.h src: @@ -740,12 +743,15 @@ filegroups: - test/core/util/port_isolated_runtime_environment.cc - test/core/util/port_server_client.cc - test/core/util/slice_splitter.cc + - test/core/util/subprocess_posix.cc + - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc - test/core/util/trickle_endpoint.cc deps: - gpr_test_util - gpr uses: + - cmdline - grpc_base - grpc_client_channel - grpc_transport_chttp2 @@ -1877,6 +1883,16 @@ targets: - test/core/end2end/fuzzers/client_fuzzer_corpus dict: test/core/end2end/fuzzers/hpack.dictionary maxlen: 2048 +- name: cmdline_test + build: test + language: c + src: + - test/core/util/cmdline_test.cc + deps: + - gpr + - gpr_test_util + - grpc_test_util + uses_polling: false - name: combiner_test cpu_cost: 10 build: test @@ -2138,15 +2154,6 @@ targets: - mac - linux - posix -- name: gpr_cmdline_test - build: test - language: c - src: - - test/core/gpr/cmdline_test.cc - deps: - - gpr_test_util - - gpr - uses_polling: false - name: gpr_cpu_test cpu_cost: 30 build: test @@ -2365,6 +2372,8 @@ targets: deps: - grpc - gpr + filegroups: + - cmdline secure: true uses_polling: false - name: grpc_credentials_test @@ -2433,6 +2442,8 @@ targets: deps: - grpc - gpr + filegroups: + - cmdline uses_polling: false - name: grpc_security_connector_test build: test @@ -2462,6 +2473,8 @@ targets: deps: - grpc - gpr + filegroups: + - cmdline uses_polling: false - name: handshake_client build: test @@ -2676,7 +2689,9 @@ targets: src: - test/core/json/json_rewrite.cc deps: + - grpc_test_util - grpc + - gpr_test_util - gpr uses_polling: false - name: json_rewrite_test @@ -42,7 +42,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/gpr/alloc.cc \ src/core/lib/gpr/arena.cc \ src/core/lib/gpr/atm.cc \ - src/core/lib/gpr/cmdline.cc \ src/core/lib/gpr/cpu_iphone.cc \ src/core/lib/gpr/cpu_linux.cc \ src/core/lib/gpr/cpu_posix.cc \ @@ -63,8 +62,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/gpr/string_posix.cc \ src/core/lib/gpr/string_util_windows.cc \ src/core/lib/gpr/string_windows.cc \ - src/core/lib/gpr/subprocess_posix.cc \ - src/core/lib/gpr/subprocess_windows.cc \ src/core/lib/gpr/sync.cc \ src/core/lib/gpr/sync_posix.cc \ src/core/lib/gpr/sync_windows.cc \ diff --git a/config.w32 b/config.w32 index a951ad245e..f054773235 100644 --- a/config.w32 +++ b/config.w32 @@ -19,7 +19,6 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\gpr\\alloc.cc " + "src\\core\\lib\\gpr\\arena.cc " + "src\\core\\lib\\gpr\\atm.cc " + - "src\\core\\lib\\gpr\\cmdline.cc " + "src\\core\\lib\\gpr\\cpu_iphone.cc " + "src\\core\\lib\\gpr\\cpu_linux.cc " + "src\\core\\lib\\gpr\\cpu_posix.cc " + @@ -40,8 +39,6 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\gpr\\string_posix.cc " + "src\\core\\lib\\gpr\\string_util_windows.cc " + "src\\core\\lib\\gpr\\string_windows.cc " + - "src\\core\\lib\\gpr\\subprocess_posix.cc " + - "src\\core\\lib\\gpr\\subprocess_windows.cc " + "src\\core\\lib\\gpr\\sync.cc " + "src\\core\\lib\\gpr\\sync_posix.cc " + "src\\core\\lib\\gpr\\sync_windows.cc " + diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 281c7e7cb8..ef2587bb42 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -633,8 +633,30 @@ Pod::Spec.new do |s| 'test/core/util/port.h', 'test/core/util/port_server_client.h', 'test/core/util/slice_splitter.h', + 'test/core/util/subprocess.h', 'test/core/util/tracer_util.h', 'test/core/util/trickle_endpoint.h', + 'test/core/util/cmdline.h', + 'src/core/lib/gpr/arena.h', + 'src/core/lib/gpr/env.h', + 'src/core/lib/gpr/fork.h', + 'src/core/lib/gpr/host_port.h', + 'src/core/lib/gpr/mpscq.h', + 'src/core/lib/gpr/murmur_hash.h', + 'src/core/lib/gpr/spinlock.h', + 'src/core/lib/gpr/string.h', + 'src/core/lib/gpr/string_windows.h', + 'src/core/lib/gpr/thd_internal.h', + 'src/core/lib/gpr/time_precise.h', + 'src/core/lib/gpr/tmpfile.h', + 'src/core/lib/gpr/useful.h', + 'src/core/lib/gprpp/abstract.h', + 'src/core/lib/gprpp/atomic.h', + 'src/core/lib/gprpp/atomic_with_atm.h', + 'src/core/lib/gprpp/atomic_with_std.h', + 'src/core/lib/gprpp/manual_constructor.h', + 'src/core/lib/gprpp/memory.h', + 'src/core/lib/profiling/timers.h', 'src/core/ext/filters/client_channel/backup_poller.h', 'src/core/ext/filters/client_channel/client_channel.h', 'src/core/ext/filters/client_channel/client_channel_factory.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 414df047e2..95f5012baa 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -114,13 +114,11 @@ Pod::Spec.new do |s| 'include/grpc/support/atm_gcc_atomic.h', 'include/grpc/support/atm_gcc_sync.h', 'include/grpc/support/atm_windows.h', - 'include/grpc/support/cmdline.h', 'include/grpc/support/cpu.h', 'include/grpc/support/log.h', 'include/grpc/support/log_windows.h', 'include/grpc/support/port_platform.h', 'include/grpc/support/string_util.h', - 'include/grpc/support/subprocess.h', 'include/grpc/support/sync.h', 'include/grpc/support/sync_custom.h', 'include/grpc/support/sync_generic.h', @@ -212,7 +210,6 @@ Pod::Spec.new do |s| 'src/core/lib/gpr/alloc.cc', 'src/core/lib/gpr/arena.cc', 'src/core/lib/gpr/atm.cc', - 'src/core/lib/gpr/cmdline.cc', 'src/core/lib/gpr/cpu_iphone.cc', 'src/core/lib/gpr/cpu_linux.cc', 'src/core/lib/gpr/cpu_posix.cc', @@ -233,8 +230,6 @@ Pod::Spec.new do |s| 'src/core/lib/gpr/string_posix.cc', 'src/core/lib/gpr/string_util_windows.cc', 'src/core/lib/gpr/string_windows.cc', - 'src/core/lib/gpr/subprocess_posix.cc', - 'src/core/lib/gpr/subprocess_windows.cc', 'src/core/lib/gpr/sync.cc', 'src/core/lib/gpr/sync_posix.cc', 'src/core/lib/gpr/sync_windows.cc', @@ -1002,8 +997,11 @@ Pod::Spec.new do |s| 'test/core/util/port_isolated_runtime_environment.cc', 'test/core/util/port_server_client.cc', 'test/core/util/slice_splitter.cc', + 'test/core/util/subprocess_posix.cc', + 'test/core/util/subprocess_windows.cc', 'test/core/util/tracer_util.cc', 'test/core/util/trickle_endpoint.cc', + 'test/core/util/cmdline.cc', 'test/core/end2end/data/ssl_test_data.h', 'test/core/security/oauth2_utils.h', 'test/core/end2end/cq_verifier.h', @@ -1020,8 +1018,10 @@ Pod::Spec.new do |s| 'test/core/util/port.h', 'test/core/util/port_server_client.h', 'test/core/util/slice_splitter.h', + 'test/core/util/subprocess.h', 'test/core/util/tracer_util.h', 'test/core/util/trickle_endpoint.h', + 'test/core/util/cmdline.h', 'test/core/end2end/end2end_tests.cc', 'test/core/end2end/end2end_test_utils.cc', 'test/core/end2end/tests/authority_not_supported.cc', @@ -176,15 +176,6 @@ EXPORTS gpr_free_aligned gpr_set_allocation_functions gpr_get_allocation_functions - gpr_cmdline_create - gpr_cmdline_add_int - gpr_cmdline_add_flag - gpr_cmdline_add_string - gpr_cmdline_on_extra_arg - gpr_cmdline_set_survive_failure - gpr_cmdline_parse - gpr_cmdline_destroy - gpr_cmdline_usage_string gpr_cpu_num_cores gpr_cpu_current_cpu gpr_log_severity_string @@ -196,11 +187,6 @@ EXPORTS gpr_format_message gpr_strdup gpr_asprintf - gpr_subprocess_binary_extension - gpr_subprocess_create - gpr_subprocess_destroy - gpr_subprocess_join - gpr_subprocess_interrupt gpr_mu_init gpr_mu_destroy gpr_mu_lock diff --git a/grpc.gemspec b/grpc.gemspec index 12c5796029..705ef8d3e2 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -49,13 +49,11 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/support/atm_gcc_atomic.h ) s.files += %w( include/grpc/support/atm_gcc_sync.h ) s.files += %w( include/grpc/support/atm_windows.h ) - s.files += %w( include/grpc/support/cmdline.h ) s.files += %w( include/grpc/support/cpu.h ) s.files += %w( include/grpc/support/log.h ) s.files += %w( include/grpc/support/log_windows.h ) s.files += %w( include/grpc/support/port_platform.h ) s.files += %w( include/grpc/support/string_util.h ) - s.files += %w( include/grpc/support/subprocess.h ) s.files += %w( include/grpc/support/sync.h ) s.files += %w( include/grpc/support/sync_custom.h ) s.files += %w( include/grpc/support/sync_generic.h ) @@ -103,7 +101,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/gpr/alloc.cc ) s.files += %w( src/core/lib/gpr/arena.cc ) s.files += %w( src/core/lib/gpr/atm.cc ) - s.files += %w( src/core/lib/gpr/cmdline.cc ) s.files += %w( src/core/lib/gpr/cpu_iphone.cc ) s.files += %w( src/core/lib/gpr/cpu_linux.cc ) s.files += %w( src/core/lib/gpr/cpu_posix.cc ) @@ -124,8 +121,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/gpr/string_posix.cc ) s.files += %w( src/core/lib/gpr/string_util_windows.cc ) s.files += %w( src/core/lib/gpr/string_windows.cc ) - s.files += %w( src/core/lib/gpr/subprocess_posix.cc ) - s.files += %w( src/core/lib/gpr/subprocess_windows.cc ) s.files += %w( src/core/lib/gpr/sync.cc ) s.files += %w( src/core/lib/gpr/sync_posix.cc ) s.files += %w( src/core/lib/gpr/sync_windows.cc ) @@ -164,7 +164,6 @@ 'src/core/lib/gpr/alloc.cc', 'src/core/lib/gpr/arena.cc', 'src/core/lib/gpr/atm.cc', - 'src/core/lib/gpr/cmdline.cc', 'src/core/lib/gpr/cpu_iphone.cc', 'src/core/lib/gpr/cpu_linux.cc', 'src/core/lib/gpr/cpu_posix.cc', @@ -185,8 +184,6 @@ 'src/core/lib/gpr/string_posix.cc', 'src/core/lib/gpr/string_util_windows.cc', 'src/core/lib/gpr/string_windows.cc', - 'src/core/lib/gpr/subprocess_posix.cc', - 'src/core/lib/gpr/subprocess_windows.cc', 'src/core/lib/gpr/sync.cc', 'src/core/lib/gpr/sync_posix.cc', 'src/core/lib/gpr/sync_windows.cc', @@ -517,8 +514,11 @@ 'test/core/util/port_isolated_runtime_environment.cc', 'test/core/util/port_server_client.cc', 'test/core/util/slice_splitter.cc', + 'test/core/util/subprocess_posix.cc', + 'test/core/util/subprocess_windows.cc', 'test/core/util/tracer_util.cc', 'test/core/util/trickle_endpoint.cc', + 'test/core/util/cmdline.cc', 'src/core/lib/avl/avl.cc', 'src/core/lib/backoff/backoff.cc', 'src/core/lib/channel/channel_args.cc', @@ -730,8 +730,11 @@ 'test/core/util/port_isolated_runtime_environment.cc', 'test/core/util/port_server_client.cc', 'test/core/util/slice_splitter.cc', + 'test/core/util/subprocess_posix.cc', + 'test/core/util/subprocess_windows.cc', 'test/core/util/tracer_util.cc', 'test/core/util/trickle_endpoint.cc', + 'test/core/util/cmdline.cc', 'src/core/lib/avl/avl.cc', 'src/core/lib/backoff/backoff.cc', 'src/core/lib/channel/channel_args.cc', diff --git a/include/grpc/module.modulemap b/include/grpc/module.modulemap index ea8d85827c..798e06675c 100644 --- a/include/grpc/module.modulemap +++ b/include/grpc/module.modulemap @@ -4,13 +4,11 @@ framework module grpc { header "support/alloc.h" header "support/atm.h" - header "support/cmdline.h" header "support/cpu.h" header "support/log.h" header "support/log_windows.h" header "support/port_platform.h" header "support/string_util.h" - header "support/subprocess.h" header "support/sync.h" header "support/sync_generic.h" header "support/thd.h" diff --git a/package.xml b/package.xml index 6d32cf0a1c..0cc92430e7 100644 --- a/package.xml +++ b/package.xml @@ -56,13 +56,11 @@ <file baseinstalldir="/" name="include/grpc/support/atm_gcc_atomic.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/atm_gcc_sync.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/atm_windows.h" role="src" /> - <file baseinstalldir="/" name="include/grpc/support/cmdline.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/cpu.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/log.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/log_windows.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/port_platform.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/string_util.h" role="src" /> - <file baseinstalldir="/" name="include/grpc/support/subprocess.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/sync.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/sync_custom.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/sync_generic.h" role="src" /> @@ -110,7 +108,6 @@ <file baseinstalldir="/" name="src/core/lib/gpr/alloc.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/gpr/arena.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/gpr/atm.cc" role="src" /> - <file baseinstalldir="/" name="src/core/lib/gpr/cmdline.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/gpr/cpu_iphone.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/gpr/cpu_linux.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/gpr/cpu_posix.cc" role="src" /> @@ -131,8 +128,6 @@ <file baseinstalldir="/" name="src/core/lib/gpr/string_posix.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/gpr/string_util_windows.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/gpr/string_windows.cc" role="src" /> - <file baseinstalldir="/" name="src/core/lib/gpr/subprocess_posix.cc" role="src" /> - <file baseinstalldir="/" name="src/core/lib/gpr/subprocess_windows.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/gpr/sync.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/gpr/sync_posix.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/gpr/sync_windows.cc" role="src" /> diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 284c79b6ff..b1b6c5461a 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -18,7 +18,6 @@ CORE_SOURCE_FILES = [ 'src/core/lib/gpr/alloc.cc', 'src/core/lib/gpr/arena.cc', 'src/core/lib/gpr/atm.cc', - 'src/core/lib/gpr/cmdline.cc', 'src/core/lib/gpr/cpu_iphone.cc', 'src/core/lib/gpr/cpu_linux.cc', 'src/core/lib/gpr/cpu_posix.cc', @@ -39,8 +38,6 @@ CORE_SOURCE_FILES = [ 'src/core/lib/gpr/string_posix.cc', 'src/core/lib/gpr/string_util_windows.cc', 'src/core/lib/gpr/string_windows.cc', - 'src/core/lib/gpr/subprocess_posix.cc', - 'src/core/lib/gpr/subprocess_windows.cc', 'src/core/lib/gpr/sync.cc', 'src/core/lib/gpr/sync_posix.cc', 'src/core/lib/gpr/sync_windows.cc', diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index 10bda74d18..38e085ef25 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -199,15 +199,6 @@ gpr_malloc_aligned_type gpr_malloc_aligned_import; gpr_free_aligned_type gpr_free_aligned_import; gpr_set_allocation_functions_type gpr_set_allocation_functions_import; gpr_get_allocation_functions_type gpr_get_allocation_functions_import; -gpr_cmdline_create_type gpr_cmdline_create_import; -gpr_cmdline_add_int_type gpr_cmdline_add_int_import; -gpr_cmdline_add_flag_type gpr_cmdline_add_flag_import; -gpr_cmdline_add_string_type gpr_cmdline_add_string_import; -gpr_cmdline_on_extra_arg_type gpr_cmdline_on_extra_arg_import; -gpr_cmdline_set_survive_failure_type gpr_cmdline_set_survive_failure_import; -gpr_cmdline_parse_type gpr_cmdline_parse_import; -gpr_cmdline_destroy_type gpr_cmdline_destroy_import; -gpr_cmdline_usage_string_type gpr_cmdline_usage_string_import; gpr_cpu_num_cores_type gpr_cpu_num_cores_import; gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import; gpr_log_severity_string_type gpr_log_severity_string_import; @@ -219,11 +210,6 @@ gpr_set_log_function_type gpr_set_log_function_import; gpr_format_message_type gpr_format_message_import; gpr_strdup_type gpr_strdup_import; gpr_asprintf_type gpr_asprintf_import; -gpr_subprocess_binary_extension_type gpr_subprocess_binary_extension_import; -gpr_subprocess_create_type gpr_subprocess_create_import; -gpr_subprocess_destroy_type gpr_subprocess_destroy_import; -gpr_subprocess_join_type gpr_subprocess_join_import; -gpr_subprocess_interrupt_type gpr_subprocess_interrupt_import; gpr_mu_init_type gpr_mu_init_import; gpr_mu_destroy_type gpr_mu_destroy_import; gpr_mu_lock_type gpr_mu_lock_import; @@ -456,15 +442,6 @@ void grpc_rb_load_imports(HMODULE library) { gpr_free_aligned_import = (gpr_free_aligned_type) GetProcAddress(library, "gpr_free_aligned"); gpr_set_allocation_functions_import = (gpr_set_allocation_functions_type) GetProcAddress(library, "gpr_set_allocation_functions"); gpr_get_allocation_functions_import = (gpr_get_allocation_functions_type) GetProcAddress(library, "gpr_get_allocation_functions"); - gpr_cmdline_create_import = (gpr_cmdline_create_type) GetProcAddress(library, "gpr_cmdline_create"); - gpr_cmdline_add_int_import = (gpr_cmdline_add_int_type) GetProcAddress(library, "gpr_cmdline_add_int"); - gpr_cmdline_add_flag_import = (gpr_cmdline_add_flag_type) GetProcAddress(library, "gpr_cmdline_add_flag"); - gpr_cmdline_add_string_import = (gpr_cmdline_add_string_type) GetProcAddress(library, "gpr_cmdline_add_string"); - gpr_cmdline_on_extra_arg_import = (gpr_cmdline_on_extra_arg_type) GetProcAddress(library, "gpr_cmdline_on_extra_arg"); - gpr_cmdline_set_survive_failure_import = (gpr_cmdline_set_survive_failure_type) GetProcAddress(library, "gpr_cmdline_set_survive_failure"); - gpr_cmdline_parse_import = (gpr_cmdline_parse_type) GetProcAddress(library, "gpr_cmdline_parse"); - gpr_cmdline_destroy_import = (gpr_cmdline_destroy_type) GetProcAddress(library, "gpr_cmdline_destroy"); - gpr_cmdline_usage_string_import = (gpr_cmdline_usage_string_type) GetProcAddress(library, "gpr_cmdline_usage_string"); gpr_cpu_num_cores_import = (gpr_cpu_num_cores_type) GetProcAddress(library, "gpr_cpu_num_cores"); gpr_cpu_current_cpu_import = (gpr_cpu_current_cpu_type) GetProcAddress(library, "gpr_cpu_current_cpu"); gpr_log_severity_string_import = (gpr_log_severity_string_type) GetProcAddress(library, "gpr_log_severity_string"); @@ -476,11 +453,6 @@ void grpc_rb_load_imports(HMODULE library) { gpr_format_message_import = (gpr_format_message_type) GetProcAddress(library, "gpr_format_message"); gpr_strdup_import = (gpr_strdup_type) GetProcAddress(library, "gpr_strdup"); gpr_asprintf_import = (gpr_asprintf_type) GetProcAddress(library, "gpr_asprintf"); - gpr_subprocess_binary_extension_import = (gpr_subprocess_binary_extension_type) GetProcAddress(library, "gpr_subprocess_binary_extension"); - gpr_subprocess_create_import = (gpr_subprocess_create_type) GetProcAddress(library, "gpr_subprocess_create"); - gpr_subprocess_destroy_import = (gpr_subprocess_destroy_type) GetProcAddress(library, "gpr_subprocess_destroy"); - gpr_subprocess_join_import = (gpr_subprocess_join_type) GetProcAddress(library, "gpr_subprocess_join"); - gpr_subprocess_interrupt_import = (gpr_subprocess_interrupt_type) GetProcAddress(library, "gpr_subprocess_interrupt"); gpr_mu_init_import = (gpr_mu_init_type) GetProcAddress(library, "gpr_mu_init"); gpr_mu_destroy_import = (gpr_mu_destroy_type) GetProcAddress(library, "gpr_mu_destroy"); gpr_mu_lock_import = (gpr_mu_lock_type) GetProcAddress(library, "gpr_mu_lock"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index ba0ba580c8..9eb0a3f372 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -33,12 +33,10 @@ #include <grpc/slice.h> #include <grpc/slice_buffer.h> #include <grpc/support/alloc.h> -#include <grpc/support/cmdline.h> #include <grpc/support/cpu.h> #include <grpc/support/log.h> #include <grpc/support/log_windows.h> #include <grpc/support/string_util.h> -#include <grpc/support/subprocess.h> #include <grpc/support/sync.h> #include <grpc/support/thd.h> #include <grpc/support/time.h> @@ -574,33 +572,6 @@ extern gpr_set_allocation_functions_type gpr_set_allocation_functions_import; typedef gpr_allocation_functions(*gpr_get_allocation_functions_type)(void); extern gpr_get_allocation_functions_type gpr_get_allocation_functions_import; #define gpr_get_allocation_functions gpr_get_allocation_functions_import -typedef gpr_cmdline*(*gpr_cmdline_create_type)(const char* description); -extern gpr_cmdline_create_type gpr_cmdline_create_import; -#define gpr_cmdline_create gpr_cmdline_create_import -typedef void(*gpr_cmdline_add_int_type)(gpr_cmdline* cl, const char* name, const char* help, int* value); -extern gpr_cmdline_add_int_type gpr_cmdline_add_int_import; -#define gpr_cmdline_add_int gpr_cmdline_add_int_import -typedef void(*gpr_cmdline_add_flag_type)(gpr_cmdline* cl, const char* name, const char* help, int* value); -extern gpr_cmdline_add_flag_type gpr_cmdline_add_flag_import; -#define gpr_cmdline_add_flag gpr_cmdline_add_flag_import -typedef void(*gpr_cmdline_add_string_type)(gpr_cmdline* cl, const char* name, const char* help, const char** value); -extern gpr_cmdline_add_string_type gpr_cmdline_add_string_import; -#define gpr_cmdline_add_string gpr_cmdline_add_string_import -typedef void(*gpr_cmdline_on_extra_arg_type)(gpr_cmdline* cl, const char* name, const char* help, void (*on_extra_arg)(void* user_data, const char* arg), void* user_data); -extern gpr_cmdline_on_extra_arg_type gpr_cmdline_on_extra_arg_import; -#define gpr_cmdline_on_extra_arg gpr_cmdline_on_extra_arg_import -typedef void(*gpr_cmdline_set_survive_failure_type)(gpr_cmdline* cl); -extern gpr_cmdline_set_survive_failure_type gpr_cmdline_set_survive_failure_import; -#define gpr_cmdline_set_survive_failure gpr_cmdline_set_survive_failure_import -typedef int(*gpr_cmdline_parse_type)(gpr_cmdline* cl, int argc, char** argv); -extern gpr_cmdline_parse_type gpr_cmdline_parse_import; -#define gpr_cmdline_parse gpr_cmdline_parse_import -typedef void(*gpr_cmdline_destroy_type)(gpr_cmdline* cl); -extern gpr_cmdline_destroy_type gpr_cmdline_destroy_import; -#define gpr_cmdline_destroy gpr_cmdline_destroy_import -typedef char*(*gpr_cmdline_usage_string_type)(gpr_cmdline* cl, const char* argv0); -extern gpr_cmdline_usage_string_type gpr_cmdline_usage_string_import; -#define gpr_cmdline_usage_string gpr_cmdline_usage_string_import typedef unsigned(*gpr_cpu_num_cores_type)(void); extern gpr_cpu_num_cores_type gpr_cpu_num_cores_import; #define gpr_cpu_num_cores gpr_cpu_num_cores_import @@ -634,21 +605,6 @@ extern gpr_strdup_type gpr_strdup_import; typedef int(*gpr_asprintf_type)(char** strp, const char* format, ...) GPR_PRINT_FORMAT_CHECK(2, 3); extern gpr_asprintf_type gpr_asprintf_import; #define gpr_asprintf gpr_asprintf_import -typedef const char*(*gpr_subprocess_binary_extension_type)(); -extern gpr_subprocess_binary_extension_type gpr_subprocess_binary_extension_import; -#define gpr_subprocess_binary_extension gpr_subprocess_binary_extension_import -typedef gpr_subprocess*(*gpr_subprocess_create_type)(int argc, const char** argv); -extern gpr_subprocess_create_type gpr_subprocess_create_import; -#define gpr_subprocess_create gpr_subprocess_create_import -typedef void(*gpr_subprocess_destroy_type)(gpr_subprocess* p); -extern gpr_subprocess_destroy_type gpr_subprocess_destroy_import; -#define gpr_subprocess_destroy gpr_subprocess_destroy_import -typedef int(*gpr_subprocess_join_type)(gpr_subprocess* p); -extern gpr_subprocess_join_type gpr_subprocess_join_import; -#define gpr_subprocess_join gpr_subprocess_join_import -typedef void(*gpr_subprocess_interrupt_type)(gpr_subprocess* p); -extern gpr_subprocess_interrupt_type gpr_subprocess_interrupt_import; -#define gpr_subprocess_interrupt gpr_subprocess_interrupt_import typedef void(*gpr_mu_init_type)(gpr_mu* mu); extern gpr_mu_init_type gpr_mu_init_import; #define gpr_mu_init gpr_mu_init_import diff --git a/test/core/bad_ssl/bad_ssl_test.cc b/test/core/bad_ssl/bad_ssl_test.cc index 8aec94fd99..e2ab22e014 100644 --- a/test/core/bad_ssl/bad_ssl_test.cc +++ b/test/core/bad_ssl/bad_ssl_test.cc @@ -24,13 +24,13 @@ #include <grpc/support/alloc.h> #include <grpc/support/log.h> #include <grpc/support/string_util.h> -#include <grpc/support/subprocess.h> #include "src/core/lib/gpr/env.h" #include "src/core/lib/gpr/host_port.h" #include "src/core/lib/gpr/string.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" +#include "test/core/util/subprocess.h" #include "test/core/util/test_config.h" static void* tag(intptr_t t) { return (void*)t; } diff --git a/test/core/bad_ssl/server_common.cc b/test/core/bad_ssl/server_common.cc index 08842b8350..809539aff3 100644 --- a/test/core/bad_ssl/server_common.cc +++ b/test/core/bad_ssl/server_common.cc @@ -16,11 +16,11 @@ * */ -#include <grpc/support/cmdline.h> #include <grpc/support/log.h> #include <signal.h> #include "test/core/bad_ssl/server_common.h" +#include "test/core/util/cmdline.h" #include "test/core/util/test_config.h" /* Common server implementation details for all servers in servers/. diff --git a/test/core/fling/client.cc b/test/core/fling/client.cc index 2d3d1b1a94..92f59b7fdb 100644 --- a/test/core/fling/client.cc +++ b/test/core/fling/client.cc @@ -21,12 +21,12 @@ #include <stdio.h> #include <string.h> -#include <grpc/support/cmdline.h> #include <grpc/support/log.h> #include <grpc/support/time.h> #include "src/core/lib/gpr/useful.h" #include "src/core/lib/profiling/timers.h" +#include "test/core/util/cmdline.h" #include "test/core/util/grpc_profiler.h" #include "test/core/util/histogram.h" #include "test/core/util/test_config.h" diff --git a/test/core/fling/fling_stream_test.cc b/test/core/fling/fling_stream_test.cc index 6b29486f22..d5fd7a8d46 100644 --- a/test/core/fling/fling_stream_test.cc +++ b/test/core/fling/fling_stream_test.cc @@ -21,11 +21,11 @@ #include <grpc/support/alloc.h> #include <grpc/support/string_util.h> -#include <grpc/support/subprocess.h> #include "src/core/lib/gpr/host_port.h" #include "src/core/lib/gpr/string.h" #include "test/core/util/port.h" +#include "test/core/util/subprocess.h" int main(int argc, char** argv) { char* me = argv[0]; diff --git a/test/core/fling/fling_test.cc b/test/core/fling/fling_test.cc index ceb9851bc9..d95317b7e6 100644 --- a/test/core/fling/fling_test.cc +++ b/test/core/fling/fling_test.cc @@ -21,11 +21,11 @@ #include <grpc/support/alloc.h> #include <grpc/support/string_util.h> -#include <grpc/support/subprocess.h> #include "src/core/lib/gpr/host_port.h" #include "src/core/lib/gpr/string.h" #include "test/core/util/port.h" +#include "test/core/util/subprocess.h" int main(int argc, const char** argv) { const char* me = argv[0]; diff --git a/test/core/fling/server.cc b/test/core/fling/server.cc index 328bd4edbd..b19a25a185 100644 --- a/test/core/fling/server.cc +++ b/test/core/fling/server.cc @@ -30,13 +30,13 @@ #endif #include <grpc/support/alloc.h> -#include <grpc/support/cmdline.h> #include <grpc/support/log.h> #include <grpc/support/time.h> #include "src/core/lib/gpr/host_port.h" #include "src/core/lib/profiling/timers.h" #include "test/core/end2end/data/ssl_test_data.h" +#include "test/core/util/cmdline.h" #include "test/core/util/grpc_profiler.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/gpr/BUILD b/test/core/gpr/BUILD index 90ac658cdc..9aa74cc132 100644 --- a/test/core/gpr/BUILD +++ b/test/core/gpr/BUILD @@ -29,16 +29,6 @@ grpc_cc_test( ) grpc_cc_test( - name = "cmdline_test", - srcs = ["cmdline_test.cc"], - language = "C++", - deps = [ - "//:gpr", - "//test/core/util:gpr_test_util", - ], -) - -grpc_cc_test( name = "cpu_test", srcs = ["cpu_test.cc"], language = "C++", diff --git a/test/core/http/httpcli_test.cc b/test/core/http/httpcli_test.cc index 6ad0753f7e..3d892b939c 100644 --- a/test/core/http/httpcli_test.cc +++ b/test/core/http/httpcli_test.cc @@ -24,10 +24,11 @@ #include <grpc/support/alloc.h> #include <grpc/support/log.h> #include <grpc/support/string_util.h> -#include <grpc/support/subprocess.h> #include <grpc/support/sync.h> + #include "src/core/lib/iomgr/iomgr.h" #include "test/core/util/port.h" +#include "test/core/util/subprocess.h" #include "test/core/util/test_config.h" static int g_done = 0; diff --git a/test/core/http/httpscli_test.cc b/test/core/http/httpscli_test.cc index 92193bb442..7e99ad4249 100644 --- a/test/core/http/httpscli_test.cc +++ b/test/core/http/httpscli_test.cc @@ -25,11 +25,12 @@ #include <grpc/support/alloc.h> #include <grpc/support/log.h> #include <grpc/support/string_util.h> -#include <grpc/support/subprocess.h> #include <grpc/support/sync.h> + #include "src/core/lib/gpr/env.h" #include "src/core/lib/iomgr/iomgr.h" #include "test/core/util/port.h" +#include "test/core/util/subprocess.h" #include "test/core/util/test_config.h" static int g_done = 0; diff --git a/test/core/json/json_rewrite.cc b/test/core/json/json_rewrite.cc index 6891a57f9f..0319d15024 100644 --- a/test/core/json/json_rewrite.cc +++ b/test/core/json/json_rewrite.cc @@ -20,11 +20,11 @@ #include <stdlib.h> #include <grpc/support/alloc.h> -#include <grpc/support/cmdline.h> #include <grpc/support/log.h> #include "src/core/lib/json/json_reader.h" #include "src/core/lib/json/json_writer.h" +#include "test/core/util/cmdline.h" typedef struct json_writer_userdata { FILE* out; diff --git a/test/core/memory_usage/client.cc b/test/core/memory_usage/client.cc index 74618a016d..4f2ca9e937 100644 --- a/test/core/memory_usage/client.cc +++ b/test/core/memory_usage/client.cc @@ -24,12 +24,13 @@ #include <grpc/byte_buffer.h> #include <grpc/byte_buffer_reader.h> #include <grpc/support/alloc.h> -#include <grpc/support/cmdline.h> #include <grpc/support/log.h> #include <grpc/support/time.h> #include "src/core/lib/gpr/env.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/useful.h" + +#include "test/core/util/cmdline.h" #include "test/core/util/memory_counters.h" #include "test/core/util/test_config.h" diff --git a/test/core/memory_usage/memory_usage_test.cc b/test/core/memory_usage/memory_usage_test.cc index f6316bda0b..cc3528b060 100644 --- a/test/core/memory_usage/memory_usage_test.cc +++ b/test/core/memory_usage/memory_usage_test.cc @@ -21,11 +21,11 @@ #include <grpc/support/alloc.h> #include <grpc/support/string_util.h> -#include <grpc/support/subprocess.h> #include "src/core/lib/gpr/host_port.h" #include "src/core/lib/gpr/string.h" #include "test/core/util/port.h" +#include "test/core/util/subprocess.h" int main(int argc, char** argv) { char* me = argv[0]; diff --git a/test/core/memory_usage/server.cc b/test/core/memory_usage/server.cc index f5da3cb791..a276102e83 100644 --- a/test/core/memory_usage/server.cc +++ b/test/core/memory_usage/server.cc @@ -30,12 +30,12 @@ #endif #include <grpc/support/alloc.h> -#include <grpc/support/cmdline.h> #include <grpc/support/log.h> #include <grpc/support/time.h> #include "src/core/lib/gpr/host_port.h" #include "test/core/end2end/data/ssl_test_data.h" +#include "test/core/util/cmdline.h" #include "test/core/util/memory_counters.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/network_benchmarks/low_level_ping_pong.cc b/test/core/network_benchmarks/low_level_ping_pong.cc index 628033d3c3..8fd2c75438 100644 --- a/test/core/network_benchmarks/low_level_ping_pong.cc +++ b/test/core/network_benchmarks/low_level_ping_pong.cc @@ -35,7 +35,6 @@ #include <sys/socket.h> #include <grpc/support/alloc.h> -#include <grpc/support/cmdline.h> #include <grpc/support/log.h> #include <grpc/support/thd.h> #include <grpc/support/time.h> @@ -43,6 +42,7 @@ #include "src/core/lib/gpr/useful.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/socket_utils_posix.h" +#include "test/core/util/cmdline.h" #include "test/core/util/histogram.h" typedef struct fd_pair { diff --git a/test/core/security/BUILD b/test/core/security/BUILD index 7cd3ae58da..425c617fd1 100644 --- a/test/core/security/BUILD +++ b/test/core/security/BUILD @@ -110,6 +110,7 @@ grpc_cc_binary( deps = [ "//:gpr", "//:grpc", + "//test/core/util:grpc_test_util", ], ) @@ -121,6 +122,7 @@ grpc_cc_binary( ":oauth2_utils", "//:gpr", "//:grpc", + "//test/core/util:grpc_test_util", ], ) @@ -131,5 +133,6 @@ grpc_cc_binary( deps = [ "//:gpr", "//:grpc", + "//test/core/util:grpc_test_util", ], ) diff --git a/test/core/security/create_jwt.cc b/test/core/security/create_jwt.cc index 56ae9c891c..bb8227f08f 100644 --- a/test/core/security/create_jwt.cc +++ b/test/core/security/create_jwt.cc @@ -24,9 +24,10 @@ #include <grpc/slice.h> #include <grpc/support/alloc.h> -#include <grpc/support/cmdline.h> #include <grpc/support/log.h> +#include "test/core/util/cmdline.h" + void create_jwt(const char* json_key_file_path, const char* service_url, const char* scope) { grpc_auth_json_key key; diff --git a/test/core/security/fetch_oauth2.cc b/test/core/security/fetch_oauth2.cc index cb28a0487c..b0fa514400 100644 --- a/test/core/security/fetch_oauth2.cc +++ b/test/core/security/fetch_oauth2.cc @@ -23,13 +23,13 @@ #include <grpc/grpc_security.h> #include <grpc/slice.h> #include <grpc/support/alloc.h> -#include <grpc/support/cmdline.h> #include <grpc/support/log.h> #include <grpc/support/sync.h> #include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/security/credentials/credentials.h" #include "test/core/security/oauth2_utils.h" +#include "test/core/util/cmdline.h" static grpc_call_credentials* create_refresh_token_creds( const char* json_refresh_token_file_path) { diff --git a/test/core/security/print_google_default_creds_token.cc b/test/core/security/print_google_default_creds_token.cc index a90f997bda..828694afd1 100644 --- a/test/core/security/print_google_default_creds_token.cc +++ b/test/core/security/print_google_default_creds_token.cc @@ -23,7 +23,6 @@ #include <grpc/grpc_security.h> #include <grpc/slice.h> #include <grpc/support/alloc.h> -#include <grpc/support/cmdline.h> #include <grpc/support/log.h> #include <grpc/support/sync.h> @@ -31,6 +30,7 @@ #include "src/core/lib/security/credentials/composite/composite_credentials.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/slice/slice_string_helpers.h" +#include "test/core/util/cmdline.h" typedef struct { gpr_mu* mu; diff --git a/test/core/security/verify_jwt.cc b/test/core/security/verify_jwt.cc index 5d32ce0cdb..747508f6f6 100644 --- a/test/core/security/verify_jwt.cc +++ b/test/core/security/verify_jwt.cc @@ -23,11 +23,11 @@ #include <grpc/grpc_security.h> #include <grpc/slice.h> #include <grpc/support/alloc.h> -#include <grpc/support/cmdline.h> #include <grpc/support/log.h> #include <grpc/support/sync.h> #include "src/core/lib/security/credentials/jwt/jwt_verifier.h" +#include "test/core/util/cmdline.h" typedef struct { grpc_pollset* pollset; diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index a3e4246d2a..2dd6dc86a0 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -46,12 +46,10 @@ #include <grpc/status.h> #include <grpc/support/alloc.h> #include <grpc/support/atm.h> -#include <grpc/support/cmdline.h> #include <grpc/support/cpu.h> #include <grpc/support/log.h> #include <grpc/support/port_platform.h> #include <grpc/support/string_util.h> -#include <grpc/support/subprocess.h> #include <grpc/support/sync.h> #include <grpc/support/sync_custom.h> #include <grpc/support/sync_generic.h> @@ -237,15 +235,6 @@ int main(int argc, char **argv) { printf("%lx", (unsigned long) gpr_free_aligned); printf("%lx", (unsigned long) gpr_set_allocation_functions); printf("%lx", (unsigned long) gpr_get_allocation_functions); - printf("%lx", (unsigned long) gpr_cmdline_create); - printf("%lx", (unsigned long) gpr_cmdline_add_int); - printf("%lx", (unsigned long) gpr_cmdline_add_flag); - printf("%lx", (unsigned long) gpr_cmdline_add_string); - printf("%lx", (unsigned long) gpr_cmdline_on_extra_arg); - printf("%lx", (unsigned long) gpr_cmdline_set_survive_failure); - printf("%lx", (unsigned long) gpr_cmdline_parse); - printf("%lx", (unsigned long) gpr_cmdline_destroy); - printf("%lx", (unsigned long) gpr_cmdline_usage_string); printf("%lx", (unsigned long) gpr_cpu_num_cores); printf("%lx", (unsigned long) gpr_cpu_current_cpu); printf("%lx", (unsigned long) gpr_log_severity_string); @@ -256,11 +245,6 @@ int main(int argc, char **argv) { printf("%lx", (unsigned long) gpr_set_log_function); printf("%lx", (unsigned long) gpr_strdup); printf("%lx", (unsigned long) gpr_asprintf); - printf("%lx", (unsigned long) gpr_subprocess_binary_extension); - printf("%lx", (unsigned long) gpr_subprocess_create); - printf("%lx", (unsigned long) gpr_subprocess_destroy); - printf("%lx", (unsigned long) gpr_subprocess_join); - printf("%lx", (unsigned long) gpr_subprocess_interrupt); printf("%lx", (unsigned long) gpr_mu_init); printf("%lx", (unsigned long) gpr_mu_destroy); printf("%lx", (unsigned long) gpr_mu_lock); diff --git a/test/core/util/BUILD b/test/core/util/BUILD index 2237cfc173..886cfddf86 100644 --- a/test/core/util/BUILD +++ b/test/core/util/BUILD @@ -51,6 +51,7 @@ grpc_cc_library( grpc_cc_library( name = "grpc_test_util_base", srcs = [ + "cmdline.cc", "grpc_profiler.cc", "histogram.cc", "mock_endpoint.cc", @@ -61,11 +62,14 @@ grpc_cc_library( "port_server_client.cc", "reconnect_server.cc", "slice_splitter.cc", + "subprocess_posix.cc", + "subprocess_windows.cc", "test_tcp_server.cc", "tracer_util.cc", "trickle_endpoint.cc", ], hdrs = [ + "cmdline.h", "grpc_profiler.h", "histogram.h", "mock_endpoint.h", @@ -74,6 +78,7 @@ grpc_cc_library( "port.h", "port_server_client.h", "reconnect_server.h", + "subprocess.h", "slice_splitter.h", "test_tcp_server.h", "tracer_util.h", @@ -109,6 +114,16 @@ grpc_cc_library( ], ) +grpc_cc_test( + name = "cmdline_test", + srcs = ["cmdline_test.cc"], + language = "C++", + deps = [ + ":grpc_test_util", + "//:gpr", + ], +) + grpc_cc_library( name = "fuzzer_corpus_test", testonly = 1, diff --git a/src/core/lib/gpr/cmdline.cc b/test/core/util/cmdline.cc index 4118f9a72a..20bce273cd 100644 --- a/src/core/lib/gpr/cmdline.cc +++ b/test/core/util/cmdline.cc @@ -16,7 +16,7 @@ * */ -#include <grpc/support/cmdline.h> +#include "test/core/util/cmdline.h" #include <limits.h> #include <stdio.h> diff --git a/include/grpc/support/cmdline.h b/test/core/util/cmdline.h index c34a109fbd..3ae35d6e6a 100644 --- a/include/grpc/support/cmdline.h +++ b/test/core/util/cmdline.h @@ -16,15 +16,11 @@ * */ -#ifndef GRPC_SUPPORT_CMDLINE_H -#define GRPC_SUPPORT_CMDLINE_H +#ifndef GRPC_TEST_CORE_UTIL_CMDLINE_H +#define GRPC_TEST_CORE_UTIL_CMDLINE_H #include <grpc/support/port_platform.h> -#ifdef __cplusplus -extern "C" { -#endif - /** Simple command line parser. Supports flags that can be specified as -foo, --foo, --no-foo, -no-foo, etc @@ -55,34 +51,30 @@ typedef struct gpr_cmdline gpr_cmdline; /** Construct a command line parser: takes a short description of the tool doing the parsing */ -GPRAPI gpr_cmdline* gpr_cmdline_create(const char* description); +gpr_cmdline* gpr_cmdline_create(const char* description); /** Add an integer parameter, with a name (used on the command line) and some helpful text (used in the command usage) */ -GPRAPI void gpr_cmdline_add_int(gpr_cmdline* cl, const char* name, - const char* help, int* value); +void gpr_cmdline_add_int(gpr_cmdline* cl, const char* name, const char* help, + int* value); /** The same, for a boolean flag */ -GPRAPI void gpr_cmdline_add_flag(gpr_cmdline* cl, const char* name, - const char* help, int* value); +void gpr_cmdline_add_flag(gpr_cmdline* cl, const char* name, const char* help, + int* value); /** And for a string */ -GPRAPI void gpr_cmdline_add_string(gpr_cmdline* cl, const char* name, - const char* help, const char** value); +void gpr_cmdline_add_string(gpr_cmdline* cl, const char* name, const char* help, + const char** value); /** Set a callback for non-named arguments */ -GPRAPI void gpr_cmdline_on_extra_arg( +void gpr_cmdline_on_extra_arg( gpr_cmdline* cl, const char* name, const char* help, void (*on_extra_arg)(void* user_data, const char* arg), void* user_data); /** Enable surviving failure: default behavior is to exit the process */ -GPRAPI void gpr_cmdline_set_survive_failure(gpr_cmdline* cl); +void gpr_cmdline_set_survive_failure(gpr_cmdline* cl); /** Parse the command line; returns 1 on success, on failure either dies (by default) or returns 0 if gpr_cmdline_set_survive_failure() has been called */ -GPRAPI int gpr_cmdline_parse(gpr_cmdline* cl, int argc, char** argv); +int gpr_cmdline_parse(gpr_cmdline* cl, int argc, char** argv); /** Destroy the parser */ -GPRAPI void gpr_cmdline_destroy(gpr_cmdline* cl); +void gpr_cmdline_destroy(gpr_cmdline* cl); /** Get a string describing usage */ -GPRAPI char* gpr_cmdline_usage_string(gpr_cmdline* cl, const char* argv0); - -#ifdef __cplusplus -} -#endif +char* gpr_cmdline_usage_string(gpr_cmdline* cl, const char* argv0); -#endif /* GRPC_SUPPORT_CMDLINE_H */ +#endif /* GRPC_TEST_CORE_UTIL_CMDLINE_H */ diff --git a/test/core/gpr/cmdline_test.cc b/test/core/util/cmdline_test.cc index 27bf0336bc..069e1ceccf 100644 --- a/test/core/gpr/cmdline_test.cc +++ b/test/core/util/cmdline_test.cc @@ -16,14 +16,18 @@ * */ -#include <grpc/support/cmdline.h> - #include <string.h> #include <grpc/support/alloc.h> #include <grpc/support/log.h> +<<<<<<< HEAD:test/core/gpr/cmdline_test.cc #include "src/core/lib/gpr/useful.h" +======= +#include <grpc/support/useful.h> + +#include "test/core/util/cmdline.h" +>>>>>>> master:test/core/util/cmdline_test.cc #include "test/core/util/test_config.h" #define LOG_TEST() gpr_log(GPR_INFO, "test at %s:%d", __FILE__, __LINE__) diff --git a/include/grpc/support/subprocess.h b/test/core/util/subprocess.h index 175f7b50eb..c7fe9af435 100644 --- a/include/grpc/support/subprocess.h +++ b/test/core/util/subprocess.h @@ -16,29 +16,21 @@ * */ -#ifndef GRPC_SUPPORT_SUBPROCESS_H -#define GRPC_SUPPORT_SUBPROCESS_H +#ifndef GRPC_TEST_CORE_UTIL_SUBPROCESS_H +#define GRPC_TEST_CORE_UTIL_SUBPROCESS_H #include <grpc/support/port_platform.h> -#ifdef __cplusplus -extern "C" { -#endif - typedef struct gpr_subprocess gpr_subprocess; /** .exe on windows, empty on unices */ -GPRAPI const char* gpr_subprocess_binary_extension(); +const char* gpr_subprocess_binary_extension(); -GPRAPI gpr_subprocess* gpr_subprocess_create(int argc, const char** argv); +gpr_subprocess* gpr_subprocess_create(int argc, const char** argv); /** if subprocess has not been joined, kill it */ -GPRAPI void gpr_subprocess_destroy(gpr_subprocess* p); +void gpr_subprocess_destroy(gpr_subprocess* p); /** returns exit status; can be called at most once */ -GPRAPI int gpr_subprocess_join(gpr_subprocess* p); -GPRAPI void gpr_subprocess_interrupt(gpr_subprocess* p); - -#ifdef __cplusplus -} // extern "C" -#endif +int gpr_subprocess_join(gpr_subprocess* p); +void gpr_subprocess_interrupt(gpr_subprocess* p); -#endif /* GRPC_SUPPORT_SUBPROCESS_H */ +#endif /* GRPC_TEST_CORE_UTIL_SUBPROCESS_H */ diff --git a/src/core/lib/gpr/subprocess_posix.cc b/test/core/util/subprocess_posix.cc index dc046b6499..0f6c99731f 100644 --- a/src/core/lib/gpr/subprocess_posix.cc +++ b/test/core/util/subprocess_posix.cc @@ -20,8 +20,6 @@ #ifdef GPR_POSIX_SUBPROCESS -#include <grpc/support/subprocess.h> - #include <assert.h> #include <errno.h> #include <signal.h> @@ -36,6 +34,8 @@ #include <grpc/support/alloc.h> #include <grpc/support/log.h> +#include "test/core/util/subprocess.h" + struct gpr_subprocess { int pid; bool joined; diff --git a/src/core/lib/gpr/subprocess_windows.cc b/test/core/util/subprocess_windows.cc index 1947d475e3..d3295244ea 100644 --- a/src/core/lib/gpr/subprocess_windows.cc +++ b/test/core/util/subprocess_windows.cc @@ -26,9 +26,9 @@ #include <grpc/support/alloc.h> #include <grpc/support/log.h> -#include <grpc/support/subprocess.h> #include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/string_windows.h" +#include "test/core/util/subprocess.h" struct gpr_subprocess { PROCESS_INFORMATION pi; diff --git a/test/cpp/util/BUILD b/test/cpp/util/BUILD index af25fca185..d092ba348e 100644 --- a/test/cpp/util/BUILD +++ b/test/cpp/util/BUILD @@ -74,6 +74,7 @@ grpc_cc_library( deps = [ "//:grpc++", "//test/core/end2end:ssl_test_data", + "//test/core/util:grpc_test_util", ], external_deps = [ "protobuf", @@ -86,6 +87,7 @@ grpc_cc_library( hdrs = GRPCXX_TESTUTIL_HDRS, deps = [ "//:grpc++_unsecure", + "//test/core/util:grpc_test_util", ], external_deps = [ "protobuf", diff --git a/test/cpp/util/subprocess.cc b/test/cpp/util/subprocess.cc index a54d0c087a..ddaad89805 100644 --- a/test/cpp/util/subprocess.cc +++ b/test/cpp/util/subprocess.cc @@ -20,7 +20,7 @@ #include <vector> -#include <grpc/support/subprocess.h> +#include "test/core/util/subprocess.h" namespace grpc { diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 979839ad3e..0f8344d424 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -909,13 +909,11 @@ include/grpc/support/atm.h \ include/grpc/support/atm_gcc_atomic.h \ include/grpc/support/atm_gcc_sync.h \ include/grpc/support/atm_windows.h \ -include/grpc/support/cmdline.h \ include/grpc/support/cpu.h \ include/grpc/support/log.h \ include/grpc/support/log_windows.h \ include/grpc/support/port_platform.h \ include/grpc/support/string_util.h \ -include/grpc/support/subprocess.h \ include/grpc/support/sync.h \ include/grpc/support/sync_custom.h \ include/grpc/support/sync_generic.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 2659e7e3d5..8e1f3bc0cc 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -910,13 +910,11 @@ include/grpc/support/atm.h \ include/grpc/support/atm_gcc_atomic.h \ include/grpc/support/atm_gcc_sync.h \ include/grpc/support/atm_windows.h \ -include/grpc/support/cmdline.h \ include/grpc/support/cpu.h \ include/grpc/support/log.h \ include/grpc/support/log_windows.h \ include/grpc/support/port_platform.h \ include/grpc/support/string_util.h \ -include/grpc/support/subprocess.h \ include/grpc/support/sync.h \ include/grpc/support/sync_custom.h \ include/grpc/support/sync_generic.h \ diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index de349232ed..80f9c0cfd2 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -849,13 +849,11 @@ include/grpc/support/atm.h \ include/grpc/support/atm_gcc_atomic.h \ include/grpc/support/atm_gcc_sync.h \ include/grpc/support/atm_windows.h \ -include/grpc/support/cmdline.h \ include/grpc/support/cpu.h \ include/grpc/support/log.h \ include/grpc/support/log_windows.h \ include/grpc/support/port_platform.h \ include/grpc/support/string_util.h \ -include/grpc/support/subprocess.h \ include/grpc/support/sync.h \ include/grpc/support/sync_custom.h \ include/grpc/support/sync_generic.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 91c3eb745c..e8280d90b4 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -849,13 +849,11 @@ include/grpc/support/atm.h \ include/grpc/support/atm_gcc_atomic.h \ include/grpc/support/atm_gcc_sync.h \ include/grpc/support/atm_windows.h \ -include/grpc/support/cmdline.h \ include/grpc/support/cpu.h \ include/grpc/support/log.h \ include/grpc/support/log_windows.h \ include/grpc/support/port_platform.h \ include/grpc/support/string_util.h \ -include/grpc/support/subprocess.h \ include/grpc/support/sync.h \ include/grpc/support/sync_custom.h \ include/grpc/support/sync_generic.h \ @@ -1070,7 +1068,6 @@ src/core/lib/gpr/alloc.cc \ src/core/lib/gpr/arena.cc \ src/core/lib/gpr/arena.h \ src/core/lib/gpr/atm.cc \ -src/core/lib/gpr/cmdline.cc \ src/core/lib/gpr/cpu_iphone.cc \ src/core/lib/gpr/cpu_linux.cc \ src/core/lib/gpr/cpu_posix.cc \ @@ -1099,8 +1096,6 @@ src/core/lib/gpr/string_posix.cc \ src/core/lib/gpr/string_util_windows.cc \ src/core/lib/gpr/string_windows.cc \ src/core/lib/gpr/string_windows.h \ -src/core/lib/gpr/subprocess_posix.cc \ -src/core/lib/gpr/subprocess_windows.cc \ src/core/lib/gpr/sync.cc \ src/core/lib/gpr/sync_posix.cc \ src/core/lib/gpr/sync_windows.cc \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 120ce3f990..03697f7e54 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -267,6 +267,22 @@ "deps": [ "gpr", "gpr_test_util", + "grpc_test_util" + ], + "headers": [], + "is_filegroup": false, + "language": "c", + "name": "cmdline_test", + "src": [ + "test/core/util/cmdline_test.cc" + ], + "third_party": false, + "type": "target" + }, + { + "deps": [ + "gpr", + "gpr_test_util", "grpc", "grpc_test_util" ], @@ -611,21 +627,6 @@ "headers": [], "is_filegroup": false, "language": "c", - "name": "gpr_cmdline_test", - "src": [ - "test/core/gpr/cmdline_test.cc" - ], - "third_party": false, - "type": "target" - }, - { - "deps": [ - "gpr", - "gpr_test_util" - ], - "headers": [], - "is_filegroup": false, - "language": "c", "name": "gpr_cpu_test", "src": [ "test/core/gpr/cpu_test.cc" @@ -951,6 +952,7 @@ }, { "deps": [ + "cmdline", "gpr", "grpc" ], @@ -1051,6 +1053,7 @@ }, { "deps": [ + "cmdline", "gpr", "grpc" ], @@ -1100,6 +1103,7 @@ }, { "deps": [ + "cmdline", "gpr", "grpc" ], @@ -1394,7 +1398,9 @@ { "deps": [ "gpr", - "grpc" + "gpr_test_util", + "grpc", + "grpc_test_util" ], "headers": [], "is_filegroup": false, @@ -8165,6 +8171,23 @@ "deps": [ "gpr_base_headers" ], + "headers": [ + "test/core/util/cmdline.h" + ], + "is_filegroup": true, + "language": "c", + "name": "cmdline", + "src": [ + "test/core/util/cmdline.cc", + "test/core/util/cmdline.h" + ], + "third_party": false, + "type": "filegroup" + }, + { + "deps": [ + "gpr_base_headers" + ], "headers": [], "is_filegroup": true, "language": "c", @@ -8173,7 +8196,6 @@ "src/core/lib/gpr/alloc.cc", "src/core/lib/gpr/arena.cc", "src/core/lib/gpr/atm.cc", - "src/core/lib/gpr/cmdline.cc", "src/core/lib/gpr/cpu_iphone.cc", "src/core/lib/gpr/cpu_linux.cc", "src/core/lib/gpr/cpu_posix.cc", @@ -8194,8 +8216,6 @@ "src/core/lib/gpr/string_posix.cc", "src/core/lib/gpr/string_util_windows.cc", "src/core/lib/gpr/string_windows.cc", - "src/core/lib/gpr/subprocess_posix.cc", - "src/core/lib/gpr/subprocess_windows.cc", "src/core/lib/gpr/sync.cc", "src/core/lib/gpr/sync_posix.cc", "src/core/lib/gpr/sync_windows.cc", @@ -8227,13 +8247,11 @@ "include/grpc/support/atm_gcc_atomic.h", "include/grpc/support/atm_gcc_sync.h", "include/grpc/support/atm_windows.h", - "include/grpc/support/cmdline.h", "include/grpc/support/cpu.h", "include/grpc/support/log.h", "include/grpc/support/log_windows.h", "include/grpc/support/port_platform.h", "include/grpc/support/string_util.h", - "include/grpc/support/subprocess.h", "include/grpc/support/sync.h", "include/grpc/support/sync_custom.h", "include/grpc/support/sync_generic.h", @@ -8275,13 +8293,11 @@ "include/grpc/support/atm_gcc_atomic.h", "include/grpc/support/atm_gcc_sync.h", "include/grpc/support/atm_windows.h", - "include/grpc/support/cmdline.h", "include/grpc/support/cpu.h", "include/grpc/support/log.h", "include/grpc/support/log_windows.h", "include/grpc/support/port_platform.h", "include/grpc/support/string_util.h", - "include/grpc/support/subprocess.h", "include/grpc/support/sync.h", "include/grpc/support/sync_custom.h", "include/grpc/support/sync_generic.h", @@ -9332,6 +9348,7 @@ }, { "deps": [ + "cmdline", "gpr", "gpr_test_util", "grpc_base", @@ -9354,6 +9371,7 @@ "test/core/util/port.h", "test/core/util/port_server_client.h", "test/core/util/slice_splitter.h", + "test/core/util/subprocess.h", "test/core/util/tracer_util.h", "test/core/util/trickle_endpoint.h" ], @@ -9392,6 +9410,9 @@ "test/core/util/port_server_client.h", "test/core/util/slice_splitter.cc", "test/core/util/slice_splitter.h", + "test/core/util/subprocess.h", + "test/core/util/subprocess_posix.cc", + "test/core/util/subprocess_windows.cc", "test/core/util/tracer_util.cc", "test/core/util/tracer_util.h", "test/core/util/trickle_endpoint.cc", diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index c17d4c5a93..322b3f6fc5 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -324,6 +324,30 @@ "posix", "windows" ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "cmdline_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "uses_polling": false + }, + { + "args": [], + "benchmark": false, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], "cpu_cost": 10, "exclude_configs": [], "exclude_iomgrs": [], @@ -752,30 +776,6 @@ "posix", "windows" ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "gpr_cmdline_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "uses_polling": false - }, - { - "args": [], - "benchmark": false, - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], "cpu_cost": 30, "exclude_configs": [], "exclude_iomgrs": [], |