From c2a3647e471bb08de24d867bc7c3f541e2f7a15d Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 20 Mar 2012 01:29:02 +0100 Subject: Implement support for user controlled timetraps OTP-9988 --- lib/common_test/test/ct_test_support.erl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/common_test/test/ct_test_support.erl') diff --git a/lib/common_test/test/ct_test_support.erl b/lib/common_test/test/ct_test_support.erl index 6df02d12b7..753e4d8d42 100644 --- a/lib/common_test/test/ct_test_support.erl +++ b/lib/common_test/test/ct_test_support.erl @@ -1001,6 +1001,12 @@ result_match({SkipOrFail,{ErrorInd,{Why,'_'}}}, result_match({SkipOrFail,{ErrorInd,{EMod,EFunc,{Why,'_'}}}}, {SkipOrFail,{ErrorInd,{EMod,EFunc,{Why,_Stack}}}}) -> true; +result_match({failed,{timetrap_timeout,{'$approx',Num}}}, + {failed,{timetrap_timeout,Value}}) -> + if Value >= trunc(Num-0.01*Num), + Value =< trunc(Num+0.01*Num) -> true; + true -> false + end; result_match(Result, Result) -> true; result_match(_, _) -> -- cgit v1.2.3