diff options
author | Benoit Foucher <benoit@zeroc.com> | 2016-11-25 13:13:22 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2016-11-25 13:13:22 +0100 |
commit | dcdc32af1fced49d80a8ccd93230e15d91ab45d8 (patch) | |
tree | eb69e2555fbd54496fce8a33f4dd610e1473ff51 /python/test | |
parent | C# IceSSL/configuration log expired certificate exceptions. (diff) | |
download | ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.tar.bz2 ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.tar.xz ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.zip |
Refactored test scripts
Diffstat (limited to 'python/test')
35 files changed, 39 insertions, 984 deletions
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") |