aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2016-06-08 16:45:05 +0200
committerHans Nilsson <[email protected]>2016-06-09 12:14:08 +0200
commit78d071ee4404ad5473dd2f866632fc4c145ab7f2 (patch)
treee3b4c25ac309c5cb117f1e0aa7963125600376d3
parent8099c11c626a501aceebcb49eda042c4f3357db8 (diff)
downloadotp-78d071ee4404ad5473dd2f866632fc4c145ab7f2.tar.gz
otp-78d071ee4404ad5473dd2f866632fc4c145ab7f2.tar.bz2
otp-78d071ee4404ad5473dd2f866632fc4c145ab7f2.zip
ftp: logging of server start in ftp_SUITE
-rw-r--r--lib/inets/test/ftp_SUITE.erl26
1 files changed, 20 insertions, 6 deletions
diff --git a/lib/inets/test/ftp_SUITE.erl b/lib/inets/test/ftp_SUITE.erl
index 5867828a1f..e2dec0c42a 100644
--- a/lib/inets/test/ftp_SUITE.erl
+++ b/lib/inets/test/ftp_SUITE.erl
@@ -864,6 +864,7 @@ find_executable(Config) ->
search_executable([{Name,Paths,_StartCmd,_ChkUp,_StopCommand,_ConfigUpd,_Host,_Port}|Srvrs]) ->
case os_find(Name,Paths) of
false ->
+ ct:log("~p not found",[Name]),
search_executable(Srvrs);
AbsName ->
ct:comment("Found ~p",[AbsName]),
@@ -880,13 +881,26 @@ os_find(Name, Paths) ->
end.
%%%----------------------------------------------------------------
-start_ftpd(Config) ->
- {AbsName,StartCmd,_ChkUp,_StopCommand,ConfigRewrite,Host,Port} = proplists:get_value(ftpd_data, Config),
- case StartCmd(Config, AbsName) of
+start_ftpd(Config0) ->
+ {AbsName,StartCmd,_ChkUp,_StopCommand,ConfigRewrite,Host,Port} =
+ proplists:get_value(ftpd_data, Config0),
+ case StartCmd(Config0, AbsName) of
{ok,StartResult} ->
- [{ftpd_host,Host},
- {ftpd_port,Port},
- {ftpd_start_result,StartResult} | ConfigRewrite(Config)];
+ Config = [{ftpd_host,Host},
+ {ftpd_port,Port},
+ {ftpd_start_result,StartResult} | ConfigRewrite(Config0)],
+ try
+ ftp__close(ftp__open(Config,[verbose]))
+ of
+ Config1 when is_list(Config1) ->
+ ct:log("Usuable ftp server ~p started on ~p:~p",[AbsName,Host,Port]),
+ Config
+ catch
+ Class:Exception ->
+ ct:log("Ftp server ~p started on ~p:~p but is unusable:~n~p:~p",
+ [AbsName,Host,Port,Class,Exception]),
+ {skip, [AbsName," started but unusuable"]}
+ end;
{error,Msg} ->
{skip, [AbsName," not started: ",Msg]}
end.