summaryrefslogtreecommitdiff
path: root/cpp/config/IcePackAdmin.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2002-08-09 14:46:06 +0000
committerBenoit Foucher <benoit@zeroc.com>2002-08-09 14:46:06 +0000
commitdb3b68cb56c951f2f54fd63685039ab908acab06 (patch)
treea2fc0e7e9fde3634b96f6da41b268fb1582b4f44 /cpp/config/IcePackAdmin.py
parentadded dummy file (diff)
downloadice-db3b68cb56c951f2f54fd63685039ab908acab06.tar.bz2
ice-db3b68cb56c951f2f54fd63685039ab908acab06.tar.xz
ice-db3b68cb56c951f2f54fd63685039ab908acab06.zip
Added new IcePack test suite, add IcePack tracing properties, added IcePack
server shutdown.
Diffstat (limited to 'cpp/config/IcePackAdmin.py')
-rw-r--r--cpp/config/IcePackAdmin.py60
1 files changed, 50 insertions, 10 deletions
diff --git a/cpp/config/IcePackAdmin.py b/cpp/config/IcePackAdmin.py
index 7af77185381..1ca50938760 100644
--- a/cpp/config/IcePackAdmin.py
+++ b/cpp/config/IcePackAdmin.py
@@ -17,7 +17,7 @@ def startIcePack(toplevel, port, testdir):
global icePackPort
- options = TestUtil.serverOptions.replace("TOPLEVELDIR", toplevel)
+ options = TestUtil.clientServerOptions.replace("TOPLEVELDIR", toplevel)
icePackPort = port
@@ -28,10 +28,17 @@ def startIcePack(toplevel, port, testdir):
r' --IcePack.Locator.Endpoints="default -p ' + icePackPort + ' -t 5000" ' + \
r' --IcePack.LocatorRegistry.Endpoints=default' + \
r' --IcePack.Admin.Endpoints=default' + \
- r' --IcePack.Data=' + os.path.join(testdir, "db")
+ r' --IcePack.Yellow.Query=Yellow/Query@YellowQueryAdapter' + \
+ r' --IcePack.Yellow.Admin=Yellow/Admin@YellowAdminAdapter' + \
+ r' --IcePack.Data=' + os.path.join(testdir, "db") + \
+ r' --Ice.ProgramName=icepack' + \
+ r' --IcePack.Trace.Activator=0 --IcePack.Trace.AdapterManager=0 --IcePack.Trace.ServerManager=0'
icePackPipe = os.popen(command)
TestUtil.getServerPid(icePackPipe)
+ TestUtil.getServerPid(icePackPipe)
+ TestUtil.getAdapterReady(icePackPipe)
+ TestUtil.getAdapterReady(icePackPipe)
TestUtil.getAdapterReady(icePackPipe)
TestUtil.getAdapterReady(icePackPipe)
print "ok"
@@ -46,9 +53,9 @@ def shutdownIcePack(toplevel, icePackPipe):
print "shutting down icepack...",
command = icePackAdmin + options + \
- r' "--Ice.Default.Locator=IcePack/locator:default -p ' + icePackPort + '" ' + \
- r' -e "shutdown" '
-
+ r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
+ r' -e "shutdown" '
+
icePackAdminPipe = os.popen(command)
icePackAdminStatus = icePackAdminPipe.close()
icePackPipe.close()
@@ -58,6 +65,39 @@ def shutdownIcePack(toplevel, icePackPipe):
TestUtil.killServers()
sys.exit(1)
+def addApplication(toplevel, descriptor, targets):
+
+ global icePackPort
+ icePackAdmin = os.path.join(toplevel, "bin", "icepackadmin")
+
+ options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
+
+ command = icePackAdmin + options + \
+ r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
+ r' -e "application add \"' + descriptor + '\\" ' + targets + ' \"'
+
+ icePackAdminPipe = os.popen(command)
+ icePackAdminStatus = icePackAdminPipe.close()
+ if icePackAdminStatus:
+ TestUtil.killServers()
+ sys.exit(1)
+
+def removeApplication(toplevel, descriptor):
+
+ global icePackPort
+ icePackAdmin = os.path.join(toplevel, "bin", "icepackadmin")
+
+ options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
+
+ command = icePackAdmin + options + \
+ r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
+ r' -e "application remove \"' + descriptor + '\\" \"'
+
+ icePackAdminPipe = os.popen(command)
+ icePackAdminStatus = icePackAdminPipe.close()
+ if icePackAdminStatus:
+ TestUtil.killServers()
+ sys.exit(1)
def addServer(toplevel, name, serverDescriptor, server, libpath, targets):
@@ -67,7 +107,7 @@ def addServer(toplevel, name, serverDescriptor, server, libpath, targets):
options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
command = icePackAdmin + options + \
- r' "--Ice.Default.Locator=IcePack/locator:default -p ' + icePackPort + '" ' + \
+ r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "server add \"' + name + '\\" \\"' + serverDescriptor + '\\" ' + \
r' \"' + server + '\\" \\"' + libpath + '\\" ' + targets + '\"'
@@ -85,7 +125,7 @@ def removeServer(toplevel, name):
options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
command = icePackAdmin + options + \
- r' "--Ice.Default.Locator=IcePack/locator:default -p ' + icePackPort + '" ' + \
+ r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "server remove \"' + name + '\\" \"'
icePackAdminPipe = os.popen(command)
@@ -101,7 +141,7 @@ def startServer(toplevel, name):
options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
command = icePackAdmin + options + \
- r' "--Ice.Default.Locator=IcePack/locator:default -p ' + icePackPort + '" ' + \
+ r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "server start \"' + name + '\\""'
icePackAdminPipe = os.popen(command)
@@ -117,7 +157,7 @@ def listAdapters(toplevel):
options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
command = icePackAdmin + options + \
- r' "--Ice.Default.Locator=IcePack/locator:default -p ' + icePackPort + '" ' + \
+ r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "adapter list"'
icePackAdminPipe = os.popen(command)
@@ -131,7 +171,7 @@ def removeAdapter(toplevel, name):
options = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
command = icePackAdmin + options + \
- r' "--Ice.Default.Locator=IcePack/locator:default -p ' + icePackPort + '" ' + \
+ r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "adapter remove \"' + name + '\\""'
icePackAdminPipe = os.popen(command)