summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-11-25 13:13:22 +0100
committerBenoit Foucher <benoit@zeroc.com>2016-11-25 13:13:22 +0100
commitdcdc32af1fced49d80a8ccd93230e15d91ab45d8 (patch)
treeeb69e2555fbd54496fce8a33f4dd610e1473ff51 /python
parentC# IceSSL/configuration log expired certificate exceptions. (diff)
downloadice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.tar.bz2
ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.tar.xz
ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.zip
Refactored test scripts
Diffstat (limited to 'python')
-rw-r--r--python/Makefile2
-rwxr-xr-xpython/allTests.py52
-rw-r--r--python/modules/IcePy/Init.cpp19
-rw-r--r--python/modules/IcePy/Makefile.mk2
-rwxr-xr-xpython/test/Ice/acm/run.py24
-rwxr-xr-xpython/test/Ice/adapterDeactivation/run.py25
-rwxr-xr-xpython/test/Ice/admin/run.py23
-rwxr-xr-xpython/test/Ice/ami/run.py25
-rw-r--r--python/test/Ice/application/test.py10
-rwxr-xr-xpython/test/Ice/binding/run.py24
-rwxr-xr-xpython/test/Ice/blobject/run.py24
-rwxr-xr-xpython/test/Ice/checksum/run.py24
-rwxr-xr-xpython/test/Ice/custom/run.py23
-rwxr-xr-xpython/test/Ice/defaultServant/run.py29
-rwxr-xr-xpython/test/Ice/defaultValue/run.py29
-rwxr-xr-xpython/test/Ice/enums/run.py28
-rwxr-xr-xpython/test/Ice/exceptions/run.py48
-rwxr-xr-xpython/test/Ice/facets/run.py25
-rwxr-xr-xpython/test/Ice/faultTolerance/Client.py4
-rwxr-xr-xpython/test/Ice/faultTolerance/Server.py2
-rwxr-xr-xpython/test/Ice/faultTolerance/run.py47
-rwxr-xr-xpython/test/Ice/info/run.py24
-rwxr-xr-xpython/test/Ice/inheritance/run.py25
-rwxr-xr-xpython/test/Ice/location/run.py24
-rwxr-xr-xpython/test/Ice/objects/run.py34
-rwxr-xr-xpython/test/Ice/operations/run.py27
-rwxr-xr-xpython/test/Ice/optional/run.py29
-rwxr-xr-xpython/test/Ice/properties/run.py45
-rwxr-xr-xpython/test/Ice/proxy/run.py27
-rwxr-xr-xpython/test/Ice/servantLocator/run.py27
-rwxr-xr-xpython/test/Ice/slicing/exceptions/run.py36
-rwxr-xr-xpython/test/Ice/slicing/objects/run.py36
-rwxr-xr-xpython/test/Ice/timeout/run.py24
-rwxr-xr-xpython/test/Slice/import/run.py59
-rw-r--r--python/test/Slice/import/test.py26
-rwxr-xr-xpython/test/Slice/keyword/run.py28
-rwxr-xr-xpython/test/Slice/macros/run.py28
-rwxr-xr-xpython/test/Slice/structure/run.py28
-rw-r--r--python/test/Slice/unicodePaths/run.py82
39 files changed, 49 insertions, 1049 deletions
diff --git a/python/Makefile b/python/Makefile
index 3c1725db834..00505061c9e 100644
--- a/python/Makefile
+++ b/python/Makefile
@@ -19,7 +19,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)))
#
# Load python rules after loading C++ dependencies
diff --git a/python/allTests.py b/python/allTests.py
index 4dc01fe19be..e4360c465d3 100755
--- a/python/allTests.py
+++ b/python/allTests.py
@@ -8,53 +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!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
+from Util import runTestsWithPath
-#
-# List of all basic tests.
-#
-tests = [
- ("Slice/keyword", ["once"]),
- ("Slice/structure", ["once"]),
- ("Slice/macros", ["once"]),
- ("Slice/import", ["once"]),
- ("Slice/unicodePaths", ["once"]),
- ("Ice/adapterDeactivation", ["core"]),
- ("Ice/binding", ["core"]),
- ("Ice/exceptions", ["core"]),
- ("Ice/facets", ["core"]),
- ("Ice/faultTolerance", ["core"]),
- ("Ice/info", ["core", "noipv6", "nocompress"]),
- ("Ice/inheritance", ["core"]),
- ("Ice/location", ["core"]),
- ("Ice/objects", ["core"]),
- ("Ice/proxy", ["core"]),
- ("Ice/properties", ["once"]),
- ("Ice/operations", ["core"]),
- ("Ice/slicing/exceptions", ["core"]),
- ("Ice/slicing/objects", ["core"]),
- ("Ice/custom", ["core"]),
- ("Ice/checksum", ["core"]),
- ("Ice/timeout", ["core", "nocompress"]),
- ("Ice/servantLocator", ["core"]),
- ("Ice/blobject", ["core"]),
- ("Ice/defaultServant", ["core"]),
- ("Ice/defaultValue", ["core"]),
- ("Ice/ami", ["core", "nocompress"]),
- ("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/python/modules/IcePy/Init.cpp b/python/modules/IcePy/Init.cpp
index 581e4f649c5..5c026c27321 100644
--- a/python/modules/IcePy/Init.cpp
+++ b/python/modules/IcePy/Init.cpp
@@ -28,6 +28,7 @@
#include <Types.h>
#include <ValueFactoryManager.h>
#include <Ice/Initialize.h>
+#include <Ice/RegisterPlugins.h>
using namespace std;
using namespace IcePy;
@@ -124,15 +125,6 @@ PyDoc_STRVAR(moduleDoc, "The Internet Communications Engine.");
#endif
-#ifdef ICE_STATIC_LIBS
-extern "C"
-{
-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
-
#if defined(__GNUC__) && PY_VERSION_HEX >= 0x03000000
extern "C" __attribute__((visibility ("default"))) PyObject *
#elif defined(_WIN32) // On Windows, PyMoDINIT_FUNC already defines dllexport
@@ -148,12 +140,9 @@ initIcePy(void)
{
PyObject* module;
-#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);
//
// Notify Python that we are a multi-threaded extension.
diff --git a/python/modules/IcePy/Makefile.mk b/python/modules/IcePy/Makefile.mk
index 63a549589da..a5115f92838 100644
--- a/python/modules/IcePy/Makefile.mk
+++ b/python/modules/IcePy/Makefile.mk
@@ -16,7 +16,7 @@ IcePy_installdir := $(install_pythondir)
IcePy_cppflags := -I$(project) -I$(top_srcdir)/cpp/include -I$(top_srcdir)/cpp/include/generated \
-I$(top_srcdir)/cpp/src $(python_cppflags)
IcePy_ldflags := $(python_ldflags)
-IcePy_dependencies := IceSSL Ice
+IcePy_dependencies := IceDiscovery IceLocatorDiscovery IceSSL Ice
IcePy_libs := mcpp
IcePy_extra_sources := $(filter-out %Util.cpp %Ruby.cpp,\
$(wildcard $(top_srcdir)/cpp/src/Slice/*.cpp)) \
diff --git a/python/test/Ice/acm/run.py b/python/test/Ice/acm/run.py
deleted file mode 100755
index 8d9a8c0837c..00000000000
--- a/python/test/Ice/acm/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.queueClientServerTest()
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/adapterDeactivation/run.py b/python/test/Ice/adapterDeactivation/run.py
deleted file mode 100755
index e285170381d..00000000000
--- a/python/test/Ice/adapterDeactivation/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.queueClientServerTest()
-TestUtil.queueCollocatedTest()
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/admin/run.py b/python/test/Ice/admin/run.py
deleted file mode 100755
index 3fc6200cd00..00000000000
--- a/python/test/Ice/admin/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/python/test/Ice/ami/run.py b/python/test/Ice/ami/run.py
deleted file mode 100755
index e285170381d..00000000000
--- a/python/test/Ice/ami/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.queueClientServerTest()
-TestUtil.queueCollocatedTest()
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/application/test.py b/python/test/Ice/application/test.py
new file mode 100644
index 00000000000..6dda05ec6ec
--- /dev/null
+++ b/python/test/Ice/application/test.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.
+#
+# **********************************************************************
+
+# Dummy file to not run this test which is only ran manually. \ No newline at end of file
diff --git a/python/test/Ice/binding/run.py b/python/test/Ice/binding/run.py
deleted file mode 100755
index 8d9a8c0837c..00000000000
--- a/python/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.queueClientServerTest()
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/blobject/run.py b/python/test/Ice/blobject/run.py
deleted file mode 100755
index 8d9a8c0837c..00000000000
--- a/python/test/Ice/blobject/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.queueClientServerTest()
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/checksum/run.py b/python/test/Ice/checksum/run.py
deleted file mode 100755
index 8d9a8c0837c..00000000000
--- a/python/test/Ice/checksum/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.queueClientServerTest()
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/custom/run.py b/python/test/Ice/custom/run.py
deleted file mode 100755
index 3fc6200cd00..00000000000
--- a/python/test/Ice/custom/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/python/test/Ice/defaultServant/run.py b/python/test/Ice/defaultServant/run.py
deleted file mode 100755
index aab09e64444..00000000000
--- a/python/test/Ice/defaultServant/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.py", startReader = False)
-print("ok")
-clientProc.startReader()
-
-clientProc.waitTestSuccess()
diff --git a/python/test/Ice/defaultValue/run.py b/python/test/Ice/defaultValue/run.py
deleted file mode 100755
index aab09e64444..00000000000
--- a/python/test/Ice/defaultValue/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.py", startReader = False)
-print("ok")
-clientProc.startReader()
-
-clientProc.waitTestSuccess()
diff --git a/python/test/Ice/enums/run.py b/python/test/Ice/enums/run.py
deleted file mode 100755
index b7e267999af..00000000000
--- a/python/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
-
-TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.",
- additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
-
-TestUtil.queueClientServerTest(configName = "1.1", message = "Running test with 1.1 encoding.")
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/exceptions/run.py b/python/test/Ice/exceptions/run.py
deleted file mode 100755
index 730e27ae290..00000000000
--- a/python/test/Ice/exceptions/run.py
+++ /dev/null
@@ -1,48 +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.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.")
-
-TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.",
- additionalClientOptions="--Ice.Default.SlicedFormat",
- additionalServerOptions="--Ice.Default.SlicedFormat")
-
-TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.",
- additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
-
-TestUtil.queueClientServerTest(configName = "compactAMD", localOnly = True,
- message = "Running test with compact (default) format and AMD server.",
- server="ServerAMD.py")
-
-TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True,
- message = "Running test with sliced format and AMD server.", server="ServerAMD.py",
- additionalClientOptions="--Ice.Default.SlicedFormat",
- additionalServerOptions="--Ice.Default.SlicedFormat")
-
-TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True,
- message = "Running test with 1.0 encoding and AMD server.", server="ServerAMD.py",
- additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
-
-TestUtil.queueCollocatedTest()
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/facets/run.py b/python/test/Ice/facets/run.py
deleted file mode 100755
index e285170381d..00000000000
--- a/python/test/Ice/facets/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.queueClientServerTest()
-TestUtil.queueCollocatedTest()
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/faultTolerance/Client.py b/python/test/Ice/faultTolerance/Client.py
index 20cf85a1c72..8c5b02bdebc 100755
--- a/python/test/Ice/faultTolerance/Client.py
+++ b/python/test/Ice/faultTolerance/Client.py
@@ -27,7 +27,7 @@ def run(args, communicator):
usage(args[0])
return False
- ports.append(int(arg))
+ ports.append(12010 + int(arg))
if len(ports) == 0:
sys.stderr.write(args[0] + ": no ports specified\n")
@@ -45,7 +45,7 @@ def run(args, communicator):
try:
initData = Ice.InitializationData()
initData.properties = Ice.createProperties(sys.argv)
-
+
#
# This test aborts servers, so we don't want warnings.
#
diff --git a/python/test/Ice/faultTolerance/Server.py b/python/test/Ice/faultTolerance/Server.py
index fd9b0f4096c..e0f0a1e4cdc 100755
--- a/python/test/Ice/faultTolerance/Server.py
+++ b/python/test/Ice/faultTolerance/Server.py
@@ -43,7 +43,7 @@ def run(args, communicator):
usage(args[0])
return False
- port = int(arg)
+ port = 12010 + int(arg)
if port <= 0:
sys.stderr.write(args[0] + ": no port specified\n")
diff --git a/python/test/Ice/faultTolerance/run.py b/python/test/Ice/faultTolerance/run.py
deleted file mode 100755
index 57213369c73..00000000000
--- a/python/test/Ice/faultTolerance/run.py
+++ /dev/null
@@ -1,47 +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
-
-server = os.path.join(os.getcwd(), "Server.py")
-client = os.path.join(os.getcwd(), "Client.py")
-
-num = 12
-base = 12340
-
-serverProc = []
-for i in range(0, num):
- sys.stdout.write("starting server #%d... " % (i + 1))
- sys.stdout.flush()
- serverProc.append(TestUtil.startServer(server, "%d" % (base + i)))
- print("ok")
-
-ports = ""
-for i in range(0, num):
- ports = "%s %d" % (ports, base + i)
-sys.stdout.write("starting client... ")
-sys.stdout.flush()
-clientProc = TestUtil.startClient(client, ports, startReader = False)
-print("ok")
-clientProc.startReader()
-
-clientProc.waitTestSuccess()
-for p in serverProc:
- p.waitTestSuccess()
diff --git a/python/test/Ice/info/run.py b/python/test/Ice/info/run.py
deleted file mode 100755
index 8d9a8c0837c..00000000000
--- a/python/test/Ice/info/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.queueClientServerTest()
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/inheritance/run.py b/python/test/Ice/inheritance/run.py
deleted file mode 100755
index e285170381d..00000000000
--- a/python/test/Ice/inheritance/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.queueClientServerTest()
-TestUtil.queueCollocatedTest()
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/location/run.py b/python/test/Ice/location/run.py
deleted file mode 100755
index 8d9a8c0837c..00000000000
--- a/python/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.queueClientServerTest()
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/objects/run.py b/python/test/Ice/objects/run.py
deleted file mode 100755
index 53b64ebcc37..00000000000
--- a/python/test/Ice/objects/run.py
+++ /dev/null
@@ -1,34 +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.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.")
-
-TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.",
- additionalClientOptions="--Ice.Default.SlicedFormat",
- additionalServerOptions="--Ice.Default.SlicedFormat")
-
-TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.",
- additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
-
-TestUtil.queueCollocatedTest()
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/operations/run.py b/python/test/Ice/operations/run.py
deleted file mode 100755
index 83b76a7726f..00000000000
--- a/python/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
-
-TestUtil.queueClientServerTest()
-TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.",
- server="ServerAMD.py")
-TestUtil.queueCollocatedTest(additionalOptions = " --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0")
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/optional/run.py b/python/test/Ice/optional/run.py
deleted file mode 100755
index 44156a1671c..00000000000
--- a/python/test/Ice/optional/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
-
-TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.")
-TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.",
- additionalClientOptions="--Ice.Default.SlicedFormat",
- additionalServerOptions="--Ice.Default.SlicedFormat")
-TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.",
- server="ServerAMD.py")
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/properties/run.py b/python/test/Ice/properties/run.py
deleted file mode 100755
index 70e96e63e13..00000000000
--- a/python/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/python/test/Ice/proxy/run.py b/python/test/Ice/proxy/run.py
deleted file mode 100755
index 83b76a7726f..00000000000
--- a/python/test/Ice/proxy/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
-
-TestUtil.queueClientServerTest()
-TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.",
- server="ServerAMD.py")
-TestUtil.queueCollocatedTest(additionalOptions = " --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0")
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/servantLocator/run.py b/python/test/Ice/servantLocator/run.py
deleted file mode 100755
index 83b76a7726f..00000000000
--- a/python/test/Ice/servantLocator/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
-
-TestUtil.queueClientServerTest()
-TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.",
- server="ServerAMD.py")
-TestUtil.queueCollocatedTest(additionalOptions = " --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0")
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/slicing/exceptions/run.py b/python/test/Ice/slicing/exceptions/run.py
deleted file mode 100755
index 6cf3085058b..00000000000
--- a/python/test/Ice/slicing/exceptions/run.py
+++ /dev/null
@@ -1,36 +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.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.")
-
-TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.",
- additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
-
-TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True,
- message = "Running test with sliced format and AMD server.", server="ServerAMD.py")
-
-TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True,
- message = "Running test with 1.0 encoding and AMD server.", server="ServerAMD.py",
- additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/slicing/objects/run.py b/python/test/Ice/slicing/objects/run.py
deleted file mode 100755
index dffc505da7e..00000000000
--- a/python/test/Ice/slicing/objects/run.py
+++ /dev/null
@@ -1,36 +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.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.")
-
-TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.",
- additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
-
-TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True,
- message = "Running test with sliced format and AMD server.", server="ServerAMD.py")
-
-TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True,
- message = "Running test with 1.0 encoding and AMD server.", server="ServerAMD.py",
- additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
-TestUtil.runQueuedTests()
diff --git a/python/test/Ice/timeout/run.py b/python/test/Ice/timeout/run.py
deleted file mode 100755
index 8d9a8c0837c..00000000000
--- a/python/test/Ice/timeout/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.queueClientServerTest()
-TestUtil.runQueuedTests()
diff --git a/python/test/Slice/import/run.py b/python/test/Slice/import/run.py
deleted file mode 100755
index f57a343fc7d..00000000000
--- a/python/test/Slice/import/run.py
+++ /dev/null
@@ -1,59 +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, shutil, subprocess
-
-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
-
-testdir = os.path.dirname(os.path.abspath(__file__))
-
-if os.path.exists(os.path.join(testdir, "Test1_ice.py")):
- os.remove(os.path.join(testdir, "Test1_ice.py"))
-if os.path.exists(os.path.join(testdir, "Test2_ice.py")):
- os.remove(os.path.join(testdir, "Test2_ice.py"))
-if os.path.exists(os.path.join(testdir, "Test")):
- shutil.rmtree(os.path.join(testdir, "Test"))
-
-if os.environ.get("USE_BIN_DIST", "no") == "yes":
- if TestUtil.isDarwin():
- slice2py = sys.executable + " /usr/local/bin/slice2py"
- elif TestUtil.isWin32():
- pythonHome = os.path.dirname(sys.executable)
- slice2py = os.path.join(pythonHome, "Scripts", "slice2py.exe")
- elif os.path.isfile(os.path.join(TestUtil.getCppBinDir(), "slice2py")):
- slice2py = os.path.join(TestUtil.getCppBinDir(), "slice2py")
- else:
- import slice2py
- slice2py = sys.executable + " " + os.path.normpath(os.path.join(slice2py.__file__, "..", "..", "..", "..", "bin", "slice2py"))
-else:
- if TestUtil.isYocto():
- slice2py = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..", "..", "cpp", "bin", "slice2py")
- else:
- slice2py = sys.executable + " " + os.path.join(path[0], "python", "config", "s2py.py")
-
-s2p = TestUtil.spawn(slice2py + " Test1.ice")
-s2p.waitTestSuccess()
-s2p = TestUtil.spawn(slice2py + " Test2.ice")
-s2p.waitTestSuccess()
-
-sys.stdout.write("starting client... ")
-sys.stdout.flush()
-clientProc = TestUtil.startClient("Client.py", "--Ice.Default.Host=127.0.0.1", startReader = False)
-print("ok")
-clientProc.startReader()
-clientProc.waitTestSuccess()
diff --git a/python/test/Slice/import/test.py b/python/test/Slice/import/test.py
new file mode 100644
index 00000000000..6a0343d1e4e
--- /dev/null
+++ b/python/test/Slice/import/test.py
@@ -0,0 +1,26 @@
+# **********************************************************************
+#
+# 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 SliceImportTestCase(ClientTestCase):
+
+ def setupClientSide(self, current):
+
+ testdir = current.testcase.getPath()
+ if os.path.exists(os.path.join(testdir, "Test1_ice.py")):
+ os.remove(os.path.join(testdir, "Test1_ice.py"))
+ if os.path.exists(os.path.join(testdir, "Test2_ice.py")):
+ os.remove(os.path.join(testdir, "Test2_ice.py"))
+ if os.path.exists(os.path.join(testdir, "Test")):
+ shutil.rmtree(os.path.join(testdir, "Test"))
+
+ slice2py = SliceTranslator("slice2py")
+ slice2py.run(current, args=["Test1.ice"])
+ slice2py.run(current, args=["Test2.ice"])
+
+TestSuite(__name__, [ SliceImportTestCase() ]) \ No newline at end of file
diff --git a/python/test/Slice/keyword/run.py b/python/test/Slice/keyword/run.py
deleted file mode 100755
index 3fdd4ddab0c..00000000000
--- a/python/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.py", "--Ice.Default.Host=127.0.0.1", startReader = False)
-print("ok")
-clientProc.startReader()
-clientProc.waitTestSuccess()
diff --git a/python/test/Slice/macros/run.py b/python/test/Slice/macros/run.py
deleted file mode 100755
index 3fdd4ddab0c..00000000000
--- a/python/test/Slice/macros/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.py", "--Ice.Default.Host=127.0.0.1", startReader = False)
-print("ok")
-clientProc.startReader()
-clientProc.waitTestSuccess()
diff --git a/python/test/Slice/structure/run.py b/python/test/Slice/structure/run.py
deleted file mode 100755
index 3fdd4ddab0c..00000000000
--- a/python/test/Slice/structure/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.py", "--Ice.Default.Host=127.0.0.1", startReader = False)
-print("ok")
-clientProc.startReader()
-clientProc.waitTestSuccess()
diff --git a/python/test/Slice/unicodePaths/run.py b/python/test/Slice/unicodePaths/run.py
deleted file mode 100644
index 566a3818b81..00000000000
--- a/python/test/Slice/unicodePaths/run.py
+++ /dev/null
@@ -1,82 +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 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.isDarwin():
- slice2py = sys.executable + " /usr/local/bin/slice2py"
- elif TestUtil.isWin32():
- pythonHome = os.path.dirname(sys.executable)
- slice2py = os.path.join(pythonHome, "Scripts", "slice2py.exe")
- elif os.path.isfile(os.path.join(TestUtil.getCppBinDir(), "slice2py")):
- slice2py = os.path.join(TestUtil.getCppBinDir(), "slice2py")
- else:
- import slice2py
- slice2py = sys.executable + " " + os.path.normpath(os.path.join(slice2py.__file__, "..", "..", "..", "..", "bin", "slice2py"))
-else:
- if TestUtil.isYocto():
- slice2py = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..", "..", "cpp", "bin", "slice2py")
- else:
- slice2py = sys.executable + " " + os.path.join(path[0], "python", "config", "s2py.py")
-
-sys.stdout.write("testing Slice compiler and unicode file paths... ")
-sys.stdout.flush()
-
-#
-# Write config
-#
-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' % (slice2py, srcPath, srcPath))
-test(p.wait() == 0)
-test(os.path.isfile("%s/Test_ice.py" % srcPath))
-
-if os.path.exists(srcPath):
- shutil.rmtree(srcPath)
-print("ok")