aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/shell_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-02-26 06:47:38 +0100
committerBjörn Gustavsson <[email protected]>2016-03-09 12:05:19 +0100
commitdb87ef023f4660fd2129f30dbbff05e73bff3dd5 (patch)
treeb97030bda2efea02fc58e5f0eaebd1450bb00d82 /lib/stdlib/test/shell_SUITE.erl
parentaeccfd1c8441ac0caa0c86aac19747eb64bd267d (diff)
downloadotp-db87ef023f4660fd2129f30dbbff05e73bff3dd5.tar.gz
otp-db87ef023f4660fd2129f30dbbff05e73bff3dd5.tar.bz2
otp-db87ef023f4660fd2129f30dbbff05e73bff3dd5.zip
Modernize use of timetraps
Either rely on the default 30 minutes timetrap, or set the timeout using the supported methods in common_test.
Diffstat (limited to 'lib/stdlib/test/shell_SUITE.erl')
-rw-r--r--lib/stdlib/test/shell_SUITE.erl11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/stdlib/test/shell_SUITE.erl b/lib/stdlib/test/shell_SUITE.erl
index 747b76abb6..e1733292f6 100644
--- a/lib/stdlib/test/shell_SUITE.erl
+++ b/lib/stdlib/test/shell_SUITE.erl
@@ -54,17 +54,12 @@ config(priv_dir,_) ->
-else.
-include_lib("common_test/include/ct.hrl").
-export([init_per_testcase/2, end_per_testcase/2]).
-% Default timetrap timeout (set in init_per_testcase).
--define(default_timeout, ?t:minutes(10)).
init_per_testcase(_Case, Config) ->
- ?line Dog = ?t:timetrap(?default_timeout),
?line OrigPath = code:get_path(),
?line code:add_patha(?config(priv_dir,Config)),
- [{orig_path,OrigPath}, {watchdog, Dog} | Config].
+ [{orig_path,OrigPath} | Config].
end_per_testcase(_Case, Config) ->
- ?line Dog = ?config(watchdog, Config),
- ?line test_server:timetrap_cancel(Dog),
?line OrigPath = ?config(orig_path,Config),
?line code:set_path(OrigPath),
?line application:unset_env(stdlib, restricted_shell),
@@ -73,7 +68,9 @@ end_per_testcase(_Case, Config) ->
ok.
-endif.
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() ->
+ [{ct_hooks,[ts_install_cth]},
+ {timetrap,{minutes,10}}].
all() ->
[forget, records, known_bugs, otp_5226, otp_5327,