diff options
author | Siri Hansen <[email protected]> | 2013-01-09 08:51:12 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2013-01-09 08:51:12 +0100 |
commit | 151f7832c74975297b1dce6302dd192285d7c2a8 (patch) | |
tree | 3fc10ca9a6c0ef9be212c5bb3e650b865d260abb /lib/common_test/src | |
parent | 9767e72b44ebd0cd5277634c4a37318479623c2d (diff) | |
parent | 06ad426384ab6c5f5966c4f5ae87be0fb01f346c (diff) | |
download | otp-151f7832c74975297b1dce6302dd192285d7c2a8.tar.gz otp-151f7832c74975297b1dce6302dd192285d7c2a8.tar.bz2 otp-151f7832c74975297b1dce6302dd192285d7c2a8.zip |
Merge branch 'siri/cover/new-bugs-r16/OTP-10638'
* siri/cover/new-bugs-r16/OTP-10638:
[cover] Cleanup by stopping cover between tests
[common_test] Stop cover on slave node after node is terminated
[test_server] Stop cover on node after node is terminated
[cover] Fix timing dependent bug in cover_SUITE:reconnect
[cover] Remove stopped node also from lost_nodes list
[cover] Don't mark stopped node as lost
Diffstat (limited to 'lib/common_test/src')
-rw-r--r-- | lib/common_test/src/ct_slave.erl | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/lib/common_test/src/ct_slave.erl b/lib/common_test/src/ct_slave.erl index 58633b7de6..1fd8c04f8b 100644 --- a/lib/common_test/src/ct_slave.erl +++ b/lib/common_test/src/ct_slave.erl @@ -449,15 +449,29 @@ wait_for_node_alive(Node, N) -> % call init:stop on a remote node do_stop(ENode) -> - case test_server:is_cover() of - true -> - MainCoverNode = cover:get_main_node(), - rpc:call(MainCoverNode,cover,flush,[ENode]); - false -> - ok + {Cover,MainCoverNode} = + case test_server:is_cover() of + true -> + Main = cover:get_main_node(), + rpc:call(Main,cover,flush,[ENode]), + {true,Main}; + false -> + {false,undefined} end, spawn(ENode, init, stop, []), - wait_for_node_dead(ENode, 5). + case wait_for_node_dead(ENode, 5) of + {ok,ENode} -> + if Cover -> + %% To avoid that cover is started again if a node + %% with the same name is started later. + rpc:call(MainCoverNode,cover,stop,[ENode]); + true -> + ok + end, + {ok,ENode}; + Error -> + Error + end. % wait N seconds until node is disconnected wait_for_node_dead(Node, 0) -> |