aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common_test/src')
-rw-r--r--lib/common_test/src/ct_hooks.erl19
-rw-r--r--lib/common_test/src/ct_run.erl2
2 files changed, 3 insertions, 18 deletions
diff --git a/lib/common_test/src/ct_hooks.erl b/lib/common_test/src/ct_hooks.erl
index 8f452ef5e3..2a23cd992b 100644
--- a/lib/common_test/src/ct_hooks.erl
+++ b/lib/common_test/src/ct_hooks.erl
@@ -213,25 +213,10 @@ call([{HookId, Fun} | Rest], Config, Meta, Hooks) ->
try
Hook = lists:keyfind(HookId, #ct_hook_config.id, Hooks),
{NewConf, NewHook} = Fun(Hook, Config, Meta),
-
- %%! --- Fri Mar 16 17:27:25 2012 --- peppe was here!
- %%!!??
- NewConf1 =
- if is_tuple(NewConf) ->
- if element(1, NewConf) == skip;
- element(1, NewConf) == fail ->
- Config;
- true ->
- NewConf
- end;
- true ->
- NewConf
- end,
-
- NewCalls = get_new_hooks(NewConf1, Fun),
+ NewCalls = get_new_hooks(NewConf, Fun),
NewHooks = lists:keyreplace(HookId, #ct_hook_config.id, Hooks, NewHook),
call(resort(NewCalls ++ Rest,NewHooks,Meta), %% Resort if call_init changed prio
- remove(?config_name, NewConf1), Meta,
+ remove(?config_name, NewConf), Meta,
terminate_if_scope_ends(HookId, Meta, NewHooks))
catch throw:{error_in_cth_call,Reason} ->
call(Rest, {fail, Reason}, Meta,
diff --git a/lib/common_test/src/ct_run.erl b/lib/common_test/src/ct_run.erl
index d142bdaa81..72124f6f21 100644
--- a/lib/common_test/src/ct_run.erl
+++ b/lib/common_test/src/ct_run.erl
@@ -2329,7 +2329,7 @@ ct_hooks_args2opts(Args) ->
Acc
end,[],Args).
-ct_hooks_args2opts([CTH,Arg,Prio,"and"| Rest],Acc) ->
+ct_hooks_args2opts([CTH,Arg,Prio,"and"| Rest],Acc) when Arg /= "and" ->
ct_hooks_args2opts(Rest,[{list_to_atom(CTH),
parse_cth_args(Arg),
parse_cth_args(Prio)}|Acc]);