aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/test/cprof_SUITE.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-04-06 19:46:34 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-04-07 12:10:13 +0200
commit8ccea1c2c756d8bc548ee6ba3e10f5a583aca7e7 (patch)
treedb703599c096483483796be01982d5a1bf75c072 /lib/tools/test/cprof_SUITE.erl
parent146dfa9ddc3b31649ef581d65f3cb00ef95af10f (diff)
downloadotp-8ccea1c2c756d8bc548ee6ba3e10f5a583aca7e7.tar.gz
otp-8ccea1c2c756d8bc548ee6ba3e10f5a583aca7e7.tar.bz2
otp-8ccea1c2c756d8bc548ee6ba3e10f5a583aca7e7.zip
Modernize use of timetraps
Diffstat (limited to 'lib/tools/test/cprof_SUITE.erl')
-rw-r--r--lib/tools/test/cprof_SUITE.erl29
1 files changed, 6 insertions, 23 deletions
diff --git a/lib/tools/test/cprof_SUITE.erl b/lib/tools/test/cprof_SUITE.erl
index 1dd4634303..404b2fe738 100644
--- a/lib/tools/test/cprof_SUITE.erl
+++ b/lib/tools/test/cprof_SUITE.erl
@@ -64,25 +64,23 @@ config(data_dir, _) ->
"cprof_SUITE_data".
-else.
%% When run in test server.
--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,
init_per_testcase/2, end_per_testcase/2,
not_run/1]).
-export([basic/1, on_load/1, modules/1]).
init_per_testcase(_Case, Config) ->
- Dog=test_server:timetrap(test_server:seconds(30)),
- [{watchdog, Dog}|Config].
+ Config.
-end_per_testcase(_Case, Config) ->
+end_per_testcase(_Case, _Config) ->
erlang:trace_pattern({'_','_','_'}, false, [local,meta,call_count]),
erlang:trace_pattern(on_load, false, [local,meta,call_count]),
erlang:trace(all, false, [all]),
- Dog=?config(watchdog, Config),
- test_server:timetrap_cancel(Dog),
ok.
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() ->
+ [{ct_hooks,[ts_install_cth]},
+ {timetrap,{seconds,30}}].
all() ->
case test_server:is_native(cprof_SUITE) of
@@ -90,21 +88,6 @@ all() ->
false -> [basic, on_load, modules]
end.
-groups() ->
- [].
-
-init_per_suite(Config) ->
- Config.
-
-end_per_suite(_Config) ->
- ok.
-
-init_per_group(_GroupName, Config) ->
- Config.
-
-end_per_group(_GroupName, Config) ->
- Config.
-
not_run(Config) when is_list(Config) ->
{skipped,"Native code"}.