summaryrefslogtreecommitdiff
path: root/cpp/test/IcePack/simple/run.py
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2001-08-16 11:26:24 +0000
committerMarc Laukien <marc@zeroc.com>2001-08-16 11:26:24 +0000
commit73e01bb42f2f75a8dbea664a664e1a19e74c28c3 (patch)
tree401359fe34493546e28880e82e6fd4629cde8eb7 /cpp/test/IcePack/simple/run.py
parentfixes (diff)
downloadice-73e01bb42f2f75a8dbea664a664e1a19e74c28c3.tar.bz2
ice-73e01bb42f2f75a8dbea664a664e1a19e74c28c3.tar.xz
ice-73e01bb42f2f75a8dbea664a664e1a19e74c28c3.zip
IcePack/simple
Diffstat (limited to 'cpp/test/IcePack/simple/run.py')
-rwxr-xr-xcpp/test/IcePack/simple/run.py49
1 files changed, 49 insertions, 0 deletions
diff --git a/cpp/test/IcePack/simple/run.py b/cpp/test/IcePack/simple/run.py
new file mode 100755
index 00000000000..b56cac18f2a
--- /dev/null
+++ b/cpp/test/IcePack/simple/run.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2001
+# MutableRealms, Inc.
+# Huntsville, AL, USA
+#
+# All Rights Reserved
+#
+# **********************************************************************
+
+import os, sys
+
+for toplevel in ["", "..", os.path.join("..", ".."), os.path.join("..", "..", "..")]:
+ if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")):
+ break
+else:
+ raise "can't find toplevel directory!"
+
+sys.path.append(os.path.join(toplevel, "config"))
+import TestUtil
+
+icePack = os.path.join(toplevel, "bin", "icepack")
+icePackAdmin = os.path.join(toplevel, "bin", "icepackadmin")
+
+print "starting icepack...",
+icePackPipe = os.popen(icePack + ' --nowarn --pid --forward "tcp -p 12346 -t 2000" --admin "tcp -p 12347 -t 2000"')
+output = icePackPipe.readline().strip()
+if not output:
+ print "failed!"
+ sys.exit(0)
+TestUtil.serverPids.append(int(output))
+print "ok"
+
+print "registering server with icepack...",
+icePackAdminPipe = os.popen(icePackAdmin + ' --admin "tcp -p 12347 -t 2000" add "test:tcp -p 12345 -t 2000"')
+icePackAdminPipe.close()
+print "ok"
+
+name = os.path.join("IcePack", "simple")
+TestUtil.clientServerTest(toplevel, name)
+TestUtil.collocatedTest(toplevel, name)
+
+print "shutting down icepack...",
+icePackAdminPipe = os.popen(icePackAdmin + ' --admin "tcp -p 12347 -t 2000" shutdown')
+icePackAdminPipe.close()
+print "ok"
+
+sys.exit(1)