aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_hooks.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2012-08-23 15:57:24 +0200
committerPeter Andersson <[email protected]>2012-08-23 15:57:29 +0200
commit474e2e4485eaf6da0b325ad7c7e79b29fac262b7 (patch)
tree4b4be7658dfc96eae6c1e711342b4160759eeb9b /lib/common_test/src/ct_hooks.erl
parentd961f2d397584e2fa8c6da4b2d6fa495803a7065 (diff)
parente07f781b77b15273eddbb84cdc2940cef87abdb4 (diff)
downloadotp-474e2e4485eaf6da0b325ad7c7e79b29fac262b7.tar.gz
otp-474e2e4485eaf6da0b325ad7c7e79b29fac262b7.tar.bz2
otp-474e2e4485eaf6da0b325ad7c7e79b29fac262b7.zip
Merge remote branch 'origin/peppe/common_test/hook_init_order' into maint
* origin/peppe/common_test/hook_init_order: Call CT Hook init functions in the correct order OTP-10135
Diffstat (limited to 'lib/common_test/src/ct_hooks.erl')
-rw-r--r--lib/common_test/src/ct_hooks.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/common_test/src/ct_hooks.erl b/lib/common_test/src/ct_hooks.erl
index 98b74665de..d0432b604d 100644
--- a/lib/common_test/src/ct_hooks.erl
+++ b/lib/common_test/src/ct_hooks.erl
@@ -192,12 +192,12 @@ call([{Hook, call_id, NextFun} | Rest], Config, Meta, Hooks) ->
case lists:keyfind(NewId, #ct_hook_config.id, Hooks) of
false when NextFun =:= undefined ->
{Hooks ++ [NewHook],
- [{NewId, call_init} | Rest]};
+ Rest ++ [{NewId, call_init}]};
ExistingHook when is_tuple(ExistingHook) ->
{Hooks, Rest};
_ ->
{Hooks ++ [NewHook],
- [{NewId, call_init}, {NewId,NextFun} | Rest]}
+ Rest ++ [{NewId, call_init}, {NewId,NextFun}]}
end,
call(resort(NewRest,NewHooks,Meta), Config, Meta, NewHooks)
catch Error:Reason ->