diff options
author | Micael Karlberg <bmk@erlang.org> | 2022-01-19 16:37:26 +0100 |
---|---|---|
committer | Micael Karlberg <bmk@erlang.org> | 2022-01-28 16:17:30 +0100 |
commit | 694850491e07635862bc22fa2a751afd8f1f0598 (patch) | |
tree | 18695b1c9f9904cbc163ebdc00d98fe6cb912971 /lib/snmp | |
parent | c70c710b99982206e8fa3d325c8644bf6c9bda76 (diff) | |
download | erlang-694850491e07635862bc22fa2a751afd8f1f0598.tar.gz |
[snmp|test] Add skip condition for specific *slooow* machine
Diffstat (limited to 'lib/snmp')
-rw-r--r-- | lib/snmp/test/snmp_agent_SUITE.erl | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/lib/snmp/test/snmp_agent_SUITE.erl b/lib/snmp/test/snmp_agent_SUITE.erl index 44ee3abdc0..7f5c2dfec4 100644 --- a/lib/snmp/test/snmp_agent_SUITE.erl +++ b/lib/snmp/test/snmp_agent_SUITE.erl @@ -1091,6 +1091,56 @@ init_per_testcase1(v3_inform_i = _Case, Config) when is_list(Config) -> "~n Case: ~p" "~n Config: ~p", [_Case, Config]), wd_start(10, Config); +init_per_testcase1(v3_des_priv = _Case, Config) when is_list(Config) -> + ?DBG("init_per_testcase1 -> entry with" + "~n Case: ~p" + "~n Config: ~p", [_Case, Config]), + %% <CONDITIONAL-SKIP> + %% This is intended to catch Yellow Dog Linux release 6.2 (2.6.29) + LinuxVersionVerify = + fun() -> + case string:to_lower(os:cmd("uname -m")) of + "ppc" ++ _ -> + case file:read_file_info("/etc/issue") of + {ok, _} -> + case string:to_lower( + os:cmd("grep -i yellow /etc/issue")) of + "yellow dog " ++ _ -> + case os:version() of + {2, 6, 29} -> + ?IPRINT("(PPC Linux) " + "kernel version check: " + "{2, 6, 29} => SKIP"), + true; + V -> + ?IPRINT("(PPC Linux) " + "kernel version check: " + "~p != {2, 6, 29} => " + "*NO* SKIP", [V]), + false + end; + _ -> % Maybe plain Debian or Ubuntu + ?IPRINT("(PPC Linux) => *NO* SKIP"), + false + end; + _ -> + ?IPRINT("(PPC Linux) Unknown distro => " + "*NO* SKIP"), + false + end; + _ -> + ?IPRINT("(Linux) Not PPC => *NO* SKIP"), + false + end + end, + Skippable = [{unix, [{linux, LinuxVersionVerify}]}], + %% </CONDITIONAL-SKIP> + case ?OS_BASED_SKIP(Skippable) of + true -> + {skip, "Host *may* not *properly* handle this test case"}; + false -> + wd_start(6, Config) + end; init_per_testcase1(_Case, Config) when is_list(Config) -> ?DBG("init_per_testcase -> entry with" "~n Case: ~p" |