aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/code_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-05-24 10:43:35 +0200
committerBjörn Gustavsson <[email protected]>2017-05-24 13:22:55 +0200
commit7ba1983bb5b5cd0d391a5ba944d1fd28ae4187d6 (patch)
treeb93513d543a7ef7efa7b5f6a66463c552de25418 /lib/kernel/test/code_SUITE.erl
parent967a7deaaee2782fb91c8af592096c6b39c666f8 (diff)
downloadotp-7ba1983bb5b5cd0d391a5ba944d1fd28ae4187d6.tar.gz
otp-7ba1983bb5b5cd0d391a5ba944d1fd28ae4187d6.tar.bz2
otp-7ba1983bb5b5cd0d391a5ba944d1fd28ae4187d6.zip
Stop the cover server after running code_SUITE:module_status/1
Leaving the cover server running could cause problems in other test cases.
Diffstat (limited to 'lib/kernel/test/code_SUITE.erl')
-rw-r--r--lib/kernel/test/code_SUITE.erl13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl
index afc32283ba..6f8e949aac 100644
--- a/lib/kernel/test/code_SUITE.erl
+++ b/lib/kernel/test/code_SUITE.erl
@@ -1791,6 +1791,19 @@ do_normalized_paths([]) ->
%% Test that module_status/1 behaves as expected
module_status(_Config) ->
+ case test_server:is_cover() of
+ true ->
+ module_status();
+ false ->
+ %% Make sure that we terminate the cover server.
+ try
+ module_status()
+ after
+ cover:stop()
+ end
+ end.
+
+module_status() ->
%% basics
not_loaded = code:module_status(fubar), % nonexisting
{file, preloaded} = code:is_loaded(erlang),