diff options
author | Ingela Anderton Andin <[email protected]> | 2015-05-04 09:30:05 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2015-05-04 09:30:05 +0200 |
commit | 33a27226f7402b2daea5c107e94790426e66ea74 (patch) | |
tree | 1a8937504dc18530b7bf8a2aad39052ecf086565 /lib/ssh/test/ssh_test_lib.erl | |
parent | afd7d321ed5fe9b34d8a2dd18bda3d14978410ca (diff) | |
parent | fb584c520ef60845506a14cb910745ffc3b92a66 (diff) | |
download | otp-33a27226f7402b2daea5c107e94790426e66ea74.tar.gz otp-33a27226f7402b2daea5c107e94790426e66ea74.tar.bz2 otp-33a27226f7402b2daea5c107e94790426e66ea74.zip |
Merge branch 'ia/ssh/test-openssh-cuddle'
* ia/ssh/test-openssh-cuddle:
ssh: Add openSSH interop check
Diffstat (limited to 'lib/ssh/test/ssh_test_lib.erl')
-rw-r--r-- | lib/ssh/test/ssh_test_lib.erl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl index b8abf5e80e..8ca05746db 100644 --- a/lib/ssh/test/ssh_test_lib.erl +++ b/lib/ssh/test/ssh_test_lib.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2012. All Rights Reserved. +%% Copyright Ericsson AB 2004-2015. 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 @@ -358,3 +358,16 @@ do_inet_port(Node) -> {ok, Socket} = rpc:call(Node, gen_tcp, listen, [0, [{reuseaddr, true}]]), {ok, Port} = rpc:call(Node, inet, port, [Socket]), {Port, Socket}. + +openssh_sanity_check(Config) -> + ssh:start(), + case ssh:connect("localhost", 22, []) of + {ok, Pid} -> + ssh:close(Pid), + ssh:stop(), + Config; + Err -> + Str = lists:append(io_lib:format("~p", [Err])), + ssh:stop(), + {skip, Str} + end. |