diff options
author | Matthew Newhook <matthew@zeroc.com> | 2012-11-21 14:42:56 -0330 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2012-11-21 14:42:56 -0330 |
commit | fb6bfca6b217731852624fd95723cf2054d12a12 (patch) | |
tree | 23a50f94aa9f0a0ed5d62fe0ce642c19a72ba445 /java/demo/Ice/optional/expect.py | |
parent | Simplified vsaddin/INSTALL.txt (diff) | |
download | ice-fb6bfca6b217731852624fd95723cf2054d12a12.tar.bz2 ice-fb6bfca6b217731852624fd95723cf2054d12a12.tar.xz ice-fb6bfca6b217731852624fd95723cf2054d12a12.zip |
Added java optional demo.
Diffstat (limited to 'java/demo/Ice/optional/expect.py')
-rwxr-xr-x | java/demo/Ice/optional/expect.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/java/demo/Ice/optional/expect.py b/java/demo/Ice/optional/expect.py new file mode 100755 index 00000000000..f7e128e4418 --- /dev/null +++ b/java/demo/Ice/optional/expect.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +# ********************************************************************** +# +# Copyright (c) 2003-2012 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 RuntimeError("can't find toplevel directory!") +sys.path.append(path[0]) + +from demoscript import Util +from demoscript.Ice import optional + +server = Util.spawn('java Server --Ice.PrintAdapterReady --Ice.Warn.Connections=0') +server.expect('.* ready') +client = Util.spawn('java Client --Ice.Warn.Connections=0') + +optional.run(client, server) |