aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test/ct_test_support.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2012-03-21 16:03:46 +0100
committerPeter Andersson <[email protected]>2012-03-21 16:03:46 +0100
commit390843117229d7d6e1e5f167aca9ea2ebe6df5f2 (patch)
tree4c01dca5f584400002e4ec573d4f7e4bdde077c3 /lib/common_test/test/ct_test_support.erl
parentafe7a29a54a7958ac90e44b3bee6c572792bb96b (diff)
downloadotp-390843117229d7d6e1e5f167aca9ea2ebe6df5f2.tar.gz
otp-390843117229d7d6e1e5f167aca9ea2ebe6df5f2.tar.bz2
otp-390843117229d7d6e1e5f167aca9ea2ebe6df5f2.zip
Update ct_master to use the Common Test CSS file for the logs
OTP-9973
Diffstat (limited to 'lib/common_test/test/ct_test_support.erl')
-rw-r--r--lib/common_test/test/ct_test_support.erl16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/common_test/test/ct_test_support.erl b/lib/common_test/test/ct_test_support.erl
index 6df02d12b7..42d4a1630d 100644
--- a/lib/common_test/test/ct_test_support.erl
+++ b/lib/common_test/test/ct_test_support.erl
@@ -29,7 +29,7 @@
-export([init_per_suite/1, init_per_suite/2, end_per_suite/1,
init_per_testcase/2, end_per_testcase/2,
write_testspec/2, write_testspec/3,
- run/2, run/4, get_opts/1, wait_for_ct_stop/1]).
+ run/2, run/3, run/4, get_opts/1, wait_for_ct_stop/1]).
-export([handle_event/2, start_event_receiver/1, get_events/2,
verify_events/3, reformat/2, log_events/4,
@@ -223,7 +223,7 @@ get_opts(Config) ->
%%%-----------------------------------------------------------------
%%%
-run(Opts, Config) ->
+run(Opts, Config) when is_list(Opts) ->
CTNode = proplists:get_value(ct_node, Config),
Level = proplists:get_value(trace_level, Config),
%% use ct interface
@@ -256,9 +256,19 @@ run(Opts, Config) ->
end.
run(M, F, A, Config) ->
+ run({M,F,A}, [], Config).
+
+run({M,F,A}, InitCalls, Config) ->
CTNode = proplists:get_value(ct_node, Config),
Level = proplists:get_value(trace_level, Config),
- test_server:format(Level, "~nCalling ~w:~w(~p) on ~p~n",
+ lists:foreach(
+ fun({IM,IF,IA}) ->
+ test_server:format(Level, "~nInit call ~w:~w(~p) on ~p...~n",
+ [IM, IF, IA, CTNode]),
+ Result = rpc:call(CTNode, IM, IF, IA),
+ test_server:format(Level, "~n...with result: ~p~n", [Result])
+ end, InitCalls),
+ test_server:format(Level, "~nStarting test with ~w:~w(~p) on ~p~n",
[M, F, A, CTNode]),
rpc:call(CTNode, M, F, A).