diff options
author | Lukas Larsson <[email protected]> | 2010-11-23 17:40:10 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2010-12-08 18:07:51 +0100 |
commit | eeb9e92f290a8a9d3431c541c2548bff5ad7c98f (patch) | |
tree | 75fa4cdd11d286f3d5890afe0816c36ae73f79c3 /lib/common_test | |
parent | 7a86a1a4802ac7ad596519a22377ed85cecfaaf5 (diff) | |
download | otp-eeb9e92f290a8a9d3431c541c2548bff5ad7c98f.tar.gz otp-eeb9e92f290a8a9d3431c541c2548bff5ad7c98f.tar.bz2 otp-eeb9e92f290a8a9d3431c541c2548bff5ad7c98f.zip |
Refactor tests to use '_' and '$proplist'
Diffstat (limited to 'lib/common_test')
4 files changed, 120 insertions, 82 deletions
diff --git a/lib/common_test/test/ct_suite_callback_SUITE.erl b/lib/common_test/test/ct_suite_callback_SUITE.erl index 059d76822a..e4bc524162 100644 --- a/lib/common_test/test/ct_suite_callback_SUITE.erl +++ b/lib/common_test/test/ct_suite_callback_SUITE.erl @@ -199,18 +199,21 @@ test_events(one_empty_scb) -> {?eh,scb,{empty_scb,init,[[]]}}, {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, {?eh,tc_start,{ct_scb_empty_SUITE,init_per_suite}}, - {?eh,scb,{empty_scb,pre_init_per_suite,[ct_scb_empty_SUITE,[]]}}, - {?eh,scb,{empty_scb,post_init_per_suite,[ct_scb_empty_SUITE,[]]}}, + {?eh,scb,{empty_scb,pre_init_per_suite, + [ct_scb_empty_SUITE,'$proplist',[]]}}, + {?eh,scb,{empty_scb,post_init_per_suite, + [ct_scb_empty_SUITE,'$proplist',[]]}}, {?eh,tc_done,{ct_scb_empty_SUITE,init_per_suite,ok}}, {?eh,tc_start,{ct_scb_empty_SUITE,test_case}}, - {?eh,scb,{empty_scb,pre_init_per_testcase,[test_case,[]]}}, - {?eh,scb,{empty_scb,post_end_per_testcase,[test_case,[]]}}, + {?eh,scb,{empty_scb,pre_init_per_testcase,[test_case,'$proplist',[]]}}, + {?eh,scb,{empty_scb,post_end_per_testcase,[test_case,'_',[]]}}, {?eh,tc_done,{ct_scb_empty_SUITE,test_case,ok}}, {?eh,tc_start,{ct_scb_empty_SUITE,end_per_suite}}, - {?eh,scb,{empty_scb,pre_end_per_suite,[ct_scb_empty_SUITE,[]]}}, - {?eh,scb,{empty_scb,post_end_per_suite,[ct_scb_empty_SUITE,[]]}}, + {?eh,scb,{empty_scb,pre_end_per_suite, + [ct_scb_empty_SUITE,'$proplist',[]]}}, + {?eh,scb,{empty_scb,post_end_per_suite,[ct_scb_empty_SUITE,'_',[]]}}, {?eh,tc_done,{ct_scb_empty_SUITE,end_per_suite,ok}}, {?eh,test_done,{'DEF','STOP_TIME'}}, {?eh,scb,{empty_scb,terminate,[[]]}}, @@ -220,32 +223,32 @@ test_events(one_empty_scb) -> test_events(two_empty_scb) -> [ {?eh,start_logging,{'DEF','RUNDIR'}}, - {?eh,scb,{empty_scb,init,[[]]}}, - {?eh,scb,{empty_scb,init,[[]]}}, + {?eh,scb,{'_',init,[[]]}}, + {?eh,scb,{'_',init,[[]]}}, {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, {?eh,tc_start,{ct_scb_empty_SUITE,init_per_suite}}, - {?eh,scb,{empty_scb,pre_init_per_suite,[ct_scb_empty_SUITE,[]]}}, - {?eh,scb,{empty_scb,pre_init_per_suite,[ct_scb_empty_SUITE,[]]}}, - {?eh,scb,{empty_scb,post_init_per_suite,[ct_scb_empty_SUITE,[]]}}, - {?eh,scb,{empty_scb,post_init_per_suite,[ct_scb_empty_SUITE,[]]}}, + {?eh,scb,{'_',pre_init_per_suite,[ct_scb_empty_SUITE,'$proplist',[]]}}, + {?eh,scb,{'_',pre_init_per_suite,[ct_scb_empty_SUITE,'$proplist',[]]}}, + {?eh,scb,{'_',post_init_per_suite,[ct_scb_empty_SUITE,'$proplist',[]]}}, + {?eh,scb,{'_',post_init_per_suite,[ct_scb_empty_SUITE,'$proplist',[]]}}, {?eh,tc_done,{ct_scb_empty_SUITE,init_per_suite,ok}}, {?eh,tc_start,{ct_scb_empty_SUITE,test_case}}, - {?eh,scb,{empty_scb,pre_init_per_testcase,[test_case,[]]}}, - {?eh,scb,{empty_scb,pre_init_per_testcase,[test_case,[]]}}, - {?eh,scb,{empty_scb,post_end_per_testcase,[test_case,[]]}}, - {?eh,scb,{empty_scb,post_end_per_testcase,[test_case,[]]}}, + {?eh,scb,{'_',pre_init_per_testcase,[test_case,'$proplist',[]]}}, + {?eh,scb,{'_',pre_init_per_testcase,[test_case,'$proplist',[]]}}, + {?eh,scb,{'_',post_end_per_testcase,[test_case,ok,[]]}}, + {?eh,scb,{'_',post_end_per_testcase,[test_case,ok,[]]}}, {?eh,tc_done,{ct_scb_empty_SUITE,test_case,ok}}, {?eh,tc_start,{ct_scb_empty_SUITE,end_per_suite}}, - {?eh,scb,{empty_scb,pre_end_per_suite,[ct_scb_empty_SUITE,[]]}}, - {?eh,scb,{empty_scb,pre_end_per_suite,[ct_scb_empty_SUITE,[]]}}, - {?eh,scb,{empty_scb,post_end_per_suite,[ct_scb_empty_SUITE,[]]}}, - {?eh,scb,{empty_scb,post_end_per_suite,[ct_scb_empty_SUITE,[]]}}, + {?eh,scb,{'_',pre_end_per_suite,[ct_scb_empty_SUITE,'$proplist',[]]}}, + {?eh,scb,{'_',pre_end_per_suite,[ct_scb_empty_SUITE,'$proplist',[]]}}, + {?eh,scb,{'_',post_end_per_suite,[ct_scb_empty_SUITE,'_',[]]}}, + {?eh,scb,{'_',post_end_per_suite,[ct_scb_empty_SUITE,'_',[]]}}, {?eh,tc_done,{ct_scb_empty_SUITE,end_per_suite,ok}}, {?eh,test_done,{'DEF','STOP_TIME'}}, - {?eh,scb,{empty_scb,terminate,[[]]}}, - {?eh,scb,{empty_scb,terminate,[[]]}}, + {?eh,scb,{'_',terminate,[[]]}}, + {?eh,scb,{'_',terminate,[[]]}}, {?eh,stop_logging,[]} ]; @@ -268,7 +271,7 @@ test_events(faulty_scb_no_init) -> test_events(minimal_scb) -> [ {?eh,start_logging,{'DEF','RUNDIR'}}, - {?eh,scb,{minimal_scb,init,[[]]}}, + {?eh,scb,{'_',init,[[]]}}, {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, {?eh,tc_start,{ct_scb_empty_SUITE,init_per_suite}}, {?eh,tc_done,{ct_scb_empty_SUITE,init_per_suite,ok}}, @@ -285,25 +288,25 @@ test_events(minimal_scb) -> test_events(minimal_and_maximal_scb) -> [ {?eh,start_logging,{'DEF','RUNDIR'}}, - {?eh,scb,{minimal_scb,init,[[]]}}, - {?eh,scb,{empty_scb,init,[[]]}}, + {?eh,scb,{'_',init,[[]]}}, + {?eh,scb,{'_',init,[[]]}}, {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, {?eh,tc_start,{ct_scb_empty_SUITE,init_per_suite}}, - {?eh,scb,{empty_scb,pre_init_per_suite,[ct_scb_empty_SUITE,[]]}}, - {?eh,scb,{empty_scb,post_init_per_suite,[ct_scb_empty_SUITE,[]]}}, + {?eh,scb,{'_',pre_init_per_suite,[ct_scb_empty_SUITE,'$proplist',[]]}}, + {?eh,scb,{'_',post_init_per_suite,[ct_scb_empty_SUITE,'$proplist',[]]}}, {?eh,tc_done,{ct_scb_empty_SUITE,init_per_suite,ok}}, {?eh,tc_start,{ct_scb_empty_SUITE,test_case}}, - {?eh,scb,{empty_scb,pre_init_per_testcase,[test_case,[]]}}, - {?eh,scb,{empty_scb,post_end_per_testcase,[test_case,[]]}}, + {?eh,scb,{'_',pre_init_per_testcase,[test_case,'$proplist',[]]}}, + {?eh,scb,{'_',post_end_per_testcase,[test_case,ok,[]]}}, {?eh,tc_done,{ct_scb_empty_SUITE,test_case,ok}}, {?eh,tc_start,{ct_scb_empty_SUITE,end_per_suite}}, - {?eh,scb,{empty_scb,pre_end_per_suite,[ct_scb_empty_SUITE,[]]}}, - {?eh,scb,{empty_scb,post_end_per_suite,[ct_scb_empty_SUITE,[]]}}, + {?eh,scb,{'_',pre_end_per_suite,[ct_scb_empty_SUITE,'$proplist',[]]}}, + {?eh,scb,{'_',post_end_per_suite,[ct_scb_empty_SUITE,'_',[]]}}, {?eh,tc_done,{ct_scb_empty_SUITE,end_per_suite,ok}}, {?eh,test_done,{'DEF','STOP_TIME'}}, - {?eh,scb,{empty_scb,terminate,[[]]}}, + {?eh,scb,{'_',terminate,[[]]}}, {?eh,stop_logging,[]} ]; @@ -313,16 +316,21 @@ test_events(faulty_scb_undef) -> {failed,FailReasonStr}}, [ {?eh,start_logging,{'DEF','RUNDIR'}}, - {?eh,scb,{undef_scb,init,[[]]}}, + {?eh,scb,{'_',init,[[]]}}, {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, {?eh,tc_start,{ct_scb_empty_SUITE,init_per_suite}}, {?eh,tc_done,{ct_scb_empty_SUITE,init_per_suite, {failed, {error,FailReasonStr}}}}, + {?eh,scb,{'_',on_tc_fail,'_'}}, {?eh,tc_auto_skip,{ct_scb_empty_SUITE,test_case, {failed, FailReason}}}, + {?eh,scb,{'_',on_tc_skip,'_'}}, + {?eh,tc_auto_skip,{ct_scb_empty_SUITE,end_per_suite, {failed, FailReason}}}, + {?eh,scb,{'_',on_tc_skip,'_'}}, + {?eh,test_done,{'DEF','STOP_TIME'}}, {?eh,stop_logging,[]} ]; @@ -332,19 +340,20 @@ test_events(scope_per_suite_scb) -> {?eh,start_logging,{'DEF','RUNDIR'}}, {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, {?eh,tc_start,{ct_scope_per_suite_scb_SUITE,init_per_suite}}, - {?eh,scb,{empty_scb,init,[[]]}}, - {?eh,scb,{empty_scb,post_init_per_suite,[ct_scope_per_suite_scb_SUITE,[]]}}, + {?eh,scb,{'_',init,[[]]}}, + {?eh,scb,{'_',post_init_per_suite,[ct_scope_per_suite_scb_SUITE,'$proplist',[]]}}, {?eh,tc_done,{ct_scope_per_suite_scb_SUITE,init_per_suite,ok}}, {?eh,tc_start,{ct_scope_per_suite_scb_SUITE,test_case}}, - {?eh,scb,{empty_scb,pre_init_per_testcase,[test_case,[]]}}, - {?eh,scb,{empty_scb,post_end_per_testcase,[test_case,[]]}}, + {?eh,scb,{'_',pre_init_per_testcase,[test_case,'$proplist',[]]}}, + {?eh,scb,{'_',post_end_per_testcase,[test_case,ok,[]]}}, {?eh,tc_done,{ct_scope_per_suite_scb_SUITE,test_case,ok}}, {?eh,tc_start,{ct_scope_per_suite_scb_SUITE,end_per_suite}}, - {?eh,scb,{empty_scb,pre_end_per_suite,[ct_scope_per_suite_scb_SUITE,[]]}}, - {?eh,scb,{empty_scb,post_end_per_suite,[ct_scope_per_suite_scb_SUITE,[]]}}, - {?eh,scb,{empty_scb,terminate,[[]]}}, + {?eh,scb,{'_',pre_end_per_suite, + [ct_scope_per_suite_scb_SUITE,'$proplist',[]]}}, + {?eh,scb,{'_',post_end_per_suite,[ct_scope_per_suite_scb_SUITE,'_',[]]}}, + {?eh,scb,{'_',terminate,[[]]}}, {?eh,tc_done,{ct_scope_per_suite_scb_SUITE,end_per_suite,ok}}, {?eh,test_done,{'DEF','STOP_TIME'}}, {?eh,stop_logging,[]} @@ -355,20 +364,20 @@ test_events(scope_suite_scb) -> {?eh,start_logging,{'DEF','RUNDIR'}}, {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, {?eh,tc_start,{ct_scope_suite_scb_SUITE,init_per_suite}}, - {?eh,scb,{empty_scb,init,[[]]}}, - {?eh,scb,{empty_scb,pre_init_per_suite,[ct_scope_suite_scb_SUITE,[]]}}, - {?eh,scb,{empty_scb,post_init_per_suite,[ct_scope_suite_scb_SUITE,[]]}}, + {?eh,scb,{'_',init,[[]]}}, + {?eh,scb,{'_',pre_init_per_suite,[ct_scope_suite_scb_SUITE,'$proplist',[]]}}, + {?eh,scb,{'_',post_init_per_suite,[ct_scope_suite_scb_SUITE,'$proplist',[]]}}, {?eh,tc_done,{ct_scope_suite_scb_SUITE,init_per_suite,ok}}, {?eh,tc_start,{ct_scope_suite_scb_SUITE,test_case}}, - {?eh,scb,{empty_scb,pre_init_per_testcase,[test_case,[]]}}, - {?eh,scb,{empty_scb,post_end_per_testcase,[test_case,[]]}}, + {?eh,scb,{'_',pre_init_per_testcase,[test_case,'$proplist',[]]}}, + {?eh,scb,{'_',post_end_per_testcase,[test_case,ok,[]]}}, {?eh,tc_done,{ct_scope_suite_scb_SUITE,test_case,ok}}, {?eh,tc_start,{ct_scope_suite_scb_SUITE,end_per_suite}}, - {?eh,scb,{empty_scb,pre_end_per_suite,[ct_scope_suite_scb_SUITE,[]]}}, - {?eh,scb,{empty_scb,post_end_per_suite,[ct_scope_suite_scb_SUITE,[]]}}, - {?eh,scb,{empty_scb,terminate,[[]]}}, + {?eh,scb,{'_',pre_end_per_suite,[ct_scope_suite_scb_SUITE,'$proplist',[]]}}, + {?eh,scb,{'_',post_end_per_suite,[ct_scope_suite_scb_SUITE,'_',[]]}}, + {?eh,scb,{'_',terminate,[[]]}}, {?eh,tc_done,{ct_scope_suite_scb_SUITE,end_per_suite,ok}}, {?eh,test_done,{'DEF','STOP_TIME'}}, {?eh,stop_logging,[]} @@ -401,19 +410,19 @@ test_events(scope_per_group_scb) -> {?eh,tc_done,{ct_scope_per_group_scb_SUITE,init_per_suite,ok}}, [{?eh,tc_start,{ct_scope_per_group_scb_SUITE,{init_per_group,group1,[]}}}, - {?eh,scb,{empty_scb,init,[[]]}}, - {?eh,scb,{empty_scb,post_init_per_group,[group1,[]]}}, + {?eh,scb,{'_',init,[[]]}}, + {?eh,scb,{'_',post_init_per_group,[group1,'$proplist',[]]}}, {?eh,tc_done,{ct_scope_per_group_scb_SUITE,{init_per_group,group1,[]},ok}}, {?eh,tc_start,{ct_scope_per_group_scb_SUITE,test_case}}, - {?eh,scb,{empty_scb,pre_init_per_testcase,[test_case,[]]}}, - {?eh,scb,{empty_scb,post_end_per_testcase,[test_case,[]]}}, + {?eh,scb,{'_',pre_init_per_testcase,[test_case,'$proplist',[]]}}, + {?eh,scb,{'_',post_end_per_testcase,[test_case,ok,[]]}}, {?eh,tc_done,{ct_scope_per_group_scb_SUITE,test_case,ok}}, {?eh,tc_start,{ct_scope_per_group_scb_SUITE,{end_per_group,group1,[]}}}, - {?eh,scb,{empty_scb,pre_end_per_group,[group1,[]]}}, - {?eh,scb,{empty_scb,post_end_per_group,[group1,[]]}}, - {?eh,scb,{empty_scb,terminate,[[]]}}, + {?eh,scb,{'_',pre_end_per_group,[group1,'$proplist',[]]}}, + {?eh,scb,{'_',post_end_per_group,[group1,'_',[]]}}, + {?eh,scb,{'_',terminate,[[]]}}, {?eh,tc_done,{ct_scope_per_group_scb_SUITE,{end_per_group,group1,[]},ok}}], {?eh,tc_start,{ct_scope_per_group_scb_SUITE,end_per_suite}}, diff --git a/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/empty_scb.erl b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/empty_scb.erl index 0d98a8c55a..05f6563c45 100644 --- a/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/empty_scb.erl +++ b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/empty_scb.erl @@ -91,7 +91,7 @@ pre_init_per_suite(Suite,Config,State) -> gen_event:notify(
?CT_EVMGR_REF, #event{ name = scb, node = node(),
data = {?MODULE, pre_init_per_suite,
- [Suite,State]}}),
+ [Suite,Config,State]}}),
{Config, State}.
%% @doc Called after init_per_suite.
@@ -104,7 +104,7 @@ post_init_per_suite(Suite,Config,State) -> gen_event:notify(
?CT_EVMGR_REF, #event{ name = scb, node = node(),
data = {?MODULE, post_init_per_suite,
- [Suite,State]}}),
+ [Suite,Config,State]}}),
{Config, State}.
%% @doc Called before end_per_suite. Note that the config cannot be
@@ -117,7 +117,7 @@ pre_end_per_suite(Suite,Config,State) -> gen_event:notify(
?CT_EVMGR_REF, #event{ name = scb, node = node(),
data = {?MODULE, pre_end_per_suite,
- [Suite,State]}}),
+ [Suite,Config,State]}}),
{Config, State}.
%% @doc Called after end_per_suite. Note that the config cannot be
@@ -130,7 +130,7 @@ post_end_per_suite(Suite,Config,State) -> gen_event:notify(
?CT_EVMGR_REF, #event{ name = scb, node = node(),
data = {?MODULE, post_end_per_suite,
- [Suite,State]}}),
+ [Suite,Config,State]}}),
{Config, State}.
%% @doc Called before each init_per_group.
@@ -143,7 +143,7 @@ pre_init_per_group(Group,Config,State) -> gen_event:notify(
?CT_EVMGR_REF, #event{ name = scb, node = node(),
data = {?MODULE, pre_init_per_group,
- [Group,State]}}),
+ [Group,Config,State]}}),
{Config, State}.
%% @doc Called after each init_per_group.
@@ -156,7 +156,7 @@ post_init_per_group(Group,Config,State) -> gen_event:notify(
?CT_EVMGR_REF, #event{ name = scb, node = node(),
data = {?MODULE, post_init_per_group,
- [Group,State]}}),
+ [Group,Config,State]}}),
{Config, State}.
%% @doc Called after each end_per_group. Note that the config cannot be
@@ -169,7 +169,7 @@ pre_end_per_group(Group,Config,State) -> gen_event:notify(
?CT_EVMGR_REF, #event{ name = scb, node = node(),
data = {?MODULE, pre_end_per_group,
- [Group,State]}}),
+ [Group,Config,State]}}),
{Config, State}.
%% @doc Called after each end_per_group. Note that the config cannot be
@@ -182,7 +182,7 @@ post_end_per_group(Group,Config,State) -> gen_event:notify(
?CT_EVMGR_REF, #event{ name = scb, node = node(),
data = {?MODULE, post_end_per_group,
- [Group,State]}}),
+ [Group,Config,State]}}),
{Config, State}.
%% @doc Called before each test case.
@@ -195,7 +195,7 @@ pre_init_per_testcase(TC,Config,State) -> gen_event:notify(
?CT_EVMGR_REF, #event{ name = scb, node = node(),
data = {?MODULE, pre_init_per_testcase,
- [TC,State]}}),
+ [TC,Config,State]}}),
{Config, State}.
%% @doc Called after each test case. Note that the config cannot be
@@ -208,7 +208,7 @@ post_end_per_testcase(TC,Config,State) -> gen_event:notify(
?CT_EVMGR_REF, #event{ name = scb, node = node(),
data = {?MODULE, post_end_per_testcase,
- [TC,State]}}),
+ [TC,Config,State]}}),
{Config, State}.
%% @doc Called after post_init_per_suite, post_end_per_suite, post_init_per_group,
@@ -218,13 +218,13 @@ post_end_per_testcase(TC,Config,State) -> -spec on_tc_fail(TC :: init_per_suite | end_per_suite |
init_per_group | end_per_group | atom(),
Reason :: term(), State :: #state{}) ->
- ok.
+ NewState :: #state{}.
on_tc_fail(TC, Reason, State) ->
gen_event:notify(
?CT_EVMGR_REF, #event{ name = scb, node = node(),
data = {?MODULE, on_tc_fail,
- [TC,State]}}),
- ok.
+ [TC,Reason,State]}}),
+ State.
%% @doc Called when a test case is skipped by either user action
%% or due to an init function failing. Test case can be
@@ -234,13 +234,13 @@ on_tc_fail(TC, Reason, State) -> {tc_auto_skip, {failed, {Mod :: atom(), Function :: atom(), Reason :: term()}}} |
{tc_user_skip, {skipped, Reason :: term()}},
State :: #state{}) ->
- ok.
+ NewState :: #state{}.
on_tc_skip(TC, Reason, State) ->
gen_event:notify(
?CT_EVMGR_REF, #event{ name = scb, node = node(),
data = {?MODULE, on_tc_skip,
- [TC,State]}}),
- ok.
+ [TC,Reason,State]}}),
+ State.
%% @doc Called when the scope of the SCB is done, this depends on
%% when the SCB was specified. This translation table describes when this
@@ -253,7 +253,6 @@ on_tc_skip(TC, Reason, State) -> %% | suite/0 | after SUITE is done |
%% | init_per_suite/1 | after SUITE is done |
%% | init_per_group/2 | after group is done |
-%% | init_per_testcase/2 | after test case is done |
%% |-----------------------------------------------|
%%
-spec terminate(State :: #state{}) ->
diff --git a/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/minimal_scb.erl b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/minimal_scb.erl index c08f1aba4a..e5fdbfb8a0 100644 --- a/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/minimal_scb.erl +++ b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/minimal_scb.erl @@ -29,7 +29,5 @@ -export([init/1]).
init(Opts) ->
- gen_event:notify(?CT_EVMGR_REF, #event{ name = scb, node = node(),
- data = {?MODULE, init, [Opts]}}),
- {now(), Opts}.
+ empty_scb:init(Opts).
diff --git a/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/undef_scb.erl b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/undef_scb.erl index cc0651d3dd..80d0f10415 100644 --- a/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/undef_scb.erl +++ b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/undef_scb.erl @@ -26,14 +26,46 @@ %% Suite Callbacks
--export([init/1]).
--export([pre_init_per_suite/3]).
+-compile(export_all).
init(Opts) ->
- gen_event:notify(?CT_EVMGR_REF, #event{ name = scb, node = node(),
- data = {?MODULE, init, [Opts]}}),
- {now(), Opts}.
+ empty_scb:init(Opts).
-
-pre_init_per_suite(Suite, Config, State) ->
+pre_init_per_suite(_Suite, _Config, _State) ->
lists:flaten([1,2,[3,4]]).
+
+post_init_per_suite(Suite,Config,State) ->
+ empty_scb:post_init_per_suite(Suite,Config,State).
+
+pre_end_per_suite(Suite,Config,State) ->
+ empty_scb:pre_end_per_suite(Suite,Config,State).
+
+post_end_per_suite(Suite,Config,State) ->
+ empty_scb:post_end_per_suite(Suite,Config,State).
+
+pre_init_per_group(Group,Config,State) ->
+ empty_scb:pre_init_per_group(Group,Config,State).
+
+post_init_per_group(Group,Config,State) ->
+ empty_scb:post_init_per_group(Group,Config,State).
+
+pre_end_per_group(Group,Config,State) ->
+ empty_scb:pre_end_per_group(Group,Config,State).
+
+post_end_per_group(Group,Config,State) ->
+ empty_scb:post_end_per_group(Group,Config,State).
+
+pre_init_per_testcase(TC,Config,State) ->
+ empty_scb:pre_init_per_testcase(TC,Config,State).
+
+post_end_per_testcase(TC,Config,State) ->
+ empty_scb:post_end_per_testcase(TC,Config,State).
+
+on_tc_fail(TC, Reason, State) ->
+ empty_scb:on_tc_fail(TC,Reason,State).
+
+on_tc_skip(TC, Reason, State) ->
+ empty_scb:on_tc_skip(TC,Reason,State).
+
+terminate(State) ->
+ empty_scb:terminate(State).
|