summaryrefslogtreecommitdiff
path: root/cpp/config/TestUtil.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2002-06-28 19:20:18 +0000
committerBenoit Foucher <benoit@zeroc.com>2002-06-28 19:20:18 +0000
commit75ac12c02d537f38b03567e406cbeccf29226fe0 (patch)
tree4add4682e2aa8edd9c58f1a23ad3f0ccc8336d02 /cpp/config/TestUtil.py
parentReplaced invalid struct name Struct with Structure. (diff)
downloadice-75ac12c02d537f38b03567e406cbeccf29226fe0.tar.bz2
ice-75ac12c02d537f38b03567e406cbeccf29226fe0.tar.xz
ice-75ac12c02d537f38b03567e406cbeccf29226fe0.zip
Merged location branch.
Diffstat (limited to 'cpp/config/TestUtil.py')
-rw-r--r--cpp/config/TestUtil.py29
1 files changed, 21 insertions, 8 deletions
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py
index 2ee25fc35e6..1631ae35fec 100644
--- a/cpp/config/TestUtil.py
+++ b/cpp/config/TestUtil.py
@@ -131,7 +131,7 @@ def getAdapterReady(serverPipe):
killServers()
sys.exit(1)
-def clientServerTest(toplevel, name):
+def clientServerTestWithOptions(toplevel, name, additionalServerOptions, additionalClientOptions):
testdir = os.path.join(toplevel, "test", name)
server = os.path.join(testdir, "server")
@@ -141,13 +141,13 @@ def clientServerTest(toplevel, name):
updatedClientOptions = clientOptions.replace("TOPLEVELDIR", toplevel)
print "starting server...",
- serverPipe = os.popen(server + updatedServerOptions)
+ serverPipe = os.popen(server + updatedServerOptions + additionalServerOptions)
getServerPid(serverPipe)
getAdapterReady(serverPipe)
print "ok"
print "starting client...",
- clientPipe = os.popen(client + updatedClientOptions)
+ clientPipe = os.popen(client + updatedClientOptions + additionalClientOptions)
print "ok"
for output in clientPipe.xreadlines():
@@ -160,7 +160,12 @@ def clientServerTest(toplevel, name):
killServers()
sys.exit(1)
-def mixedClientServerTest(toplevel, name):
+def clientServerTest(toplevel, name):
+
+ clientServerTestWithOptions(toplevel, name, "", "")
+
+
+def mixedClientServerTestWithOptions(toplevel, name, additionalServerOptions, additionalClientOptions):
testdir = os.path.join(toplevel, "test", name)
server = os.path.join(testdir, "server")
@@ -170,13 +175,13 @@ def mixedClientServerTest(toplevel, name):
updatedClientOptions = updatedServerOptions
print "starting server...",
- serverPipe = os.popen(server + updatedServerOptions)
+ serverPipe = os.popen(server + updatedServerOptions + additionalServerOptions)
getServerPid(serverPipe)
getAdapterReady(serverPipe)
print "ok"
print "starting client...",
- clientPipe = os.popen(client + updatedClientOptions)
+ clientPipe = os.popen(client + updatedClientOptions + additionalClientOptions)
getServerPid(clientPipe)
getAdapterReady(clientPipe)
print "ok"
@@ -191,7 +196,11 @@ def mixedClientServerTest(toplevel, name):
killServers()
sys.exit(1)
-def collocatedTest(toplevel, name):
+def mixedClientServerTest(toplevel, name):
+
+ mixedClientServerTestWithOptions(toplevel, name, "", "")
+
+def collocatedTestWithOptions(toplevel, name, additionalOptions):
testdir = os.path.join(toplevel, "test", name)
collocated = os.path.join(testdir, "collocated")
@@ -199,7 +208,7 @@ def collocatedTest(toplevel, name):
updatedCollocatedOptions = collocatedOptions.replace("TOPLEVELDIR", toplevel)
print "starting collocated...",
- collocatedPipe = os.popen(collocated + updatedCollocatedOptions)
+ collocatedPipe = os.popen(collocated + updatedCollocatedOptions + additionalOptions)
print "ok"
for output in collocatedPipe.xreadlines():
@@ -211,6 +220,10 @@ def collocatedTest(toplevel, name):
killServers()
sys.exit(1)
+def collocatedTest(toplevel, name):
+
+ collocatedTestWithOptions(toplevel, name, "")
+
def cleanDbDir(path):
files = os.listdir(path)