summaryrefslogtreecommitdiff
path: root/java/config/TestUtil.py
diff options
context:
space:
mode:
Diffstat (limited to 'java/config/TestUtil.py')
-rw-r--r--java/config/TestUtil.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/java/config/TestUtil.py b/java/config/TestUtil.py
index da5abdbf54e..0aa8d7c6ab5 100644
--- a/java/config/TestUtil.py
+++ b/java/config/TestUtil.py
@@ -147,6 +147,34 @@ def clientServerTestWithOptions(additionalServerOptions, additionalClientOptions
killServers()
sys.exit(1)
+def clientServerTestWithClasspath(serverClasspath, clientClasspath):
+
+ classpath = os.getenv("CLASSPATH", "")
+ scp = serverClasspath + sep + classpath
+ ccp = clientClasspath + sep + classpath
+
+ server = "java -ea -cp " + scp + " Server --Ice.ProgramName=Server"
+ client = "java -ea -cp " + ccp + " Client --Ice.ProgramName=Client"
+
+ print "starting server...",
+ serverPipe = os.popen(server + serverOptions)
+ getAdapterReady(serverPipe)
+ print "ok"
+
+ print "starting client...",
+ clientPipe = os.popen(client + clientOptions)
+ print "ok"
+
+ for output in clientPipe.xreadlines():
+ print output,
+
+ clientStatus = clientPipe.close()
+ serverStatus = serverPipe.close()
+
+ if clientStatus or serverStatus:
+ killServers()
+ sys.exit(1)
+
def clientServerTest():
clientServerTestWithOptions("", "")