diff --git a/grpc.gemspec b/grpc.gemspec index 9c858b25791c861c7a5c77308a24d70cc60cba3f..05bb681c5fc7f3d273381a5fdeaa9aff0b3a7117 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -24,10 +24,6 @@ Gem::Specification.new do |s| s.files += Dir.glob('include/grpc/**/*') s.test_files = Dir.glob('src/ruby/spec/**/*') s.bindir = 'src/ruby/bin' - %w(math noproto).each do |b| - s.executables += ["#{b}_client.rb", "#{b}_server.rb"] - end - s.executables += %w(grpc_ruby_interop_client grpc_ruby_interop_server) s.require_paths = %w( src/ruby/bin src/ruby/lib src/ruby/pb ) s.platform = Gem::Platform::RUBY diff --git a/src/ruby/bin/grpc_ruby_interop_client b/src/ruby/bin/grpc_ruby_interop_client deleted file mode 100755 index e79fd33aa5011146969618b648f7c4a455f0fe5b..0000000000000000000000000000000000000000 --- a/src/ruby/bin/grpc_ruby_interop_client +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env ruby - -# 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. - -# Provides a gem binary entry point for the interop client. -require 'test/client' diff --git a/src/ruby/bin/grpc_ruby_interop_server b/src/ruby/bin/grpc_ruby_interop_server deleted file mode 100755 index 656a5f7c998cc8c7be38407d007a9a02ad65a649..0000000000000000000000000000000000000000 --- a/src/ruby/bin/grpc_ruby_interop_server +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env ruby - -# 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. - -# Provides a gem binary entry point for the interop server -require 'test/server' diff --git a/src/ruby/bin/interop/interop_client.rb b/src/ruby/bin/interop/interop_client.rb deleted file mode 100755 index 239083f37f6e239cdc702ded10bd03a5c54428cb..0000000000000000000000000000000000000000 --- a/src/ruby/bin/interop/interop_client.rb +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env ruby - -# 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. - -# ####################################################################### -# DEPRECATED: The behaviour in this file has been moved to pb/test/client.rb -# -# This file remains to support existing tools and scripts that use it. -# ###################################################################### -# -# interop_client is a testing tool that accesses a gRPC interop testing -# server and runs a test on it. -# -# Helps validate interoperation b/w different gRPC implementations. -# -# Usage: $ path/to/interop_client.rb --server_host=<hostname> \ -# --server_port=<port> \ -# --test_case=<testcase_name> - -this_dir = File.expand_path(File.dirname(__FILE__)) -pb_dir = File.join(File.dirname(File.dirname(this_dir)), 'pb') -$LOAD_PATH.unshift(pb_dir) unless $LOAD_PATH.include?(pb_dir) - -require 'test/client' diff --git a/src/ruby/bin/interop/interop_server.rb b/src/ruby/bin/interop/interop_server.rb deleted file mode 100755 index c6b0d00ec6361daa69d0460b267c516b82d7f602..0000000000000000000000000000000000000000 --- a/src/ruby/bin/interop/interop_server.rb +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env ruby - -# 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. - -# ####################################################################### -# DEPRECATED: The behaviour in this file has been moved to pb/test/server.rb -# -# This file remains to support existing tools and scripts that use it. -# ###################################################################### -# -# interop_server is a Testing app that runs a gRPC interop testing server. -# -# It helps validate interoperation b/w gRPC in different environments -# -# Helps validate interoperation b/w different gRPC implementations. -# -# Usage: $ path/to/interop_server.rb --port - -this_dir = File.expand_path(File.dirname(__FILE__)) -pb_dir = File.join(File.dirname(File.dirname(this_dir)), 'pb') -$LOAD_PATH.unshift(pb_dir) unless $LOAD_PATH.include?(pb_dir) - -require 'test/server' diff --git a/src/ruby/pb/test/client.rb b/src/ruby/pb/test/client.rb index 2f83e67c5248226375d83f45054d44d25c638382..695a5c4ea231022e49642134099b3058c9eb459f 100755 --- a/src/ruby/pb/test/client.rb +++ b/src/ruby/pb/test/client.rb @@ -464,6 +464,9 @@ def main opts = parse_args stub = create_stub(opts) NamedTests.new(stub, opts).method(opts['test_case']).call + p "OK: #{opts['test_case']}" end -main +if __FILE__ == $0 + main +end diff --git a/templates/grpc.gemspec.template b/templates/grpc.gemspec.template index 6f8d1fb9e6cd2c0c9f7596e4bb70a2413d7f8fee..ce775ffb90bf7f10cb8767f792fd2a7d72dc2f48 100644 --- a/templates/grpc.gemspec.template +++ b/templates/grpc.gemspec.template @@ -26,10 +26,6 @@ s.files += Dir.glob('include/grpc/**/*') s.test_files = Dir.glob('src/ruby/spec/**/*') s.bindir = 'src/ruby/bin' - ${'%'}w(math noproto).each do |b| - s.executables += ["#{b}_client.rb", "#{b}_server.rb"] - end - s.executables += %w(grpc_ruby_interop_client grpc_ruby_interop_server) s.require_paths = %w( src/ruby/bin src/ruby/lib src/ruby/pb ) s.platform = Gem::Platform::RUBY diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 28b91f8b623be7ce13d381c89824ba7c632a3fa0..220d0e60485c6e051dda3b7f5acf3cb20cd5f5e9 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -270,13 +270,13 @@ class RubyLanguage: self.safename = str(self) def client_cmd(self, args): - return ['ruby', 'src/ruby/bin/interop/interop_client.rb'] + args + return ['ruby', 'src/ruby/pb/test/client.rb'] + args def cloud_to_prod_env(self): return {} def server_cmd(self, args): - return ['ruby', 'src/ruby/bin/interop/interop_server.rb', '--use_tls=true'] + args + return ['ruby', 'src/ruby/pb/test/server.rb', '--use_tls=true'] + args def global_env(self): return {} @@ -590,8 +590,8 @@ prod_servers = { False), 'cloud_gateway_v2': ('216.239.32.255', 'grpc-test2.sandbox.googleapis.com', True), - 'gateway_v4': ('grpc-test4.sandbox.googleapis.com', - 'grpc-test4.sandbox.googleapis.com', True), + 'gateway_v4': ('grpc-test4.sandbox.googleapis.com', + 'grpc-test4.sandbox.googleapis.com', True), 'cloud_gateway_v4': ('216.239.32.255', 'grpc-test4.sandbox.googleapis.com', True), }