summaryrefslogtreecommitdiff
path: root/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'ruby')
-rw-r--r--ruby/Makefile2
-rwxr-xr-xruby/allTests.py45
-rw-r--r--ruby/config/Make.rules10
-rw-r--r--ruby/src/IceRuby/Communicator.cpp11
-rw-r--r--ruby/src/IceRuby/Init.cpp17
-rw-r--r--ruby/src/IceRuby/Makefile.mk2
-rwxr-xr-xruby/test/Ice/acm/run.py25
-rw-r--r--ruby/test/Ice/application/test.py0
-rwxr-xr-xruby/test/Ice/binding/run.py24
-rwxr-xr-xruby/test/Ice/checksum/run.py23
-rwxr-xr-xruby/test/Ice/defaultValue/run.py28
-rwxr-xr-xruby/test/Ice/enums/run.py28
-rwxr-xr-xruby/test/Ice/exceptions/run.py45
-rwxr-xr-xruby/test/Ice/facets/run.py24
-rwxr-xr-xruby/test/Ice/info/run.py23
-rwxr-xr-xruby/test/Ice/inheritance/run.py24
-rwxr-xr-xruby/test/Ice/location/run.py24
-rwxr-xr-xruby/test/Ice/objects/run.py32
-rwxr-xr-xruby/test/Ice/operations/run.py27
-rwxr-xr-xruby/test/Ice/optional/run.py26
-rwxr-xr-xruby/test/Ice/properties/run.py45
-rwxr-xr-xruby/test/Ice/proxy/run.py28
-rwxr-xr-xruby/test/Ice/slicing/exceptions/run.py28
-rwxr-xr-xruby/test/Ice/slicing/objects/run.py28
-rwxr-xr-xruby/test/Ice/timeout/run.py25
-rwxr-xr-xruby/test/Slice/keyword/run.py28
-rwxr-xr-xruby/test/Slice/macros/run.py29
-rwxr-xr-xruby/test/Slice/structure/run.py29
-rw-r--r--ruby/test/Slice/unicodePaths/run.py84
29 files changed, 32 insertions, 732 deletions
diff --git a/ruby/Makefile b/ruby/Makefile
index 9d9f9b10657..33007d4d602 100644
--- a/ruby/Makefile
+++ b/ruby/Makefile
@@ -15,7 +15,7 @@ include $(top_srcdir)/config/Make.rules
#
# Load C++ dependencies
#
-$(eval $(call load-dependencies,$(addprefix $(top_srcdir)/cpp/src/,Ice IceSSL)))
+$(eval $(call load-dependencies,$(addprefix $(top_srcdir)/cpp/src/,Ice IceSSL IceLocatorDiscovery IceDiscovery)))
$(eval $(call load-translator-dependencies,$(top_srcdir)/cpp/src/slice2rb))
#
diff --git a/ruby/allTests.py b/ruby/allTests.py
index 54e3f8ae08f..e4360c465d3 100755
--- a/ruby/allTests.py
+++ b/ruby/allTests.py
@@ -8,46 +8,9 @@
#
# **********************************************************************
-import os, sys, re, getopt
+import os, sys
+sys.path.append(os.path.join(os.path.dirname(__file__), "..", "scripts"))
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
+from Util import runTestsWithPath
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-#
-# List of all basic tests.
-#
-tests = [
- ("Slice/keyword", ["once"]),
- ("Slice/structure", ["once"]),
- ("Slice/macros", ["once"]),
- ("Slice/unicodePaths", ["once"]),
- ("Ice/binding", ["core"]),
- ("Ice/checksum", ["core"]),
- ("Ice/exceptions", ["core"]),
- ("Ice/facets", ["core"]),
- ("Ice/info", ["core", "noipv6", "nocompress"]),
- ("Ice/inheritance", ["core"]),
- ("Ice/location", ["core"]),
- ("Ice/objects", ["core"]),
- ("Ice/proxy", ["core"]),
- ("Ice/properties", ["once", "nowin32"]),
- ("Ice/operations", ["core"]),
- ("Ice/timeout", ["core", "nocompress"]),
- ("Ice/slicing/exceptions", ["core"]),
- ("Ice/slicing/objects", ["core"]),
- ("Ice/defaultValue", ["core"]),
- ("Ice/optional", ["core"]),
- ("Ice/enums", ["core"]),
- ("Ice/acm", ["core"])
- ]
-
-if __name__ == "__main__":
- TestUtil.run(tests)
+runTestsWithPath(__file__) \ No newline at end of file
diff --git a/ruby/config/Make.rules b/ruby/config/Make.rules
index eec3423d6c0..409e0254863 100644
--- a/ruby/config/Make.rules
+++ b/ruby/config/Make.rules
@@ -29,6 +29,16 @@ ifneq ($(wildcard $(ruby_config_dir)/ruby/config.h),)
ruby_cppflags += -I$(ruby_config_dir)
endif
+# OS X & macOS with LLVM-Clang > 7.3 and the system version of Ruby require '-Wno-shift-negative-value'. This issue
+# has been patched in more recent 2.x Ruby versions.
+ifeq ($(shell uname),Darwin)
+ ifeq ($(shell which $(RUBY)),/usr/bin/ruby)
+ ifeq ($(shell expr $$($(CXX) -v 2>&1 | head -1 | sed -E 's/.*clang-([0-9][0-9][0-9]).*/\1/') \>= 703),1)
+ ruby_cppflags += -Wno-shift-negative-value $(RUBY_FLAGS)
+ endif
+ endif
+endif
+
# Ruby linker flags
ruby_ldflags := $(call ruby-call,$$(LIBRUBYARG))
ruby_libdir := $(call ruby-call,$(if $(findstring MINGW,$(shell uname)),$$(bindir),$$(libdir)))
diff --git a/ruby/src/IceRuby/Communicator.cpp b/ruby/src/IceRuby/Communicator.cpp
index 73fd483f8be..232092dd9bd 100644
--- a/ruby/src/IceRuby/Communicator.cpp
+++ b/ruby/src/IceRuby/Communicator.cpp
@@ -173,6 +173,17 @@ IceRuby_initialize(int argc, VALUE* argv, VALUE self)
communicator = Ice::initialize(data);
}
}
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ for(i = 0; i < ac + 1; ++i)
+ {
+ free(av[i]);
+ }
+ delete[] av;
+
+ throw;
+ }
catch(...)
{
for(i = 0; i < ac + 1; ++i)
diff --git a/ruby/src/IceRuby/Init.cpp b/ruby/src/IceRuby/Init.cpp
index 5520de7d9fe..a0c2663f4ed 100644
--- a/ruby/src/IceRuby/Init.cpp
+++ b/ruby/src/IceRuby/Init.cpp
@@ -19,6 +19,8 @@
#include <Endpoint.h>
#include <ValueFactoryManager.h>
+#include <Ice/RegisterPlugins.h>
+
using namespace std;
using namespace IceRuby;
@@ -27,21 +29,12 @@ static VALUE iceModule;
extern "C"
{
-#ifdef ICE_STATIC_LIBS
-Ice::Plugin* createIceSSL(const Ice::CommunicatorPtr&, const std::string&, const Ice::StringSeq&);
-Ice::Plugin* createIceDiscovery(const Ice::CommunicatorPtr&, const string&, const Ice::StringSeq&);
-Ice::Plugin* createIceLocatorDiscovery(const Ice::CommunicatorPtr&, const string&, const Ice::StringSeq&);
-#endif
-
void
ICE_DECLSPEC_EXPORT Init_IceRuby()
{
-#ifdef ICE_STATIC_LIBS
- // Register the plugins manually if we're building with static libraries.
- Ice::registerPluginFactory("IceSSL", createIceSSL, false);
- Ice::registerPluginFactory("IceDiscovery", createIceDiscovery, false);
- Ice::registerPluginFactory("IceLocatorDiscovery", createIceLocatorDiscovery, false);
-#endif
+ Ice::registerIceSSL(false);
+ Ice::registerIceDiscovery(false);
+ Ice::registerIceLocatorDiscovery(false);
iceModule = rb_define_module("Ice");
initCommunicator(iceModule);
diff --git a/ruby/src/IceRuby/Makefile.mk b/ruby/src/IceRuby/Makefile.mk
index 991308fc482..b4468e12b9c 100644
--- a/ruby/src/IceRuby/Makefile.mk
+++ b/ruby/src/IceRuby/Makefile.mk
@@ -16,7 +16,7 @@ IceRuby_installdir := $(install_rubylibdir)
IceRuby_cppflags := -I$(project) -I$(top_srcdir)/cpp/include -I$(top_srcdir)/cpp/include/generated \
-I$(top_srcdir)/cpp/src $(ruby_cppflags)
IceRuby_ldflags := $(ruby_ldflags)
-IceRuby_dependencies := IceSSL Ice
+IceRuby_dependencies := IceDiscovery IceLocatorDiscovery IceSSL Ice
IceRuby_libs := mcpp
IceRuby_extra_sources := $(filter-out %Util.cpp %Python.cpp,\
$(wildcard $(top_srcdir)/cpp/src/Slice/*.cpp)) \
diff --git a/ruby/test/Ice/acm/run.py b/ruby/test/Ice/acm/run.py
deleted file mode 100755
index 9bd838957b6..00000000000
--- a/ruby/test/Ice/acm/run.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-TestUtil.clientServerTest()
-
-sys.exit(0)
diff --git a/ruby/test/Ice/application/test.py b/ruby/test/Ice/application/test.py
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/ruby/test/Ice/application/test.py
diff --git a/ruby/test/Ice/binding/run.py b/ruby/test/Ice/binding/run.py
deleted file mode 100755
index 4e108ef8705..00000000000
--- a/ruby/test/Ice/binding/run.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-TestUtil.clientServerTest()
-
diff --git a/ruby/test/Ice/checksum/run.py b/ruby/test/Ice/checksum/run.py
deleted file mode 100755
index 3fc6200cd00..00000000000
--- a/ruby/test/Ice/checksum/run.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-TestUtil.clientServerTest()
diff --git a/ruby/test/Ice/defaultValue/run.py b/ruby/test/Ice/defaultValue/run.py
deleted file mode 100755
index aefa272c10e..00000000000
--- a/ruby/test/Ice/defaultValue/run.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-sys.stdout.write("starting client... ")
-sys.stdout.flush()
-clientProc = TestUtil.startClient("Client.rb", startReader = False)
-print("ok")
-clientProc.startReader()
-clientProc.waitTestSuccess()
diff --git a/ruby/test/Ice/enums/run.py b/ruby/test/Ice/enums/run.py
deleted file mode 100755
index 6870d8dcd2a..00000000000
--- a/ruby/test/Ice/enums/run.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-print("Running test with 1.0 encoding.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
-
-print("Running test with 1.1 encoding.")
-TestUtil.clientServerTest()
diff --git a/ruby/test/Ice/exceptions/run.py b/ruby/test/Ice/exceptions/run.py
deleted file mode 100755
index 99baacc7c1c..00000000000
--- a/ruby/test/Ice/exceptions/run.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-print("Running test with compact (default) format.")
-TestUtil.clientServerTest()
-
-print("Running test with sliced format.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat",
- additionalServerOptions="--Ice.Default.SlicedFormat")
-
-print("Running test with 1.0 encoding.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
-
-print("Running test with compact (default) format and AMD server.")
-TestUtil.clientServerTest(server="serveramd")
-
-print("Running test with sliced format and AMD server.")
-TestUtil.clientServerTest(server="serveramd",
- additionalClientOptions="--Ice.Default.SlicedFormat",
- additionalServerOptions="--Ice.Default.SlicedFormat")
-
-print("Running test with 1.0 encoding and AMD server.")
-TestUtil.clientServerTest(server="serveramd",
- additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
diff --git a/ruby/test/Ice/facets/run.py b/ruby/test/Ice/facets/run.py
deleted file mode 100755
index 4e108ef8705..00000000000
--- a/ruby/test/Ice/facets/run.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-TestUtil.clientServerTest()
-
diff --git a/ruby/test/Ice/info/run.py b/ruby/test/Ice/info/run.py
deleted file mode 100755
index 3fc6200cd00..00000000000
--- a/ruby/test/Ice/info/run.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-TestUtil.clientServerTest()
diff --git a/ruby/test/Ice/inheritance/run.py b/ruby/test/Ice/inheritance/run.py
deleted file mode 100755
index 4e108ef8705..00000000000
--- a/ruby/test/Ice/inheritance/run.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-TestUtil.clientServerTest()
-
diff --git a/ruby/test/Ice/location/run.py b/ruby/test/Ice/location/run.py
deleted file mode 100755
index 4e108ef8705..00000000000
--- a/ruby/test/Ice/location/run.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-TestUtil.clientServerTest()
-
diff --git a/ruby/test/Ice/objects/run.py b/ruby/test/Ice/objects/run.py
deleted file mode 100755
index 10fcc7c02db..00000000000
--- a/ruby/test/Ice/objects/run.py
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-print("Running test with compact (default) format.")
-TestUtil.clientServerTest()
-
-print("Running test with sliced format.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat",
- additionalServerOptions="--Ice.Default.SlicedFormat")
-
-print("Running test with 1.0 encoding.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
diff --git a/ruby/test/Ice/operations/run.py b/ruby/test/Ice/operations/run.py
deleted file mode 100755
index 6e7a3af7229..00000000000
--- a/ruby/test/Ice/operations/run.py
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-print("tests with regular server.")
-TestUtil.clientServerTest()
-print("tests with AMD server.")
-TestUtil.clientServerTest(server="serveramd")
-
diff --git a/ruby/test/Ice/optional/run.py b/ruby/test/Ice/optional/run.py
deleted file mode 100755
index 9e0a062c612..00000000000
--- a/ruby/test/Ice/optional/run.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-print("Running test with compact (default) format.")
-TestUtil.clientServerTest()
-print("Running test with sliced format.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", additionalServerOptions="--Ice.Default.SlicedFormat")
diff --git a/ruby/test/Ice/properties/run.py b/ruby/test/Ice/properties/run.py
deleted file mode 100755
index 70e96e63e13..00000000000
--- a/ruby/test/Ice/properties/run.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-#
-# Write config
-#
-if sys.version_info[0] == 2:
- configPath = "./config/\xe4\xb8\xad\xe5\x9b\xbd_client.config"
- decodedPath = configPath.decode("utf-8")
-else:
- configPath = "./config/\u4e2d\u56fd_client.config"
- decodedPath = configPath # No need to decode with Python3, strings are already Unicode
-
-TestUtil.createFile(decodedPath,
- ["# Automatically generated by Ice test driver.",
- "Ice.Trace.Protocol=1",
- "Ice.Trace.Network=1",
- "Ice.ProgramName=PropertiesClient",
- "Config.Path=" + configPath],
- "utf-8")
-
-TestUtil.simpleTest()
-
-if os.path.exists(decodedPath):
- os.remove(decodedPath)
diff --git a/ruby/test/Ice/proxy/run.py b/ruby/test/Ice/proxy/run.py
deleted file mode 100755
index b1cbdc1940c..00000000000
--- a/ruby/test/Ice/proxy/run.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-print("tests with regular server.")
-TestUtil.clientServerTest()
-print("tests with AMD server.")
-TestUtil.clientServerTest(server="serveramd")
-
-sys.exit(0)
diff --git a/ruby/test/Ice/slicing/exceptions/run.py b/ruby/test/Ice/slicing/exceptions/run.py
deleted file mode 100755
index d27134b1154..00000000000
--- a/ruby/test/Ice/slicing/exceptions/run.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-print("Running test with sliced format.")
-TestUtil.clientServerTest()
-
-print("Running test with 1.0 encoding.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
diff --git a/ruby/test/Ice/slicing/objects/run.py b/ruby/test/Ice/slicing/objects/run.py
deleted file mode 100755
index d27134b1154..00000000000
--- a/ruby/test/Ice/slicing/objects/run.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-print("Running test with sliced format.")
-TestUtil.clientServerTest()
-
-print("Running test with 1.0 encoding.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
diff --git a/ruby/test/Ice/timeout/run.py b/ruby/test/Ice/timeout/run.py
deleted file mode 100755
index 94778d2a1f3..00000000000
--- a/ruby/test/Ice/timeout/run.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-print("tests with regular server.")
-TestUtil.clientServerTest()
-
diff --git a/ruby/test/Slice/keyword/run.py b/ruby/test/Slice/keyword/run.py
deleted file mode 100755
index 27257ffbfad..00000000000
--- a/ruby/test/Slice/keyword/run.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-sys.stdout.write("starting client... ")
-sys.stdout.flush()
-clientProc = TestUtil.startClient("Client.rb", "--Ice.Default.Host=127.0.0.1", startReader = False)
-print("ok")
-clientProc.startReader()
-clientProc.waitTestSuccess()
diff --git a/ruby/test/Slice/macros/run.py b/ruby/test/Slice/macros/run.py
deleted file mode 100755
index 4ada9c9860f..00000000000
--- a/ruby/test/Slice/macros/run.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-sys.stdout.write("starting client... ")
-sys.stdout.flush()
-clientProc = TestUtil.startClient("Client.rb", "--Ice.Default.Host=127.0.0.1", startReader = False)
-print("ok")
-clientProc.startReader()
-clientProc.waitTestSuccess()
-
diff --git a/ruby/test/Slice/structure/run.py b/ruby/test/Slice/structure/run.py
deleted file mode 100755
index 4ada9c9860f..00000000000
--- a/ruby/test/Slice/structure/run.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-sys.stdout.write("starting client... ")
-sys.stdout.flush()
-clientProc = TestUtil.startClient("Client.rb", "--Ice.Default.Host=127.0.0.1", startReader = False)
-print("ok")
-clientProc.startReader()
-clientProc.waitTestSuccess()
-
diff --git a/ruby/test/Slice/unicodePaths/run.py b/ruby/test/Slice/unicodePaths/run.py
deleted file mode 100644
index 3ff0e2838c5..00000000000
--- a/ruby/test/Slice/unicodePaths/run.py
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys, locale, shutil
-
-path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-def test(b):
- if not b:
- print("failed!")
- sys.exit(1)
-
-if TestUtil.isAIX() or TestUtil.isLinux():
- encoding = locale.getdefaultlocale()[1]
- if encoding != "UTF-8":
- print("Please set LC_ALL to xx_xx.UTF-8, for example FR_FR.UTF-8")
- print("Skipping test")
- sys.exit(0)
-
-if TestUtil.isWin32():
- print("Ruby on Windows is build with MINGW and it doesn't support Windows UNICODE APIs")
- print("Skipping test")
- sys.exit(0)
-
-if sys.version_info[0] == 2 and TestUtil.isWin32():
- print("To run this test on Windows you need to be using Python 3.x")
- print("Python 2.x subprocess module doesn't support unicode on Windows")
- print("Skipping test")
- sys.exit(0)
-
-if os.environ.get("USE_BIN_DIST", "no") == "yes":
- if TestUtil.isYocto():
- slice2rb = os.path.join(TestUtil.getCppBinDir(), "slice2rb")
- if os.path.isfile("/usr/bin/slice2rb.ruby2.1"):
- slice2rb = "slice2rb.ruby2.1"
- else:
- slice2rb = "slice2rb"
-else:
- if TestUtil.isYocto():
- slice2rb = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..", "..", "cpp", "bin", "slice2rb")
- else:
- slice2rb = "ruby " + os.path.join(path[0], "ruby", "config", "s2rb.rb")
-
-sys.stdout.write("testing Slice compiler and unicode file paths... ")
-sys.stdout.flush()
-
-#
-# Write Slice file
-#
-if sys.version_info[0] == 2:
- srcPath = "./\xe4\xb8\xad\xe5\x9b\xbd".decode("utf-8")
-else:
- srcPath = "./\u4e2d\u56fd"
-if os.path.exists(srcPath):
- shutil.rmtree(srcPath)
-os.mkdir(srcPath)
-
-TestUtil.createFile("%s/Test.ice" % srcPath, ["module Test { ",
- "class Point{int x; int y; };",
- "interface Canvas{ void draw(Point p); };",
- "};"], "utf-8")
-p = TestUtil.runCommand('%s %s/Test.ice --output-dir %s' % (slice2rb, srcPath, srcPath))
-test(p.wait() == 0)
-test(os.path.isfile("%s/Test.rb" % srcPath))
-
-if os.path.exists(srcPath):
- shutil.rmtree(srcPath)
-print("ok")