From 7db62c1513718c565dafa85838f3aadb8851627c Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Wed, 11 Sep 2013 00:57:40 +0200 Subject: Add misc documentation --- .../test/ct_pre_post_test_io_SUITE_data/cth_ctrl.erl | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'lib/common_test/test') diff --git a/lib/common_test/test/ct_pre_post_test_io_SUITE_data/cth_ctrl.erl b/lib/common_test/test/ct_pre_post_test_io_SUITE_data/cth_ctrl.erl index a9ea7b14dd..c8c08a5735 100644 --- a/lib/common_test/test/ct_pre_post_test_io_SUITE_data/cth_ctrl.erl +++ b/lib/common_test/test/ct_pre_post_test_io_SUITE_data/cth_ctrl.erl @@ -21,6 +21,8 @@ -export([proceed/0, init/2, terminate/1]). +-include_lib("common_test/include/ct.hrl"). + %%%=================================================================== %%% API %%%=================================================================== @@ -39,12 +41,12 @@ init(_Id, _Opts) -> ok end, WhoAmI = self(), + WhoAmI = whereis(?CT_HOOK_INIT_PROCESS), DispPid = spawn_link(fun() -> dispatcher(WhoAmI) end), register(?MODULE, DispPid), - io:format(user, - "~n~n+++ Startup of ~w on ~p finished, " - "call ~w:proceed() to run tests...~n", - [?MODULE,node(),?MODULE]), + ct:pal("~n~n+++ Startup of ~w on ~p finished, " + "call ~w:proceed() to run tests...~n", + [?MODULE,node(),?MODULE]), start_external_logger(cth_logger), receive {?MODULE,proceed} -> ok @@ -55,9 +57,10 @@ init(_Id, _Opts) -> {ok,[],ct_last}. terminate(_State) -> - io:format(user, - "~n~n+++ Tests finished, call ~w:proceed() to shut down...~n", - [?MODULE]), + WhoAmI = whereis(?CT_HOOK_TERMINATE_PROCESS), + WhoAmI = self(), + ct:pal("~n~n+++ Tests finished, call ~w:proceed() to shut down...~n", + [?MODULE]), receive {?MODULE,proceed} -> ok after -- cgit v1.2.3