summaryrefslogtreecommitdiff
path: root/scripts/tests/Ice
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/tests/Ice')
-rw-r--r--scripts/tests/Ice/__init__.py8
-rw-r--r--scripts/tests/Ice/adapterDeactivation.py11
-rw-r--r--scripts/tests/Ice/admin.py11
-rw-r--r--scripts/tests/Ice/ami.py11
-rw-r--r--scripts/tests/Ice/background.py10
-rw-r--r--scripts/tests/Ice/enums.py13
-rw-r--r--scripts/tests/Ice/exceptions.py24
-rwxr-xr-xscripts/tests/Ice/faultTolerance.py20
-rw-r--r--scripts/tests/Ice/hold.py11
-rw-r--r--scripts/tests/Ice/info.py11
-rw-r--r--scripts/tests/Ice/interceptor.py10
-rw-r--r--scripts/tests/Ice/interrupt.py11
-rw-r--r--scripts/tests/Ice/metrics.py11
-rw-r--r--scripts/tests/Ice/networkProxy.py38
-rw-r--r--scripts/tests/Ice/objects.py14
-rw-r--r--scripts/tests/Ice/optional.py23
-rw-r--r--scripts/tests/Ice/properties.py23
-rw-r--r--scripts/tests/Ice/slicing/__init__.py8
-rw-r--r--scripts/tests/Ice/slicing/exceptions.py22
-rw-r--r--scripts/tests/Ice/slicing/objects.py13
-rw-r--r--scripts/tests/Ice/stream.py14
-rw-r--r--scripts/tests/Ice/timeout.py11
-rw-r--r--scripts/tests/Ice/udp.py19
23 files changed, 347 insertions, 0 deletions
diff --git a/scripts/tests/Ice/__init__.py b/scripts/tests/Ice/__init__.py
new file mode 100644
index 00000000000..90d182d1c05
--- /dev/null
+++ b/scripts/tests/Ice/__init__.py
@@ -0,0 +1,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.
+#
+# **********************************************************************
diff --git a/scripts/tests/Ice/adapterDeactivation.py b/scripts/tests/Ice/adapterDeactivation.py
new file mode 100644
index 00000000000..deb29ba6b5f
--- /dev/null
+++ b/scripts/tests/Ice/adapterDeactivation.py
@@ -0,0 +1,11 @@
+# -*- 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.
+#
+# **********************************************************************
+
+TestSuite(__name__, multihost=False) \ No newline at end of file
diff --git a/scripts/tests/Ice/admin.py b/scripts/tests/Ice/admin.py
new file mode 100644
index 00000000000..a87c0754c69
--- /dev/null
+++ b/scripts/tests/Ice/admin.py
@@ -0,0 +1,11 @@
+# -*- 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.
+#
+# **********************************************************************
+
+TestSuite(__name__, options = { "ipv6" : [False] }, multihost=False) \ No newline at end of file
diff --git a/scripts/tests/Ice/ami.py b/scripts/tests/Ice/ami.py
new file mode 100644
index 00000000000..6e5abe02f7f
--- /dev/null
+++ b/scripts/tests/Ice/ami.py
@@ -0,0 +1,11 @@
+# -*- 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.
+#
+# **********************************************************************
+
+TestSuite(__name__, options = { "compress" : [False] }) \ No newline at end of file
diff --git a/scripts/tests/Ice/background.py b/scripts/tests/Ice/background.py
new file mode 100644
index 00000000000..4db72200a79
--- /dev/null
+++ b/scripts/tests/Ice/background.py
@@ -0,0 +1,10 @@
+# **********************************************************************
+#
+# 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.
+#
+# **********************************************************************
+
+TestSuite(__name__, libDirs=["testtransport"], options={ "mx": [False] })
diff --git a/scripts/tests/Ice/enums.py b/scripts/tests/Ice/enums.py
new file mode 100644
index 00000000000..1780057f1a5
--- /dev/null
+++ b/scripts/tests/Ice/enums.py
@@ -0,0 +1,13 @@
+# **********************************************************************
+#
+# 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.
+#
+# **********************************************************************
+
+TestSuite(__name__, [
+ ClientServerTestCase("client/server with default encoding"),
+ ClientServerTestCase("client/server with 1.0 encoding", props={ "Ice.Default.EncodingVersion" : "1.0" }),
+]) \ No newline at end of file
diff --git a/scripts/tests/Ice/exceptions.py b/scripts/tests/Ice/exceptions.py
new file mode 100644
index 00000000000..0e2ac209032
--- /dev/null
+++ b/scripts/tests/Ice/exceptions.py
@@ -0,0 +1,24 @@
+# **********************************************************************
+#
+# 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.
+#
+# **********************************************************************
+
+testcases = [
+ ClientServerTestCase("client/server with compact format"),
+ ClientServerTestCase("client/server with sliced format", props={ "Ice.Default.SlicedFormat" : True }),
+ ClientServerTestCase("client/server with 1.0 encoding", props={ "Ice.Default.EncodingVersion" : "1.0" }),
+]
+
+# If the mapping has AMD servers, also run with the AMD servers
+if Mapping.getByPath(__name__).hasSource("Ice/exceptions", "serveramd"):
+ testcases += [
+ ClientAMDServerTestCase("client/amd server with compact format"),
+ ClientAMDServerTestCase("client/amd server with sliced format", props={ "Ice.Default.SlicedFormat" : True }),
+ ClientAMDServerTestCase("client/amd server with 1.0 encoding", props={ "Ice.Default.EncodingVersion" : "1.0" }),
+ ]
+
+TestSuite(__name__, testcases) \ No newline at end of file
diff --git a/scripts/tests/Ice/faultTolerance.py b/scripts/tests/Ice/faultTolerance.py
new file mode 100755
index 00000000000..6cc55446826
--- /dev/null
+++ b/scripts/tests/Ice/faultTolerance.py
@@ -0,0 +1,20 @@
+# **********************************************************************
+#
+# 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.
+#
+# **********************************************************************
+
+from Util import *
+
+#
+# Start 12 servers
+#
+servers=range(1, 13)
+
+TestSuite(__name__, [
+ ClientServerTestCase(client=Client(args=[i for i in servers]),
+ servers=[Server(args=[i], waitForShutdown=False) for i in servers])
+])
diff --git a/scripts/tests/Ice/hold.py b/scripts/tests/Ice/hold.py
new file mode 100644
index 00000000000..a3889c461b7
--- /dev/null
+++ b/scripts/tests/Ice/hold.py
@@ -0,0 +1,11 @@
+# -*- 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.
+#
+# **********************************************************************
+
+TestSuite(__name__, [ClientServerTestCase(server=Server(readyCount=2))])
diff --git a/scripts/tests/Ice/info.py b/scripts/tests/Ice/info.py
new file mode 100644
index 00000000000..e42ee312f56
--- /dev/null
+++ b/scripts/tests/Ice/info.py
@@ -0,0 +1,11 @@
+# -*- 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.
+#
+# **********************************************************************
+
+TestSuite(__name__, options = { "ipv6" : [False], "compress" : [False] }, multihost=False) \ No newline at end of file
diff --git a/scripts/tests/Ice/interceptor.py b/scripts/tests/Ice/interceptor.py
new file mode 100644
index 00000000000..1db4578f24b
--- /dev/null
+++ b/scripts/tests/Ice/interceptor.py
@@ -0,0 +1,10 @@
+# **********************************************************************
+#
+# 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.
+#
+# **********************************************************************
+
+TestSuite(__name__, [ClientTestCase(client=Client(props={"Ice.Warn.Dispatch" : 0}))], libDirs=["interceptortest"])
diff --git a/scripts/tests/Ice/interrupt.py b/scripts/tests/Ice/interrupt.py
new file mode 100644
index 00000000000..6e5abe02f7f
--- /dev/null
+++ b/scripts/tests/Ice/interrupt.py
@@ -0,0 +1,11 @@
+# -*- 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.
+#
+# **********************************************************************
+
+TestSuite(__name__, options = { "compress" : [False] }) \ No newline at end of file
diff --git a/scripts/tests/Ice/metrics.py b/scripts/tests/Ice/metrics.py
new file mode 100644
index 00000000000..e81bc4b22af
--- /dev/null
+++ b/scripts/tests/Ice/metrics.py
@@ -0,0 +1,11 @@
+# -*- 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.
+#
+# **********************************************************************
+
+TestSuite(__name__, options = { "ipv6" : [False], "compress": [False], "protocol" : ["tcp", "ssl"] }, multihost=False)
diff --git a/scripts/tests/Ice/networkProxy.py b/scripts/tests/Ice/networkProxy.py
new file mode 100644
index 00000000000..948b24b2e7c
--- /dev/null
+++ b/scripts/tests/Ice/networkProxy.py
@@ -0,0 +1,38 @@
+# **********************************************************************
+#
+# 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 NetworkProxy
+
+class NetworkProxyTestCase(ClientServerTestCase):
+
+ def __init__(self, proxyName, proxyType, proxyPortNum):
+ ClientServerTestCase.__init__(self, proxyName + " client/server", client = Client(props = lambda p, c: {
+ "Ice.{0}ProxyHost".format(proxyName): "localhost",
+ "Ice.{0}ProxyPort".format(proxyName): "{0}".format(c.driver.getTestPort(proxyPortNum))
+ }))
+ self.proxyName = proxyName
+ self.proxyType = proxyType
+ self.proxyPortNum = proxyPortNum
+ self.proxy = None
+
+ def setupClientSide(self, current):
+ current.write("starting {0} proxy... ".format(self.proxyName))
+ self.proxy = self.proxyType(current.driver.getTestPort(self.proxyPortNum))
+ current.writeln("ok")
+
+ def teardownClientSide(self, current, success):
+ current.write("terminating {0} proxy... ".format(self.proxyName))
+ self.proxy.terminate()
+ self.proxy = None
+ current.writeln("ok")
+
+TestSuite(__name__, [
+ NetworkProxyTestCase("SOCKS", NetworkProxy.SocksProxy, 30),
+ NetworkProxyTestCase("HTTP", NetworkProxy.HttpProxy, 31),
+], options = { "ipv6" : [False] })
diff --git a/scripts/tests/Ice/objects.py b/scripts/tests/Ice/objects.py
new file mode 100644
index 00000000000..fef2b3fb6cb
--- /dev/null
+++ b/scripts/tests/Ice/objects.py
@@ -0,0 +1,14 @@
+# **********************************************************************
+#
+# 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.
+#
+# **********************************************************************
+
+TestSuite(__name__, [
+ ClientServerTestCase("client/server with compact format"),
+ ClientServerTestCase("client/server with sliced format", props={ "Ice.Default.SlicedFormat" : True }),
+ ClientServerTestCase("client/server with 1.0 encoding", props={ "Ice.Default.EncodingVersion" : "1.0" }),
+]) \ No newline at end of file
diff --git a/scripts/tests/Ice/optional.py b/scripts/tests/Ice/optional.py
new file mode 100644
index 00000000000..b706d197749
--- /dev/null
+++ b/scripts/tests/Ice/optional.py
@@ -0,0 +1,23 @@
+# **********************************************************************
+#
+# 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.
+#
+# **********************************************************************
+
+
+testcases = [
+ ClientServerTestCase("client/server with compact format"),
+ ClientServerTestCase("client/server with sliced format", props={ "Ice.Default.SlicedFormat" : True }),
+]
+
+# If the mapping has AMD servers, also run with the AMD servers
+if Mapping.getByPath(__name__).hasSource("Ice/exceptions", "serveramd"):
+ testcases += [
+ ClientAMDServerTestCase("client/amd server with compact format"),
+ ClientAMDServerTestCase("client/amd server with sliced format", props={ "Ice.Default.SlicedFormat" : True }),
+ ]
+
+TestSuite(__name__, testcases) \ No newline at end of file
diff --git a/scripts/tests/Ice/properties.py b/scripts/tests/Ice/properties.py
new file mode 100644
index 00000000000..92a9832aa61
--- /dev/null
+++ b/scripts/tests/Ice/properties.py
@@ -0,0 +1,23 @@
+# -*- 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.
+#
+# **********************************************************************
+
+class PropertiesTestSuite(TestSuite):
+
+ def setup(self, current):
+ name = "\xe4\xb8\xad\xe5\x9b\xbd_client.config" if isPython2 else "\u4e2d\u56fd_client.config"
+ self.createFile("./config/" + name,
+ ["# Automatically generated by Ice test driver.",
+ "Ice.Trace.Protocol=1",
+ "Ice.Trace.Network=1",
+ "Ice.ProgramName=PropertiesClient",
+ "Config.Path=./config/" + name],
+ "utf-8")
+
+PropertiesTestSuite(__name__)
diff --git a/scripts/tests/Ice/slicing/__init__.py b/scripts/tests/Ice/slicing/__init__.py
new file mode 100644
index 00000000000..90d182d1c05
--- /dev/null
+++ b/scripts/tests/Ice/slicing/__init__.py
@@ -0,0 +1,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.
+#
+# **********************************************************************
diff --git a/scripts/tests/Ice/slicing/exceptions.py b/scripts/tests/Ice/slicing/exceptions.py
new file mode 100644
index 00000000000..beb5f64484a
--- /dev/null
+++ b/scripts/tests/Ice/slicing/exceptions.py
@@ -0,0 +1,22 @@
+# **********************************************************************
+#
+# 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.
+#
+# **********************************************************************
+
+testcases = [
+ ClientServerTestCase(),
+ ClientServerTestCase("client/server with 1.0 encoding", props={ "Ice.Default.EncodingVersion" : "1.0" }),
+]
+
+# If the mapping has AMD servers, also run with the AMD servers
+if Mapping.getByPath(__name__).hasSource("Ice/exceptions", "serveramd"):
+ testcases += [
+ ClientAMDServerTestCase(),
+ ClientAMDServerTestCase("client/amd server with 1.0 encoding", props={ "Ice.Default.EncodingVersion" : "1.0" }),
+ ]
+
+TestSuite(__name__, testcases) \ No newline at end of file
diff --git a/scripts/tests/Ice/slicing/objects.py b/scripts/tests/Ice/slicing/objects.py
new file mode 100644
index 00000000000..c1d57969e85
--- /dev/null
+++ b/scripts/tests/Ice/slicing/objects.py
@@ -0,0 +1,13 @@
+# **********************************************************************
+#
+# 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.
+#
+# **********************************************************************
+
+TestSuite(__name__, [
+ ClientServerTestCase(),
+ ClientServerTestCase("client/server with 1.0 encoding", props={ "Ice.Default.EncodingVersion" : "1.0" }),
+]) \ No newline at end of file
diff --git a/scripts/tests/Ice/stream.py b/scripts/tests/Ice/stream.py
new file mode 100644
index 00000000000..30fecbf5b9e
--- /dev/null
+++ b/scripts/tests/Ice/stream.py
@@ -0,0 +1,14 @@
+# **********************************************************************
+#
+# 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.
+#
+# **********************************************************************
+
+
+TestSuite(__name__, [
+ ClientTestCase("client with default encoding"),
+ ClientTestCase("client with 1.0 encoding", props={ "Ice.Default.EncodingVersion" : "1.0" })
+]) \ No newline at end of file
diff --git a/scripts/tests/Ice/timeout.py b/scripts/tests/Ice/timeout.py
new file mode 100644
index 00000000000..6e5abe02f7f
--- /dev/null
+++ b/scripts/tests/Ice/timeout.py
@@ -0,0 +1,11 @@
+# -*- 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.
+#
+# **********************************************************************
+
+TestSuite(__name__, options = { "compress" : [False] }) \ No newline at end of file
diff --git a/scripts/tests/Ice/udp.py b/scripts/tests/Ice/udp.py
new file mode 100644
index 00000000000..214d9aaf8f3
--- /dev/null
+++ b/scripts/tests/Ice/udp.py
@@ -0,0 +1,19 @@
+# **********************************************************************
+#
+# 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.
+#
+# **********************************************************************
+
+from Util import *
+
+#
+# Start 5 servers
+#
+servers=range(0, 5)
+
+TestSuite(__name__, [
+ ClientServerTestCase(client=Client(args=[5]), servers=[Server(args=[i], ready="McastTestAdapter") for i in servers])
+], multihost=False)