summaryrefslogtreecommitdiff
path: root/cpp/config/TestUtil.py
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/config/TestUtil.py')
-rw-r--r--cpp/config/TestUtil.py51
1 files changed, 38 insertions, 13 deletions
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py
index 3f9c13fe692..b5e1dcbe44b 100644
--- a/cpp/config/TestUtil.py
+++ b/cpp/config/TestUtil.py
@@ -11,23 +11,48 @@
import sys, os
-protocol = "tcp"
+#
+# Set protocol to "ssl" in case you want to run the tests with the SSL protocol. Otherwise TCP is used.
+#
-serverOptions = \
-" --Ice.PrintProcessId --Ice.PrintAdapterReady --Ice.WarnAboutServerExceptions --Ice.ServerIdleTime=30" + \
-" --Ice.Security.Ssl.CertPath=TOPLEVELDIR/certs --Ice.Security.Ssl.Config=server_sslconfig.xml" + \
-" --Ice.Protocol=" + protocol
+protocol = "ssl"
+#protocol = ""
-clientOptions = \
-" --Ice.Security.Ssl.CertPath=TOPLEVELDIR/certs --Ice.Security.Ssl.Config=client_sslconfig.xml" + \
-" --Ice.Protocol=" + protocol
+#
+# Set the host to the hostname the server is running. If not set, "localhost" is used.
+#
-clientServerOptions = \
-" --Ice.PrintProcessId --Ice.PrintAdapterReady --Ice.WarnAboutServerExceptions --Ice.ServerIdleTime=30" + \
-" --Ice.Security.Ssl.CertPath=TOPLEVELDIR/certs --Ice.Security.Ssl.Config=sslconfig.xml --Ice.Protocol=" + protocol
+#host = "someotherhost"
+host = ""
+
+#
+# Don't change anything below this line
+#
-collocatedOptions = \
-" --Ice.Security.Ssl.CertPath=TOPLEVELDIR/certs --Ice.Security.Ssl.Config=sslconfig.xml --Ice.Protocol=" + protocol
+if protocol == "ssl":
+ clientProtocol = " --Ice.DefaultProtocol=ssl" + \
+ " --Ice.Security.Ssl.CertPath=TOPLEVELDIR/certs --Ice.Security.Ssl.Config=client_sslconfig.xml"
+ serverProtocol = " --Ice.DefaultProtocol=ssl" + \
+ " --Ice.Security.Ssl.CertPath=TOPLEVELDIR/certs --Ice.Security.Ssl.Config=server_sslconfig.xml"
+ clientServerProtocol = " --Ice.DefaultProtocol=ssl" + \
+ " --Ice.Security.Ssl.CertPath=TOPLEVELDIR/certs --Ice.Security.Ssl.Config=sslconfig.xml"
+else:
+ clientProtocol = ""
+ serverProtocol = ""
+ clientServerProtocol = ""
+
+if host != "":
+ defaultHost = " --Ice.DefaultHost=" + host
+else:
+ defaultHost = ""
+
+commonServerOptions = \
+" --Ice.PrintProcessId --Ice.PrintAdapterReady --Ice.WarnAboutServerExceptions --Ice.ServerIdleTime=30"
+
+serverOptions = commonServerOptions + serverProtocol
+clientOptions = clientProtocol + defaultHost
+clientServerOptions = commonServerOptions + clientServerProtocol + defaultHost
+collocatedOptions = clientServerProtocol
serverPids = []