diff options
Diffstat (limited to 'lib/ssh/test/ssh_test_lib.erl')
-rw-r--r-- | lib/ssh/test/ssh_test_lib.erl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl index a9591547dd..ae8f7abb70 100644 --- a/lib/ssh/test/ssh_test_lib.erl +++ b/lib/ssh/test/ssh_test_lib.erl @@ -55,6 +55,7 @@ rcv_lingering/1, receive_exec_result/1, receive_exec_result_or_fail/1, receive_exec_end/2, +receive_exec_end/3, receive_exec_result/3, failfun/2, hostname/0, @@ -443,10 +444,10 @@ receive_exec_result(Msgs) when is_list(Msgs) -> false -> case Msg of {ssh_cm,_,{data,_,1, Data}} -> - ct:log("~p:~p StdErr: ~p~n", [?MODULE,?FUNCTION_NAME,Data]), + ct:log("~p:~p unexpected StdErr: ~p~n~p~n", [?MODULE,?FUNCTION_NAME,Data,Msg]), receive_exec_result(Msgs); Other -> - ct:log("~p:~p Other ~p", [?MODULE,?FUNCTION_NAME,Other]), + ct:log("~p:~p unexpected Other ~p", [?MODULE,?FUNCTION_NAME,Other]), {unexpected_msg, Other} end end @@ -474,9 +475,12 @@ receive_exec_result_or_fail(Msg) -> end. receive_exec_end(ConnectionRef, ChannelId) -> + receive_exec_end(ConnectionRef, ChannelId, 0). + +receive_exec_end(ConnectionRef, ChannelId, ExitStatus) -> receive_exec_result( [{ssh_cm, ConnectionRef, {eof, ChannelId}}, - {optional, {ssh_cm, ConnectionRef, {exit_status, ChannelId, 0}}}, + {optional, {ssh_cm, ConnectionRef, {exit_status, ChannelId, ExitStatus}}}, {ssh_cm, ConnectionRef, {closed, ChannelId}} ]). |