diff options
author | Peter Andersson <[email protected]> | 2012-03-20 01:29:02 +0100 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2012-03-21 11:41:57 +0100 |
commit | c2a3647e471bb08de24d867bc7c3f541e2f7a15d (patch) | |
tree | 248e157a67cd4d6322bc5b6585e930a532598a7f /lib/common_test/test/ct_test_support.erl | |
parent | afe7a29a54a7958ac90e44b3bee6c572792bb96b (diff) | |
download | otp-c2a3647e471bb08de24d867bc7c3f541e2f7a15d.tar.gz otp-c2a3647e471bb08de24d867bc7c3f541e2f7a15d.tar.bz2 otp-c2a3647e471bb08de24d867bc7c3f541e2f7a15d.zip |
Implement support for user controlled timetraps
OTP-9988
Diffstat (limited to 'lib/common_test/test/ct_test_support.erl')
-rw-r--r-- | lib/common_test/test/ct_test_support.erl | 6 |
1 files changed, 6 insertions, 0 deletions
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(_, _) -> |