summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/config/IceGridAdmin.py50
-rw-r--r--cpp/config/TestUtil.py2
-rw-r--r--cpp/test/Glacier2/router/Client.cpp2
-rwxr-xr-xcpp/test/Glacier2/router/run.py1
4 files changed, 31 insertions, 24 deletions
diff --git a/cpp/config/IceGridAdmin.py b/cpp/config/IceGridAdmin.py
index 4853aade3ea..e4c168be3de 100644
--- a/cpp/config/IceGridAdmin.py
+++ b/cpp/config/IceGridAdmin.py
@@ -11,9 +11,6 @@
import sys, os, TestUtil
from threading import Thread
-debug = 0
-#debug = 1
-
for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
toplevel = os.path.normpath(toplevel)
if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")):
@@ -70,11 +67,11 @@ def startIceGridRegistry(testdir, dynamicRegistration = False):
if dynamicRegistration:
command += ' --IceGrid.Registry.DynamicRegistration'
- if debug:
- print command
+ if TestUtil.debug:
+ print "(" + command + ")",
- (stdin, iceGridPipe) = os.popen4(command)
+ iceGridPipe = os.popen(command + " 2>&1")
TestUtil.getServerPid(iceGridPipe)
TestUtil.getAdapterReady(iceGridPipe, True, 4)
print "ok"
@@ -100,11 +97,11 @@ def startIceGridNode(testdir):
r' --IceGrid.Node.Data=' + dataDir + \
r' --IceGrid.Node.Name=localnode' + \
r' --IceGrid.Node.PropertiesOverride=' + overrideOptions
- if debug:
- print command
+ if TestUtil.debug:
+ print "(" + command + ")",
- (stdin, iceGridPipe) = os.popen4(command)
+ iceGridPipe = os.popen(command + " 2>&1")
TestUtil.getServerPid(iceGridPipe)
TestUtil.getAdapterReady(iceGridPipe, False)
TestUtil.waitServiceReady(iceGridPipe, 'node')
@@ -124,11 +121,12 @@ def iceGridAdmin(cmd, ignoreFailure = False):
command = iceGridAdmin + TestUtil.clientOptions + \
r' --Ice.Default.Locator="IceGrid/Locator:default -p ' + iceGridPort + '" ' + \
r" --IceGridAdmin.Username=" + user + " --IceGridAdmin.Password=test1 " + \
- r' -e "' + cmd + '" 2>&1'
- if debug:
- print command
+ r' -e "' + cmd + '"'
+
+ if TestUtil.debug:
+ print "(" + command +")",
- iceGridAdminPipe = os.popen(command)
+ iceGridAdminPipe = os.popen(command + " 2>&1")
output = iceGridAdminPipe.readlines()
@@ -169,11 +167,12 @@ def iceGridTest(name, application, additionalOptions = "", applicationOptions =
print "starting client...",
- command = client + TestUtil.clientOptions + " " + clientOptions + " 2>&1"
- if debug:
- print command
+ command = client + TestUtil.clientOptions + " " + clientOptions
- clientPipe = os.popen(command)
+ if TestUtil.debug:
+ print "(" + command +")",
+
+ clientPipe = os.popen(command + " 2>&1")
print "ok"
TestUtil.printOutputFromPipe(clientPipe)
@@ -220,17 +219,24 @@ def iceGridClientServerTest(name, additionalClientOptions, additionalServerOptio
iceGridRegistryPipe = startIceGridRegistry(testdir, True)
print "starting sever...",
- serverPipe = os.popen(server + TestUtil.clientServerOptions + " " + serverOptions + " 2>&1")
+
+ command = server + TestUtil.clientServerOptions + " " + serverOptions
+
+ if TestUtil.debug:
+ print "(" + command +")",
+
+ serverPipe = os.popen(command + " 2>&1")
TestUtil.getServerPid(serverPipe)
TestUtil.getAdapterReady(serverPipe)
print "ok"
print "starting client...",
- command = client + TestUtil.clientOptions + " " + clientOptions + " 2>&1"
- if debug:
- print command
+ command = client + TestUtil.clientOptions + " " + clientOptions
+
+ if TestUtil.debug:
+ print "(" + command +")",
- clientPipe = os.popen(command)
+ clientPipe = os.popen(command + " 2>&1")
print "ok"
TestUtil.printOutputFromPipe(clientPipe)
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py
index 5cc36d8efd8..1c101f392cd 100644
--- a/cpp/config/TestUtil.py
+++ b/cpp/config/TestUtil.py
@@ -395,7 +395,7 @@ else:
commonClientOptions = " --Ice.NullHandleAbort --Ice.Warn.Connections"
commonServerOptions = " --Ice.PrintProcessId --Ice.PrintAdapterReady --Ice.NullHandleAbort" + \
- " --Ice.Warn.Connections --Ice.ServerIdleTime=30";
+ " --Ice.Warn.Connections --Ice.ServerIdleTime=30"
if threadPerConnection > 0:
commonClientOptions += " --Ice.ThreadPerConnection=" + str(threadPerConnection)
diff --git a/cpp/test/Glacier2/router/Client.cpp b/cpp/test/Glacier2/router/Client.cpp
index 14f41a8ef97..163bb8965e1 100644
--- a/cpp/test/Glacier2/router/Client.cpp
+++ b/cpp/test/Glacier2/router/Client.cpp
@@ -455,6 +455,7 @@ CallbackClient::run(int argc, char* argv[])
communicator()->setDefaultRouter(router);
cout << "ok" << endl;
}
+
{
cout << "getting the session timeout... " << flush;
Ice::Long timeout = router->getSessionTimeout();
@@ -462,7 +463,6 @@ CallbackClient::run(int argc, char* argv[])
cout << "ok" << endl;
}
-
ObjectPrx base;
{
diff --git a/cpp/test/Glacier2/router/run.py b/cpp/test/Glacier2/router/run.py
index 99f01dd0ca9..34f7039b947 100755
--- a/cpp/test/Glacier2/router/run.py
+++ b/cpp/test/Glacier2/router/run.py
@@ -45,6 +45,7 @@ TestUtil.getServerPid(starterPipe)
#
TestUtil.getAdapterReady(starterPipe, False)
print "ok"
+
starterThread = TestUtil.ReaderThread(starterPipe);
starterThread.start()