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_master.erl | 13 +++++++++++++
1 file changed, 13 insertions(+)
(limited to 'lib/common_test/src/ct_master.erl')
diff --git a/lib/common_test/src/ct_master.erl b/lib/common_test/src/ct_master.erl
index b42ff73846..0a41a0ed15 100644
--- a/lib/common_test/src/ct_master.erl
+++ b/lib/common_test/src/ct_master.erl
@@ -25,6 +25,7 @@
-export([run/1,run/3,run/4]).
-export([run_on_node/2,run_on_node/3]).
-export([run_test/1,run_test/2]).
+-export([get_event_mgr_ref/0]).
-export([basic_html/1]).
-export([abort/0,abort/1,progress/0]).
@@ -291,6 +292,18 @@ abort(Node) when is_atom(Node) ->
progress() ->
call(progress).
+%%%-----------------------------------------------------------------
+%%% @spec get_event_mgr_ref() -> MasterEvMgrRef
+%%% MasterEvMgrRef = atom()
+%%%
+%%% @doc Call this function in order to get a reference to the
+%%% CT master 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_master:get_event_mgr_ref(), my_ev_h, [])
+get_event_mgr_ref() ->
+ ?CT_MEVMGR_REF.
+
%%%-----------------------------------------------------------------
%%% @spec basic_html(Bool) -> ok
%%% Bool = true | false
--
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_master.erl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'lib/common_test/src/ct_master.erl')
diff --git a/lib/common_test/src/ct_master.erl b/lib/common_test/src/ct_master.erl
index 0a41a0ed15..2cdb259899 100644
--- a/lib/common_test/src/ct_master.erl
+++ b/lib/common_test/src/ct_master.erl
@@ -300,7 +300,7 @@ progress() ->
%%% CT master 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_master:get_event_mgr_ref(), my_ev_h, [])
+%%% gen_event:add_handler(ct_master:get_event_mgr_ref(), my_ev_h, [])
get_event_mgr_ref() ->
?CT_MEVMGR_REF.
--
cgit v1.2.3