diff options
author | Matthew Newhook <matthew@zeroc.com> | 2015-03-18 12:58:16 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2015-03-18 12:58:16 -0230 |
commit | 9b7668c7c92cf9cb311fe444cdddb489cd2a219d (patch) | |
tree | 5016567c58c81f5654e9d01935e199c6bf4761d2 /demoscript/IceGrid/allocate.py | |
parent | VS add-in & build updates: (diff) | |
download | ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.bz2 ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.xz ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.zip |
Removed demos.
Moved demoscript to distribution.
Diffstat (limited to 'demoscript/IceGrid/allocate.py')
-rwxr-xr-x | demoscript/IceGrid/allocate.py | 144 |
1 files changed, 0 insertions, 144 deletions
diff --git a/demoscript/IceGrid/allocate.py b/demoscript/IceGrid/allocate.py deleted file mode 100755 index 2283832dc50..00000000000 --- a/demoscript/IceGrid/allocate.py +++ /dev/null @@ -1,144 +0,0 @@ -#!/usr/bin/env python -# ********************************************************************** -# -# Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -# -# This copy of Ice is licensed to you under the terms described in the -# ICE_LICENSE file included in this distribution. -# -# ********************************************************************** - -import sys, os -from demoscript import Util -import Expect - -def run(clientCmd): - sys.stdout.write("cleaning databases... ") - sys.stdout.flush() - nodeDir = os.path.join("db", "node") - if not os.path.exists(nodeDir): - os.mkdir(nodeDir) - else: - Util.cleanDbDir(nodeDir) - regDir = os.path.join("db", "registry") - if not os.path.exists(regDir): - os.mkdir(regDir) - else: - Util.cleanDbDir(regDir) - print("ok") - - if Util.defaultHost: - args = ' --IceGrid.Node.PropertiesOverride="Ice.Default.Host=127.0.0.1"' - else: - args = '' - - sys.stdout.write("starting icegridnode... ") - sys.stdout.flush() - node = Util.spawn(Util.getIceGridNode() + ' --Ice.Config=config.grid --Ice.PrintAdapterReady %s' % (args)) - node.expect('IceGrid.Registry.Internal ready\nIceGrid.Registry.Server ready\nIceGrid.Registry.Client ready' + - '\nIceGrid.Registry.Discovery ready\nIceGrid.Node ready') - print("ok") - - sys.stdout.write("deploying application... ") - sys.stdout.flush() - admin = Util.spawn(Util.getIceGridAdmin() + ' --Ice.Config=config.grid') - admin.expect('>>>') - admin.sendline("application add \'application-single.xml\'") - admin.expect('>>>') - print("ok") - - sys.stdout.write("testing client... ") - sys.stdout.flush() - client1 = Util.spawn(clientCmd) - client1.expect('user id:') - client1.sendline('foo') - client1.expect('password:') - client1.sendline('foo') - - client2 = Util.spawn(clientCmd) - client2.expect('user id:') - client2.sendline('foo') - client2.expect('password:') - client2.sendline('foo') - - node.expect('activating server') - client1.expect('==>') - client2.expect(Expect.TIMEOUT, timeout = 0) - - client1.sendline('t') - node.expect('says Hello World!') - client2.expect(Expect.TIMEOUT, timeout = 0) - client1.sendline('x') - client1.waitTestSuccess(timeout=120) - - client2.expect('==>') - client2.sendline('t') - node.expect('says Hello World!') - client2.sendline('s') - node.expect('detected termination of server') - client2.sendline('x') - client2.waitTestSuccess(timeout=120) - print("ok") - - sys.stdout.write("deploying multiple... ") - sys.stdout.flush() - admin.sendline("application update \'application-multiple.xml\'") - admin.expect('>>>') - print("ok") - - sys.stdout.write("testing client... ") - sys.stdout.flush() - client1 = Util.spawn(clientCmd) - client1.expect('user id:') - client1.sendline('foo') - client1.expect('password:') - client1.sendline('foo') - - client2 = Util.spawn(clientCmd) - client2.expect('user id:') - client2.sendline('foo') - client2.expect('password:') - client2.sendline('foo') - - client3 = Util.spawn(clientCmd) - client3.expect('user id:') - client3.sendline('foo') - client3.expect('password:') - client3.sendline('foo') - - node.expect('activating server') - client1.expect('==>') - client2.expect('==>') - client3.expect(Expect.TIMEOUT, timeout = 0) - - client1.sendline('t') - node.expect('says Hello World!') - client2.sendline('t') - node.expect('says Hello World!') - client3.expect(Expect.TIMEOUT, timeout = 0) - - client1.sendline('x') - client1.waitTestSuccess(timeout=120) - - client3.expect('==>') - client3.sendline('t') - node.expect('says Hello World!') - client2.sendline('t') - node.expect('says Hello World!') - - client2.sendline('s') - node.expect('detected termination of server') - client2.sendline('x') - client2.waitTestSuccess(timeout=120) - - client3.sendline('s') - node.expect('detected termination of server') - client3.sendline('x') - client3.waitTestSuccess(timeout=120) - - print("ok") - - admin.sendline('registry shutdown Master') - admin.sendline('exit') - admin.waitTestSuccess() - node.waitTestSuccess() |