From e628d2cdf8953b8692e6b9ac0265c20bfce4b21d Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Wed, 29 May 2019 12:10:56 +0200 Subject: [snmp|test] Improved IPv6 test checks Improve the checks for if/when we shall run the IPv6 test cases. OTP-15764 --- lib/snmp/test/snmp_manager_test.erl | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'lib/snmp/test/snmp_manager_test.erl') 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). -- cgit v1.2.3