diff options
Diffstat (limited to 'py/config/TestUtil.py')
-rw-r--r-- | py/config/TestUtil.py | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/py/config/TestUtil.py b/py/config/TestUtil.py index a1c5c0dd124..c8bcfaa4a5d 100644 --- a/py/config/TestUtil.py +++ b/py/config/TestUtil.py @@ -225,10 +225,13 @@ commonServerOptions = " --Ice.PrintProcessId --Ice.PrintAdapterReady --Ice.NullH " --Ice.ThreadPool.Server.Size=1 --Ice.ThreadPool.Server.SizeMax=3" + \ " --Ice.ThreadPool.Server.SizeWarn=0" +commonCollocatedOptions = " --Ice.ThreadPool.Server.Size=1 --Ice.ThreadPool.Server.SizeMax=3" + \ + " --Ice.ThreadPool.Server.SizeWarn=0" + clientOptions = clientProtocol + defaultHost + commonClientOptions serverOptions = serverProtocol + defaultHost + commonServerOptions clientServerOptions = clientServerProtocol + defaultHost + commonServerOptions -collocatedOptions = clientServerProtocol + defaultHost +collocatedOptions = clientServerProtocol + defaultHost + commonCollocatedOptions def clientServerTestWithOptionsAndNames(name, additionalServerOptions, additionalClientOptions, \ serverName, clientName): @@ -308,6 +311,32 @@ def mixedClientServerTest(name): mixedClientServerTestWithOptions(name, "", "") +def collocatedTestWithOptions(name, additionalOptions): + + testdir = os.path.join(toplevel, "test", name) + collocated = "Collocated.py" + + cwd = os.getcwd() + os.chdir(testdir) + + print "starting collocated...", + collocatedPipe = os.popen("python " + collocated + collocatedOptions + additionalOptions + " 2>&1") + print "ok" + + printOutputFromPipe(collocatedPipe) + + collocatedStatus = collocatedPipe.close() + + if collocatedStatus: + killServers() + sys.exit(1) + + os.chdir(cwd) + +def collocatedTest(name): + + collocatedTestWithOptions(name, "") + def cleanDbDir(path): files = os.listdir(path) |