summaryrefslogtreecommitdiff
path: root/java/demo/Ice/serialize/expect.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2009-02-10 17:13:13 +0100
committerBenoit Foucher <benoit@zeroc.com>2009-02-11 12:03:18 +0100
commit8da946b10aa122ca8f41caaf03aa374dd585ebe4 (patch)
treef4beee9c4e429b4cda3fa38e82fc481c12c7be6f /java/demo/Ice/serialize/expect.py
parentFixed bug 3593 - fixed .NET IceBox server to be consistent with Java (diff)
downloadice-8da946b10aa122ca8f41caaf03aa374dd585ebe4.tar.bz2
ice-8da946b10aa122ca8f41caaf03aa374dd585ebe4.tar.xz
ice-8da946b10aa122ca8f41caaf03aa374dd585ebe4.zip
Added demoscripts for serialize demo
Diffstat (limited to 'java/demo/Ice/serialize/expect.py')
-rwxr-xr-xjava/demo/Ice/serialize/expect.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/java/demo/Ice/serialize/expect.py b/java/demo/Ice/serialize/expect.py
new file mode 100755
index 00000000000..76bc8e43408
--- /dev/null
+++ b/java/demo/Ice/serialize/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 serialize
+
+server = Util.spawn('java Server --Ice.PrintAdapterReady --Ice.Warn.Connections=0')
+server.expect('.* ready')
+client = Util.spawn('java Client --Ice.Warn.Connections=0')
+client.expect('.*==>')
+
+serialize.run(client, server)