aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/test/instrument_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/instrument_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/instrument_SUITE.erl')
-rw-r--r--lib/tools/test/instrument_SUITE.erl40
1 files changed, 6 insertions, 34 deletions
diff --git a/lib/tools/test/instrument_SUITE.erl b/lib/tools/test/instrument_SUITE.erl
index bf541023ed..b4ace283d6 100644
--- a/lib/tools/test/instrument_SUITE.erl
+++ b/lib/tools/test/instrument_SUITE.erl
@@ -19,43 +19,18 @@
%%
-module(instrument_SUITE).
--export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
- init_per_group/2,end_per_group/2,
- init_per_testcase/2,end_per_testcase/2]).
-
+-export([all/0, suite/0]).
-export(['+Mim true'/1, '+Mis true'/1]).
-include_lib("common_test/include/ct.hrl").
-init_per_testcase(_Case, Config) ->
- Dog=?t:timetrap(10000),
- [{watchdog, Dog}|Config].
-
-end_per_testcase(_Case, Config) ->
- Dog=?config(watchdog, Config),
- ?t:timetrap_cancel(Dog),
- ok.
-
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() ->
+ [{ct_hooks,[ts_install_cth]},
+ {timetrap,{seconds,10}}].
all() ->
['+Mim true', '+Mis true'].
-groups() ->
- [].
-
-init_per_suite(Config) ->
- Config.
-
-end_per_suite(_Config) ->
- ok.
-
-init_per_group(_GroupName, Config) ->
- Config.
-
-end_per_group(_GroupName, Config) ->
- Config.
-
'+Mim true'(doc) -> ["Check that memory data can be read and processed"];
'+Mim true'(suite) -> [];
@@ -78,9 +53,7 @@ end_per_group(_GroupName, Config) ->
N when is_integer(N) ->
N = lists:foldl(fun ({_,_,Size,_}, Sum) ->
Size+Sum
- end,
- 0,
- AL),
+ end, 0, AL),
N =< S3;
Other ->
?t:fail(Other)
@@ -115,8 +88,7 @@ end_per_group(_GroupName, Config) ->
ASL = lists:map(fun ({_,A,S,_}) -> {A,S} end, AL),
ASL = lists:map(fun ({_,A,S,_}) -> {A,S} end, DAL),
instrument:holes(MDS),
- {comment,
- "total status - sum of blocks = " ++ integer_to_list(S1-SumBlocks)}.
+ {comment, "total status - sum of blocks = " ++ integer_to_list(S1-SumBlocks)}.
'+Mis true'(doc) -> ["Check that memory data can be read and processed"];
'+Mis true'(suite) -> [];