summaryrefslogtreecommitdiff
path: root/java/test
diff options
context:
space:
mode:
Diffstat (limited to 'java/test')
-rwxr-xr-xjava/test/Freeze/complex/run.py33
-rwxr-xr-xjava/test/Freeze/cursor/run.py11
-rwxr-xr-xjava/test/Freeze/dbmap/run.py11
-rwxr-xr-xjava/test/Freeze/evictor/run.py6
-rwxr-xr-xjava/test/Glacier/starter/run.py17
-rwxr-xr-xjava/test/Ice/adapterDeactivation/run.py6
-rwxr-xr-xjava/test/Ice/exceptions/run.py6
-rwxr-xr-xjava/test/Ice/facets/run.py6
-rwxr-xr-xjava/test/Ice/faultTolerance/run.py18
-rwxr-xr-xjava/test/Ice/inheritance/run.py6
-rwxr-xr-xjava/test/Ice/location/run.py4
-rwxr-xr-xjava/test/Ice/locationForward/run.py18
-rwxr-xr-xjava/test/Ice/objects/run.py6
-rwxr-xr-xjava/test/Ice/operations/run.py6
-rwxr-xr-xjava/test/IcePack/deployer/run.py47
-rwxr-xr-xjava/test/IcePack/simple/run.py48
-rwxr-xr-xjava/test/IceXML/encoding/run.py13
17 files changed, 123 insertions, 139 deletions
diff --git a/java/test/Freeze/complex/run.py b/java/test/Freeze/complex/run.py
index 6057457d91a..62517733168 100755
--- a/java/test/Freeze/complex/run.py
+++ b/java/test/Freeze/complex/run.py
@@ -25,36 +25,37 @@ else:
sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
-testdir = os.path.join(toplevel,"test", "Freeze", "complex")
+name = os.path.join("Freeze", "complex")
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
+#
+# Clean the contents of the database directory.
+#
dbdir = os.path.join(testdir, "db")
TestUtil.cleanDbDir(dbdir)
-classpath = os.path.join(toplevel, "lib") + TestUtil.sep + os.path.join(testdir, "classes") + \
- TestUtil.sep + os.getenv("CLASSPATH", "")
-client = "java -classpath \"" + classpath + "\" Client --dbdir " + testdir
+client = "java -ea Client"
+clientOptions = " --dbdir " + testdir;
print "starting populate...",
-clientPipe = os.popen(client + " populate")
+populatePipe = os.popen(client + clientOptions + " populate")
print "ok"
-for output in clientPipe.xreadlines():
+for output in populatePipe.xreadlines():
print output,
-clientStatus = clientPipe.close()
+populateStatus = populatePipe.close()
-if clientStatus:
+if populateStatus:
sys.exit(1)
-print "starting validate...",
-clientPipe = os.popen(client + " validate")
-output = clientPipe.read().strip()
-if not output:
- print "failed!"
- clientPipe.close()
- sys.exit(1)
+print "starting verification client...",
+clientPipe = os.popen(client + clientOptions + " validate")
print "ok"
-print output
+
+for output in clientPipe.xreadlines():
+ print output,
clientStatus = clientPipe.close()
diff --git a/java/test/Freeze/cursor/run.py b/java/test/Freeze/cursor/run.py
index 757bd31bfe5..221603210d8 100755
--- a/java/test/Freeze/cursor/run.py
+++ b/java/test/Freeze/cursor/run.py
@@ -25,17 +25,18 @@ else:
sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
-testdir = os.path.join(toplevel,"test", "Freeze", "cursor")
+name = os.path.join("Freeze", "cursor")
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
dbdir = os.path.join(testdir, "db")
TestUtil.cleanDbDir(dbdir)
-classpath = os.path.join(toplevel, "lib") + TestUtil.sep + os.path.join(testdir, "classes") + \
- TestUtil.sep + os.getenv("CLASSPATH", "")
-client = "java -classpath \"" + classpath + "\" Client " + testdir
+client = "java -ea Client"
+clientOptions = ' ' + testdir;
print "starting client...",
-clientPipe = os.popen(client)
+clientPipe = os.popen(client + clientOptions)
print "ok"
for output in clientPipe.xreadlines():
diff --git a/java/test/Freeze/dbmap/run.py b/java/test/Freeze/dbmap/run.py
index 862d2a72cf3..7c40b6854ee 100755
--- a/java/test/Freeze/dbmap/run.py
+++ b/java/test/Freeze/dbmap/run.py
@@ -25,17 +25,18 @@ else:
sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
-testdir = os.path.join(toplevel,"test", "Freeze", "dbmap")
+name = os.path.join("Freeze", "dbmap")
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
dbdir = os.path.join(testdir, "db")
TestUtil.cleanDbDir(dbdir)
-classpath = os.path.join(toplevel, "lib") + TestUtil.sep + os.path.join(testdir, "classes") + \
- TestUtil.sep + os.getenv("CLASSPATH", "")
-client = "java -classpath \"" + classpath + "\" Client " + testdir
+client = "java -ea Client"
+clientOptions = ' ' + testdir;
print "starting client...",
-clientPipe = os.popen(client)
+clientPipe = os.popen(client + clientOptions)
print "ok"
for output in clientPipe.xreadlines():
diff --git a/java/test/Freeze/evictor/run.py b/java/test/Freeze/evictor/run.py
index bbb507fbde3..0c55168ea44 100755
--- a/java/test/Freeze/evictor/run.py
+++ b/java/test/Freeze/evictor/run.py
@@ -25,10 +25,12 @@ else:
sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
-testdir = os.path.join(toplevel,"test", "Freeze", "evictor")
+name = os.path.join("Freeze", "evictor")
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
dbdir = os.path.join(testdir, "db")
TestUtil.cleanDbDir(dbdir)
-TestUtil.clientServerTestWithOptions(toplevel, "Freeze/evictor", " " + testdir, "")
+TestUtil.clientServerTestWithOptions(name, " " + testdir, "")
sys.exit(0)
diff --git a/java/test/Glacier/starter/run.py b/java/test/Glacier/starter/run.py
index 23d0a0493e4..d20698d729e 100755
--- a/java/test/Glacier/starter/run.py
+++ b/java/test/Glacier/starter/run.py
@@ -34,11 +34,7 @@ ice_home = os.environ['ICE_HOME']
starter = os.path.join(ice_home, "bin", "glacierstarter")
router = os.path.join(ice_home, "bin", "glacierrouter")
-updatedServerOptions = TestUtil.serverOptions.replace("TOPLEVELDIR", toplevel)
-updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
-updatedClientServerOptions = TestUtil.clientServerOptions.replace("TOPLEVELDIR", toplevel)
-
-command = starter + updatedClientServerOptions + \
+command = starter + TestUtil.clientServerOptions + \
r' --Ice.PrintProcessId' \
r' --Glacier.Starter.RouterPath=' + router + \
r' --Glacier.Starter.PropertiesOverwrite=Ice.ServerIdleTime=10' \
@@ -55,11 +51,14 @@ TestUtil.getAdapterReady(starterPipe)
print "ok"
name = os.path.join("Glacier", "starter")
-TestUtil.mixedClientServerTest(toplevel, name)
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
+
+TestUtil.mixedClientServerTest(name)
-# We run the test again, to check whether the glacier starter can
-# start up multiple routers.
-TestUtil.mixedClientServerTest(toplevel, name)
+# We run the test again, to check whether the glacier router starter
+# can start up multiple routers.
+TestUtil.mixedClientServerTest(name)
print "shutting down glacier starter...",
TestUtil.killServers() # TODO: Graceful shutdown.
diff --git a/java/test/Ice/adapterDeactivation/run.py b/java/test/Ice/adapterDeactivation/run.py
index d230bc3657c..6a637ef945b 100755
--- a/java/test/Ice/adapterDeactivation/run.py
+++ b/java/test/Ice/adapterDeactivation/run.py
@@ -26,7 +26,9 @@ sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
name = os.path.join("Ice", "adapterDeactivation")
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
-TestUtil.clientServerTest(toplevel, name)
-TestUtil.collocatedTest(toplevel, name)
+TestUtil.clientServerTest(name)
+TestUtil.collocatedTest(name)
sys.exit(0)
diff --git a/java/test/Ice/exceptions/run.py b/java/test/Ice/exceptions/run.py
index b832ebefcc0..255fc484e2c 100755
--- a/java/test/Ice/exceptions/run.py
+++ b/java/test/Ice/exceptions/run.py
@@ -26,7 +26,9 @@ sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
name = os.path.join("Ice", "exceptions")
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
-TestUtil.clientServerTest(toplevel, name)
-TestUtil.collocatedTest(toplevel, name)
+TestUtil.clientServerTest(name)
+TestUtil.collocatedTest(name)
sys.exit(0)
diff --git a/java/test/Ice/facets/run.py b/java/test/Ice/facets/run.py
index 1fd4846df21..a8b6c10db60 100755
--- a/java/test/Ice/facets/run.py
+++ b/java/test/Ice/facets/run.py
@@ -26,7 +26,9 @@ sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
name = os.path.join("Ice", "facets")
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
-TestUtil.clientServerTest(toplevel, name)
-TestUtil.collocatedTest(toplevel, name)
+TestUtil.clientServerTest(name)
+TestUtil.collocatedTest(name)
sys.exit(0)
diff --git a/java/test/Ice/faultTolerance/run.py b/java/test/Ice/faultTolerance/run.py
index f2452e71757..68b61543efd 100755
--- a/java/test/Ice/faultTolerance/run.py
+++ b/java/test/Ice/faultTolerance/run.py
@@ -25,22 +25,20 @@ else:
sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
-testdir = os.path.join(toplevel,"test", "Ice", "faultTolerance")
-classpath = os.path.join(toplevel, "lib") + TestUtil.sep + os.path.join(testdir, "classes") + \
- TestUtil.sep + os.getenv("CLASSPATH", "")
-server = "java -classpath \"" + classpath + "\" Server"
-client = "java -classpath \"" + classpath + "\" Client"
+name = os.path.join("Ice", "faultTolerance")
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
+
+server = "java -ea Server"
+client = "java -ea 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.getAdapterReady(serverPipes[i])
print "ok"
@@ -48,7 +46,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/java/test/Ice/inheritance/run.py b/java/test/Ice/inheritance/run.py
index 1f7dd687e29..76b54aab357 100755
--- a/java/test/Ice/inheritance/run.py
+++ b/java/test/Ice/inheritance/run.py
@@ -26,7 +26,9 @@ sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
name = os.path.join("Ice", "inheritance")
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
-TestUtil.clientServerTest(toplevel, name)
-TestUtil.collocatedTest(toplevel, name)
+TestUtil.clientServerTest(name)
+TestUtil.collocatedTest(name)
sys.exit(0)
diff --git a/java/test/Ice/location/run.py b/java/test/Ice/location/run.py
index 2971c29b33e..f4af7193109 100755
--- a/java/test/Ice/location/run.py
+++ b/java/test/Ice/location/run.py
@@ -26,6 +26,8 @@ sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
name = os.path.join("Ice", "location")
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
-TestUtil.clientServerTest(toplevel, name)
+TestUtil.mixedClientServerTest(name)
sys.exit(0)
diff --git a/java/test/Ice/locationForward/run.py b/java/test/Ice/locationForward/run.py
index 2db27d134df..3734e10b5ae 100755
--- a/java/test/Ice/locationForward/run.py
+++ b/java/test/Ice/locationForward/run.py
@@ -25,18 +25,16 @@ else:
sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
-testdir = os.path.join(toplevel, "test", "Ice", "locationForward")
-classpath = os.path.join(toplevel, "lib") + TestUtil.sep + os.path.join(testdir, "classes") + \
- TestUtil.sep + os.getenv("CLASSPATH", "")
-server = "java -classpath \"" + classpath + "\" Server"
-client = "java -classpath \"" + classpath + "\" Client"
+name = os.path.join("Ice", "locationForward")
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
+
+server = "java -ea Server"
+client = "java -ea 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:
@@ -44,14 +42,14 @@ 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.getAdapterReady(serverPipes[i])
print "ok"
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/java/test/Ice/objects/run.py b/java/test/Ice/objects/run.py
index 29706d1678b..1ec23f28dee 100755
--- a/java/test/Ice/objects/run.py
+++ b/java/test/Ice/objects/run.py
@@ -26,7 +26,9 @@ sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
name = os.path.join("Ice", "objects")
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
-TestUtil.clientServerTest(toplevel, name)
-TestUtil.collocatedTest(toplevel, name)
+TestUtil.clientServerTest(name)
+TestUtil.collocatedTest(name)
sys.exit(0)
diff --git a/java/test/Ice/operations/run.py b/java/test/Ice/operations/run.py
index be59dffaf74..516d3a916e5 100755
--- a/java/test/Ice/operations/run.py
+++ b/java/test/Ice/operations/run.py
@@ -26,7 +26,9 @@ sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
name = os.path.join("Ice", "operations")
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
-TestUtil.clientServerTest(toplevel, name)
-TestUtil.collocatedTest(toplevel, name)
+TestUtil.clientServerTest(name)
+TestUtil.collocatedTest(name)
sys.exit(0)
diff --git a/java/test/IcePack/deployer/run.py b/java/test/IcePack/deployer/run.py
index cf523418df2..6ced6e9840a 100755
--- a/java/test/IcePack/deployer/run.py
+++ b/java/test/IcePack/deployer/run.py
@@ -26,33 +26,22 @@ sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
import IcePackAdmin
-if not os.environ.has_key('ICE_HOME'):
- print "ICE_HOME is not defined."
- sys.exit(0)
-
-ice_home = os.environ['ICE_HOME']
-
-testdir = os.path.join(toplevel, "test", "IcePack", "deployer")
-
-
-os.environ['CLASSPATH'] = os.path.join(toplevel, "lib") + TestUtil.sep + os.path.join(testdir, "classes") + \
- TestUtil.sep + os.environ['CLASSPATH']
+name = os.path.join("IcePack", "deployer")
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
#
# 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...",
- classpath = os.path.join(toplevel, "lib") + TestUtil.sep + os.path.join(testdir, "classes") + TestUtil.sep + \
- os.getenv("CLASSPATH", "")
-
- clientPipe = os.popen("java -ea -classpath \"" + classpath + "\" Client " + updatedClientOptions)
+ clientPipe = os.popen("java -ea Client " + fullClientOptions)
print "ok"
for output in clientPipe.xreadlines():
@@ -62,30 +51,25 @@ def startClient(options):
if clientStatus:
print "failed"
-if TestUtil.protocol == "ssl":
- targets = "ssl"
-else:
- targets = ""
-
#
# Start IcePack.
#
IcePackAdmin.cleanDbDir(os.path.join(testdir, "db"))
-icePackRegistryPipe = IcePackAdmin.startIcePackRegistry(ice_home, "12346", testdir)
-icePackNodePipe = IcePackAdmin.startIcePackNode(ice_home, 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(ice_home, os.path.join(testdir, "application.xml"), targets);
+IcePackAdmin.addApplication(os.path.join(testdir, "application.xml"), "");
print "ok"
startClient("")
print "removing application...",
-IcePackAdmin.removeApplication(ice_home, os.path.join(testdir, "application.xml"));
+IcePackAdmin.removeApplication(os.path.join(testdir, "application.xml"));
print "ok"
#
@@ -93,20 +77,19 @@ print "ok"
# client to test targets (-t options) and remove the application.
#
print "deploying application with target...",
-IcePackAdmin.addApplication(ice_home, os.path.join(testdir, "application.xml"),
- targets + " 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(ice_home, os.path.join(testdir, "application.xml"));
+IcePackAdmin.removeApplication(os.path.join(testdir, "application.xml"));
print "ok"
#
# Shutdown IcePack.
#
-IcePackAdmin.shutdownIcePackNode(ice_home, icePackNodePipe)
-IcePackAdmin.shutdownIcePackRegistry(ice_home, icePackRegistryPipe)
+IcePackAdmin.shutdownIcePackNode(icePackNodePipe)
+IcePackAdmin.shutdownIcePackRegistry(icePackRegistryPipe)
sys.exit(0)
diff --git a/java/test/IcePack/simple/run.py b/java/test/IcePack/simple/run.py
index 0b2896731ba..07766f8cac8 100755
--- a/java/test/IcePack/simple/run.py
+++ b/java/test/IcePack/simple/run.py
@@ -13,7 +13,7 @@
#
# **********************************************************************
-import os, sys, time
+import os, sys
for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
toplevel = os.path.normpath(toplevel)
@@ -26,18 +26,13 @@ sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
import IcePackAdmin
-if not os.environ.has_key('ICE_HOME'):
- print "ICE_HOME is not defined."
- sys.exit(0)
-
-ice_home = os.environ['ICE_HOME']
-
-testdir = os.path.join(toplevel, "test", "IcePack", "simple")
name = os.path.join("IcePack", "simple")
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
#
-# Add locator options for client and servers. All servers are now
-# clients since they need to make requests to IcePack.
+# Add locator options for the client and server. Since the server
+# invokes on the locator it's also considered to be a client.
#
additionalOptions = " --Ice.Default.Locator=\"IcePack/Locator:default -p 12346\""
@@ -46,47 +41,38 @@ IcePackAdmin.cleanDbDir(os.path.join(testdir, "db"))
#
# Start IcePack registry.
#
-icePackRegistryPipe = IcePackAdmin.startIcePackRegistry(ice_home, "12346", testdir)
+icePackRegistryPipe = IcePackAdmin.startIcePackRegistry("12346", testdir)
#
-# Test client/server w/o automatic activation.
+# 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(ice_home, icePackRegistryPipe)
+IcePackAdmin.shutdownIcePackRegistry(icePackRegistryPipe)
IcePackAdmin.cleanDbDir(os.path.join(testdir, "db"))
#
# Start IcePack registry and a node.
#
-icePackRegistryPipe = IcePackAdmin.startIcePackRegistry(ice_home, "12346", testdir)
-icePackNodePipe = IcePackAdmin.startIcePackNode(ice_home, testdir)
+icePackRegistryPipe = IcePackAdmin.startIcePackRegistry("12346", testdir)
+icePackNodePipe = IcePackAdmin.startIcePackNode(testdir)
#
# Test client/server with on demand activation.
#
-classpath = os.path.join(toplevel, "lib") + TestUtil.sep + os.path.join(testdir, "classes") + TestUtil.sep + \
- os.getenv("CLASSPATH", "")
-client = "java -ea -classpath \"" + classpath + "\" Client "
-
-if TestUtil.protocol == "ssl":
- targets = "ssl"
-else:
- targets = ""
+client = "java -ea Client"
print "registering server with icepack...",
-IcePackAdmin.addServer(ice_home, "server", os.path.join(testdir, "simple_server.xml"), "", classpath, "");
+IcePackAdmin.addServer("server", os.path.join(testdir, "simple_server.xml"), "", "", "");
print "ok"
-updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel) + additionalOptions
-
print "starting client...",
-clientPipe = os.popen(client + updatedClientOptions)
+clientPipe = os.popen(client + TestUtil.clientOptions + additionalOptions)
print "ok"
for output in clientPipe.xreadlines():
@@ -98,10 +84,10 @@ if clientStatus:
sys.exit(1)
print "unregister server with icepack...",
-IcePackAdmin.removeServer(ice_home, "server");
+IcePackAdmin.removeServer("server");
print "ok"
-IcePackAdmin.shutdownIcePackNode(ice_home, icePackNodePipe)
-IcePackAdmin.shutdownIcePackRegistry(ice_home, icePackRegistryPipe)
+IcePackAdmin.shutdownIcePackNode(icePackNodePipe)
+IcePackAdmin.shutdownIcePackRegistry(icePackRegistryPipe)
sys.exit(0)
diff --git a/java/test/IceXML/encoding/run.py b/java/test/IceXML/encoding/run.py
index 6befbf0e0bc..d911d5c207d 100755
--- a/java/test/IceXML/encoding/run.py
+++ b/java/test/IceXML/encoding/run.py
@@ -25,18 +25,19 @@ else:
sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
-testdir = os.path.join(toplevel,"test", "IceXML", "encoding")
-classpath = os.path.join(toplevel, "lib") + TestUtil.sep + os.path.join(testdir, "classes") + \
- TestUtil.sep + os.getenv("CLASSPATH", "")
-client = "java -classpath \"" + classpath + "\" Client"
+name = os.path.join("IceXML", "encoding")
+testdir = os.path.join(toplevel, "test", name)
+os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"]
+
+client = "java -ea Client"
print "starting client...",
-clientPipe = os.popen(client)
+clientPipe = os.popen(client + " " + testdir)
print "ok"
for output in clientPipe.xreadlines():
print output,
-
+
clientStatus = clientPipe.close()
if clientStatus: