diff options
Diffstat (limited to 'lib/ssh/test/ssh_test_lib.erl')
-rw-r--r-- | lib/ssh/test/ssh_test_lib.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl index 8b7d5e2992..8c9fb9038d 100644 --- a/lib/ssh/test/ssh_test_lib.erl +++ b/lib/ssh/test/ssh_test_lib.erl @@ -44,9 +44,13 @@ connect(Options) -> connect(Port, Options) when is_integer(Port) -> connect(hostname(), Port, Options); +connect(any, Options) -> + connect(hostname(), inet_port(), Options); connect(Host, Options) -> connect(Host, inet_port(), Options). +connect(any, Port, Options) -> + connect(hostname(), Port, Options); connect(Host, Port, Options) -> case ssh:connect(Host, Port, Options) of {ok, ConnectionRef} -> @@ -65,6 +69,8 @@ daemon(Host, Options) -> daemon(Host, Port, Options) -> case ssh:daemon(Host, Port, Options) of + {ok, Pid} when Host == any -> + {Pid, hostname(), Port}; {ok, Pid} -> {Pid, Host, Port}; Error -> |