diff options
author | Peter Andersson <[email protected]> | 2013-05-29 12:20:30 +0200 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2013-05-29 12:20:30 +0200 |
commit | e6b32d2494ccb7a7926844bb9fe4bac6dc65eaa1 (patch) | |
tree | 6b92fa4ba410942bb7e770d4b97717d687d4fb65 /lib/test_server/src/test_server.erl | |
parent | 3f6185714ee9b383d9ba330e02b73017bf68babc (diff) | |
download | otp-e6b32d2494ccb7a7926844bb9fe4bac6dc65eaa1.tar.gz otp-e6b32d2494ccb7a7926844bb9fe4bac6dc65eaa1.tar.bz2 otp-e6b32d2494ccb7a7926844bb9fe4bac6dc65eaa1.zip |
Remove incorrect warning about missing end_per_testcase
OTP-11052
Diffstat (limited to 'lib/test_server/src/test_server.erl')
-rw-r--r-- | lib/test_server/src/test_server.erl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/test_server/src/test_server.erl b/lib/test_server/src/test_server.erl index 8b0be51be3..c350f758ce 100644 --- a/lib/test_server/src/test_server.erl +++ b/lib/test_server/src/test_server.erl @@ -716,6 +716,16 @@ end_conf_timeout(_, _) -> call_end_conf(Mod,Func,TCPid,TCExitReason,Loc,Conf,TVal) -> Starter = self(), Data = {Mod,Func,TCPid,TCExitReason,Loc}, + case erlang:function_exported(Mod,end_per_testcase,2) of + false -> + spawn_link(fun() -> + Starter ! {self(),{call_end_conf,Data,ok}} + end); + true -> + do_call_end_conf(Starter,Mod,Func,Data,Conf,TVal) + end. + +do_call_end_conf(Starter,Mod,Func,Data,Conf,TVal) -> EndConfProc = fun() -> process_flag(trap_exit,true), % to catch timetraps @@ -753,7 +763,8 @@ call_end_conf(Mod,Func,TCPid,TCExitReason,Loc,Conf,TVal) -> end, spawn_link(EndConfProc). -spawn_fw_call(Mod,{init_per_testcase,Func},CurrConf,Pid,{timetrap_timeout,TVal}=Why, +spawn_fw_call(Mod,{init_per_testcase,Func},CurrConf,Pid, + {timetrap_timeout,TVal}=Why, Loc,SendTo) -> FwCall = fun() -> |