aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2010-06-04 15:34:42 +0200
committerRaimo Niskanen <[email protected]>2010-06-09 16:19:23 +0200
commit34cf18550ff792ed9da884b00a49d6accd1bd5f5 (patch)
treed81105e39baec08bba74932fc4490ad7e825acb7 /lib/common_test/src/ct.erl
parenta3af252253c1fbc642cf6229ff1e23f095b75b59 (diff)
downloadotp-34cf18550ff792ed9da884b00a49d6accd1bd5f5.tar.gz
otp-34cf18550ff792ed9da884b00a49d6accd1bd5f5.tar.bz2
otp-34cf18550ff792ed9da884b00a49d6accd1bd5f5.zip
Add support for dynamic timetrap handling
Diffstat (limited to 'lib/common_test/src/ct.erl')
-rw-r--r--lib/common_test/src/ct.erl14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/common_test/src/ct.erl b/lib/common_test/src/ct.erl
index 307d10428d..77bcf34981 100644
--- a/lib/common_test/src/ct.erl
+++ b/lib/common_test/src/ct.erl
@@ -65,7 +65,7 @@
pal/1, pal/2, pal/3,
fail/1, comment/1,
testcases/2, userdata/2, userdata/3,
- sleep/1]).
+ timetrap/1, sleep/1]).
%% New API for manipulating with config handlers
-export([add_config/2, remove_config/2]).
@@ -844,6 +844,18 @@ remove_config(Callback, Config) ->
ct_config:remove_config(Callback, Config).
%%%-----------------------------------------------------------------
+%%% @spec timetrap(Time) -> ok
+%%% Time = {hours,Hours} | {minutes,Mins} | {seconds,Secs} | Millisecs | infinity
+%%% Hours = integer()
+%%% Mins = integer()
+%%% Secs = integer()
+%%% Millisecs = integer() | float()
+%%%
+%%% @doc <p>Use this function to set a new timetrap for the running test case.</p>
+timetrap(Time) ->
+ test_server:timetrap(Time).
+
+%%%-----------------------------------------------------------------
%%% @spec sleep(Time) -> ok
%%% Time = {hours,Hours} | {minutes,Mins} | {seconds,Secs} | Millisecs | infinity
%%% Hours = integer()