diff options
author | ZeroC Staff <git@zeroc.com> | 2003-06-13 14:17:55 +0000 |
---|---|---|
committer | ZeroC Staff <git@zeroc.com> | 2003-06-13 14:17:55 +0000 |
commit | c6da0858a2627cdace6ea2964de4d9e9e49b29aa (patch) | |
tree | 673e0d215e19c7ebfb9a7295bf5dace808312c3a /cpp/config/TestUtil.py | |
parent | Added appendix.sgml target to Makefile. That target is for Appendix B of (diff) | |
download | ice-c6da0858a2627cdace6ea2964de4d9e9e49b29aa.tar.bz2 ice-c6da0858a2627cdace6ea2964de4d9e9e49b29aa.tar.xz ice-c6da0858a2627cdace6ea2964de4d9e9e49b29aa.zip |
changed the code to print output from pipes so that you get each line as it
comes, fixed some line endings
Diffstat (limited to 'cpp/config/TestUtil.py')
-rw-r--r-- | cpp/config/TestUtil.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py index 3e21a1d7702..d5fdc368de0 100644 --- a/cpp/config/TestUtil.py +++ b/cpp/config/TestUtil.py @@ -137,6 +137,13 @@ def waitServiceReady(pipe, token): if output == token + " ready": break +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")): @@ -203,8 +210,7 @@ def clientServerTestWithOptionsAndNames(name, additionalServerOptions, additiona clientPipe = os.popen(client + clientOptions + additionalClientOptions) print "ok" - for output in clientPipe.xreadlines(): - print output, + printOutputFromPipe(clientPipe) clientStatus = clientPipe.close() serverStatus = serverPipe.close() @@ -239,8 +245,7 @@ def mixedClientServerTestWithOptions(name, additionalServerOptions, additionalCl getAdapterReady(clientPipe) print "ok" - for output in clientPipe.xreadlines(): - print output, + printOutputFromPipe(clientPipe) clientStatus = clientPipe.close() serverStatus = serverPipe.close() @@ -262,8 +267,7 @@ def collocatedTestWithOptions(name, additionalOptions): collocatedPipe = os.popen(collocated + collocatedOptions + additionalOptions) print "ok" - for output in collocatedPipe.xreadlines(): - print output, + printOutputFromPipe(collocatedPipe) collocatedStatus = collocatedPipe.close() |