summaryrefslogtreecommitdiff
path: root/cs/config/TestUtil.py
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2004-07-06 03:44:47 +0000
committerMichi Henning <michi@zeroc.com>2004-07-06 03:44:47 +0000
commit5050f6f04878376e1ad19689804426e5298cc75e (patch)
tree1073954ab2062b2c9b069d6fdcfc1d915b3896c0 /cs/config/TestUtil.py
parentDid a make depend. (diff)
downloadice-5050f6f04878376e1ad19689804426e5298cc75e.tar.bz2
ice-5050f6f04878376e1ad19689804426e5298cc75e.tar.xz
ice-5050f6f04878376e1ad19689804426e5298cc75e.zip
Changed test scripts to use unbuffered I/O so when we run the scripts from
allTests.py, we get to see the output as it is produced, not line by line.
Diffstat (limited to 'cs/config/TestUtil.py')
-rw-r--r--cs/config/TestUtil.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/cs/config/TestUtil.py b/cs/config/TestUtil.py
index 0bfe36540cd..4e3247c11b4 100644
--- a/cs/config/TestUtil.py
+++ b/cs/config/TestUtil.py
@@ -125,12 +125,12 @@ def printOutputFromPipe(pipe):
while True:
- line = pipe.readline()
+ c = pipe.read(1)
- if not line:
+ if c == ""
break
- os.write(1, line)
+ os.write(1, c)
for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
toplevel = os.path.normpath(toplevel)
@@ -193,13 +193,13 @@ def clientServerTestWithOptionsAndNames(name, additionalServerOptions, additiona
client = os.path.join(testdir, clientName)
print "starting " + serverName + "...",
- serverPipe = os.popen(server + serverOptions + " " + additionalServerOptions)
+ serverPipe = os.popen(server + serverOptions + " " + additionalServerOptions, "r", 0)
getServerPid(serverPipe)
getAdapterReady(serverPipe)
print "ok"
print "starting " + clientName + "...",
- clientPipe = os.popen(client + clientOptions + " " + additionalClientOptions)
+ clientPipe = os.popen(client + clientOptions + " " + additionalClientOptions, "r", 0)
print "ok"
printOutputFromPipe(clientPipe)
@@ -226,13 +226,13 @@ def mixedClientServerTestWithOptions(name, additionalServerOptions, additionalCl
client = os.path.join(testdir, "client")
print "starting server...",
- serverPipe = os.popen(server + clientServerOptions + " " + additionalServerOptions)
+ serverPipe = os.popen(server + clientServerOptions + " " + additionalServerOptions, "r", 0)
getServerPid(serverPipe)
getAdapterReady(serverPipe)
print "ok"
print "starting client...",
- clientPipe = os.popen(client + clientServerOptions + " " + additionalClientOptions)
+ clientPipe = os.popen(client + clientServerOptions + " " + additionalClientOptions, "r", 0)
getServerPid(clientPipe)
getAdapterReady(clientPipe)
print "ok"
@@ -256,7 +256,7 @@ def collocatedTestWithOptions(name, additionalOptions):
collocated = os.path.join(testdir, "collocated")
print "starting collocated...",
- collocatedPipe = os.popen(collocated + collocatedOptions + " " + additionalOptions)
+ collocatedPipe = os.popen(collocated + collocatedOptions + " " + additionalOptions, "r", 0)
print "ok"
printOutputFromPipe(collocatedPipe)