diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-04-21 15:59:33 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-04-21 15:59:33 -0230 |
commit | ae58d9f09835de8d57e5ad27d9b33ffbcd0d5092 (patch) | |
tree | f96fbf2fd2643bf02c64931dedfd3b6772169705 /cpp/demo/Ice/plugin/expect.py | |
parent | Bug 2504 - added getPlugins method to PluginManager (diff) | |
download | ice-ae58d9f09835de8d57e5ad27d9b33ffbcd0d5092.tar.bz2 ice-ae58d9f09835de8d57e5ad27d9b33ffbcd0d5092.tar.xz ice-ae58d9f09835de8d57e5ad27d9b33ffbcd0d5092.zip |
Bug 3912 - added logger plugin demo
Diffstat (limited to 'cpp/demo/Ice/plugin/expect.py')
-rwxr-xr-x | cpp/demo/Ice/plugin/expect.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/cpp/demo/Ice/plugin/expect.py b/cpp/demo/Ice/plugin/expect.py new file mode 100755 index 00000000000..f4da233e308 --- /dev/null +++ b/cpp/demo/Ice/plugin/expect.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python +# ********************************************************************** +# +# Copyright (c) 2003-2009 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 + +path = [ ".", "..", "../..", "../../..", "../../../.." ] +head = os.path.dirname(sys.argv[0]) +if len(head) > 0: + path = [os.path.join(head, p) for p in path] +path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "demoscript")) ] +if len(path) == 0: + raise "can't find toplevel directory!" +sys.path.append(path[0]) + +from demoscript import * +from demoscript.Ice import plugin + +server = Util.spawn('./server --Ice.PrintAdapterReady --Ice.Warn.Connections=0') +server.expect('.* ready') +client = Util.spawn('./client --Ice.Warn.Connections=0') +client.expect('.*==>') + +plugin.run(client, server) |