aboutsummaryrefslogtreecommitdiffstats
path: root/erts/test/ethread_SUITE.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-04-05 16:47:27 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-04-05 16:47:27 +0200
commit120a586a5d7d13e0d022dd773537856d30482e1e (patch)
tree211ea0fcfc8daa620165248ab4cd1bb67f61832e /erts/test/ethread_SUITE.erl
parent6b17c34656457bf0da708f5c719adabbbd0a00cf (diff)
downloadotp-120a586a5d7d13e0d022dd773537856d30482e1e.tar.gz
otp-120a586a5d7d13e0d022dd773537856d30482e1e.tar.bz2
otp-120a586a5d7d13e0d022dd773537856d30482e1e.zip
Modernize use of timetraps
Diffstat (limited to 'erts/test/ethread_SUITE.erl')
-rw-r--r--erts/test/ethread_SUITE.erl57
1 files changed, 16 insertions, 41 deletions
diff --git a/erts/test/ethread_SUITE.erl b/erts/test/ethread_SUITE.erl
index 91adbc05c0..889aeb8969 100644
--- a/erts/test/ethread_SUITE.erl
+++ b/erts/test/ethread_SUITE.erl
@@ -28,13 +28,7 @@
-module(ethread_SUITE).
-author('[email protected]').
-%-define(line_trace, 1).
-
--define(DEFAULT_TIMEOUT, ?t:minutes(10)).
-
--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, init_per_testcase/2, end_per_testcase/2]).
-export([create_join_thread/1,
equal_tids/1,
@@ -53,7 +47,11 @@
-include_lib("common_test/include/ct.hrl").
-tests() ->
+suite() ->
+ [{ct_hooks,[ts_install_cth]},
+ {timetrap, {minutes, 10}}].
+
+all() ->
[create_join_thread,
equal_tids,
mutex,
@@ -69,26 +67,19 @@ tests() ->
atomic,
dw_atomic_massage].
-suite() -> [{ct_hooks,[ts_install_cth]}].
-
-all() ->
- tests().
-
-groups() ->
- [].
-
-init_per_suite(Config) ->
- Config.
+init_per_testcase(Case, Config) ->
+ case inet:gethostname() of
+ {ok,"fenris"} when Case == max_threads ->
+ %% Cannot use os:type+os:version as not all
+ %% solaris10 machines are buggy.
+ {skip, "This machine is buggy"};
+ _Else ->
+ Config
+ end.
-end_per_suite(_Config) ->
+end_per_testcase(_Case, _Config) ->
ok.
-init_per_group(_GroupName, Config) ->
- Config.
-
-end_per_group(_GroupName, Config) ->
- Config.
-
%%
%%
%% The test-cases
@@ -215,22 +206,6 @@ dw_atomic_massage(Config) ->
%%
%%
-init_per_testcase(Case, Config) ->
- case inet:gethostname() of
- {ok,"fenris"} when Case == max_threads ->
- %% Cannot use os:type+os:version as not all
- %% solaris10 machines are buggy.
- {skip, "This machine is buggy"};
- _Else ->
- Dog = ?t:timetrap(?DEFAULT_TIMEOUT),
- [{watchdog, Dog}|Config]
- end.
-
-end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
- ?t:timetrap_cancel(Dog),
- ok.
-
-define(TESTPROG, "ethread_tests").
-define(FAILED_MARKER, $E,$T,$H,$R,$-,$T,$E,$S,$T,$-,$F,$A,$I,$L,$U,$R,$E).
-define(SKIPPED_MARKER, $E,$T,$H,$R,$-,$T,$E,$S,$T,$-,$S,$K,$I,$P).