diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-04-25 16:18:10 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-04-25 16:18:10 +0200 |
commit | b842026cc5e86cf7f054da073f6da16adf02baa9 (patch) | |
tree | 1c1ca3ae789be95f2a08aa1c215c0e499a2be9eb /lib/runtime_tools/test/dyntrace_SUITE.erl | |
parent | 7c0c37b96fa6199e70682b8b0e5e588f70e881cd (diff) | |
parent | ee65f0cff97803cf07fb638fd56b8ed21765a647 (diff) | |
download | otp-b842026cc5e86cf7f054da073f6da16adf02baa9.tar.gz otp-b842026cc5e86cf7f054da073f6da16adf02baa9.tar.bz2 otp-b842026cc5e86cf7f054da073f6da16adf02baa9.zip |
Merge branch 'egil/runtime_tools/modernize-tests'
* egil/runtime_tools/modernize-tests:
Eliminate use of doc and suite clauses
Replace ?t with test_server
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 'lib/runtime_tools/test/dyntrace_SUITE.erl')
-rw-r--r-- | lib/runtime_tools/test/dyntrace_SUITE.erl | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/lib/runtime_tools/test/dyntrace_SUITE.erl b/lib/runtime_tools/test/dyntrace_SUITE.erl index f3c1cce8f8..7be2f49a8b 100644 --- a/lib/runtime_tools/test/dyntrace_SUITE.erl +++ b/lib/runtime_tools/test/dyntrace_SUITE.erl @@ -20,26 +20,14 @@ -module(dyntrace_SUITE). -include_lib("common_test/include/ct.hrl"). --export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, - init_per_group/2,end_per_group/2]). --export([init_per_testcase/2, end_per_testcase/2]). +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1]). %% Test cases -export([smoke/1,process/1]). -%% Default timetrap timeout (set in init_per_testcase) --define(default_timeout, ?t:minutes(1)). - -init_per_testcase(_Case, Config) -> - Dog = test_server:timetrap(?default_timeout), - [{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, 1}}]. all() -> case erlang:system_info(dynamic_trace) of @@ -73,14 +61,8 @@ init_per_suite(Config) -> end_per_suite(_Config) -> ok. -init_per_group(_GroupName, Config) -> - Config. - -end_per_group(_GroupName, Config) -> - Config. - smoke(Config) -> - Emu = ?t:lookup_config(emu_name, Config), + Emu = test_server:lookup_config(emu_name, Config), BinEmu = list_to_binary(Emu), case erlang:system_info(dynamic_trace) of dtrace -> @@ -107,8 +89,7 @@ process(_Config) -> {probe,"process-hibernate"}, {action,[{printf,["hibernate %s %s\n",{arg,0},{arg,1}]}]}, {probe,"process-exit"}, - {action,[{printf,["exit %s %s\n",{arg,0},{arg,1}]}]} - ], + {action,[{printf,["exit %s %s\n",{arg,0},{arg,1}]}]}], F = fun() -> {Pid,Ref} = spawn_monitor(fun my_process/0), Pid ! hibernate, |