diff options
author | Michi Henning <michi@zeroc.com> | 2004-07-06 03:44:47 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2004-07-06 03:44:47 +0000 |
commit | 5050f6f04878376e1ad19689804426e5298cc75e (patch) | |
tree | 1073954ab2062b2c9b069d6fdcfc1d915b3896c0 /java/config/TestUtil.py | |
parent | Did a make depend. (diff) | |
download | ice-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 'java/config/TestUtil.py')
-rw-r--r-- | java/config/TestUtil.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/java/config/TestUtil.py b/java/config/TestUtil.py index 9d9f686310e..893e3fe2fda 100644 --- a/java/config/TestUtil.py +++ b/java/config/TestUtil.py @@ -120,12 +120,12 @@ def printOutputFromPipe(pipe): while 1: - 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) @@ -169,12 +169,12 @@ def clientServerTestWithOptions(additionalServerOptions, additionalClientOptions client = "java -ea Client --Ice.ProgramName=Client " print "starting server...", - serverPipe = os.popen(server + serverOptions + additionalServerOptions + " 2>&1") + serverPipe = os.popen(server + serverOptions + additionalServerOptions + " 2>&1", "r", 0) getAdapterReady(serverPipe) print "ok" print "starting client...", - clientPipe = os.popen(client + clientOptions + additionalClientOptions + " 2>&1") + clientPipe = os.popen(client + clientOptions + additionalClientOptions + " 2>&1", "r", 0) print "ok" #printOutputFromPipe(serverPipe) @@ -198,14 +198,14 @@ def clientServerTestWithClasspath(serverClasspath, clientClasspath): print "starting server...", os.environ["CLASSPATH"] = scp - serverPipe = os.popen(server + serverOptions + " 2>&1") + serverPipe = os.popen(server + serverOptions + " 2>&1", "r", 0) os.environ["CLASSPATH"] = classpath getAdapterReady(serverPipe) print "ok" print "starting client...", os.environ["CLASSPATH"] = ccp - clientPipe = os.popen(client + clientOptions + " 2>&1") + clientPipe = os.popen(client + clientOptions + " 2>&1", "r", 0) os.environ["CLASSPATH"] = classpath print "ok" @@ -229,12 +229,12 @@ def mixedClientServerTestWithOptions(additionalServerOptions, additionalClientOp client = "java -ea Client --Ice.ProgramName=Client " print "starting server...", - serverPipe = os.popen(server + serverOptions + additionalServerOptions + " 2>&1") + serverPipe = os.popen(server + serverOptions + additionalServerOptions + " 2>&1", "r", 0) getAdapterReady(serverPipe) print "ok" print "starting client...", - clientPipe = os.popen(client + clientOptions + additionalClientOptions + " 2>&1") + clientPipe = os.popen(client + clientOptions + additionalClientOptions + " 2>&1", "r", 0) print "ok" printOutputFromPipe(clientPipe) @@ -255,7 +255,7 @@ def collocatedTestWithOptions(additionalOptions): collocated = "java -ea Collocated --Ice.ProgramName=Collocated " print "starting collocated...", - collocatedPipe = os.popen(collocated + collocatedOptions + additionalOptions + " 2>&1") + collocatedPipe = os.popen(collocated + collocatedOptions + additionalOptions + " 2>&1", "r", 0) print "ok" printOutputFromPipe(collocatedPipe) |