summaryrefslogtreecommitdiff
path: root/cpp/test/IceStorm/federation2/run.py
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/IceStorm/federation2/run.py')
-rwxr-xr-xcpp/test/IceStorm/federation2/run.py38
1 files changed, 17 insertions, 21 deletions
diff --git a/cpp/test/IceStorm/federation2/run.py b/cpp/test/IceStorm/federation2/run.py
index ca6e2cd11a6..019696da00b 100755
--- a/cpp/test/IceStorm/federation2/run.py
+++ b/cpp/test/IceStorm/federation2/run.py
@@ -32,42 +32,38 @@ iceBox = os.path.join(toplevel, "bin", "icebox")
iceBoxAdmin = os.path.join(toplevel, "bin", "iceboxadmin")
iceStormAdmin = os.path.join(toplevel, "bin", "icestormadmin")
-updatedServerOptions = TestUtil.serverOptions.replace("TOPLEVELDIR", toplevel)
-updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
-updatedClientServerOptions = TestUtil.clientServerOptions.replace("TOPLEVELDIR", toplevel)
+iceBoxEndpoints = ' --IceBox.ServiceManager.Endpoints="default -p 12345"'
-iceBoxEndpoints=' --IceBox.ServiceManager.Endpoints="default -p 12345"'
-
-iceStormService=" --IceBox.Service.IceStorm=IceStormService:create" + \
- ' --IceStorm.TopicManager.Endpoints="default -p 12346"' + \
- " --IceBox.PrintServicesReady=IceStorm"
-iceStormReference=' --IceStorm.TopicManager.Proxy="IceStorm/TopicManager: default -p 12346"'
+iceStormService = " --IceBox.Service.IceStorm=IceStormService:create" + \
+ ' --IceStorm.TopicManager.Endpoints="default -p 12346"' + \
+ " --IceBox.PrintServicesReady=IceStorm"
+iceStormReference = ' --IceStorm.TopicManager.Proxy="IceStorm/TopicManager: default -p 12346"'
dbEnvName = os.path.join(testdir, "db")
TestUtil.cleanDbDir(dbEnvName)
-iceStormDBEnv=" --IceBox.DBEnvName.IceStorm=" + dbEnvName
+iceStormDBEnv = " --IceBox.DBEnvName.IceStorm=" + dbEnvName
print "starting icestorm service...",
-command = iceBox + updatedClientServerOptions + iceBoxEndpoints + iceStormService + iceStormDBEnv
+command = iceBox + TestUtil.clientServerOptions + iceBoxEndpoints + iceStormService + iceStormDBEnv
iceBoxPipe = os.popen(command)
TestUtil.getServerPid(iceBoxPipe)
TestUtil.waitServiceReady(iceBoxPipe, "IceStorm")
print "ok"
print "creating topics...",
-command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "create fed1"'
+command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "create fed1"'
iceStormAdminPipe = os.popen(command)
iceStormAdminStatus = iceStormAdminPipe.close()
if iceStormAdminStatus:
TestUtil.killServers()
sys.exit(1)
-command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "create fed2"'
+command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "create fed2"'
iceStormAdminPipe = os.popen(command)
iceStormAdminStatus = iceStormAdminPipe.close()
if iceStormAdminStatus:
TestUtil.killServers()
sys.exit(1)
-command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "create fed3"'
+command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "create fed3"'
iceStormAdminPipe = os.popen(command)
iceStormAdminStatus = iceStormAdminPipe.close()
if iceStormAdminStatus:
@@ -77,7 +73,7 @@ print "ok"
print "linking topics...",
graph = os.path.join(testdir, "fed.xml");
-command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "graph ' + graph + r' 10"'
+command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "graph ' + graph + r' 10"'
iceStormAdminPipe = os.popen(command)
iceStormAdminStatus = iceStormAdminPipe.close()
if iceStormAdminStatus:
@@ -99,7 +95,7 @@ except:
pass # Ignore errors if the lockfile is not present
print "starting subscriber...",
-command = subscriber + updatedClientServerOptions + iceStormReference + r' ' + subscriberLockFile
+command = subscriber + TestUtil.clientServerOptions + iceStormReference + r' ' + subscriberLockFile
subscriberPipe = os.popen(command)
TestUtil.getServerPid(subscriberPipe)
TestUtil.getAdapterReady(subscriberPipe)
@@ -117,7 +113,7 @@ print "ok"
# causes subscriber to terminate.
#
print "starting publisher...",
-command = publisher + updatedClientOptions + iceStormReference
+command = publisher + TestUtil.clientOptions + iceStormReference
publisherPipe = os.popen(command)
print "ok"
@@ -142,19 +138,19 @@ print "ok"
# Destroy the topic.
#
print "destroying topics...",
-command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "destroy fed1"'
+command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "destroy fed1"'
iceStormAdminPipe = os.popen(command)
iceStormAdminStatus = iceStormAdminPipe.close()
if iceStormAdminStatus:
TestUtil.killServers()
sys.exit(1)
-command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "destroy fed2"'
+command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "destroy fed2"'
iceStormAdminPipe = os.popen(command)
iceStormAdminStatus = iceStormAdminPipe.close()
if iceStormAdminStatus:
TestUtil.killServers()
sys.exit(1)
-command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "destroy fed3"'
+command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "destroy fed3"'
iceStormAdminPipe = os.popen(command)
iceStormAdminStatus = iceStormAdminPipe.close()
if iceStormAdminStatus:
@@ -166,7 +162,7 @@ print "ok"
# Shutdown icestorm.
#
print "shutting down icestorm service...",
-command = iceBoxAdmin + updatedClientOptions + iceBoxEndpoints + r' shutdown'
+command = iceBoxAdmin + TestUtil.clientOptions + iceBoxEndpoints + r' shutdown'
iceBoxAdminPipe = os.popen(command)
iceBoxAdminStatus = iceBoxAdminPipe.close()
if iceBoxAdminStatus: