summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2004-07-06 03:44:47 +0000
committerMichi Henning <michi@zeroc.com>2004-07-06 03:44:47 +0000
commit5050f6f04878376e1ad19689804426e5298cc75e (patch)
tree1073954ab2062b2c9b069d6fdcfc1d915b3896c0 /cpp
parentDid a make depend. (diff)
downloadice-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 'cpp')
-rw-r--r--cpp/config/IcePackAdmin.py20
-rw-r--r--cpp/config/TestUtil.py16
-rwxr-xr-xcpp/test/Freeze/complex/run.py4
-rwxr-xr-xcpp/test/Freeze/dbmap/run.py2
-rwxr-xr-xcpp/test/FreezeScript/dbmap/run.py4
-rwxr-xr-xcpp/test/FreezeScript/evictor/run.py2
-rwxr-xr-xcpp/test/Glacier/starter/run.py2
-rwxr-xr-xcpp/test/Ice/faultTolerance/run.py4
-rwxr-xr-xcpp/test/Ice/gc/run.py2
-rwxr-xr-xcpp/test/IcePack/deployer/run.py2
-rwxr-xr-xcpp/test/IcePack/simple/run.py2
-rwxr-xr-xcpp/test/IceSSL/certificateAndKeyParsing/run.py2
-rwxr-xr-xcpp/test/IceSSL/certificateVerifier/run.py2
-rwxr-xr-xcpp/test/IceSSL/configuration/run.py2
-rwxr-xr-xcpp/test/IceSSL/loadPEM/run.py2
-rwxr-xr-xcpp/test/IceStorm/federation/run.py16
-rwxr-xr-xcpp/test/IceStorm/federation2/run.py14
-rwxr-xr-xcpp/test/IceStorm/single/run.py12
-rwxr-xr-xcpp/test/IceUtil/inputUtil/run.py2
-rwxr-xr-xcpp/test/IceUtil/thread/run.py2
-rwxr-xr-xcpp/test/IceUtil/unicode/run.py2
-rwxr-xr-xcpp/test/IceUtil/uuid/run.py2
-rwxr-xr-xcpp/test/Slice/errorDetection/run.py2
23 files changed, 60 insertions, 60 deletions
diff --git a/cpp/config/IcePackAdmin.py b/cpp/config/IcePackAdmin.py
index b78eb5735a6..592136a9bcd 100644
--- a/cpp/config/IcePackAdmin.py
+++ b/cpp/config/IcePackAdmin.py
@@ -68,7 +68,7 @@ def startIcePackRegistry(port, testdir):
r' --IcePack.Registry.Trace.NodeRegistry=0' + \
r' --Ice.ProgramName=icepackregistry'
- (stdin, icePackPipe) = os.popen4(command)
+ (stdin, icePackPipe) = os.popen4(command, "r", 0)
TestUtil.getServerPid(icePackPipe)
TestUtil.getAdapterReady(icePackPipe)
TestUtil.getAdapterReady(icePackPipe)
@@ -104,7 +104,7 @@ def startIcePackNode(testdir):
r' --IcePack.Node.Trace.Server=0' + \
r' --IcePack.Node.PrintServersReady=node'
- (stdin, icePackPipe) = os.popen4(command)
+ (stdin, icePackPipe) = os.popen4(command, "r", 0)
TestUtil.getServerPid(icePackPipe)
TestUtil.getAdapterReady(icePackPipe)
TestUtil.waitServiceReady(icePackPipe, 'node')
@@ -125,7 +125,7 @@ def shutdownIcePackRegistry():
r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "shutdown" ' + " 2>&1"
- icePackAdminPipe = os.popen(command)
+ icePackAdminPipe = os.popen(command, "r", 0)
TestUtil.printOutputFromPipe(icePackAdminPipe)
icePackAdminStatus = icePackAdminPipe.close()
if icePackAdminStatus:
@@ -143,7 +143,7 @@ def shutdownIcePackNode():
r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "node shutdown localnode" ' + " 2>&1"
- icePackAdminPipe = os.popen(command)
+ icePackAdminPipe = os.popen(command, "r", 0)
TestUtil.printOutputFromPipe(icePackAdminPipe)
icePackAdminStatus = icePackAdminPipe.close()
if icePackAdminStatus:
@@ -161,7 +161,7 @@ def addApplication(descriptor, options):
r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "application add \"' + descriptor + '\\" ' + options + ' \"' + " 2>&1"
- icePackAdminPipe = os.popen(command)
+ icePackAdminPipe = os.popen(command, "r", 0)
TestUtil.printOutputFromPipe(icePackAdminPipe)
icePackAdminStatus = icePackAdminPipe.close()
if icePackAdminStatus:
@@ -177,7 +177,7 @@ def removeApplication(name):
r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "application remove \"' + name + '\\" \"' + " 2>&1"
- icePackAdminPipe = os.popen(command)
+ icePackAdminPipe = os.popen(command, "r", 0)
TestUtil.printOutputFromPipe(icePackAdminPipe)
icePackAdminStatus = icePackAdminPipe.close()
if icePackAdminStatus:
@@ -195,7 +195,7 @@ def addServer(serverDescriptor, options):
r' -e "server add ' + serverDescriptor + ' localnode ' + \
r' ' + options + '\"' + " 2>&1"
- icePackAdminPipe = os.popen(command)
+ icePackAdminPipe = os.popen(command, "r", 0)
TestUtil.printOutputFromPipe(icePackAdminPipe)
icePackAdminStatus = icePackAdminPipe.close()
if icePackAdminStatus:
@@ -212,7 +212,7 @@ def removeServer(name):
r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "server remove \"' + name + '\\" \"' + " 2>&1"
- icePackAdminPipe = os.popen(command)
+ icePackAdminPipe = os.popen(command, "r", 0)
icePackAdminStatus = icePackAdminPipe.close()
if icePackAdminStatus:
TestUtil.killServers()
@@ -227,7 +227,7 @@ def startServer(name):
r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "server start \"' + name + '\\""' + " 2>&1"
- icePackAdminPipe = os.popen(command)
+ icePackAdminPipe = os.popen(command, "r", 0)
icePackAdminStatus = icePackAdminPipe.close()
if icePackAdminStatus:
TestUtil.killServers()
@@ -242,7 +242,7 @@ def listAdapters():
r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \
r' -e "adapter list"' + " 2>&1"
- icePackAdminPipe = os.popen(command)
+ icePackAdminPipe = os.popen(command, "r", 0)
return icePackAdminPipe
def cleanDbDir(path):
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py
index 99e16091eca..b50151e1cac 100644
--- a/cpp/config/TestUtil.py
+++ b/cpp/config/TestUtil.py
@@ -174,12 +174,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)
@@ -251,13 +251,13 @@ def clientServerTestWithOptionsAndNames(name, additionalServerOptions, additiona
client = os.path.join(testdir, clientName)
print "starting " + serverName + "...",
- serverPipe = os.popen(server + serverOptions + additionalServerOptions + " 2>&1")
+ serverPipe = os.popen(server + serverOptions + additionalServerOptions + " 2>&1", "r", 0)
getServerPid(serverPipe)
getAdapterReady(serverPipe)
print "ok"
print "starting " + clientName + "...",
- clientPipe = os.popen(client + clientOptions + additionalClientOptions + " 2>&1")
+ clientPipe = os.popen(client + clientOptions + additionalClientOptions + " 2>&1", "r", 0)
print "ok"
printOutputFromPipe(clientPipe)
@@ -284,13 +284,13 @@ def mixedClientServerTestWithOptions(name, additionalServerOptions, additionalCl
client = os.path.join(testdir, "client")
print "starting server...",
- serverPipe = os.popen(server + clientServerOptions + additionalServerOptions + " 2>&1")
+ serverPipe = os.popen(server + clientServerOptions + additionalServerOptions + " 2>&1", "r", 0)
getServerPid(serverPipe)
getAdapterReady(serverPipe)
print "ok"
print "starting client...",
- clientPipe = os.popen(client + clientServerOptions + additionalClientOptions + " 2>&1")
+ clientPipe = os.popen(client + clientServerOptions + additionalClientOptions + " 2>&1", "r", 0)
getServerPid(clientPipe)
getAdapterReady(clientPipe)
print "ok"
@@ -314,7 +314,7 @@ def collocatedTestWithOptions(name, additionalOptions):
collocated = os.path.join(testdir, "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)
diff --git a/cpp/test/Freeze/complex/run.py b/cpp/test/Freeze/complex/run.py
index 0c37e77359a..29d8431041a 100755
--- a/cpp/test/Freeze/complex/run.py
+++ b/cpp/test/Freeze/complex/run.py
@@ -32,7 +32,7 @@ TestUtil.cleanDbDir(dbdir)
client = os.path.join(testdir, "client")
print "starting populate...",
-populatePipe = os.popen(client + TestUtil.clientOptions + " --dbdir " + testdir + " populate" + " 2>&1")
+populatePipe = os.popen(client + TestUtil.clientOptions + " --dbdir " + testdir + " populate" + " 2>&1", "r", 0)
print "ok"
TestUtil.printOutputFromPipe(populatePipe)
@@ -43,7 +43,7 @@ if populateStatus:
sys.exit(1)
print "starting verification client...",
-clientPipe = os.popen(client + TestUtil.clientOptions + " --dbdir " + testdir + " validate" + " 2>&1")
+clientPipe = os.popen(client + TestUtil.clientOptions + " --dbdir " + testdir + " validate" + " 2>&1", "r", 0)
print "ok"
TestUtil.printOutputFromPipe(clientPipe)
diff --git a/cpp/test/Freeze/dbmap/run.py b/cpp/test/Freeze/dbmap/run.py
index 9cc9cd8ed39..d9b2bedff27 100755
--- a/cpp/test/Freeze/dbmap/run.py
+++ b/cpp/test/Freeze/dbmap/run.py
@@ -29,7 +29,7 @@ TestUtil.cleanDbDir(dbdir)
client = os.path.join(testdir, "client")
print "starting client...",
-clientPipe = os.popen(client + TestUtil.clientOptions + " " + testdir + " 2>&1")
+clientPipe = os.popen(client + TestUtil.clientOptions + " " + testdir + " 2>&1", "r", 0)
print "ok"
TestUtil.printOutputFromPipe(clientPipe)
diff --git a/cpp/test/FreezeScript/dbmap/run.py b/cpp/test/FreezeScript/dbmap/run.py
index 6ed553d5279..7dc447481ab 100755
--- a/cpp/test/FreezeScript/dbmap/run.py
+++ b/cpp/test/FreezeScript/dbmap/run.py
@@ -64,7 +64,7 @@ for oldfile in files:
command = transformdb + " --old " + os.path.join(directory, "fail", oldfile) + " --new " + os.path.join(directory, "fail", newfile) + " -o tmp.xml --key string --value " + value
- stdin, stdout, stderr = os.popen3(command)
+ stdin, stdout, stderr = os.popen3(command, "r", 0)
lines1 = stderr.readlines()
lines2 = open(os.path.join(directory, "fail", oldfile.replace("_old.ice", ".err")), "r").readlines()
if len(lines1) != len(lines2):
@@ -111,7 +111,7 @@ print "executing default transformations... ",
sys.stdout.flush()
command = transformdb + " --old " + testold + " --new " + testnew + " --key int --value ::S " + init_dbdir + " default.db " + check_dbdir
-stdin, stdout, stderr = os.popen3(command)
+stdin, stdout, stderr = os.popen3(command, "r", 0)
stderr.readlines()
print "ok"
diff --git a/cpp/test/FreezeScript/evictor/run.py b/cpp/test/FreezeScript/evictor/run.py
index 8812a486cd8..ddbd992e96c 100755
--- a/cpp/test/FreezeScript/evictor/run.py
+++ b/cpp/test/FreezeScript/evictor/run.py
@@ -54,7 +54,7 @@ print "executing evictor transformations... ",
sys.stdout.flush()
command = transformdb + " -e -p --old " + testold + " --new " + testnew + " -f " + transformxml + " " + dbdir + " evictor.db " + check_dbdir
-stdin, stdout, stderr = os.popen3(command)
+stdin, stdout, stderr = os.popen3(command, "r", 0)
stderr.readlines()
print "ok"
diff --git a/cpp/test/Glacier/starter/run.py b/cpp/test/Glacier/starter/run.py
index f1e8de06996..77d27a05553 100755
--- a/cpp/test/Glacier/starter/run.py
+++ b/cpp/test/Glacier/starter/run.py
@@ -33,7 +33,7 @@ command = starter + TestUtil.clientServerOptions + \
r' --Glacier.Router.Server.Endpoints="tcp"'
print "starting glacier starter...",
-starterPipe = os.popen(command)
+starterPipe = os.popen(command, "r", 0)
TestUtil.getServerPid(starterPipe)
TestUtil.getAdapterReady(starterPipe)
print "ok"
diff --git a/cpp/test/Ice/faultTolerance/run.py b/cpp/test/Ice/faultTolerance/run.py
index d3882612077..2bb7dbd93c8 100755
--- a/cpp/test/Ice/faultTolerance/run.py
+++ b/cpp/test/Ice/faultTolerance/run.py
@@ -32,7 +32,7 @@ base = 12340
serverPipes = { }
for i in range(0, num):
print "starting server #%d..." % (i + 1),
- serverPipes[i] = os.popen(server + TestUtil.serverOptions + " %d" % (base + i) + " 2>&1")
+ serverPipes[i] = os.popen(server + TestUtil.serverOptions + " %d" % (base + i) + " 2>&1", "r", 0)
TestUtil.getServerPid(serverPipes[i])
TestUtil.getAdapterReady(serverPipes[i])
print "ok"
@@ -41,7 +41,7 @@ ports = ""
for i in range(0, num):
ports = "%s %d" % (ports, base + i)
print "starting client...",
-clientPipe = os.popen(client + TestUtil.clientOptions + " " + ports + " 2>&1")
+clientPipe = os.popen(client + TestUtil.clientOptions + " " + ports + " 2>&1", "r", 0)
print "ok"
TestUtil.printOutputFromPipe(clientPipe)
diff --git a/cpp/test/Ice/gc/run.py b/cpp/test/Ice/gc/run.py
index b9d43f19736..da7677652a8 100755
--- a/cpp/test/Ice/gc/run.py
+++ b/cpp/test/Ice/gc/run.py
@@ -26,7 +26,7 @@ testdir = os.path.join(toplevel, "test", name)
client = os.path.join(testdir, "client")
print "starting client...",
-clientPipe = os.popen(client + " 2>&1")
+clientPipe = os.popen(client + " 2>&1", "r", 0)
print "ok"
TestUtil.printOutputFromPipe(clientPipe)
diff --git a/cpp/test/IcePack/deployer/run.py b/cpp/test/IcePack/deployer/run.py
index c8bed4755d1..4c6cdb8f65a 100755
--- a/cpp/test/IcePack/deployer/run.py
+++ b/cpp/test/IcePack/deployer/run.py
@@ -44,7 +44,7 @@ def startClient(options):
options
print "starting client...",
- clientPipe = os.popen(os.path.join(testdir, "client") + fullClientOptions + " 2>&1")
+ clientPipe = os.popen(os.path.join(testdir, "client") + fullClientOptions + " 2>&1", "r", 0)
print "ok"
TestUtil.printOutputFromPipe(clientPipe)
diff --git a/cpp/test/IcePack/simple/run.py b/cpp/test/IcePack/simple/run.py
index c46ca420cab..c76045c990b 100755
--- a/cpp/test/IcePack/simple/run.py
+++ b/cpp/test/IcePack/simple/run.py
@@ -68,7 +68,7 @@ IcePackAdmin.addServer(os.path.join(testdir, "simple_server.xml"), "test.dir=" +
print "ok"
print "starting client...",
-clientPipe = os.popen(client + TestUtil.clientOptions + additionalOptions + " --with-deploy" + " 2>&1")
+clientPipe = os.popen(client + TestUtil.clientOptions + additionalOptions + " --with-deploy" + " 2>&1", "r", 0)
print "ok"
TestUtil.printOutputFromPipe(clientPipe)
diff --git a/cpp/test/IceSSL/certificateAndKeyParsing/run.py b/cpp/test/IceSSL/certificateAndKeyParsing/run.py
index 6ba36e6e744..bcc36ad5452 100755
--- a/cpp/test/IceSSL/certificateAndKeyParsing/run.py
+++ b/cpp/test/IceSSL/certificateAndKeyParsing/run.py
@@ -37,7 +37,7 @@ client = os.path.join(testdir, "certificateAndKeyParsing")
localClientOptions = TestUtil.clientServerProtocol + TestUtil.defaultHost
print "starting certificateAndKeyParsing...",
-clientPipe = os.popen(client + localClientOptions + testOptions + " 2>&1")
+clientPipe = os.popen(client + localClientOptions + testOptions + " 2>&1", "r", 0)
print "ok"
TestUtil.printOutputFromPipe(clientPipe)
diff --git a/cpp/test/IceSSL/certificateVerifier/run.py b/cpp/test/IceSSL/certificateVerifier/run.py
index 2cfb1fdda42..d655539f6c5 100755
--- a/cpp/test/IceSSL/certificateVerifier/run.py
+++ b/cpp/test/IceSSL/certificateVerifier/run.py
@@ -31,7 +31,7 @@ client = os.path.join(testdir, "certificateVerifier")
localClientOptions = TestUtil.clientServerProtocol + TestUtil.defaultHost
print "starting certificateVerifier...",
-clientPipe = os.popen(client + localClientOptions + " 2>&1")
+clientPipe = os.popen(client + localClientOptions + " 2>&1", "r", 0)
print "ok"
TestUtil.printOutputFromPipe(clientPipe)
diff --git a/cpp/test/IceSSL/configuration/run.py b/cpp/test/IceSSL/configuration/run.py
index 90bd44d0186..4c42713c784 100755
--- a/cpp/test/IceSSL/configuration/run.py
+++ b/cpp/test/IceSSL/configuration/run.py
@@ -31,7 +31,7 @@ client = os.path.join(testdir, "configuration")
localClientOptions = TestUtil.clientServerProtocol + TestUtil.defaultHost
print "starting configuration...",
-clientPipe = os.popen(client + localClientOptions + " 2>&1")
+clientPipe = os.popen(client + localClientOptions + " 2>&1", "r", 0)
print "ok"
TestUtil.printOutputFromPipe(clientPipe)
diff --git a/cpp/test/IceSSL/loadPEM/run.py b/cpp/test/IceSSL/loadPEM/run.py
index 89f0d37f0ba..1548af46d23 100755
--- a/cpp/test/IceSSL/loadPEM/run.py
+++ b/cpp/test/IceSSL/loadPEM/run.py
@@ -36,7 +36,7 @@ client = os.path.join(testdir, "loadPEM")
localClientOptions = TestUtil.clientServerProtocol + TestUtil.defaultHost
print "starting loadPEM...",
-clientPipe = os.popen(client + localClientOptions + testOptions + " 2>&1")
+clientPipe = os.popen(client + localClientOptions + testOptions + " 2>&1", "r", 0)
print "ok"
TestUtil.printOutputFromPipe(clientPipe)
diff --git a/cpp/test/IceStorm/federation/run.py b/cpp/test/IceStorm/federation/run.py
index 78be1985e54..7fd5068111d 100755
--- a/cpp/test/IceStorm/federation/run.py
+++ b/cpp/test/IceStorm/federation/run.py
@@ -62,7 +62,7 @@ def doTest(batch):
print "starting " + name + "...",
command = subscriber + batchOptions + TestUtil.clientServerOptions + iceStormReference + r' ' + subscriberLockFile + " 2>&1"
- subscriberPipe = os.popen(command)
+ subscriberPipe = os.popen(command, "r", 0)
TestUtil.getServerPid(subscriberPipe)
TestUtil.getAdapterReady(subscriberPipe)
print "ok"
@@ -84,7 +84,7 @@ def doTest(batch):
#
print "starting publisher...",
command = publisher + TestUtil.clientOptions + iceStormReference + " 2>&1"
- publisherPipe = os.popen(command)
+ publisherPipe = os.popen(command, "r", 0)
print "ok"
TestUtil.printOutputFromPipe(publisherPipe)
@@ -114,14 +114,14 @@ iceStormDBEnv=" --Freeze.DbEnv.IceStorm.DbHome=" + dbHome
print "starting icestorm service...",
command = iceBox + TestUtil.clientServerOptions + iceBoxEndpoints + iceStormService + iceStormDBEnv + " 2>&1"
-iceBoxPipe = os.popen(command)
+iceBoxPipe = os.popen(command, "r", 0)
TestUtil.getServerPid(iceBoxPipe)
TestUtil.waitServiceReady(iceBoxPipe, "IceStorm")
print "ok"
print "creating topics...",
command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "create fed1 fed2 fed3"' + " 2>&1"
-iceStormAdminPipe = os.popen(command)
+iceStormAdminPipe = os.popen(command, "r", 0)
iceStormAdminStatus = iceStormAdminPipe.close()
if iceStormAdminStatus:
TestUtil.killServers()
@@ -130,13 +130,13 @@ print "ok"
print "linking topics...",
command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "link fed1 fed2 10"' + " 2>&1"
-iceStormAdminPipe = os.popen(command)
+iceStormAdminPipe = os.popen(command, "r", 0)
iceStormAdminStatus = iceStormAdminPipe.close()
if iceStormAdminStatus:
TestUtil.killServers()
sys.exit(1)
command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "link fed2 fed3 5"' + " 2>&1"
-iceStormAdminPipe = os.popen(command)
+iceStormAdminPipe = os.popen(command, "r", 0)
iceStormAdminStatus = iceStormAdminPipe.close()
if iceStormAdminStatus:
TestUtil.killServers()
@@ -158,7 +158,7 @@ batchStatus = doTest(1)
#
print "destroying topics...",
command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "destroy fed1 fed2 fed3"' + " 2>&1"
-iceStormAdminPipe = os.popen(command)
+iceStormAdminPipe = os.popen(command, "r", 0)
iceStormAdminStatus = iceStormAdminPipe.close()
if iceStormAdminStatus:
TestUtil.killServers()
@@ -170,7 +170,7 @@ print "ok"
#
print "shutting down icestorm service...",
command = iceBoxAdmin + TestUtil.clientOptions + iceBoxEndpoints + r' shutdown' + " 2>&1"
-iceBoxAdminPipe = os.popen(command)
+iceBoxAdminPipe = os.popen(command, "r", 0)
iceBoxAdminStatus = iceBoxAdminPipe.close()
if iceBoxAdminStatus:
TestUtil.killServers()
diff --git a/cpp/test/IceStorm/federation2/run.py b/cpp/test/IceStorm/federation2/run.py
index 3b23c919088..0f239ca7f28 100755
--- a/cpp/test/IceStorm/federation2/run.py
+++ b/cpp/test/IceStorm/federation2/run.py
@@ -64,7 +64,7 @@ def doTest(batch):
print "starting " + name + "...",
command = subscriber + batchOptions + TestUtil.clientServerOptions + iceStormReference + r' ' + subscriberLockFile + " 2>&1"
- subscriberPipe = os.popen(command)
+ subscriberPipe = os.popen(command, "r", 0)
TestUtil.getServerPid(subscriberPipe)
TestUtil.getAdapterReady(subscriberPipe)
print "ok"
@@ -86,7 +86,7 @@ def doTest(batch):
#
print "starting publisher...",
command = publisher + TestUtil.clientOptions + iceStormReference + " 2>&1"
- publisherPipe = os.popen(command)
+ publisherPipe = os.popen(command, "r", 0)
print "ok"
TestUtil.printOutputFromPipe(publisherPipe)
@@ -116,14 +116,14 @@ iceStormDBEnv=" --Freeze.DbEnv.IceStorm.DbHome=" + dbHome
print "starting icestorm service...",
command = iceBox + TestUtil.clientServerOptions + iceBoxEndpoints + iceStormService + iceStormDBEnv + " 2>&1"
-iceBoxPipe = os.popen(command)
+iceBoxPipe = os.popen(command, "r", 0)
TestUtil.getServerPid(iceBoxPipe)
TestUtil.waitServiceReady(iceBoxPipe, "IceStorm")
print "ok"
print "creating topics...",
command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "create fed1 fed2 fed3"' + " 2>&1"
-iceStormAdminPipe = os.popen(command)
+iceStormAdminPipe = os.popen(command, "r", 0)
iceStormAdminStatus = iceStormAdminPipe.close()
if iceStormAdminStatus:
TestUtil.killServers()
@@ -133,7 +133,7 @@ print "ok"
print "linking topics...",
graph = os.path.join(testdir, "fed.xml");
command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "graph ' + graph + r' 10"' + " 2>&1"
-iceStormAdminPipe = os.popen(command)
+iceStormAdminPipe = os.popen(command, "r", 0)
#
# The graph command generates output. We must read it otherwise
# closing the pipe might return a non-zero status.
@@ -161,7 +161,7 @@ batchStatus = doTest(1)
#
print "destroying topics...",
command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "destroy fed1 fed2 fed3"' + " 2>&1"
-iceStormAdminPipe = os.popen(command)
+iceStormAdminPipe = os.popen(command, "r", 0)
iceStormAdminStatus = iceStormAdminPipe.close()
if iceStormAdminStatus:
TestUtil.killServers()
@@ -173,7 +173,7 @@ print "ok"
#
print "shutting down icestorm service...",
command = iceBoxAdmin + TestUtil.clientOptions + iceBoxEndpoints + r' shutdown' + " 2>&1"
-iceBoxAdminPipe = os.popen(command)
+iceBoxAdminPipe = os.popen(command, "r", 0)
iceBoxAdminStatus = iceBoxAdminPipe.close()
if iceBoxAdminStatus:
TestUtil.killServers()
diff --git a/cpp/test/IceStorm/single/run.py b/cpp/test/IceStorm/single/run.py
index 838b1362fc9..b30ac9a4cfe 100755
--- a/cpp/test/IceStorm/single/run.py
+++ b/cpp/test/IceStorm/single/run.py
@@ -42,7 +42,7 @@ iceStormDBEnv=" --Freeze.DbEnv.IceStorm.DbHome=" + dbHome
print "starting icestorm service...",
command = iceBox + TestUtil.clientServerOptions + iceBoxEndpoints + iceStormService + iceStormDBEnv + " 2>&1"
-iceBoxPipe = os.popen(command)
+iceBoxPipe = os.popen(command, "r", 0)
TestUtil.getServerPid(iceBoxPipe)
#TestUtil.getAdapterReady(iceBoxPipe)
TestUtil.waitServiceReady(iceBoxPipe, "IceStorm")
@@ -50,7 +50,7 @@ print "ok"
print "creating topic...",
command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "create single"' + " 2>&1"
-iceStormAdminPipe = os.popen(command)
+iceStormAdminPipe = os.popen(command, "r", 0)
iceStormAdminStatus = iceStormAdminPipe.close()
if iceStormAdminStatus:
TestUtil.killServers()
@@ -72,7 +72,7 @@ except:
print "starting subscriber...",
command = subscriber + TestUtil.clientServerOptions + iceStormReference + r' ' + subscriberLockFile + " 2>&1"
-subscriberPipe = os.popen(command)
+subscriberPipe = os.popen(command, "r", 0)
TestUtil.getServerPid(subscriberPipe)
TestUtil.getAdapterReady(subscriberPipe)
print "ok"
@@ -90,7 +90,7 @@ print "ok"
#
print "starting publisher...",
command = publisher + TestUtil.clientOptions + iceStormReference + " 2>&1"
-publisherPipe = os.popen(command)
+publisherPipe = os.popen(command, "r", 0)
print "ok"
TestUtil.printOutputFromPipe(publisherPipe);
@@ -114,7 +114,7 @@ print "ok"
#
print "destroying topic...",
command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "destroy single"' + " 2>&1"
-iceStormAdminPipe = os.popen(command)
+iceStormAdminPipe = os.popen(command, "r", 0)
iceStormAdminStatus = iceStormAdminPipe.close()
if iceStormAdminStatus:
TestUtil.killServers()
@@ -126,7 +126,7 @@ print "ok"
#
print "shutting down icestorm service...",
command = iceBoxAdmin + TestUtil.clientOptions + iceBoxEndpoints + r' shutdown' + " 2>&1"
-iceBoxAdminPipe = os.popen(command)
+iceBoxAdminPipe = os.popen(command, "r", 0)
iceBoxAdminStatus = iceBoxAdminPipe.close()
if iceBoxAdminStatus:
TestUtil.killServers()
diff --git a/cpp/test/IceUtil/inputUtil/run.py b/cpp/test/IceUtil/inputUtil/run.py
index 95ef6336e1f..589826e2ff7 100755
--- a/cpp/test/IceUtil/inputUtil/run.py
+++ b/cpp/test/IceUtil/inputUtil/run.py
@@ -27,7 +27,7 @@ client = os.path.join(testdir, "client")
clientOptions = ' ' + testdir;
print "starting client...",
-clientPipe = os.popen(client + clientOptions + " 2>&1")
+clientPipe = os.popen(client + clientOptions + " 2>&1", "r", 0)
print "ok"
TestUtil.printOutputFromPipe(clientPipe);
diff --git a/cpp/test/IceUtil/thread/run.py b/cpp/test/IceUtil/thread/run.py
index 6612d951f75..d0b2e07efec 100755
--- a/cpp/test/IceUtil/thread/run.py
+++ b/cpp/test/IceUtil/thread/run.py
@@ -27,7 +27,7 @@ client = os.path.join(testdir, "client")
clientOptions = ' ' + testdir;
print "starting client...",
-clientPipe = os.popen(client + clientOptions + " 2>&1")
+clientPipe = os.popen(client + clientOptions + " 2>&1", "r", 0)
print "ok"
TestUtil.printOutputFromPipe(clientPipe);
diff --git a/cpp/test/IceUtil/unicode/run.py b/cpp/test/IceUtil/unicode/run.py
index 0d92699dc5b..24d86d22121 100755
--- a/cpp/test/IceUtil/unicode/run.py
+++ b/cpp/test/IceUtil/unicode/run.py
@@ -41,7 +41,7 @@ file.close();
print "ok"
print "starting client...",
-clientPipe = os.popen(client + clientOptions + " 2>&1")
+clientPipe = os.popen(client + clientOptions + " 2>&1", "r", 0)
print "ok"
TestUtil.printOutputFromPipe(clientPipe);
diff --git a/cpp/test/IceUtil/uuid/run.py b/cpp/test/IceUtil/uuid/run.py
index 75ca25ec8ea..646c125bba5 100755
--- a/cpp/test/IceUtil/uuid/run.py
+++ b/cpp/test/IceUtil/uuid/run.py
@@ -26,7 +26,7 @@ testdir = os.path.join(toplevel, "test", name)
client = os.path.join(testdir, "client")
print "starting client...",
-clientPipe = os.popen(client + " 2>&1")
+clientPipe = os.popen(client + " 2>&1", "r", 0)
print "ok"
TestUtil.printOutputFromPipe(clientPipe);
diff --git a/cpp/test/Slice/errorDetection/run.py b/cpp/test/Slice/errorDetection/run.py
index ce6a0c337ae..7ecae19ef0e 100755
--- a/cpp/test/Slice/errorDetection/run.py
+++ b/cpp/test/Slice/errorDetection/run.py
@@ -42,7 +42,7 @@ for file in files:
command = slice2cpp + " --case-sensitive -I. " + os.path.join(directory, file);
else:
command = slice2cpp + " -I. " + os.path.join(directory, file);
- stdin, stdout, stderr = os.popen3(command)
+ stdin, stdout, stderr = os.popen3(command, "r", 0)
lines1 = stdout.readlines()
lines2 = open(os.path.join(directory, regex1.sub(".err", file)), "r").readlines()
if len(lines1) != len(lines2):