aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_hooks.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2013-09-01 23:36:24 +0200
committerPeter Andersson <[email protected]>2013-09-03 17:02:14 +0200
commit376da624578485aae6160d8ee327330d58613fae (patch)
treef97b792846560be7998fea40bdd9aa10e2dd56bd /lib/common_test/src/ct_hooks.erl
parent112b1f795ccd573a612208269e9b4937865445b5 (diff)
downloadotp-376da624578485aae6160d8ee327330d58613fae.tar.gz
otp-376da624578485aae6160d8ee327330d58613fae.tar.bz2
otp-376da624578485aae6160d8ee327330d58613fae.zip
Find and fix minor bugs
Diffstat (limited to 'lib/common_test/src/ct_hooks.erl')
-rw-r--r--lib/common_test/src/ct_hooks.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/common_test/src/ct_hooks.erl b/lib/common_test/src/ct_hooks.erl
index b492663c57..e845e9e908 100644
--- a/lib/common_test/src/ct_hooks.erl
+++ b/lib/common_test/src/ct_hooks.erl
@@ -52,7 +52,6 @@
init(Opts) ->
call(get_builtin_hooks(Opts) ++ get_new_hooks(Opts, undefined),
ok, init, []).
-
%% @doc Called after all suites are done.
-spec terminate(Hooks :: term()) ->
@@ -276,8 +275,10 @@ get_new_hooks(Config, Fun) ->
end, get_new_hooks(Config)).
get_new_hooks(Config) when is_list(Config) ->
- lists:flatmap(fun({?config_name, HookConfigs}) ->
+ lists:flatmap(fun({?config_name, HookConfigs}) when is_list(HookConfigs) ->
HookConfigs;
+ ({?config_name, HookConfig}) when is_atom(HookConfig) ->
+ [HookConfig];
(_) ->
[]
end, Config);