summaryrefslogtreecommitdiff
path: root/cs/config/TestUtil.py
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2004-07-13 01:46:34 +0000
committerMichi Henning <michi@zeroc.com>2004-07-13 01:46:34 +0000
commit7cdafbd1bb834067d571df52af2247da3a4b8bc9 (patch)
treeca2e93a79ed35c8b7b458b197ac99c2b5afbff32 /cs/config/TestUtil.py
parentChanged Icecs.dll -> icecs.dll. (diff)
downloadice-7cdafbd1bb834067d571df52af2247da3a4b8bc9.tar.bz2
ice-7cdafbd1bb834067d571df52af2247da3a4b8bc9.tar.xz
ice-7cdafbd1bb834067d571df52af2247da3a4b8bc9.zip
Added shell launch scripts for mono executables.
Diffstat (limited to 'cs/config/TestUtil.py')
-rw-r--r--cs/config/TestUtil.py48
1 files changed, 35 insertions, 13 deletions
diff --git a/cs/config/TestUtil.py b/cs/config/TestUtil.py
index 5e7fe0aaca1..bc4150f4fad 100644
--- a/cs/config/TestUtil.py
+++ b/cs/config/TestUtil.py
@@ -188,20 +188,30 @@ collocatedOptions = clientServerProtocol + defaultHost
def clientServerTestWithOptionsAndNames(name, additionalServerOptions, additionalClientOptions, \
serverName, clientName):
- testdir = os.path.join(toplevel, "test", name)
- server = os.path.join(testdir, serverName)
- client = os.path.join(testdir, clientName)
+ testDir = os.path.join(toplevel, "test", name)
+ server = os.path.basename(serverName)
+ serverDir = os.path.dirname(os.path.join(testDir, serverName))
+ client = os.path.basename(clientName)
+ clientDir = os.path.dirname(os.path.join(testDir, clientName))
+ cwd = os.getcwd()
+
print "starting " + serverName + "...",
- serverPipe = os.popen(server + serverOptions + " " + additionalServerOptions)
+ os.chdir(serverDir)
+ serverPipe = os.popen(os.path.join(".", server) + serverOptions + " " + additionalServerOptions)
getServerPid(serverPipe)
getAdapterReady(serverPipe)
print "ok"
+ os.chdir(cwd)
+
print "starting " + clientName + "...",
- clientPipe = os.popen(client + clientOptions + " " + additionalClientOptions)
+ os.chdir(clientDir);
+ clientPipe = os.popen(os.path.join(".", client) + clientOptions + " " + additionalClientOptions)
print "ok"
+ os.chdir(cwd)
+
printOutputFromPipe(clientPipe)
clientStatus = clientPipe.close()
@@ -221,22 +231,28 @@ def clientServerTest(name):
def mixedClientServerTestWithOptions(name, additionalServerOptions, additionalClientOptions):
- testdir = os.path.join(toplevel, "test", name)
- server = os.path.join(testdir, "server")
- client = os.path.join(testdir, "client")
+ testDir = os.path.join(toplevel, "test", name)
+
+ cwd = os.getcwd()
print "starting server...",
- serverPipe = os.popen(server + clientServerOptions + " " + additionalServerOptions)
+ os.chdir(testDir);
+ serverPipe = os.popen(os.path.join(".", "server") + clientServerOptions + " " + additionalServerOptions)
getServerPid(serverPipe)
getAdapterReady(serverPipe)
print "ok"
+ os.chdir(cwd)
+
print "starting client...",
- clientPipe = os.popen(client + clientServerOptions + " " + additionalClientOptions)
+ os.chdir(testDir);
+ clientPipe = os.popen(os.path.join(".", "client") + clientServerOptions + " " + additionalClientOptions)
getServerPid(clientPipe)
getAdapterReady(clientPipe)
print "ok"
+ os.chdir(cwd)
+
printOutputFromPipe(clientPipe)
clientStatus = clientPipe.close()
@@ -252,13 +268,19 @@ def mixedClientServerTest(name):
def collocatedTestWithOptions(name, additionalOptions):
- testdir = os.path.join(toplevel, "test", name)
- collocated = os.path.join(testdir, "collocated")
+ testDir = os.path.join(toplevel, "test", name)
+ collocatedDir = os.path.dirname(os.path.join(testDir, "collocated"))
+
+ cwd = os.getcwd()
+
+ os.chdir(collocatedDir)
print "starting collocated...",
- collocatedPipe = os.popen(collocated + collocatedOptions + " " + additionalOptions)
+ collocatedPipe = os.popen(os.path.join(".", "collocated") + collocatedOptions + " " + additionalOptions)
print "ok"
+ os.chdir(cwd)
+
printOutputFromPipe(collocatedPipe)
collocatedStatus = collocatedPipe.close()