diff options
author | Lukas Larsson <[email protected]> | 2010-11-30 18:25:36 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2010-12-08 18:07:54 +0100 |
commit | b299052f8d69ef4fff19d83d0f75ded72d65e9e3 (patch) | |
tree | 2b4421b8b9f495cad945724ffc8f4150e5b87346 /lib/common_test/src/ct_framework.erl | |
parent | c0c7e05de55b83ed6d53da628cb345fc4f4da864 (diff) | |
download | otp-b299052f8d69ef4fff19d83d0f75ded72d65e9e3.tar.gz otp-b299052f8d69ef4fff19d83d0f75ded72d65e9e3.tar.bz2 otp-b299052f8d69ef4fff19d83d0f75ded72d65e9e3.zip |
Update ct_framework calls to allow manipulation of test results in end_tc without breaking backwards compatability (I hope)
Diffstat (limited to 'lib/common_test/src/ct_framework.erl')
-rw-r--r-- | lib/common_test/src/ct_framework.erl | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/common_test/src/ct_framework.erl b/lib/common_test/src/ct_framework.erl index f7c07a5374..dbf367e4d8 100644 --- a/lib/common_test/src/ct_framework.erl +++ b/lib/common_test/src/ct_framework.erl @@ -484,21 +484,27 @@ end_tc(Mod,Func,TCPid,Result,Args,Return) -> case get('$test_server_framework_test') of undefined -> - FinalResult = ct_suite_callback:end_tc( - Mod, FuncSpec, Args, Result, Return), + {FinalResult,FinalNotify} = + case ct_suite_callback:end_tc( + Mod, FuncSpec, Args, Result, Return) of + '$ct_no_change' -> + {FinalResult = ok,Result}; + FinalResult -> + {FinalResult,FinalResult} + end, % send sync notification so that event handlers may print % in the log file before it gets closed ct_event:sync_notify(#event{name=tc_done, node=node(), data={Mod,FuncSpec, - tag_scb(FinalResult)}}); + tag_scb(FinalNotify)}}); Fun -> % send sync notification so that event handlers may print % in the log file before it gets closed ct_event:sync_notify(#event{name=tc_done, node=node(), data={Mod,FuncSpec,tag(Result)}}), - FinalResult = Fun(end_tc, ok) + FinalResult = Fun(end_tc, Return) end, @@ -521,13 +527,7 @@ end_tc(Mod,Func,TCPid,Result,Args,Return) -> _ -> ok end, - case FinalResult of - Result -> - ok; - _Else -> - FinalResult - end. - + FinalResult. %% {error,Reason} | {skip,Reason} | {timetrap_timeout,TVal} | %% {testcase_aborted,Reason} | testcase_aborted_or_killed | |