diff options
author | Siri Hansen <[email protected]> | 2013-03-14 11:06:27 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2013-03-14 11:06:27 +0100 |
commit | 8e44167cb97ccf51a8ee3ca97449613ef3300514 (patch) | |
tree | 7e4dcabf0b3a431a9fd05c48d3f35285095195f9 /lib/observer/test/etop_SUITE.erl | |
parent | e2ee1f79a7d0ffe02eab4da90d655e77893d1666 (diff) | |
parent | 6ab4b1c2a7a5a89dd8ea4094bd7fb4c23745acfc (diff) | |
download | otp-8e44167cb97ccf51a8ee3ca97449613ef3300514.tar.gz otp-8e44167cb97ccf51a8ee3ca97449613ef3300514.tar.bz2 otp-8e44167cb97ccf51a8ee3ca97449613ef3300514.zip |
Merge branch 'siri/observer/misc-bugs/OTP-10894' into maint
* siri/observer/misc-bugs/OTP-10894:
[observer] Extend timer to allow trace msgs to arrive over tcp/ip
[observer] Kill slave node between tests in etop_SUITE
[observer] Accept current function for a process to be 'undefined' on hipe
[observer] Improve measurement of CPU utilization in etop
[observer] Fix non tail-recusive loop when measuring scheduler utilization
Diffstat (limited to 'lib/observer/test/etop_SUITE.erl')
-rw-r--r-- | lib/observer/test/etop_SUITE.erl | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/lib/observer/test/etop_SUITE.erl b/lib/observer/test/etop_SUITE.erl index 06577f82cc..6ce3ea59cf 100644 --- a/lib/observer/test/etop_SUITE.erl +++ b/lib/observer/test/etop_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2012. All Rights Reserved. +%% Copyright Ericsson AB 2002-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -21,7 +21,8 @@ %% Test functions -export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, - init_per_group/2,end_per_group/2,text/1,text_tracing_off/1]). + init_per_group/2,end_per_group/2]). +-export([text/1,text/2,text_tracing_off/1,text_tracing_off/2]). -export([init_per_testcase/2, end_per_testcase/2]). -include_lib("test_server/include/test_server.hrl"). @@ -31,7 +32,10 @@ init_per_testcase(_Case, Config) -> ?line Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. -end_per_testcase(_Case, Config) -> +end_per_testcase(Case, Config) -> + try apply(?MODULE,Case,[cleanup,Config]) + catch error:undef -> ok + end, Dog=?config(watchdog, Config), ?t:timetrap_cancel(Dog), ok. @@ -82,9 +86,12 @@ text() -> ?line timer:sleep(3000), ?line etop:config(sort,msg_q), ?line timer:sleep(3000), - ?line etop:stop(), - ?line ?t:stop_node(Node), ok. +text(cleanup,_Config) -> + etop:stop(), + {ok,Host} = inet:gethostname(), + Node = list_to_atom("node2@"++Host), + ?t:stop_node(Node). text_tracing_off(suite) -> []; @@ -111,7 +118,10 @@ text_tracing_off(Config) when is_list(Config) -> ?line timer:sleep(3000), ?line etop:config(sort,runtime), % this should not crash, but has no effect ?line timer:sleep(3000), - ?line etop:stop(), - ?line ?t:stop_node(Node), ok. +text_tracing_off(cleanup,_Config) -> + etop:stop(), + {ok,Host} = inet:gethostname(), + Node = list_to_atom("node2@"++Host), + ?t:stop_node(Node). |