aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_test_lib.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2015-10-01 18:51:10 +0200
committerHans Nilsson <[email protected]>2015-10-06 15:24:40 +0200
commita07d8d5ecd8aa1f09ce5437f58d1c41118337424 (patch)
tree94536009c4f7a294130243874c51ae92d943c0ec /lib/ssh/test/ssh_test_lib.erl
parentf1e82db97780529ccf46b8e7b72d482649b6dcd2 (diff)
downloadotp-a07d8d5ecd8aa1f09ce5437f58d1c41118337424.tar.gz
otp-a07d8d5ecd8aa1f09ce5437f58d1c41118337424.tar.bz2
otp-a07d8d5ecd8aa1f09ce5437f58d1c41118337424.zip
ssh: compression tests skipped if alg is not supported
Diffstat (limited to 'lib/ssh/test/ssh_test_lib.erl')
-rw-r--r--lib/ssh/test/ssh_test_lib.erl22
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl
index 6d568125bb..e16df6f959 100644
--- a/lib/ssh/test/ssh_test_lib.erl
+++ b/lib/ssh/test/ssh_test_lib.erl
@@ -552,4 +552,24 @@ algo_intersection(_, _) ->
to_atoms(L) -> lists:map(fun erlang:list_to_atom/1, L).
-
+%%%----------------------------------------------------------------
+ssh_supports(Alg, SshDefaultAlg_tag) ->
+ SupAlgs =
+ case proplists:get_value(SshDefaultAlg_tag,
+ ssh:default_algorithms()) of
+ [{_K1,L1}, {_K2,L2}] ->
+ lists:usort(L1++L2);
+ L ->
+ L
+ end,
+ if
+ is_atom(Alg) ->
+ lists:member(Alg, SupAlgs);
+ is_list(Alg) ->
+ case Alg--SupAlgs of
+ [] ->
+ true;
+ UnSup ->
+ {false,UnSup}
+ end
+ end.