diff options
author | Erlang/OTP <[email protected]> | 2011-04-15 14:50:26 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2011-04-15 14:50:26 +0200 |
commit | 94a980f1342af2c593c700fe429a4d54ac95e555 (patch) | |
tree | 4fab03ae97b9e4d378df0dc041381c3c8e5cf589 /lib/test_server/src/test_server.erl | |
parent | fb1eab890f6776419b3999285dff45802658e8f0 (diff) | |
parent | 7ffe6f4faf3df263e662091c0a8de729418cbb31 (diff) | |
download | otp-94a980f1342af2c593c700fe429a4d54ac95e555.tar.gz otp-94a980f1342af2c593c700fe429a4d54ac95e555.tar.bz2 otp-94a980f1342af2c593c700fe429a4d54ac95e555.zip |
Merge branch 'lukas/common_test/ct_hooks_compat_maint/OTP-9200' into maint-r14
* lukas/common_test/ct_hooks_compat_maint/OTP-9200:
Update framwork backwards compatability check to use TEST_SERVER_FRAMEWORK as it should and not the Module
Export ct_framework:end_tc/3 for backwards compatability reasons
Update end_tc framework calls to check the name of the framework module instead of the return value of the call
Diffstat (limited to 'lib/test_server/src/test_server.erl')
-rw-r--r-- | lib/test_server/src/test_server.erl | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/test_server/src/test_server.erl b/lib/test_server/src/test_server.erl index 7f0011bd68..8fe7d72270 100644 --- a/lib/test_server/src/test_server.erl +++ b/lib/test_server/src/test_server.erl @@ -1193,11 +1193,10 @@ run_test_case_eval1(Mod, Func, Args, Name, RunInit, TCCallback) -> do_end_tc_call(M,F,Res,Return) -> Ref = make_ref(), - case test_server_sup:framework_call( - end_tc, [?pl2a(M),F,Res], Ref) of - {fail,FWReason} -> - {failed,FWReason}; - Ref -> + case os:getenv("TEST_SERVER_FRAMEWORK") of + FW when FW == "ct_framework"; + FW == "undefined"; + FW == false -> case test_server_sup:framework_call( end_tc, [?pl2a(M),F,Res, Return], ok) of {fail,FWReason} -> @@ -1212,8 +1211,14 @@ do_end_tc_call(M,F,Res,Return) -> NewReturn -> NewReturn end; - _ -> - Return + Other -> + case test_server_sup:framework_call( + end_tc, [Other,F,Res], Ref) of + {fail,FWReason} -> + {failed,FWReason}; + _Else -> + Return + end end. %% the return value is a list and we have to check if it contains |