From 2f7784b69f888e9a84a99a1aff8843d8841d51a2 Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Mon, 22 Oct 2012 17:51:17 +0200 Subject: Fixed ICE-4556 - --interface option not working on some platforms, enabled Java IPv6 tests on Windows --- demoscript/Ice/multicast.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'demoscript/Ice') diff --git a/demoscript/Ice/multicast.py b/demoscript/Ice/multicast.py index 17905d1d048..d1f84d3698a 100644 --- a/demoscript/Ice/multicast.py +++ b/demoscript/Ice/multicast.py @@ -64,12 +64,19 @@ def run(clientCmd, serverCmd): runDemo(clientCmd, serverCmd) print("ok") - if Util.getMapping() == "java" and Util.isWin32(): - sys.stdout.write("skipping testing multicast discovery (IPv6) under Windows...") + sys.stdout.write("testing multicast discovery (IPv6)... ") + sys.stdout.flush() + + # + # On OS X, using the interface-local address doesn't work, the client fails with + # a "Host not reachable" error, instead we use a link-local address with on loopback. + # + if Util.isDarwin(): + endpoint = 'udp -h \\"ff02::1:1\\" -p 10000 --interface \\"lo0\\"' else: - sys.stdout.write("testing multicast discovery (IPv6)... ") - sys.stdout.flush() - serverCmd += ' --Ice.IPv6=1 --Discover.Endpoints="udp -h \\"ff01::1:1\\" -p 10000"' - clientCmd += ' --Ice.IPv6=1 --Discover.Proxy="discover:udp -h \\"ff01::1:1\\" -p 10000"' - runDemo(clientCmd, serverCmd) + endpoint = 'udp -h \\"ff01::1:1\\" -p 10000' + serverCmd += ' --Ice.IPv6=1 --Discover.Endpoints="%s"' % (endpoint) + clientCmd += ' --Ice.IPv6=1 --Discover.Proxy="discover:%s"' % (endpoint) + + runDemo(clientCmd, serverCmd) print("ok") -- cgit v1.2.3