aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_hooks.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-03-25 21:19:05 +0100
committerMicael Karlberg <[email protected]>2011-03-25 21:19:05 +0100
commit5396cae69c23d7d8b7bbd0433c3b31144254c7a9 (patch)
treea16e52267f14417155e938ee5f34cc5082efc314 /lib/common_test/src/ct_hooks.erl
parent143cc965e88ea2486c1e6b804f2ae033e870de2d (diff)
parentf0e2f0b91ac4d45a64ddac511e0eba9b6ce01e92 (diff)
downloadotp-5396cae69c23d7d8b7bbd0433c3b31144254c7a9.tar.gz
otp-5396cae69c23d7d8b7bbd0433c3b31144254c7a9.tar.bz2
otp-5396cae69c23d7d8b7bbd0433c3b31144254c7a9.zip
Merge branch 'dev' into bmk/snmp/support_ipv6_transport_address
Diffstat (limited to 'lib/common_test/src/ct_hooks.erl')
-rw-r--r--lib/common_test/src/ct_hooks.erl10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/common_test/src/ct_hooks.erl b/lib/common_test/src/ct_hooks.erl
index 77b7566d9e..5eddefffce 100644
--- a/lib/common_test/src/ct_hooks.erl
+++ b/lib/common_test/src/ct_hooks.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -66,11 +66,13 @@ terminate(Hooks) ->
init_tc(ct_framework, _Func, Args) ->
Args;
init_tc(Mod, init_per_suite, Config) ->
- Info = case catch proplists:get_value(ct_hooks, Mod:suite()) of
+ Info = try proplists:get_value(ct_hooks, Mod:suite(),[]) of
List when is_list(List) ->
[{ct_hooks,List}];
- _Else ->
- []
+ CTHook when is_atom(CTHook) ->
+ [{ct_hooks,[CTHook]}]
+ catch error:undef ->
+ [{ct_hooks,[]}]
end,
call(fun call_generic/3, Config ++ Info, [pre_init_per_suite, Mod]);
init_tc(Mod, end_per_suite, Config) ->