From bb8ddc6d95844f92f4a3bfd7bfd3073f63bcbf45 Mon Sep 17 00:00:00 2001
From: Peter Andersson
Date: Thu, 26 Feb 2015 17:42:10 +0100
Subject: Add API functions for reading CT event manager references
---
lib/common_test/src/ct.erl | 14 ++++++++++++++
1 file changed, 14 insertions(+)
(limited to 'lib/common_test/src/ct.erl')
diff --git a/lib/common_test/src/ct.erl b/lib/common_test/src/ct.erl
index 85afdc7834..0dc80142e0 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]).
@@ -1004,6 +1006,18 @@ get_testdata(Key) ->
abort_current_testcase(Reason) ->
test_server_ctrl:abort_current_testcase(Reason).
+%%%-----------------------------------------------------------------
+%%% @spec get_event_mgr_ref() -> EvMgrRef
+%%% EvMgrRef = atom()
+%%%
+%%% @doc 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:
+%%% gen_event:add_handler(ct:get_event_mgr_ref(), my_ev_h, [])
+get_event_mgr_ref() ->
+ ?CT_EVMGR_REF.
+
%%%-----------------------------------------------------------------
%%% @spec encrypt_config_file(SrcFileName, EncryptFileName) ->
%%% ok | {error,Reason}
--
cgit v1.2.3
From d603d51333b2bdc58658ef8bfe7f2a2a8ed074a5 Mon Sep 17 00:00:00 2001
From: Peter Andersson
Date: Thu, 26 Feb 2015 23:11:38 +0100
Subject: Add documentation
---
lib/common_test/src/ct.erl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'lib/common_test/src/ct.erl')
diff --git a/lib/common_test/src/ct.erl b/lib/common_test/src/ct.erl
index 0dc80142e0..9d8fce2789 100644
--- a/lib/common_test/src/ct.erl
+++ b/lib/common_test/src/ct.erl
@@ -1014,7 +1014,7 @@ abort_current_testcase(Reason) ->
%%% CT event manager. The reference can be used to e.g. add
%%% a user specific event handler while tests are running.
%%% Example:
-%%% gen_event:add_handler(ct:get_event_mgr_ref(), my_ev_h, [])
+%%% gen_event:add_handler(ct:get_event_mgr_ref(), my_ev_h, [])
get_event_mgr_ref() ->
?CT_EVMGR_REF.
--
cgit v1.2.3