aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2011-01-24 08:42:58 +0100
committerErlang/OTP <[email protected]>2011-01-24 08:42:58 +0100
commitf0168539740f650cb8a7ef0bf8b51facc40c1563 (patch)
treee4a8171a88c3972c87c152e51950a3dcc52801a2
parenta55a1a82aa398d75152bb96ad6274b656ca58fa5 (diff)
parent1a6611c383fd0c85fecfd70e04e4e4525c0a55b1 (diff)
downloadotp-f0168539740f650cb8a7ef0bf8b51facc40c1563.tar.gz
otp-f0168539740f650cb8a7ef0bf8b51facc40c1563.tar.bz2
otp-f0168539740f650cb8a7ef0bf8b51facc40c1563.zip
Merge branch 'nick/orber/inet6_test_cases/OTP-9035' into maint-r14
* nick/orber/inet6_test_cases/OTP-9035: OTP-9035 - More tests added so that Orber does not try to run IPv6 tests on a machine than cannot handle that. This only affect test code and not the application.
-rw-r--r--lib/orber/test/orber_test_lib.erl15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/orber/test/orber_test_lib.erl b/lib/orber/test/orber_test_lib.erl
index b95cf4b0ec..132f02bb78 100644
--- a/lib/orber/test/orber_test_lib.erl
+++ b/lib/orber/test/orber_test_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -126,13 +126,22 @@ version_ok() ->
_ ->
case gen_tcp:listen(0, [{reuseaddr, true}, inet6]) of
{ok, LSock} ->
- gen_tcp:close(LSock),
- true;
+ {ok, Port} = inet:port(LSock),
+ case gen_tcp:connect(Hostname, Port, [inet6]) of
+ {error, _} ->
+ gen_tcp:close(LSock),
+ {skipped, "Inet cannot handle IPv6"};
+ {ok, Socket} ->
+ gen_tcp:close(Socket),
+ gen_tcp:close(LSock),
+ true
+ end;
{error, _} ->
{skipped, "Inet cannot handle IPv6"}
end
end
end.
+
%%------------------------------------------------------------
%% function : get_host
%% Arguments: Family - inet | inet6