aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2013-12-03 11:14:40 +0100
committerPeter Andersson <[email protected]>2013-12-03 11:15:13 +0100
commit1af2b59ab5102e52ed55cc3afed561daa08eac17 (patch)
tree4e08f83225f1ab2cfe611578b39de9ba4147eb23 /lib/common_test/src
parent342d12087e62ffaf239a3a42d503d9e5ec64a83f (diff)
parent8b1fddd13a95d0232cfc08f529632d58eb9f4fe6 (diff)
downloadotp-1af2b59ab5102e52ed55cc3afed561daa08eac17.tar.gz
otp-1af2b59ab5102e52ed55cc3afed561daa08eac17.tar.bz2
otp-1af2b59ab5102e52ed55cc3afed561daa08eac17.zip
Merge branch 'peppe/common_test/hook_skip_failure' into maint
* peppe/common_test/hook_skip_failure: Fix CT hook pre_end_per_group causing crash when returning {skip,Reason} OTP-11409
Diffstat (limited to 'lib/common_test/src')
-rw-r--r--lib/common_test/src/cth_log_redirect.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/common_test/src/cth_log_redirect.erl b/lib/common_test/src/cth_log_redirect.erl
index 8fed341600..61700a2032 100644
--- a/lib/common_test/src/cth_log_redirect.erl
+++ b/lib/common_test/src/cth_log_redirect.erl
@@ -73,7 +73,7 @@ pre_init_per_group(Group, Config, State) ->
set_curr_func({group,Group,init_per_group}, Config),
{Config, State}.
-post_init_per_group(Group, Config, Result, tc_log_async) ->
+post_init_per_group(Group, Config, Result, tc_log_async) when is_list(Config) ->
case lists:member(parallel,proplists:get_value(
tc_group_properties,Config,[])) of
true ->
@@ -154,7 +154,8 @@ handle_info(_, State) ->
handle_call(flush,State) ->
{ok, ok, State};
-handle_call({set_curr_func,{group,Group,Conf},Config}, State) ->
+handle_call({set_curr_func,{group,Group,Conf},Config},
+ State) when is_list(Config) ->
Parallel = case proplists:get_value(tc_group_properties, Config) of
undefined -> false;
Props -> lists:member(parallel, Props)
@@ -162,6 +163,10 @@ handle_call({set_curr_func,{group,Group,Conf},Config}, State) ->
{ok, ok, State#eh_state{curr_group = Group,
curr_func = Conf,
parallel_tcs = Parallel}};
+handle_call({set_curr_func,{group,Group,Conf},_SkipOrFail}, State) ->
+ {ok, ok, State#eh_state{curr_group = Group,
+ curr_func = Conf,
+ parallel_tcs = false}};
handle_call({set_curr_func,{group,undefined},_Config}, State) ->
{ok, ok, State#eh_state{curr_group = undefined,
curr_func = undefined,