diff options
author | Siri Hansen <siri@erlang.org> | 2012-10-22 16:13:50 +0200 |
---|---|---|
committer | Siri Hansen <siri@erlang.org> | 2012-10-30 11:18:42 +0100 |
commit | 3d4ea1aa4226e10b6daab29ae34f60deb0ecd7a9 (patch) | |
tree | bc4954838a1e26672fa1f9085484e33cb5da4ee9 /lib/common_test/src | |
parent | f6c1c3127f027cd717d01613cd356c5ada35041c (diff) | |
download | otp-3d4ea1aa4226e10b6daab29ae34f60deb0ecd7a9.tar.gz otp-3d4ea1aa4226e10b6daab29ae34f60deb0ecd7a9.tar.bz2 otp-3d4ea1aa4226e10b6daab29ae34f60deb0ecd7a9.zip |
[common_test, test_server] Don't flush cover if cover is not running
ct_slave, ct_test_support and test_server_test_lib always called
cover:flush/1 when stopping slave nodes. If cover was not running,
this would cause cover_server to be started and thus
test_server:is_cover/0 to return true afterwards. This has been
corrected.
Diffstat (limited to 'lib/common_test/src')
-rw-r--r-- | lib/common_test/src/ct_slave.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/common_test/src/ct_slave.erl b/lib/common_test/src/ct_slave.erl index 6f7e83d852..cb05423497 100644 --- a/lib/common_test/src/ct_slave.erl +++ b/lib/common_test/src/ct_slave.erl @@ -430,8 +430,13 @@ wait_for_node_alive(Node, N) -> % call init:stop on a remote node do_stop(ENode) -> - MainCoverNode = cover:get_main_node(), - rpc:call(MainCoverNode,cover,flush,[ENode]), + case test_server:is_cover() of + true -> + MainCoverNode = cover:get_main_node(), + rpc:call(MainCoverNode,cover,flush,[ENode]); + false -> + ok + end, spawn(ENode, init, stop, []), wait_for_node_dead(ENode, 5). |