diff options
author | Peter Andersson <[email protected]> | 2011-09-22 12:46:12 +0200 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2011-09-23 12:24:55 +0200 |
commit | 11107d76a34667ec87668b2624a0f3df43dea655 (patch) | |
tree | c12c94650d27a7b72e522058c723be876c06ba0a /lib/test_server/src/test_server.erl | |
parent | d7391d973f453de4749857291680380b60330bc7 (diff) | |
download | otp-11107d76a34667ec87668b2624a0f3df43dea655.tar.gz otp-11107d76a34667ec87668b2624a0f3df43dea655.tar.bz2 otp-11107d76a34667ec87668b2624a0f3df43dea655.zip |
Fix error with incorrect notification after end_per_testcase craches
Diffstat (limited to 'lib/test_server/src/test_server.erl')
-rw-r--r-- | lib/test_server/src/test_server.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/test_server/src/test_server.erl b/lib/test_server/src/test_server.erl index ae54925c2e..303ee3ae95 100644 --- a/lib/test_server/src/test_server.erl +++ b/lib/test_server/src/test_server.erl @@ -1194,12 +1194,17 @@ run_test_case_eval1(Mod, Func, Args, Name, RunInit, TCCallback) -> SaveCfg1={save_config,_} -> {FWReturn,TSReturn,[SaveCfg1|lists:keydelete(save_config,1, EndConf1)]}; - {fail,ReasonToFail} -> % user has failed the testcase + {fail,ReasonToFail} -> + %% user has failed the testcase fw_error_notify(Mod, Func, EndConf1, ReasonToFail), {{error,ReasonToFail},{failed,ReasonToFail},EndConf1}; - {failed,{_,end_per_testcase,_}} = Failure -> % unexpected termination + {failed,{_,end_per_testcase,_}} = Failure when FWReturn == ok -> + %% unexpected termination in end_per_testcase + %% report this as the result to the framework {Failure,TSReturn,EndConf1}; _ -> + %% test case result should be reported to framework + %% no matter the status of end_per_testcase {FWReturn,TSReturn,EndConf1} end, %% clear current state in controller loop |