diff options
author | Mark Spruiell <mes@zeroc.com> | 2009-08-19 12:38:41 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2009-08-19 12:38:41 -0700 |
commit | 6d692f31dd7c66b9900341f9d7ede86b11b63486 (patch) | |
tree | 6c83b006fcf54207762d7bd6f0d583522f600dda /cpp/demo/cookbook/compression/expect.py | |
parent | fixing NPE in Java class-loading code (diff) | |
download | ice-6d692f31dd7c66b9900341f9d7ede86b11b63486.tar.bz2 ice-6d692f31dd7c66b9900341f9d7ede86b11b63486.tar.xz ice-6d692f31dd7c66b9900341f9d7ede86b11b63486.zip |
adding compression cookbook demo
Diffstat (limited to 'cpp/demo/cookbook/compression/expect.py')
-rwxr-xr-x | cpp/demo/cookbook/compression/expect.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/cpp/demo/cookbook/compression/expect.py b/cpp/demo/cookbook/compression/expect.py new file mode 100755 index 00000000000..f10620a2e46 --- /dev/null +++ b/cpp/demo/cookbook/compression/expect.py @@ -0,0 +1,35 @@ +#!/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 * +import signal + +server = Util.spawn('./server --Ice.PrintAdapterReady') +server.expect('.* ready') + +print "testing...", +sys.stdout.flush() +client = Util.spawn('./client Compression.cpp') +client.expect('done') +client.waitTestSuccess() +server.kill(signal.SIGINT) +server.waitTestSuccess() +print "ok" |