chore(emqx_app): do not print 'starting' log when test

This commit is contained in:
Zaiming Shi 2021-04-19 19:40:02 +02:00 committed by Zaiming (Stone) Shi
parent b97b36d077
commit 7128bc9e6e
1 changed files with 10 additions and 4 deletions

View File

@ -83,19 +83,25 @@ print_otp_version_warning() -> ok.
print_otp_version_warning() -> print_otp_version_warning() ->
io:format("WARNING: Running on Erlang/OTP version ~p. Recommended: 23~n", io:format("WARNING: Running on Erlang/OTP version ~p. Recommended: 23~n",
[?OTP_RELEASE]). [?OTP_RELEASE]).
-endif. -endif. % OTP_RELEASE
-ifndef(TEST).
print_banner() -> print_banner() ->
io:format("Starting ~s on node ~s~n", [?APP, node()]). io:format("Starting ~s on node ~s~n", [?APP, node()]).
-ifndef(TEST).
print_vsn() -> print_vsn() ->
io:format("~s ~s is running now!~n", [get_description(), get_release()]). io:format("~s ~s is running now!~n", [get_description(), get_release()]).
-else.
-else. % TEST
print_vsn() -> print_vsn() ->
ok. ok.
-endif.
print_banner() ->
ok.
-endif. % TEST
get_description() -> get_description() ->
{ok, Descr0} = application:get_key(?APP, description), {ok, Descr0} = application:get_key(?APP, description),