diff options
author | Bernard Normier <bernard@zeroc.com> | 2004-05-04 16:18:38 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2004-05-04 16:18:38 +0000 |
commit | 5b44ffc8583cd452b4d0e192e00c4c02a5d360e9 (patch) | |
tree | 61bee6a4db082507575f8a1b3d48baba0c674f0b /cpp/config/TestUtil.py | |
parent | missives outside sync (diff) | |
download | ice-5b44ffc8583cd452b4d0e192e00c4c02a5d360e9.tar.bz2 ice-5b44ffc8583cd452b4d0e192e00c4c02a5d360e9.tar.xz ice-5b44ffc8583cd452b4d0e192e00c4c02a5d360e9.zip |
Switched to popen4
Diffstat (limited to 'cpp/config/TestUtil.py')
-rw-r--r-- | cpp/config/TestUtil.py | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py index 4d3bd807172..162407eb3a4 100644 --- a/cpp/config/TestUtil.py +++ b/cpp/config/TestUtil.py @@ -240,21 +240,23 @@ def clientServerTestWithOptionsAndNames(name, additionalServerOptions, additiona client = os.path.join(testdir, clientName) print "starting " + serverName + "...", - serverPipe = os.popen(server + serverOptions + additionalServerOptions) + (serverPipeIn, serverPipe) = os.popen4(server + serverOptions + additionalServerOptions) getServerPid(serverPipe) getAdapterReady(serverPipe) print "ok" print "starting " + clientName + "...", - 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) @@ -273,23 +275,25 @@ def mixedClientServerTestWithOptions(name, additionalServerOptions, additionalCl client = os.path.join(testdir, "client") print "starting server...", - serverPipe = os.popen(server + clientServerOptions + additionalServerOptions) + (serverPipeIn, serverPipe) = os.popen4(server + serverOptions + additionalServerOptions) getServerPid(serverPipe) getAdapterReady(serverPipe) print "ok" print "starting client...", - clientPipe = os.popen(client + clientServerOptions + additionalClientOptions) + (clientPipeIn, clientPipe) = os.popen4(client + clientOptions + additionalClientOptions) getServerPid(clientPipe) getAdapterReady(clientPipe) 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) @@ -303,14 +307,15 @@ def collocatedTestWithOptions(name, additionalOptions): collocated = os.path.join(testdir, "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) |