summaryrefslogtreecommitdiff
path: root/cpp/test/Glacier2/sessionControl/run.py
diff options
context:
space:
mode:
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)