aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_hooks.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2014-03-03 21:45:34 +0100
committerPeter Andersson <[email protected]>2014-03-12 17:04:59 +0100
commitffa2475adee774d0fced95d47fffe4528d436dd0 (patch)
tree4a4ee57b53b7ad7355ad9877022ba3bb368dd35e /lib/common_test/src/ct_hooks.erl
parentc9ef7945d7c1621ba6d51bb24dc1853f47e30cc5 (diff)
downloadotp-ffa2475adee774d0fced95d47fffe4528d436dd0.tar.gz
otp-ffa2475adee774d0fced95d47fffe4528d436dd0.tar.bz2
otp-ffa2475adee774d0fced95d47fffe4528d436dd0.zip
Update event protocol and CT Hooks API
Diffstat (limited to 'lib/common_test/src/ct_hooks.erl')
-rw-r--r--lib/common_test/src/ct_hooks.erl13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/common_test/src/ct_hooks.erl b/lib/common_test/src/ct_hooks.erl
index fa8d36392c..2e667030a9 100644
--- a/lib/common_test/src/ct_hooks.erl
+++ b/lib/common_test/src/ct_hooks.erl
@@ -121,12 +121,13 @@ end_tc(_Mod, TC, Config, Result, _Return) ->
call(fun call_generic/3, Result, [post_end_per_testcase, TC, Config],
'$ct_no_change').
-on_tc_skip(How, {Suite, GroupName, Case, Reason}) ->
- call(fun call_cleanup/3, {How, Reason},
- [on_tc_skip, Suite, GroupName, Case]).
+%% Case = TestCase | {TestCase,GroupName}
+on_tc_skip(How, {Suite, Case, Reason}) ->
+ call(fun call_cleanup/3, {How, Reason}, [on_tc_skip, Suite, Case]).
-on_tc_fail(_How, {Suite, GroupName, Case, Reason}) ->
- call(fun call_cleanup/3, Reason, [on_tc_fail, Suite, GroupName, Case]).
+%% Case = TestCase | {TestCase,GroupName}
+on_tc_fail(_How, {Suite, Case, Reason}) ->
+ call(fun call_cleanup/3, Reason, [on_tc_fail, Suite, Case]).
%% -------------------------------------------------------------------------
%% Internal Functions
@@ -246,7 +247,7 @@ scope([post_init_per_suite, SuiteName|_]) ->
scope(init) ->
none.
-terminate_if_scope_ends(HookId, [on_tc_skip,_Suite,Name,end_per_group],
+terminate_if_scope_ends(HookId, [on_tc_skip,_Suite,{end_per_group,Name}],
Hooks) ->
terminate_if_scope_ends(HookId, [post_end_per_group, Name], Hooks);
terminate_if_scope_ends(HookId, [on_tc_skip,Suite,end_per_suite], Hooks) ->