diff options
author | Peter Andersson <[email protected]> | 2012-03-16 01:35:21 +0100 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2012-03-19 14:16:04 +0100 |
commit | 2409000567436f33fd912e9a809cc9dda3e9172f (patch) | |
tree | 68441dcdeaed0651f5df141aec38826fcaa566a5 /lib/test_server/src | |
parent | b411aa5d4e953d719d21f0108edfe20bde08c916 (diff) | |
download | otp-2409000567436f33fd912e9a809cc9dda3e9172f.tar.gz otp-2409000567436f33fd912e9a809cc9dda3e9172f.tar.bz2 otp-2409000567436f33fd912e9a809cc9dda3e9172f.zip |
Use calls to ct_framework:init/end_per_suite for configuration
Now that calls to ct_framework:init/end_per_suite take place
whenever init/end_per_suite is missing in the test suite,
these calls should trigger init/end_tc to perform configuration
(such as calling calling CTH functions, suite/0, etc).
Diffstat (limited to 'lib/test_server/src')
-rw-r--r-- | lib/test_server/src/test_server_ctrl.erl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/test_server/src/test_server_ctrl.erl b/lib/test_server/src/test_server_ctrl.erl index 91e469ed95..79c45de071 100644 --- a/lib/test_server/src/test_server_ctrl.erl +++ b/lib/test_server/src/test_server_ctrl.erl @@ -2199,7 +2199,7 @@ add_init_and_end_per_suite([], LastMod, LastRef, FwMod) -> %% let's call a "fake" end_per_suite if it exists case erlang:function_exported(FwMod, end_per_suite, 1) of true -> - [{conf,LastRef,[],{FwMod,end_per_suite}}]; + [{conf,LastRef,[{suite,LastMod}],{FwMod,end_per_suite}}]; false -> [{conf,LastRef,[],{LastMod,end_per_suite}}] end @@ -2220,7 +2220,8 @@ do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod) -> case erlang:function_exported(FwMod, init_per_suite, 1) of true -> Ref = make_ref(), - {[{conf,Ref,[],{FwMod,init_per_suite}}],Mod,Ref}; + {[{conf,Ref,[{suite,Mod}], + {FwMod,init_per_suite}}],Mod,Ref}; false -> {[],Mod,undefined} end @@ -2241,7 +2242,8 @@ do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod) -> %% let's call a "fake" end_per_suite if it exists case erlang:function_exported(FwMod, end_per_suite, 1) of true -> - [{conf,LastRef,[],{FwMod,end_per_suite}}|Init]; + [{conf,LastRef,[{suite,Mod}], + {FwMod,end_per_suite}}|Init]; false -> [{conf,LastRef,[],{LastMod,end_per_suite}}|Init] end @@ -2846,7 +2848,8 @@ run_test_cases_loop([{conf,Ref,Props,{Mod,Func}}|_Cases]=Cs0, end, Mode0), update_config(hd(Config), TSDirs ++ [{tc_group_path,GroupPath} | CfgProps]) - end, + end, + CurrMode = curr_mode(Ref, Mode0, Mode), ConfCaseResult = run_test_case(Ref, 0, Mod, Func, [ActualCfg], skip_init, target, TimetrapData, CurrMode), |