aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_hooks.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2016-03-01 16:51:33 +0100
committerPeter Andersson <[email protected]>2016-03-03 14:32:46 +0100
commit3e720193641aa92d0082586ba64fc75cda32103c (patch)
tree6e34eac007e910ae22de3ee8b33cbd06a0a8c382 /lib/common_test/src/ct_hooks.erl
parenta99c84bf251e21f23c77f1026e32e63cf552143e (diff)
downloadotp-3e720193641aa92d0082586ba64fc75cda32103c.tar.gz
otp-3e720193641aa92d0082586ba64fc75cda32103c.tar.bz2
otp-3e720193641aa92d0082586ba64fc75cda32103c.zip
Fix remaining issues
Diffstat (limited to 'lib/common_test/src/ct_hooks.erl')
-rw-r--r--lib/common_test/src/ct_hooks.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/common_test/src/ct_hooks.erl b/lib/common_test/src/ct_hooks.erl
index 4008ea998a..b604074d12 100644
--- a/lib/common_test/src/ct_hooks.erl
+++ b/lib/common_test/src/ct_hooks.erl
@@ -96,7 +96,9 @@ init_tc(_Mod, {end_per_group, GroupName, _}, Config) ->
init_tc(_Mod, {init_per_testcase,TC}, Config) ->
call(fun call_generic/3, Config, [pre_init_per_testcase, TC]);
init_tc(_Mod, {end_per_testcase,TC}, Config) ->
- call(fun call_generic/3, Config, [pre_end_per_testcase, TC]).
+ call(fun call_generic/3, Config, [pre_end_per_testcase, TC]);
+init_tc(_Mod, TC = error_in_suite, Config) ->
+ call(fun call_generic/3, Config, [pre_init_per_testcase, TC]).
%% @doc Called as each test case is completed. This includes all configuration
%% tests.
@@ -133,8 +135,12 @@ end_tc(_Mod, {init_per_testcase,TC}, Config, Result, _Return) ->
'$ct_no_change');
end_tc(_Mod, {end_per_testcase,TC}, Config, Result, _Return) ->
call(fun call_generic/3, Result, [post_end_per_testcase, TC, Config],
+ '$ct_no_change');
+end_tc(_Mod, TC = error_in_suite, Config, Result, _Return) ->
+ call(fun call_generic/3, Result, [post_end_per_testcase, TC, Config],
'$ct_no_change').
+
%% Case = TestCase | {TestCase,GroupName}
on_tc_skip(How, {Suite, Case, Reason}) ->
call(fun call_cleanup/3, {How, Reason}, [on_tc_skip, Suite, Case]).