aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2014-09-19 22:26:30 +0200
committerIngela Anderton Andin <[email protected]>2014-09-19 22:26:30 +0200
commite00e62392040ddc328cd0581b4743a4edebe25ab (patch)
tree164ecf0a24992eec552dafe372d5f0c34d87ba5f /lib/ssh/test
parentd4d7231a24c697085ddf89fcdfac506b7e732e5c (diff)
downloadotp-e00e62392040ddc328cd0581b4743a4edebe25ab.tar.gz
otp-e00e62392040ddc328cd0581b4743a4edebe25ab.tar.bz2
otp-e00e62392040ddc328cd0581b4743a4edebe25ab.zip
ssh: Avoid windows wierdness
Diffstat (limited to 'lib/ssh/test')
-rw-r--r--lib/ssh/test/ssh_to_openssh_SUITE.erl25
1 files changed, 16 insertions, 9 deletions
diff --git a/lib/ssh/test/ssh_to_openssh_SUITE.erl b/lib/ssh/test/ssh_to_openssh_SUITE.erl
index 35179adf28..41fbd324c4 100644
--- a/lib/ssh/test/ssh_to_openssh_SUITE.erl
+++ b/lib/ssh/test/ssh_to_openssh_SUITE.erl
@@ -119,15 +119,7 @@ erlang_shell_client_openssh_server(Config) when is_list(Config) ->
IO ! {input, self(), "echo Hej\n"},
receive_hej(),
IO ! {input, self(), "exit\n"},
- receive
- <<"logout">> ->
- receive
- <<"Connection closed">> ->
- ok
- end;
- Other0 ->
- ct:fail({unexpected_msg, Other0})
- end,
+ receive_logout(),
receive
{'EXIT', Shell, normal} ->
ok;
@@ -544,6 +536,21 @@ receive_hej() ->
receive_hej()
end.
+receive_logout() ->
+ receive
+ <<"logout">> ->
+ receive
+ <<"Connection closed">> ->
+ ok
+ end;
+ <<"TERM environment variable not set.\n">> -> %% Windows work around
+ receive_logout();
+ Other0 ->
+ ct:fail({unexpected_msg, Other0})
+ end.
+
+
+
%%--------------------------------------------------------------------
%%--------------------------------------------------------------------
%% Check if we have a "newer" ssh client that supports these test cases