diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-04-11 15:45:00 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-04-11 15:45:00 +0200 |
commit | 8cda28dea9595c29a2b3b61d4a6dab43977b178a (patch) | |
tree | 95531a548a60d3a7ab9587e54cf8dee44118122a /erts/test/z_SUITE.erl | |
parent | 9d2dde09689246cd61a5e7bfdc8ca37884043a9c (diff) | |
parent | 2f1ce217b9eaa0ef4be778193e232ee5faf00a15 (diff) | |
download | otp-8cda28dea9595c29a2b3b61d4a6dab43977b178a.tar.gz otp-8cda28dea9595c29a2b3b61d4a6dab43977b178a.tar.bz2 otp-8cda28dea9595c29a2b3b61d4a6dab43977b178a.zip |
Merge branch 'egil/erts-lib/modernize-tests'
* egil/erts-lib/modernize-tests:
Replace test_server:os_type/0 with os:type/0
Eliminate use of doc and suite clauses
Replace use of test_server:format/2 with io:format/2
Eliminate use of test_server:fail/0,1
Eliminate use of ?config() macro
Modernize use of timetraps
Remove ?line macros
Diffstat (limited to 'erts/test/z_SUITE.erl')
-rw-r--r-- | erts/test/z_SUITE.erl | 45 |
1 files changed, 5 insertions, 40 deletions
diff --git a/erts/test/z_SUITE.erl b/erts/test/z_SUITE.erl index 7f3260e4cb..de3e1c24a4 100644 --- a/erts/test/z_SUITE.erl +++ b/erts/test/z_SUITE.erl @@ -24,8 +24,6 @@ %% This suite expects to be run as the last suite of all suites. %% -%-define(line_trace, 1). - -include_lib("kernel/include/file.hrl"). -record(core_search_conf, {search_dir, @@ -34,52 +32,19 @@ file, run_by_ts}). --define(DEFAULT_TIMEOUT, ?t:minutes(5)). - --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([search_for_core_files/1, core_files/1]). -include_lib("common_test/include/ct.hrl"). - -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. - -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap, {minutes, 5}}]. all() -> [core_files]. -groups() -> - []. - -init_per_suite(Config) -> - Config. - -end_per_suite(_Config) -> - ok. - -init_per_group(_GroupName, Config) -> - Config. - -end_per_group(_GroupName, Config) -> - Config. - - - -core_files(doc) -> - []; -core_files(suite) -> - []; core_files(Config) when is_list(Config) -> case os:type() of {win32, _} -> @@ -354,7 +319,7 @@ core_file_search(#core_search_conf{search_dir = Base, case {RunByTS, ICores, FCores} of {true, [], []} -> ok; {true, _, []} -> {comment, Res}; - {true, _, _} -> ?t:fail(Res); + {true, _, _} -> ct:fail(Res); _ -> Res end end. |