aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2013-06-04 16:18:18 +0200
committerPeter Andersson <[email protected]>2013-06-04 16:18:18 +0200
commitd0a933df7a84a9a90b948af0c1bd16df3fccbbf5 (patch)
tree174cc0f13a7ed0cb2b4101db4c6ef31374461dfa /lib
parent9087aeb1fa77bb46ca5364102ed1c9eb37854447 (diff)
parent08fffe14651b07ee5ae04c7bdaa29fee21d65a1e (diff)
downloadotp-d0a933df7a84a9a90b948af0c1bd16df3fccbbf5.tar.gz
otp-d0a933df7a84a9a90b948af0c1bd16df3fccbbf5.tar.bz2
otp-d0a933df7a84a9a90b948af0c1bd16df3fccbbf5.zip
Merge branch 'maint'
Diffstat (limited to 'lib')
-rw-r--r--lib/test_server/src/test_server.erl13
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() ->