aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2015-03-18 10:51:55 +0100
committerPeter Andersson <[email protected]>2015-03-18 10:51:55 +0100
commit3f14d81b883fd5a6d853e2d15537da3bbe6084ff (patch)
tree0a23b3decc595a3b22aab8a49597a40b0d8afb61 /lib/common_test/src/ct.erl
parent0a6d665ebc5d90f81162923d22c967990be8eefb (diff)
parent286fbba4880eb58239e03751f088ebbbf38512cd (diff)
downloadotp-3f14d81b883fd5a6d853e2d15537da3bbe6084ff.tar.gz
otp-3f14d81b883fd5a6d853e2d15537da3bbe6084ff.tar.bz2
otp-3f14d81b883fd5a6d853e2d15537da3bbe6084ff.zip
Merge branch 'maint'
Diffstat (limited to 'lib/common_test/src/ct.erl')
-rw-r--r--lib/common_test/src/ct.erl14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/common_test/src/ct.erl b/lib/common_test/src/ct.erl
index 85afdc7834..9d8fce2789 100644
--- a/lib/common_test/src/ct.erl
+++ b/lib/common_test/src/ct.erl
@@ -52,6 +52,7 @@
-module(ct).
-include("ct.hrl").
+-include("ct_util.hrl").
%% Command line user interface for running tests
-export([install/1, run/1, run/2, run/3,
@@ -77,6 +78,7 @@
%% Other interface functions
-export([get_status/0, abort_current_testcase/1,
+ get_event_mgr_ref/0,
encrypt_config_file/2, encrypt_config_file/3,
decrypt_config_file/2, decrypt_config_file/3]).
@@ -1005,6 +1007,18 @@ abort_current_testcase(Reason) ->
test_server_ctrl:abort_current_testcase(Reason).
%%%-----------------------------------------------------------------
+%%% @spec get_event_mgr_ref() -> EvMgrRef
+%%% EvMgrRef = atom()
+%%%
+%%% @doc <p>Call this function in order to get a reference to the
+%%% CT event manager. The reference can be used to e.g. add
+%%% a user specific event handler while tests are running.
+%%% Example:
+%%% <c>gen_event:add_handler(ct:get_event_mgr_ref(), my_ev_h, [])</c></p>
+get_event_mgr_ref() ->
+ ?CT_EVMGR_REF.
+
+%%%-----------------------------------------------------------------
%%% @spec encrypt_config_file(SrcFileName, EncryptFileName) ->
%%% ok | {error,Reason}
%%% SrcFileName = string()