summaryrefslogtreecommitdiff
path: root/java/config/TestUtil.py
diff options
context:
space:
mode:
authorZeroC Staff <git@zeroc.com>2003-06-13 15:05:55 +0000
committerZeroC Staff <git@zeroc.com>2003-06-13 15:05:55 +0000
commit60d716efafccb3410560617e871f6ca2895ad0e7 (patch)
tree8981a2d5e6544702d0b757c52bc3e9b2d22bdbda /java/config/TestUtil.py
parentchanged the code to print output from pipes so that you get each line as it (diff)
downloadice-60d716efafccb3410560617e871f6ca2895ad0e7.tar.bz2
ice-60d716efafccb3410560617e871f6ca2895ad0e7.tar.xz
ice-60d716efafccb3410560617e871f6ca2895ad0e7.zip
changed the code to print output from pipes so that you get each line as it
comes
Diffstat (limited to 'java/config/TestUtil.py')
-rw-r--r--java/config/TestUtil.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/java/config/TestUtil.py b/java/config/TestUtil.py
index 6220ef44526..c3e79a79717 100644
--- a/java/config/TestUtil.py
+++ b/java/config/TestUtil.py
@@ -91,6 +91,13 @@ def getAdapterReady(serverPipe):
killServers()
sys.exit(1)
+def printOutputFromPipe(pipe):
+ while 1:
+ line = pipe.readline()
+ if not line:
+ break
+ os.write(1, line)
+
for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
toplevel = os.path.normpath(toplevel)
if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")):
@@ -137,8 +144,7 @@ def clientServerTestWithOptions(additionalServerOptions, additionalClientOptions
clientPipe = os.popen(client + clientOptions + additionalClientOptions)
print "ok"
- for output in clientPipe.xreadlines():
- print output,
+ printOutputFromPipe(clientPipe)
clientStatus = clientPipe.close()
serverStatus = serverPipe.close()
@@ -165,8 +171,7 @@ def clientServerTestWithClasspath(serverClasspath, clientClasspath):
clientPipe = os.popen(client + clientOptions)
print "ok"
- for output in clientPipe.xreadlines():
- print output,
+ printOutputFromPipe(clientPipe)
clientStatus = clientPipe.close()
serverStatus = serverPipe.close()
@@ -193,8 +198,7 @@ def mixedClientServerTestWithOptions(additionalServerOptions, additionalClientOp
clientPipe = os.popen(client + clientOptions + additionalClientOptions)
print "ok"
- for output in clientPipe.xreadlines():
- print output,
+ printOutputFromPipe(clientPipe)
clientStatus = clientPipe.close()
serverStatus = serverPipe.close()
@@ -215,8 +219,7 @@ def collocatedTestWithOptions(additionalOptions):
collocatedPipe = os.popen(collocated + collocatedOptions + additionalOptions)
print "ok"
- for output in collocatedPipe.xreadlines():
- print output,
+ printOutputFromPipe(collocatedPipe)
collocatedStatus = collocatedPipe.close()