aboutsummaryrefslogtreecommitdiffstats
path: root/erts/test/erl_print_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/erl_print_SUITE.erl
parent6b17c34656457bf0da708f5c719adabbbd0a00cf (diff)
downloadotp-120a586a5d7d13e0d022dd773537856d30482e1e.tar.gz
otp-120a586a5d7d13e0d022dd773537856d30482e1e.tar.bz2
otp-120a586a5d7d13e0d022dd773537856d30482e1e.zip
Modernize use of timetraps
Diffstat (limited to 'erts/test/erl_print_SUITE.erl')
-rw-r--r--erts/test/erl_print_SUITE.erl45
1 files changed, 9 insertions, 36 deletions
diff --git a/erts/test/erl_print_SUITE.erl b/erts/test/erl_print_SUITE.erl
index ceec4f4259..5699a906aa 100644
--- a/erts/test/erl_print_SUITE.erl
+++ b/erts/test/erl_print_SUITE.erl
@@ -28,51 +28,33 @@
-module(erl_print_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([erlang_display/1, integer/1, float/1,
string/1, character/1, snprintf/1, quote/1]).
-include_lib("common_test/include/ct.hrl").
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() ->
+ [{ct_hooks,[ts_install_cth]},
+ {timetrap, {minutes, 10}}].
all() ->
- test_cases().
-
-groups() ->
- [].
+ [erlang_display, integer, float, string, character,
+ snprintf, quote].
-init_per_suite(Config) ->
- Config.
+init_per_testcase(Case, Config) ->
+ [{testcase, Case}|Config].
-end_per_suite(_Config) ->
+end_per_testcase(_Case, _Config) ->
ok.
-init_per_group(_GroupName, Config) ->
- Config.
-
-end_per_group(_GroupName, Config) ->
- Config.
-
-
%%
%%
%% Test cases
%%
%%
-test_cases() ->
- [erlang_display, integer, float, string, character,
- snprintf, quote].
-
erlang_display(doc) -> [];
erlang_display(suite) -> [];
erlang_display(Config) when is_list(Config) ->
@@ -244,15 +226,6 @@ default_testcase_impl(doc) -> [];
default_testcase_impl(suite) -> [];
default_testcase_impl(Config) when is_list(Config) -> run_case(Config).
-init_per_testcase(Case, Config) ->
- Dog = ?t:timetrap(?DEFAULT_TIMEOUT),
- [{testcase, Case}, {watchdog, Dog} |Config].
-
-end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
- ?t:timetrap_cancel(Dog),
- ok.
-
-define(TESTPROG, "erl_print_tests").
-define(FAILED_MARKER, $E,$P,$-,$T,$E,$S,$T,$-,$F,$A,$I,$L,$U,$R,$E).
-define(SKIPPED_MARKER, $E,$P,$-,$T,$E,$S,$T,$-,$S,$K,$I,$P).