summaryrefslogtreecommitdiff
path: root/demoscript/IceGrid/simple.py
diff options
context:
space:
mode:
Diffstat (limited to 'demoscript/IceGrid/simple.py')
-rwxr-xr-xdemoscript/IceGrid/simple.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/demoscript/IceGrid/simple.py b/demoscript/IceGrid/simple.py
index 121ee90604c..c13b143998d 100755
--- a/demoscript/IceGrid/simple.py
+++ b/demoscript/IceGrid/simple.py
@@ -8,7 +8,8 @@
#
# **********************************************************************
-import sys, demoscript, time, os
+import sys, time, os
+from demoscript import *
def run(clientStr, desc = 'application'):
print "cleaning databases...",
@@ -17,29 +18,28 @@ def run(clientStr, desc = 'application'):
if not os.path.exists(nodeDir):
os.mkdir(nodeDir)
else:
- demoscript.Util.cleanDbDir(nodeDir)
+ Util.cleanDbDir(nodeDir)
regDir = os.path.join("db", "registry")
if not os.path.exists(regDir):
os.mkdir(regDir)
else:
- demoscript.Util.cleanDbDir(regDir)
+ Util.cleanDbDir(regDir)
print "ok"
- if demoscript.Util.defaultHost:
+ if Util.defaultHost:
args = ' --IceGrid.Node.PropertiesOverride="Ice.Default.Host=127.0.0.1"'
else:
args = ''
print "starting icegridnode...",
sys.stdout.flush()
- node = demoscript.Util.spawn('icegridnode --Ice.Config=config.grid --Ice.PrintAdapterReady %s' % (args),
- language="C++")
- node.expect('IceGrid.Registry.Internal ready\r{1,2}\nIceGrid.Registry.Server ready\r{1,2}\nIceGrid.Registry.Client ready\r{1,2}\nIceGrid.Node ready')
+ node = Util.spawn('icegridnode --Ice.Config=config.grid --Ice.PrintAdapterReady %s' % (args))
+ node.expect('IceGrid.Registry.Internal ready\nIceGrid.Registry.Server ready\nIceGrid.Registry.Client ready\nIceGrid.Node ready')
print "ok"
print "deploying application...",
sys.stdout.flush()
- admin = demoscript.Util.spawn('icegridadmin --Ice.Config=config.grid', language="C++")
+ admin = Util.spawn('icegridadmin --Ice.Config=config.grid')
admin.expect('>>>')
admin.sendline("application add \'%s.xml\'" %(desc))
admin.expect('>>>')
@@ -47,7 +47,7 @@ def run(clientStr, desc = 'application'):
print "testing client...",
sys.stdout.flush()
- client = demoscript.Util.spawn(clientStr)
+ client = Util.spawn(clientStr)
client.expect('==>')
client.sendline('t')
node.expect("SimpleServer says Hello World!")
@@ -68,7 +68,7 @@ def run(clientStr, desc = 'application'):
print "testing client...",
sys.stdout.flush()
- client = demoscript.Util.spawn(clientStr)
+ client = Util.spawn(clientStr)
client.expect('==>')
client.sendline('t')
node.expect("SimpleServer-[123] says Hello World!")
@@ -93,7 +93,7 @@ def run(clientStr, desc = 'application'):
def testserver(which):
admin.sendline('server start SimpleServer-%d' % which)
admin.expect('>>> ')
- client = demoscript.Util.spawn(clientStr)
+ client = Util.spawn(clientStr)
client.expect('==>')
client.sendline('t')
node.expect("SimpleServer-%d says Hello World!" % which)