diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-04-06 19:46:34 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-04-07 12:10:13 +0200 |
commit | 8ccea1c2c756d8bc548ee6ba3e10f5a583aca7e7 (patch) | |
tree | db703599c096483483796be01982d5a1bf75c072 /lib/tools/test/eprof_SUITE.erl | |
parent | 146dfa9ddc3b31649ef581d65f3cb00ef95af10f (diff) | |
download | otp-8ccea1c2c756d8bc548ee6ba3e10f5a583aca7e7.tar.gz otp-8ccea1c2c756d8bc548ee6ba3e10f5a583aca7e7.tar.bz2 otp-8ccea1c2c756d8bc548ee6ba3e10f5a583aca7e7.zip |
Modernize use of timetraps
Diffstat (limited to 'lib/tools/test/eprof_SUITE.erl')
-rw-r--r-- | lib/tools/test/eprof_SUITE.erl | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/lib/tools/test/eprof_SUITE.erl b/lib/tools/test/eprof_SUITE.erl index 6274eabc37..a8de8ff921 100644 --- a/lib/tools/test/eprof_SUITE.erl +++ b/lib/tools/test/eprof_SUITE.erl @@ -21,32 +21,16 @@ -include_lib("common_test/include/ct.hrl"). --export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, - init_per_group/2,end_per_group/2]). - +-export([all/0, suite/0]). -export([tiny/1,eed/1,basic/1,basic_option/1]). -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{seconds,60}}]. all() -> [basic, basic_option, tiny, eed]. -groups() -> - []. - -init_per_suite(Config) -> - Config. - -end_per_suite(_Config) -> - ok. - -init_per_group(_GroupName, Config) -> - Config. - -end_per_group(_GroupName, Config) -> - Config. - - basic(suite) -> []; basic(Config) when is_list(Config) -> @@ -184,7 +168,6 @@ tiny(Config) when is_list(Config) -> {ok, OldCurDir} = file:get_cwd(), Datadir = ?config(data_dir, Config), Privdir = ?config(priv_dir, Config), - TTrap=?t:timetrap(60*1000), % (Trace)Compile to priv_dir and make sure the correct version is loaded. {ok,eprof_suite_test} = compile:file(filename:join(Datadir, "eprof_suite_test"), @@ -200,7 +183,6 @@ tiny(Config) when is_list(Config) -> ok = eprof:analyze(total), ok = eprof:log("eprof_SUITE_logfile"), stopped = eprof:stop(), - ?t:timetrap_cancel(TTrap), ok = file:set_cwd(OldCurDir), ok. @@ -209,7 +191,7 @@ eed(Config) when is_list(Config) -> ensure_eprof_stopped(), Datadir = ?config(data_dir, Config), Privdir = ?config(priv_dir, Config), - TTrap=?t:timetrap(5*60*1000), + ct:timetrap({minutes, 5}), %% (Trace)Compile to priv_dir and make sure the correct version is loaded. code:purge(eed), @@ -236,7 +218,6 @@ eed(Config) when is_list(Config) -> ok = eprof:analyze(total), ok = eprof:log("eprof_SUITE_logfile"), stopped = eprof:stop(), - ?t:timetrap_cancel(TTrap), try S = lists:flatten(io_lib:format("~p times slower", [10*(T3-T2)/(T2-T1)])), |