diff options
| author | Peter Andersson <[email protected]> | 2015-02-26 17:42:10 +0100 | 
|---|---|---|
| committer | Peter Andersson <[email protected]> | 2015-02-26 17:42:10 +0100 | 
| commit | bb8ddc6d95844f92f4a3bfd7bfd3073f63bcbf45 (patch) | |
| tree | 06b449ec8806414c516de7f4b4a9a85be07a2d8c /lib/common_test/src | |
| parent | e54f1984aa17554e7bfb5911f5d2b38b0cc9775c (diff) | |
| download | otp-bb8ddc6d95844f92f4a3bfd7bfd3073f63bcbf45.tar.gz otp-bb8ddc6d95844f92f4a3bfd7bfd3073f63bcbf45.tar.bz2 otp-bb8ddc6d95844f92f4a3bfd7bfd3073f63bcbf45.zip  | |
Add API functions for reading CT event manager references
Diffstat (limited to 'lib/common_test/src')
| -rw-r--r-- | lib/common_test/src/ct.erl | 14 | ||||
| -rw-r--r-- | lib/common_test/src/ct_master.erl | 13 | 
2 files changed, 27 insertions, 0 deletions
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]). @@ -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: +%%%         gen_event:add_handler(ct:get_event_mgr_ref(), my_ev_h, [])</p> +get_event_mgr_ref() -> +    ?CT_EVMGR_REF. + +%%%-----------------------------------------------------------------  %%% @spec encrypt_config_file(SrcFileName, EncryptFileName) ->   %%%                                                  ok | {error,Reason}  %%%       SrcFileName = string() 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]). @@ -292,6 +293,18 @@ progress() ->      call(progress).  %%%----------------------------------------------------------------- +%%% @spec get_event_mgr_ref() -> MasterEvMgrRef +%%%       MasterEvMgrRef = atom() +%%% +%%% @doc <p>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, [])</p> +get_event_mgr_ref() -> +    ?CT_MEVMGR_REF. + +%%%-----------------------------------------------------------------  %%% @spec basic_html(Bool) -> ok  %%%       Bool = true | false  %%%  | 
