summaryrefslogtreecommitdiff
path: root/scripts/tests
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2018-10-31 17:12:16 +0100
committerBenoit Foucher <benoit@zeroc.com>2018-10-31 17:12:16 +0100
commit1eced1d40a6ddb94be5c531be90c75c64c305bad (patch)
tree970d404e22831a77a5eafa3b1fda285fc6bf87e3 /scripts/tests
parentslice2cpp bug with lowercase drive letter on Windows (diff)
downloadice-1eced1d40a6ddb94be5c531be90c75c64c305bad.tar.bz2
ice-1eced1d40a6ddb94be5c531be90c75c64c305bad.tar.xz
ice-1eced1d40a6ddb94be5c531be90c75c64c305bad.zip
Better support for Android and Xamarin testing, see #186
Diffstat (limited to 'scripts/tests')
-rw-r--r--scripts/tests/Ice/udp.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/scripts/tests/Ice/udp.py b/scripts/tests/Ice/udp.py
index c805bc4333f..675ec75afd7 100644
--- a/scripts/tests/Ice/udp.py
+++ b/scripts/tests/Ice/udp.py
@@ -9,18 +9,23 @@
from Util import *
+class UdpTestCase(ClientServerTestCase):
+
+ def setupServerSide(self, current):
+ if current.config.android or current.config.xamarin:
+ self.servers = [Server(ready="McastTestAdapter")]
+ else:
+ self.servers = [Server(args=[i], ready="McastTestAdapter") for i in range(0, 5)]
+
+ def setupClientSide(self, current):
+ if current.config.android:
+ self.clients = [Client()]
+ else:
+ self.clients = [Client(args=[5])]
+
#
# With UWP, we can't run the UDP tests with the C++ servers (used when SSL is enabled).
#
options=lambda current: { "protocol": ["tcp", "ws"] } if current.config.uwp else {}
-global currentMapping # The mapping for which this test suite is being loaded
-
-if (isinstance(currentMapping, AndroidMappingMixin) or
- isinstance(currentMapping, XamarinMapping)):
- testcase = ClientServerTestCase(server=Server(ready="McastTestAdapter"))
-else:
- testcase = ClientServerTestCase(client=Client(args=[5]),
- servers=[Server(args=[i], ready="McastTestAdapter") for i in range(0, 5)])
-
-TestSuite(__name__, [ testcase ], multihost=False, options=options)
+TestSuite(__name__, [ UdpTestCase() ], multihost=False, options=options)