summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpp/config/IcePackAdmin.py69
-rw-r--r--cpp/config/TestUtil.py117
-rwxr-xr-xcpp/test/Freeze/evictor/run.py2
-rwxr-xr-xcpp/test/Ice/adapterDeactivation/run.py4
-rwxr-xr-xcpp/test/Ice/exceptions/run.py4
-rwxr-xr-xcpp/test/Ice/facets/run.py4
-rwxr-xr-xcpp/test/Ice/faultTolerance/run.py7
-rwxr-xr-xcpp/test/Ice/inheritance/run.py4
-rwxr-xr-xcpp/test/Ice/location/run.py2
-rwxr-xr-xcpp/test/Ice/locationForward/run.py7
-rwxr-xr-xcpp/test/Ice/objects/run.py4
-rwxr-xr-xcpp/test/Ice/operations/run.py4
-rw-r--r--cpp/test/IcePack/deployer/application.xml4
-rwxr-xr-xcpp/test/IcePack/deployer/run.py28
-rwxr-xr-xcpp/test/IcePack/simple/run.py19
-rwxr-xr-xcpp/test/IceSSL/certificateAndKeyParsing/run.py14
-rwxr-xr-xcpp/test/IceSSL/certificateVerification/run.py24
-rwxr-xr-xcpp/test/IceSSL/certificateVerifier/run.py3
-rwxr-xr-xcpp/test/IceSSL/configuration/run.py3
-rwxr-xr-xcpp/test/IceSSL/loadPEM/run.py8
20 files changed, 158 insertions, 173 deletions
diff --git a/cpp/config/IcePackAdmin.py b/cpp/config/IcePackAdmin.py
index 8ead5badf69..37364da0d21 100644
--- a/cpp/config/IcePackAdmin.py
+++ b/cpp/config/IcePackAdmin.py
@@ -15,14 +15,19 @@
import sys, os, TestUtil
+for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
+ toplevel = os.path.normpath(toplevel)
+ if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")):
+ break
+else:
+ raise "can't find toplevel directory!"
+
icePackPort = "0";
-def startIcePackRegistry(toplevel, port, testdir):
+def startIcePackRegistry(port, testdir):
global icePackPort
- options = TestUtil.clientServerOptions.replace("TOPLEVELDIR", toplevel)
-
icePackPort = port
icePack = os.path.join(toplevel, "bin", "icepackregistry")
@@ -32,7 +37,7 @@ def startIcePackRegistry(toplevel, port, testdir):
os.mkdir(dataDir)
print "starting icepack registry...",
- command = icePack + options + ' --nowarn ' + \
+ command = icePack + TestUtil.clientServerOptions + ' --nowarn ' + \
r' --IcePack.Registry.Locator.Endpoints="default -p ' + icePackPort + ' -t 5000" ' + \
r' --IcePack.Registry.LocatorRegistry.Endpoints=default' + \
r' --IcePack.Registry.Internal.Endpoints=default' + \
@@ -51,20 +56,18 @@ def startIcePackRegistry(toplevel, port, testdir):
return icePackPipe
-def startIcePackNode(toplevel, testdir):
+def startIcePackNode(testdir):
- options = TestUtil.clientServerOptions.replace("TOPLEVELDIR", toplevel)
-
icePack = os.path.join(toplevel, "bin", "icepacknode")
dataDir = os.path.join(testdir, "db", "node")
if not os.path.exists(dataDir):
os.mkdir(dataDir)
- overrideOptions = '"' + options.replace("--", "") + '"'
+ overrideOptions = '"' + TestUtil.clientServerOptions.replace("--", "") + '"'
print "starting icepack node...",
- command = icePack + options + ' --nowarn ' + \
+ command = icePack + TestUtil.clientServerOptions + ' --nowarn ' + \
r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' --IcePack.Node.Endpoints=default' + \
r' --IcePack.Node.Data=' + dataDir + \
@@ -81,15 +84,13 @@ def startIcePackNode(toplevel, testdir):
print "ok"
return icePackPipe
-def shutdownIcePackRegistry(toplevel, icePackPipe):
+def shutdownIcePackRegistry(icePackPipe):
global icePackPort
icePackAdmin = os.path.join(toplevel, "bin", "icepackadmin")
- options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
-
print "shutting down icepack registry...",
- command = icePackAdmin + options + \
+ command = icePackAdmin + TestUtil.clientOptions + \
r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "shutdown" '
@@ -102,15 +103,13 @@ def shutdownIcePackRegistry(toplevel, icePackPipe):
TestUtil.killServers()
sys.exit(1)
-def shutdownIcePackNode(toplevel, icePackPipe):
+def shutdownIcePackNode(icePackPipe):
global icePackPort
icePackAdmin = os.path.join(toplevel, "bin", "icepackadmin")
- options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
-
print "shutting down icepack node...",
- command = icePackAdmin + options + \
+ command = icePackAdmin + TestUtil.clientOptions + \
r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "node shutdown localnode" '
@@ -123,14 +122,12 @@ def shutdownIcePackNode(toplevel, icePackPipe):
TestUtil.killServers()
sys.exit(1)
-def addApplication(toplevel, descriptor, targets):
+def addApplication(descriptor, targets):
global icePackPort
icePackAdmin = os.path.join(toplevel, "bin", "icepackadmin")
- options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
-
- command = icePackAdmin + options + \
+ command = icePackAdmin + TestUtil.clientOptions + \
r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "application add \"' + descriptor + '\\" ' + targets + ' \"'
@@ -140,14 +137,12 @@ def addApplication(toplevel, descriptor, targets):
TestUtil.killServers()
sys.exit(1)
-def removeApplication(toplevel, descriptor):
+def removeApplication(descriptor):
global icePackPort
icePackAdmin = os.path.join(toplevel, "bin", "icepackadmin")
- options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
-
- command = icePackAdmin + options + \
+ command = icePackAdmin + TestUtil.clientOptions + \
r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "application remove \"' + descriptor + '\\" \"'
@@ -157,14 +152,12 @@ def removeApplication(toplevel, descriptor):
TestUtil.killServers()
sys.exit(1)
-def addServer(toplevel, name, serverDescriptor, server, libpath, targets):
+def addServer(name, serverDescriptor, server, libpath, targets):
global icePackPort
icePackAdmin = os.path.join(toplevel, "bin", "icepackadmin")
- options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
-
- command = icePackAdmin + options + \
+ command = icePackAdmin + TestUtil.clientOptions + \
r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "server add localnode \"' + name + '\\" \\"' + serverDescriptor + '\\" ' + \
r' \"' + server + '\\" \\"' + libpath + '\\" ' + targets + '\"'
@@ -175,14 +168,12 @@ def addServer(toplevel, name, serverDescriptor, server, libpath, targets):
TestUtil.killServers()
sys.exit(1)
-def removeServer(toplevel, name):
+def removeServer(name):
global icePackPort
icePackAdmin = os.path.join(toplevel, "bin", "icepackadmin")
- options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
-
- command = icePackAdmin + options + \
+ command = icePackAdmin + TestUtil.clientOptions + \
r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "server remove \"' + name + '\\" \"'
@@ -192,13 +183,11 @@ def removeServer(toplevel, name):
TestUtil.killServers()
sys.exit(1)
-def startServer(toplevel, name):
+def startServer(name):
global icePackPort
icePackAdmin = os.path.join(toplevel, "bin", "icepackadmin")
- options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
-
- command = icePackAdmin + options + \
+ command = icePackAdmin + TestUtil.clientOptions + \
r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "server start \"' + name + '\\""'
@@ -208,13 +197,11 @@ def startServer(toplevel, name):
TestUtil.killServers()
sys.exit(1)
-def listAdapters(toplevel):
+def listAdapters():
global icePackPort
icePackAdmin = os.path.join(toplevel, "bin", "icepackadmin")
- options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
-
- command = icePackAdmin + options + \
+ command = icePackAdmin + TestUtil.clientOptions + \
r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "adapter list"'
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py
index 9954769b93a..24a464e0d94 100644
--- a/cpp/config/TestUtil.py
+++ b/cpp/config/TestUtil.py
@@ -13,8 +13,6 @@
#
# **********************************************************************
-import sys, os
-
#
# Set protocol to "ssl" in case you want to run the tests with the SSL
# protocol. Otherwise TCP is used.
@@ -45,37 +43,7 @@ host = "localhost"
# Don't change anything below this line!
#
-if protocol == "ssl":
- plugin = " --Ice.Plugin.IceSSL=IceSSL:create"
- clientProtocol = plugin + " --Ice.Default.Protocol=ssl" + \
- " --IceSSL.Client.CertPath=TOPLEVELDIR/certs --IceSSL.Client.Config=client_sslconfig.xml"
- serverProtocol = plugin + " --Ice.Default.Protocol=ssl" + \
- " --IceSSL.Server.CertPath=TOPLEVELDIR/certs --IceSSL.Server.Config=server_sslconfig.xml"
- clientServerProtocol = plugin + " --Ice.Default.Protocol=ssl" + \
- " --IceSSL.Client.CertPath=TOPLEVELDIR/certs --IceSSL.Client.Config=sslconfig.xml" + \
- " --IceSSL.Server.CertPath=TOPLEVELDIR/certs --IceSSL.Server.Config=sslconfig.xml"
-else:
- clientProtocol = ""
- serverProtocol = ""
- clientServerProtocol = ""
-
-if compress:
- clientProtocol += " --Ice.Override.Compress"
- serverProtocol += " --Ice.Override.Compress"
- clientServerProtocol += " --Ice.Override.Compress"
-
-if host != "":
- defaultHost = " --Ice.Default.Host=" + host
-else:
- defaultHost = ""
-
-commonServerOptions = " --Ice.PrintProcessId --Ice.PrintAdapterReady --Ice.ServerThreadPool.Size=3" + \
- " --Ice.ConnectionWarnings --Ice.ServerIdleTime=30"
-
-clientOptions = clientProtocol + defaultHost
-serverOptions = serverProtocol + defaultHost + commonServerOptions
-clientServerOptions = clientServerProtocol + defaultHost + commonServerOptions
-collocatedOptions = clientServerProtocol + defaultHost
+import sys, os
def isCygwin():
@@ -150,23 +118,66 @@ def waitServiceReady(pipe, token):
if output == token + " ready":
break
-def clientServerTestWithOptions(toplevel, name, additionalServerOptions, additionalClientOptions):
+for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
+ toplevel = os.path.normpath(toplevel)
+ if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")):
+ break
+else:
+ raise "can't find toplevel directory!"
+
+if not isWin32():
+ os.environ["LD_LIBRARY_PATH"] = os.path.join(toplevel, "lib") + ":" + os.environ["LD_LIBRARY_PATH"]
+
+if protocol == "ssl":
+ plugin = " --Ice.Plugin.IceSSL=IceSSL:create"
+ clientProtocol = plugin + " --Ice.Default.Protocol=ssl" + \
+ " --IceSSL.Client.CertPath=" + os.path.join(toplevel, "certs") + \
+ " --IceSSL.Client.Config=client_sslconfig.xml"
+ serverProtocol = plugin + " --Ice.Default.Protocol=ssl" + \
+ " --IceSSL.Server.CertPath=" + os.path.join(toplevel, "certs") + \
+ " --IceSSL.Server.Config=server_sslconfig.xml"
+ clientServerProtocol = plugin + " --Ice.Default.Protocol=ssl" + \
+ " --IceSSL.Client.CertPath=" + os.path.join(toplevel, "certs") + \
+ " --IceSSL.Client.Config=sslconfig.xml" + \
+ " --IceSSL.Server.CertPath=" + os.path.join(toplevel, "certs") + \
+ " --IceSSL.Server.Config=sslconfig.xml"
+else:
+ clientProtocol = ""
+ serverProtocol = ""
+ clientServerProtocol = ""
+
+if compress:
+ clientProtocol += " --Ice.Override.Compress"
+ serverProtocol += " --Ice.Override.Compress"
+ clientServerProtocol += " --Ice.Override.Compress"
+
+if host != "":
+ defaultHost = " --Ice.Default.Host=" + host
+else:
+ defaultHost = ""
+
+commonServerOptions = " --Ice.PrintProcessId --Ice.PrintAdapterReady --Ice.ServerThreadPool.Size=3" + \
+ " --Ice.ConnectionWarnings --Ice.ServerIdleTime=30"
+
+clientOptions = clientProtocol + defaultHost
+serverOptions = serverProtocol + defaultHost + commonServerOptions
+clientServerOptions = clientServerProtocol + defaultHost + commonServerOptions
+collocatedOptions = clientServerProtocol + defaultHost
+
+def clientServerTestWithOptions(name, additionalServerOptions, additionalClientOptions):
testdir = os.path.join(toplevel, "test", name)
server = os.path.join(testdir, "server")
client = os.path.join(testdir, "client")
- updatedServerOptions = serverOptions.replace("TOPLEVELDIR", toplevel)
- updatedClientOptions = clientOptions.replace("TOPLEVELDIR", toplevel)
-
print "starting server...",
- serverPipe = os.popen(server + updatedServerOptions + additionalServerOptions)
+ serverPipe = os.popen(server + serverOptions + additionalServerOptions)
getServerPid(serverPipe)
getAdapterReady(serverPipe)
print "ok"
print "starting client...",
- clientPipe = os.popen(client + updatedClientOptions + additionalClientOptions)
+ clientPipe = os.popen(client + clientOptions + additionalClientOptions)
print "ok"
for output in clientPipe.xreadlines():
@@ -179,28 +190,24 @@ def clientServerTestWithOptions(toplevel, name, additionalServerOptions, additio
killServers()
sys.exit(1)
-def clientServerTest(toplevel, name):
+def clientServerTest(name):
- clientServerTestWithOptions(toplevel, name, "", "")
+ clientServerTestWithOptions(name, "", "")
-
-def mixedClientServerTestWithOptions(toplevel, name, additionalServerOptions, additionalClientOptions):
+def mixedClientServerTestWithOptions(name, additionalServerOptions, additionalClientOptions):
testdir = os.path.join(toplevel, "test", name)
server = os.path.join(testdir, "server")
client = os.path.join(testdir, "client")
- updatedServerOptions = clientServerOptions.replace("TOPLEVELDIR", toplevel)
- updatedClientOptions = updatedServerOptions
-
print "starting server...",
- serverPipe = os.popen(server + updatedServerOptions + additionalServerOptions)
+ serverPipe = os.popen(server + clientServerOptions + additionalServerOptions)
getServerPid(serverPipe)
getAdapterReady(serverPipe)
print "ok"
print "starting client...",
- clientPipe = os.popen(client + updatedClientOptions + additionalClientOptions)
+ clientPipe = os.popen(client + clientServerOptions + additionalClientOptions)
getServerPid(clientPipe)
getAdapterReady(clientPipe)
print "ok"
@@ -215,19 +222,17 @@ def mixedClientServerTestWithOptions(toplevel, name, additionalServerOptions, ad
killServers()
sys.exit(1)
-def mixedClientServerTest(toplevel, name):
+def mixedClientServerTest(name):
- mixedClientServerTestWithOptions(toplevel, name, "", "")
+ mixedClientServerTestWithOptions(name, "", "")
-def collocatedTestWithOptions(toplevel, name, additionalOptions):
+def collocatedTestWithOptions(name, additionalOptions):
testdir = os.path.join(toplevel, "test", name)
collocated = os.path.join(testdir, "collocated")
- updatedCollocatedOptions = collocatedOptions.replace("TOPLEVELDIR", toplevel)
-
print "starting collocated...",
- collocatedPipe = os.popen(collocated + updatedCollocatedOptions + additionalOptions)
+ collocatedPipe = os.popen(collocated + collocatedOptions + additionalOptions)
print "ok"
for output in collocatedPipe.xreadlines():
@@ -239,9 +244,9 @@ def collocatedTestWithOptions(toplevel, name, additionalOptions):
killServers()
sys.exit(1)
-def collocatedTest(toplevel, name):
+def collocatedTest(name):
- collocatedTestWithOptions(toplevel, name, "")
+ collocatedTestWithOptions(name, "")
def cleanDbDir(path):
diff --git a/cpp/test/Freeze/evictor/run.py b/cpp/test/Freeze/evictor/run.py
index 918d826265e..cc0f3522482 100755
--- a/cpp/test/Freeze/evictor/run.py
+++ b/cpp/test/Freeze/evictor/run.py
@@ -32,5 +32,5 @@ testdir = os.path.join(toplevel, "test", name)
dbdir = os.path.join(testdir, "db")
TestUtil.cleanDbDir(dbdir)
-TestUtil.clientServerTestWithOptions(toplevel, name, " " + testdir, "")
+TestUtil.clientServerTestWithOptions(name, " " + testdir, "")
sys.exit(0)
diff --git a/cpp/test/Ice/adapterDeactivation/run.py b/cpp/test/Ice/adapterDeactivation/run.py
index d230bc3657c..c4407a2ca68 100755
--- a/cpp/test/Ice/adapterDeactivation/run.py
+++ b/cpp/test/Ice/adapterDeactivation/run.py
@@ -27,6 +27,6 @@ import TestUtil
name = os.path.join("Ice", "adapterDeactivation")
-TestUtil.clientServerTest(toplevel, name)
-TestUtil.collocatedTest(toplevel, name)
+TestUtil.clientServerTest(name)
+TestUtil.collocatedTest(name)
sys.exit(0)
diff --git a/cpp/test/Ice/exceptions/run.py b/cpp/test/Ice/exceptions/run.py
index b832ebefcc0..39b9b18a4b9 100755
--- a/cpp/test/Ice/exceptions/run.py
+++ b/cpp/test/Ice/exceptions/run.py
@@ -27,6 +27,6 @@ import TestUtil
name = os.path.join("Ice", "exceptions")
-TestUtil.clientServerTest(toplevel, name)
-TestUtil.collocatedTest(toplevel, name)
+TestUtil.clientServerTest(name)
+TestUtil.collocatedTest(name)
sys.exit(0)
diff --git a/cpp/test/Ice/facets/run.py b/cpp/test/Ice/facets/run.py
index 1fd4846df21..f9d93b10da0 100755
--- a/cpp/test/Ice/facets/run.py
+++ b/cpp/test/Ice/facets/run.py
@@ -27,6 +27,6 @@ import TestUtil
name = os.path.join("Ice", "facets")
-TestUtil.clientServerTest(toplevel, name)
-TestUtil.collocatedTest(toplevel, name)
+TestUtil.clientServerTest(name)
+TestUtil.collocatedTest(name)
sys.exit(0)
diff --git a/cpp/test/Ice/faultTolerance/run.py b/cpp/test/Ice/faultTolerance/run.py
index 151f149d27a..e06b110f939 100755
--- a/cpp/test/Ice/faultTolerance/run.py
+++ b/cpp/test/Ice/faultTolerance/run.py
@@ -32,13 +32,10 @@ client = os.path.join(testdir, "client")
num = 6
base = 12340
-updatedServerOptions = TestUtil.serverOptions.replace("TOPLEVELDIR", toplevel)
-updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
-
serverPipes = { }
for i in range(0, num):
print "starting server #%d..." % (i + 1),
- serverPipes[i] = os.popen(server + updatedServerOptions + " %d" % (base + i))
+ serverPipes[i] = os.popen(server + TestUtil.serverOptions + " %d" % (base + i))
TestUtil.getServerPid(serverPipes[i])
TestUtil.getAdapterReady(serverPipes[i])
print "ok"
@@ -47,7 +44,7 @@ ports = ""
for i in range(0, num):
ports = "%s %d" % (ports, base + i)
print "starting client...",
-clientPipe = os.popen(client + updatedClientOptions + " " + ports)
+clientPipe = os.popen(client + TestUtil.clientOptions + " " + ports)
print "ok"
for output in clientPipe.xreadlines():
diff --git a/cpp/test/Ice/inheritance/run.py b/cpp/test/Ice/inheritance/run.py
index 1f7dd687e29..3cb6f4cec39 100755
--- a/cpp/test/Ice/inheritance/run.py
+++ b/cpp/test/Ice/inheritance/run.py
@@ -27,6 +27,6 @@ import TestUtil
name = os.path.join("Ice", "inheritance")
-TestUtil.clientServerTest(toplevel, name)
-TestUtil.collocatedTest(toplevel, name)
+TestUtil.clientServerTest(name)
+TestUtil.collocatedTest(name)
sys.exit(0)
diff --git a/cpp/test/Ice/location/run.py b/cpp/test/Ice/location/run.py
index 3fffd5cba84..a2b30f10e3b 100755
--- a/cpp/test/Ice/location/run.py
+++ b/cpp/test/Ice/location/run.py
@@ -27,5 +27,5 @@ import TestUtil
name = os.path.join("Ice", "location")
-TestUtil.mixedClientServerTest(toplevel, name)
+TestUtil.mixedClientServerTest(name)
sys.exit(0)
diff --git a/cpp/test/Ice/locationForward/run.py b/cpp/test/Ice/locationForward/run.py
index f665ebda4b5..2fba1589028 100755
--- a/cpp/test/Ice/locationForward/run.py
+++ b/cpp/test/Ice/locationForward/run.py
@@ -32,9 +32,6 @@ client = os.path.join(testdir, "client")
num = 5
base = 12340
-updatedServerOptions = TestUtil.serverOptions.replace("TOPLEVELDIR", toplevel)
-updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
-
serverPipes = { }
for i in range(0, num):
if i + 1 < num:
@@ -42,7 +39,7 @@ for i in range(0, num):
else:
s = " %d" % (base + i)
print "starting server #%d..." % (i + 1),
- command = server + updatedServerOptions + s;
+ command = server + TestUtil.serverOptions + s;
serverPipes[i] = os.popen(command)
TestUtil.getServerPid(serverPipes[i])
TestUtil.getAdapterReady(serverPipes[i])
@@ -50,7 +47,7 @@ for i in range(0, num):
print "starting client...",
s = " %d %d" % (base, (base + num - 1))
-command = client + updatedClientOptions + s
+command = client + TestUtil.clientOptions + s
clientPipe = os.popen(command)
print "ok"
diff --git a/cpp/test/Ice/objects/run.py b/cpp/test/Ice/objects/run.py
index 29706d1678b..07067bf38fe 100755
--- a/cpp/test/Ice/objects/run.py
+++ b/cpp/test/Ice/objects/run.py
@@ -27,6 +27,6 @@ import TestUtil
name = os.path.join("Ice", "objects")
-TestUtil.clientServerTest(toplevel, name)
-TestUtil.collocatedTest(toplevel, name)
+TestUtil.clientServerTest(name)
+TestUtil.collocatedTest(name)
sys.exit(0)
diff --git a/cpp/test/Ice/operations/run.py b/cpp/test/Ice/operations/run.py
index be59dffaf74..7c1bde7457d 100755
--- a/cpp/test/Ice/operations/run.py
+++ b/cpp/test/Ice/operations/run.py
@@ -27,6 +27,6 @@ import TestUtil
name = os.path.join("Ice", "operations")
-TestUtil.clientServerTest(toplevel, name)
-TestUtil.collocatedTest(toplevel, name)
+TestUtil.clientServerTest(name)
+TestUtil.collocatedTest(name)
sys.exit(0)
diff --git a/cpp/test/IcePack/deployer/application.xml b/cpp/test/IcePack/deployer/application.xml
index 89fe1061479..0ecfb0b542e 100644
--- a/cpp/test/IcePack/deployer/application.xml
+++ b/cpp/test/IcePack/deployer/application.xml
@@ -3,8 +3,8 @@
<node name="localnode" basedir="${basedir}">
<server name="Yellow" descriptor="yellow_icebox.xml"/>
- <server name="IceBox1" descriptor="icebox.xml"/>
- <server name="IceBox2" descriptor="icebox.xml"/>
+ <server name="IceBox1" binpath="../../../bin/icebox" descriptor="icebox.xml"/>
+ <server name="IceBox2" binpath="../../../bin/icebox" descriptor="icebox.xml"/>
<server name="Server1" binpath="./server" descriptor="server.xml"/>
<server name="Server2" binpath="./server" descriptor="server.xml" targets="target1 target2"/>
diff --git a/cpp/test/IcePack/deployer/run.py b/cpp/test/IcePack/deployer/run.py
index f078f09223d..5c510903f3a 100755
--- a/cpp/test/IcePack/deployer/run.py
+++ b/cpp/test/IcePack/deployer/run.py
@@ -28,19 +28,20 @@ import IcePackAdmin
testdir = os.path.join(toplevel, "test", "IcePack", "deployer")
-os.environ['LD_LIBRARY_PATH'] = testdir + ":" + os.environ['LD_LIBRARY_PATH']
+if not TestUtil.isWin32():
+ os.environ["LD_LIBRARY_PATH"] = testdir + ":" + os.environ["LD_LIBRARY_PATH"]
#
# Start the client.
#
def startClient(options):
- updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel) + \
- " --Ice.Default.Locator=\"IcePack/Locator:default -p 12346\" " + \
- options
+ fullClientOptions = TestUtil.clientOptions + \
+ " --Ice.Default.Locator=\"IcePack/Locator:default -p 12346\" " + \
+ options
print "starting client...",
- clientPipe = os.popen(os.path.join(testdir, "client") + updatedClientOptions)
+ clientPipe = os.popen(os.path.join(testdir, "client") + fullClientOptions)
print "ok"
for output in clientPipe.xreadlines():
@@ -54,21 +55,20 @@ def startClient(options):
# Start IcePack.
#
IcePackAdmin.cleanDbDir(os.path.join(testdir, "db"))
-
-icePackRegistryPipe = IcePackAdmin.startIcePackRegistry(toplevel, "12346", testdir)
-icePackNodePipe = IcePackAdmin.startIcePackNode(toplevel, testdir)
+icePackRegistryPipe = IcePackAdmin.startIcePackRegistry("12346", testdir)
+icePackNodePipe = IcePackAdmin.startIcePackNode(testdir)
#
# Deploy the application, run the client and remove the application.
#
print "deploying application...",
-IcePackAdmin.addApplication(toplevel, os.path.join(testdir, "application.xml"), "");
+IcePackAdmin.addApplication(os.path.join(testdir, "application.xml"), "");
print "ok"
startClient("")
print "removing application...",
-IcePackAdmin.removeApplication(toplevel, os.path.join(testdir, "application.xml"));
+IcePackAdmin.removeApplication(os.path.join(testdir, "application.xml"));
print "ok"
#
@@ -76,19 +76,19 @@ print "ok"
# client to test targets (-t options) and remove the application.
#
print "deploying application with target...",
-IcePackAdmin.addApplication(toplevel, os.path.join(testdir, "application.xml"), "debug localnode.Server1.manual")
+IcePackAdmin.addApplication(os.path.join(testdir, "application.xml"), "debug localnode.Server1.manual")
print "ok"
startClient("-t")
print "removing application...",
-IcePackAdmin.removeApplication(toplevel, os.path.join(testdir, "application.xml"));
+IcePackAdmin.removeApplication(os.path.join(testdir, "application.xml"));
print "ok"
#
# Shutdown IcePack.
#
-IcePackAdmin.shutdownIcePackNode(toplevel, icePackNodePipe)
-IcePackAdmin.shutdownIcePackRegistry(toplevel, icePackRegistryPipe)
+IcePackAdmin.shutdownIcePackNode(icePackNodePipe)
+IcePackAdmin.shutdownIcePackRegistry(icePackRegistryPipe)
sys.exit(0)
diff --git a/cpp/test/IcePack/simple/run.py b/cpp/test/IcePack/simple/run.py
index 28eca1d22ed..533d38b7302 100755
--- a/cpp/test/IcePack/simple/run.py
+++ b/cpp/test/IcePack/simple/run.py
@@ -35,32 +35,31 @@ testdir = os.path.join(toplevel, "test", "IcePack", "simple")
#
additionalOptions = " --Ice.Default.Locator=\"IcePack/Locator:default -p 12346\""
-
IcePackAdmin.cleanDbDir(os.path.join(testdir, "db"))
#
# Start IcePack registry
#
-icePackRegistryPipe = IcePackAdmin.startIcePackRegistry(toplevel, "12346", testdir)
+icePackRegistryPipe = IcePackAdmin.startIcePackRegistry("12346", testdir)
#
# Test client/server without on demand activation.
#
additionalServerOptions=" --TestAdapter.Endpoints=default --TestAdapter.AdapterId=TestAdapter " + additionalOptions
-TestUtil.mixedClientServerTestWithOptions(toplevel, name, additionalServerOptions, additionalOptions)
+TestUtil.mixedClientServerTestWithOptions(name, additionalServerOptions, additionalOptions)
#
# Shutdown the registry.
#
-IcePackAdmin.shutdownIcePackRegistry(toplevel, icePackRegistryPipe)
+IcePackAdmin.shutdownIcePackRegistry(icePackRegistryPipe)
IcePackAdmin.cleanDbDir(os.path.join(testdir, "db"))
#
# Start the registry and a node.
#
-icePackRegistryPipe = IcePackAdmin.startIcePackRegistry(toplevel, "12346", testdir)
-icePackNodePipe = IcePackAdmin.startIcePackNode(toplevel, testdir)
+icePackRegistryPipe = IcePackAdmin.startIcePackRegistry("12346", testdir)
+icePackNodePipe = IcePackAdmin.startIcePackNode(testdir)
#
# Test client/server with on demand activation.
@@ -69,7 +68,7 @@ server = os.path.join(testdir, "server")
client = os.path.join(testdir, "client")
print "registering server with icepack...",
-IcePackAdmin.addServer(toplevel, "server", os.path.join(testdir, "simple_server.xml"), server, "", "");
+IcePackAdmin.addServer("server", os.path.join(testdir, "simple_server.xml"), server, "", "");
print "ok"
updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel) + additionalOptions
@@ -87,10 +86,10 @@ if clientStatus:
sys.exit(1)
print "unregister server with icepack...",
-IcePackAdmin.removeServer(toplevel, "server");
+IcePackAdmin.removeServer("server");
print "ok"
-IcePackAdmin.shutdownIcePackNode(toplevel, icePackNodePipe)
-IcePackAdmin.shutdownIcePackRegistry(toplevel, icePackRegistryPipe)
+IcePackAdmin.shutdownIcePackNode(icePackNodePipe)
+IcePackAdmin.shutdownIcePackRegistry(icePackRegistryPipe)
sys.exit(0)
diff --git a/cpp/test/IceSSL/certificateAndKeyParsing/run.py b/cpp/test/IceSSL/certificateAndKeyParsing/run.py
index 667f3335ff5..20e03a10b88 100755
--- a/cpp/test/IceSSL/certificateAndKeyParsing/run.py
+++ b/cpp/test/IceSSL/certificateAndKeyParsing/run.py
@@ -29,20 +29,18 @@ if TestUtil.protocol != "ssl" :
print "This test may only be run with SSL enabled."
sys.exit(0)
-testOptions = " --IceSSL.Test.Client.CertPath=TOPLEVELDIR/test/IceSSL/certs" + \
- " --IceSSL.Server.CertPath=TOPLEVELDIR/test/IceSSL/certs" + \
- " --IceSSL.Server.Config= " + \
- " --IceSSL.Client.CertPath=TOPLEVELDIR/test/IceSSL/certs" + \
- " --IceSSL.Client.Config= "
+testOptions = " --IceSSL.Test.Client.CertPath=" + os.path.join(toplevel, "test", "IceSSL", "certs") + \
+ " --IceSSL.Client.CertPath=" + os.path.join(toplevel, "test", "IceSSL", "certs") + \
+ " --IceSSL.Client.Config= " + \
+ " --IceSSL.Server.CertPath=" + os.path.join(toplevel, "test", "IceSSL", "certs") + \
+ " --IceSSL.Server.Config= "
testdir = os.path.join(toplevel,"test", "IceSSL", "certificateAndKeyParsing")
client = os.path.join(testdir, "certificateAndKeyParsing")
localClientOptions = TestUtil.clientServerProtocol + TestUtil.defaultHost
-updatedOptions = localClientOptions.replace("TOPLEVELDIR", toplevel)
-testOptions = testOptions.replace("TOPLEVELDIR", toplevel)
print "starting certificateAndKeyParsing...",
-clientPipe = os.popen(client + updatedOptions + testOptions)
+clientPipe = os.popen(client + localClientOptions + testOptions)
print "ok"
for output in clientPipe.xreadlines():
diff --git a/cpp/test/IceSSL/certificateVerification/run.py b/cpp/test/IceSSL/certificateVerification/run.py
index 705382af0a7..9038b280d80 100755
--- a/cpp/test/IceSSL/certificateVerification/run.py
+++ b/cpp/test/IceSSL/certificateVerification/run.py
@@ -29,22 +29,28 @@ if TestUtil.protocol != "ssl":
print "This test may only be run with SSL enabled."
sys.exit(0)
-TestUtil.clientOptions += \
- " --IceSSL.Test.Client.CertPath=TOPLEVELDIR/test/IceSSL/certs"
-TestUtil.serverOptions += \
- " --IceSSL.Test.Server.CertPath=TOPLEVELDIR/test/IceSSL/certs"
-TestUtil.clientServerOptions += \
- " --IceSSL.Test.Client.CertPath=TOPLEVELDIR/test/IceSSL/certs" + \
- " --IceSSL.Test.Server.CertPath=TOPLEVELDIR/test/IceSSL/certs"
+testOptions = " --IceSSL.Client.CertPath=" + os.path.join(toplevel, "test", "IceSSL", "certs") + \
+ " --IceSSL.Client.Config= " + \
+ " --IceSSL.Server.CertPath=" + os.path.join(toplevel, "test", "IceSSL", "certs") + \
+ " --IceSSL.Server.Config= "
+
+TestUtil.clientOptions += " --IceSSL.Test.Client.CertPath=" + \
+ os.path.join(toplevel, "test", "IceSSL", "certs")
+TestUtil.serverOptions += " --IceSSL.Test.Server.CertPath=" + \
+ os.path.join(toplevel, "test", "IceSSL", "certs")
+TestUtil.clientServerOptions += " --IceSSL.Test.Client.CertPath=" + \
+ os.path.join(toplevel, "test", "IceSSL", "certs") + \
+ " --IceSSL.Test.Server.CertPath=" + \
+ os.path.join(toplevel, "test", "IceSSL", "certs")
name = os.path.join("IceSSL", "certificateVerification")
print "testing default certificate verifier."
-TestUtil.clientServerTest(toplevel, name)
+TestUtil.clientServerTest(name)
print "testing single-certificate certificate verifier."
TestUtil.clientOptions += " --IceSSL.Client.CertificateVerifier=singleCert"
TestUtil.serverOptions += " --IceSSL.Server.CertificateVerifier=singleCert"
-TestUtil.clientServerTest(toplevel, name)
+TestUtil.clientServerTest(name)
sys.exit(0)
diff --git a/cpp/test/IceSSL/certificateVerifier/run.py b/cpp/test/IceSSL/certificateVerifier/run.py
index 43f2aec9091..84f28dab0ff 100755
--- a/cpp/test/IceSSL/certificateVerifier/run.py
+++ b/cpp/test/IceSSL/certificateVerifier/run.py
@@ -33,9 +33,8 @@ testdir = os.path.join(toplevel,"test", "IceSSL", "certificateVerifier")
client = os.path.join(testdir, "certificateVerifier")
localClientOptions = TestUtil.clientServerProtocol + TestUtil.defaultHost
-updatedOptions = localClientOptions.replace("TOPLEVELDIR", toplevel)
print "starting certificateVerifier...",
-clientPipe = os.popen(client + updatedOptions)
+clientPipe = os.popen(client + localClientOptions)
print "ok"
for output in clientPipe.xreadlines():
diff --git a/cpp/test/IceSSL/configuration/run.py b/cpp/test/IceSSL/configuration/run.py
index f787ac3e0fd..fcfa47e4f51 100755
--- a/cpp/test/IceSSL/configuration/run.py
+++ b/cpp/test/IceSSL/configuration/run.py
@@ -33,9 +33,8 @@ testdir = os.path.join(toplevel,"test", "IceSSL", "configuration")
client = os.path.join(testdir, "configuration")
localClientOptions = TestUtil.clientServerProtocol + TestUtil.defaultHost
-updatedOptions = localClientOptions.replace("TOPLEVELDIR", toplevel)
print "starting configuration...",
-clientPipe = os.popen(client + updatedOptions)
+clientPipe = os.popen(client + localClientOptions)
print "ok"
for output in clientPipe.xreadlines():
diff --git a/cpp/test/IceSSL/loadPEM/run.py b/cpp/test/IceSSL/loadPEM/run.py
index 6712182b76a..1b289b4ee48 100755
--- a/cpp/test/IceSSL/loadPEM/run.py
+++ b/cpp/test/IceSSL/loadPEM/run.py
@@ -29,19 +29,17 @@ if TestUtil.protocol != "ssl":
print "This test may only be run with SSL enabled."
sys.exit(0)
-testOptions = " --IceSSL.Client.CertPath=TOPLEVELDIR/test/IceSSL/certs" + \
+testOptions = " --IceSSL.Client.CertPath=" + os.path.join(toplevel, "test", "IceSSL", "certs") + \
" --IceSSL.Client.Config= " + \
- " --IceSSL.Server.CertPath=TOPLEVELDIR/test/IceSSL/certs" + \
+ " --IceSSL.Server.CertPath=" + os.path.join(toplevel, "test", "IceSSL", "certs") + \
" --IceSSL.Server.Config= "
testdir = os.path.join(toplevel,"test", "IceSSL", "loadPEM")
client = os.path.join(testdir, "loadPEM")
localClientOptions = TestUtil.clientServerProtocol + TestUtil.defaultHost
-updatedOptions = localClientOptions.replace("TOPLEVELDIR", toplevel)
-testOptions = testOptions.replace("TOPLEVELDIR", toplevel)
print "starting loadPEM...",
-clientPipe = os.popen(client + updatedOptions + testOptions)
+clientPipe = os.popen(client + localClientOptions + testOptions)
print "ok"
for output in clientPipe.xreadlines():