summaryrefslogtreecommitdiff
path: root/cpp/test/Glacier2/sessionControl/run.py
diff options
context:
space:
mode:
authorBrent Eagles <brent@zeroc.com>2007-11-07 14:59:34 -0330
committerBrent Eagles <brent@zeroc.com>2007-11-07 14:59:34 -0330
commit676286717393ad5a1dfecac80022ce85cd503711 (patch)
treefbf5f846218fcac6de115bea01fe1572d309d0c2 /cpp/test/Glacier2/sessionControl/run.py
parent- Fixing bug 2522 for Python. This involved adding the C++ class (diff)
downloadice-676286717393ad5a1dfecac80022ce85cd503711.tar.bz2
ice-676286717393ad5a1dfecac80022ce85cd503711.tar.xz
ice-676286717393ad5a1dfecac80022ce85cd503711.zip
- Moved cpp/slice to slice
- Merged all TestUtil.py modules to config/TestUtil.py - Moved all certs to config/certs - Updated test scripts to refer to new TestUtil.py module and use new interfaces - Updated build systems to refer to new slice location - Moved cpp/install to distribution - Moved and merged all IceGridAdmin.py modules to config. - Modified build system to deal with new build logic. That is there are 3 basic ways to find the slice translators and runtime: ICE_HOME, an RPM install and the source distribution. Automatically detecting Ice in a default install location is now problematic and no longer done.
Diffstat (limited to 'cpp/test/Glacier2/sessionControl/run.py')
-rwxr-xr-xcpp/test/Glacier2/sessionControl/run.py24
1 files changed, 14 insertions, 10 deletions
diff --git a/cpp/test/Glacier2/sessionControl/run.py b/cpp/test/Glacier2/sessionControl/run.py
index 8c62f569b44..982d6e725e0 100755
--- a/cpp/test/Glacier2/sessionControl/run.py
+++ b/cpp/test/Glacier2/sessionControl/run.py
@@ -8,7 +8,7 @@
#
# **********************************************************************
-import os, sys
+import os, sys, time
for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
toplevel = os.path.normpath(toplevel)
@@ -21,37 +21,41 @@ sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
name = os.path.join("Glacier2", "sessionControl")
-testdir = os.path.join(toplevel, "test", name)
+testdir = os.path.dirname(os.path.abspath(__file__))
server = os.path.join(testdir, "server")
print "starting server...",
-serverPipe = os.popen(server + TestUtil.clientServerOptions + " 2>&1")
+serverPipe = TestUtil.startServer(server, " 2>&1")
TestUtil.getServerPid(serverPipe)
TestUtil.getAdapterReady(serverPipe)
print "ok"
-router = os.path.join(toplevel, "bin", "glacier2router")
+router = os.path.join(TestUtil.getBinDir(__file__), "glacier2router")
-command = router + TestUtil.clientServerOptions + \
- r' --Glacier2.Client.Endpoints="default -p 12347 -t 10000"' + \
+args = r' --Glacier2.Client.Endpoints="default -p 12347 -t 10000"' + \
r' --Ice.Admin.Endpoints="tcp -h 127.0.0.1 -p 12348 -t 10000"' + \
r' --Ice.Admin.InstanceName=Glacier2' + \
r' --Glacier2.Server.Endpoints="default -p 12349 -t 10000"' + \
r' --Glacier2.SessionManager="SessionManager:tcp -h 127.0.0.1 -p 12010 -t 10000"' \
- r' --Glacier2.PermissionsVerifier="Glacier2/NullPermissionsVerifier"'
+ r' --Glacier2.PermissionsVerifier="Glacier2/NullPermissionsVerifier" 2>&1'
print "starting router...",
-starterPipe = os.popen(command + " 2>&1")
+starterPipe = TestUtil.startServer(router, args)
TestUtil.getServerPid(starterPipe)
TestUtil.getAdapterReady(starterPipe)
print "ok"
client = os.path.join(testdir, "client")
+#
+# The test may sporadically fail without this slight pause.
+#
+time.sleep(1)
+
print "starting client...",
-clientPipe = os.popen(client + TestUtil.clientServerOptions + " 2>&1")
-TestUtil.getServerPid(clientPipe)
+clientPipe = TestUtil.startClient(client, " 2>&1")
+#TestUtil.getServerPid(clientPipe)
print "ok"
TestUtil.printOutputFromPipe(clientPipe)