diff options
author | Lukas Larsson <[email protected]> | 2010-12-08 17:16:49 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2010-12-08 18:08:28 +0100 |
commit | 8ed5c47ca047405b2c00a979a8567412e5283322 (patch) | |
tree | b934eaf290cb2dd3249ff2bc81ddff8079b9710d /lib/common_test/src/ct_suite_callback.erl | |
parent | 8b33f2edabbfd684e619238bbfaa10cc16e2a0a7 (diff) | |
download | otp-8ed5c47ca047405b2c00a979a8567412e5283322.tar.gz otp-8ed5c47ca047405b2c00a979a8567412e5283322.tar.bz2 otp-8ed5c47ca047405b2c00a979a8567412e5283322.zip |
Add so that failures in SCB:init/1 causes the entire scb scope to fail
Diffstat (limited to 'lib/common_test/src/ct_suite_callback.erl')
-rw-r--r-- | lib/common_test/src/ct_suite_callback.erl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/common_test/src/ct_suite_callback.erl b/lib/common_test/src/ct_suite_callback.erl index 4f6bf9942e..8372303737 100644 --- a/lib/common_test/src/ct_suite_callback.erl +++ b/lib/common_test/src/ct_suite_callback.erl @@ -46,8 +46,7 @@ {error, Reason :: term()}. init(Opts) -> call([{CB, call_init, undefined} || CB <- get_new_callbacks(Opts)], - ct_suite_callback_init_dummy, init, []), - ok. + ok, init, []). %% @doc Called after all suites are done. @@ -181,9 +180,11 @@ call([{CB, call_init, NextFun} | Rest], Config, Meta, CBs) -> [Mod,NewId]), call(NewRest, Config, Meta, NewCBs) catch Error:Reason -> + Trace = erlang:get_stacktrace(), ct_logs:log("Suite Callback","Failed to start a SCB: ~p:~p", - [Error,{Reason,erlang:get_stacktrace()}]), - call(Rest, Config, Meta, CBs) + [Error,{Reason,Trace}]), + call([], {fail,"Failed to start SCB" + ", see the CT Log for details"}, Meta, CBs) end; call([{CBId, Fun} | Rest], Config, Meta, CBs) -> try |