aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/test/snmp_manager_test.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-05-29 12:10:56 +0200
committerMicael Karlberg <[email protected]>2019-05-29 12:10:56 +0200
commite628d2cdf8953b8692e6b9ac0265c20bfce4b21d (patch)
treee151e1ce6545d92a483a531cbef01936ab04b73a /lib/snmp/test/snmp_manager_test.erl
parent36e61f1e23bf06664206aaba1848e36440a36e4a (diff)
downloadotp-e628d2cdf8953b8692e6b9ac0265c20bfce4b21d.tar.gz
otp-e628d2cdf8953b8692e6b9ac0265c20bfce4b21d.tar.bz2
otp-e628d2cdf8953b8692e6b9ac0265c20bfce4b21d.zip
[snmp|test] Improved IPv6 test checks
Improve the checks for if/when we shall run the IPv6 test cases. OTP-15764
Diffstat (limited to 'lib/snmp/test/snmp_manager_test.erl')
-rw-r--r--lib/snmp/test/snmp_manager_test.erl23
1 files changed, 9 insertions, 14 deletions
diff --git a/lib/snmp/test/snmp_manager_test.erl b/lib/snmp/test/snmp_manager_test.erl
index 8fd325192b..d959d9e09b 100644
--- a/lib/snmp/test/snmp_manager_test.erl
+++ b/lib/snmp/test/snmp_manager_test.erl
@@ -649,22 +649,17 @@ init_per_group_ipv6(GroupName, Config) ->
true ->
{skip, "Host *may* not *properly* support IPV6"};
false ->
- {ok, Hostname} = inet:gethostname(),
- case ct:require(ipv6_hosts) of
- ok ->
- case lists:member(list_to_atom(Hostname),
- ct:get_config(ipv6_hosts)) of
- true ->
- ipv6_init(snmp_test_lib:init_group_top_dir(GroupName,
- Config));
- false ->
- {skip, "Host does not support IPv6"}
- end;
- _ ->
- {skip, "Test config ipv6_hosts is missing"}
+ %% Even if this host supports IPv6 we don't use it unless its
+ %% one of the configures/supported IPv6 hosts...
+ case (?HAS_SUPPORT_IPV6() andalso ?IS_IPV6_HOST()) of
+ true ->
+ ipv6_init(snmp_test_lib:init_group_top_dir(GroupName, Config));
+ false ->
+ {skip, "Host does not support IPv6"}
end
end.
-
+
+
end_per_group(_GroupName, Config) ->
%% Do we really need to do this?
lists:keydelete(snmp_group_top_dir, 1, Config).