diff options
author | Bernard Normier <bernard@zeroc.com> | 2004-04-26 22:25:19 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2004-04-26 22:25:19 +0000 |
commit | d09b3e1c9e8cabb793eba26d9c82fb7e82889b1a (patch) | |
tree | b1a7e4d30918a6ab4b8500a27758c04ea6a76cda /java/config/TestUtil.py | |
parent | Minor fixes (diff) | |
download | ice-d09b3e1c9e8cabb793eba26d9c82fb7e82889b1a.tar.bz2 ice-d09b3e1c9e8cabb793eba26d9c82fb7e82889b1a.tar.xz ice-d09b3e1c9e8cabb793eba26d9c82fb7e82889b1a.zip |
Freeze test fix + switch to popen4 to get stderr with Python on Windows
Diffstat (limited to 'java/config/TestUtil.py')
-rw-r--r-- | java/config/TestUtil.py | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/java/config/TestUtil.py b/java/config/TestUtil.py index 5a1fe045e7c..bc2083cd7a2 100644 --- a/java/config/TestUtil.py +++ b/java/config/TestUtil.py @@ -166,20 +166,22 @@ def clientServerTestWithOptions(additionalServerOptions, additionalClientOptions client = "java -ea Client --Ice.ProgramName=Client " print "starting server...", - serverPipe = os.popen(server + serverOptions + additionalServerOptions) + (serverPipeIn, serverPipe) = os.popen4(server + serverOptions + additionalServerOptions) getAdapterReady(serverPipe) print "ok" print "starting client...", - clientPipe = os.popen(client + clientOptions + additionalClientOptions) + (clientPipeIn, clientPipe) = os.popen4(client + clientOptions + additionalClientOptions) print "ok" printOutputFromPipe(clientPipe) + clientInStatus = clientPipeIn.close() clientStatus = clientPipe.close() + serverInStatus = serverPipeIn.close() serverStatus = serverPipe.close() - if clientStatus or serverStatus: + if clientInStatus or clientStatus or serverInStatus or serverStatus: killServers() sys.exit(1) @@ -194,25 +196,28 @@ def clientServerTestWithClasspath(serverClasspath, clientClasspath): print "starting server...", os.environ["CLASSPATH"] = scp - serverPipe = os.popen(server + serverOptions) + (serverPipeIn, serverPipe) = os.popen4(server + serverOptions) os.environ["CLASSPATH"] = classpath getAdapterReady(serverPipe) print "ok" print "starting client...", os.environ["CLASSPATH"] = ccp - clientPipe = os.popen(client + clientOptions) + (clientPipeIn, clientPipe) = os.popen4(client + clientOptions) os.environ["CLASSPATH"] = classpath print "ok" printOutputFromPipe(clientPipe) + clientInStatus = clientPipeIn.close() clientStatus = clientPipe.close() + serverInStatus = serverPipeIn.close() serverStatus = serverPipe.close() - if clientStatus or serverStatus: + if clientInStatus or clientStatus or serverInStatus or serverStatus: killServers() sys.exit(1) + def clientServerTest(): @@ -224,20 +229,22 @@ def mixedClientServerTestWithOptions(additionalServerOptions, additionalClientOp client = "java -ea Client --Ice.ProgramName=Client " print "starting server...", - serverPipe = os.popen(server + serverOptions + additionalServerOptions) + (serverPipeIn, serverPipe) = os.popen4(server + serverOptions + additionalServerOptions) getAdapterReady(serverPipe) print "ok" print "starting client...", - clientPipe = os.popen(client + clientOptions + additionalClientOptions) + (clientPipeIn, clientPipe) = os.popen4(client + clientOptions + additionalClientOptions) print "ok" printOutputFromPipe(clientPipe) + clientInStatus = clientPipeIn.close() clientStatus = clientPipe.close() + serverInStatus = serverPipeIn.close() serverStatus = serverPipe.close() - if clientStatus or serverStatus: + if clientInStatus or clientStatus or serverInStatus or serverStatus: killServers() sys.exit(1) @@ -250,14 +257,15 @@ def collocatedTestWithOptions(additionalOptions): collocated = "java -ea Collocated --Ice.ProgramName=Collocated " print "starting collocated...", - collocatedPipe = os.popen(collocated + collocatedOptions + additionalOptions) + (collocatedPipeIn, collocatedPipe) = os.popen4(collocated + collocatedOptions + additionalOptions) print "ok" printOutputFromPipe(collocatedPipe) + collocatedInStatus = collocatedPipeIn.close() collocatedStatus = collocatedPipe.close() - if collocatedStatus: + if collocatedInStatus or collocatedStatus: killServers() sys.exit(1) |