diff options
author | Peter Andersson <[email protected]> | 2012-03-20 09:34:38 +0100 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2012-03-20 09:34:48 +0100 |
commit | f16576b473d4f514197d6262e7a4c4a23c00d9e5 (patch) | |
tree | 6cef1aeab359ebc5adbd8b0c02aeb7871fbe87a0 /lib/common_test/src/ct_hooks.erl | |
parent | eb8c407eabfac8696f0ff235ce9d31af5698cf53 (diff) | |
parent | 7b16f86fb5933a94b21a11391dc37562283991da (diff) | |
download | otp-f16576b473d4f514197d6262e7a4c4a23c00d9e5.tar.gz otp-f16576b473d4f514197d6262e7a4c4a23c00d9e5.tar.bz2 otp-f16576b473d4f514197d6262e7a4c4a23c00d9e5.zip |
Merge remote branch 'origin/peppe/common_test/otp-9880_9986_9989' into maint
* origin/peppe/common_test/otp-9880_9986_9989:
Fix error with group config deleted before post_end_per_group
Introduce new test suite for CTHs
Fix bug in handling ct_hooks start arguments
Use calls to ct_framework:init/end_per_suite for configuration
Change ct_init/end_per_group to init/end_per_group
Run hooks for non-existing config functions
OTP-9880
OTP-9986
OTP-9989
OTP-9992
Diffstat (limited to 'lib/common_test/src/ct_hooks.erl')
-rw-r--r-- | lib/common_test/src/ct_hooks.erl | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/common_test/src/ct_hooks.erl b/lib/common_test/src/ct_hooks.erl index c42adbbdd9..2a23cd992b 100644 --- a/lib/common_test/src/ct_hooks.erl +++ b/lib/common_test/src/ct_hooks.erl @@ -70,8 +70,7 @@ terminate(Hooks) -> {skip, Reason :: term()} | {auto_skip, Reason :: term()} | {fail, Reason :: term()}. -init_tc(ct_framework, _Func, Args) -> - Args; + init_tc(Mod, init_per_suite, Config) -> Info = try proplists:get_value(ct_hooks, Mod:suite(),[]) of List when is_list(List) -> @@ -104,27 +103,21 @@ init_tc(_Mod, TC, Config) -> {auto_skip, Reason :: term()} | {fail, Reason :: term()} | ok | '$ct_no_change'. -end_tc(ct_framework, _Func, _Args, Result, _Return) -> - Result; end_tc(Mod, init_per_suite, Config, _Result, Return) -> call(fun call_generic/3, Return, [post_init_per_suite, Mod, Config], '$ct_no_change'); - end_tc(Mod, end_per_suite, Config, Result, _Return) -> call(fun call_generic/3, Result, [post_end_per_suite, Mod, Config], '$ct_no_change'); - end_tc(_Mod, {init_per_group, GroupName, _}, Config, _Result, Return) -> call(fun call_generic/3, Return, [post_init_per_group, GroupName, Config], '$ct_no_change'); - end_tc(Mod, {end_per_group, GroupName, Opts}, Config, Result, _Return) -> Res = call(fun call_generic/3, Result, [post_end_per_group, GroupName, Config], '$ct_no_change'), maybe_stop_locker(Mod, GroupName,Opts), Res; - end_tc(_Mod, TC, Config, Result, _Return) -> call(fun call_generic/3, Result, [post_end_per_testcase, TC, Config], '$ct_no_change'). |