summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rebar_cover_utils.erl6
-rw-r--r--src/rebar_eunit.erl2
-rw-r--r--src/rebar_qc.erl2
3 files changed, 7 insertions, 3 deletions
diff --git a/src/rebar_cover_utils.erl b/src/rebar_cover_utils.erl
index a232867..3195fe2 100644
--- a/src/rebar_cover_utils.erl
+++ b/src/rebar_cover_utils.erl
@@ -30,7 +30,8 @@
%% for internal use only
-export([init/3,
perform_cover/4,
- close/1]).
+ close/1,
+ exit/0]).
-include("rebar.hrl").
@@ -52,6 +53,9 @@ close(not_enabled) ->
close(F) ->
ok = file:close(F).
+exit() ->
+ cover:stop().
+
init(false, _BeamFiles, _TargetDir) ->
{ok, not_enabled};
init(true, BeamFiles, TargetDir) ->
diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl
index faa6228..a5b7b00 100644
--- a/src/rebar_eunit.erl
+++ b/src/rebar_eunit.erl
@@ -182,7 +182,7 @@ run_eunit(Config, CodePath, SrcErls) ->
%% Stop cover to clean the cover_server state. This is important if we want
%% eunit+cover to not slow down when analyzing many Erlang modules.
- ok = cover:stop(),
+ ok = rebar_cover_utils:exit(),
case EunitResult of
ok ->
diff --git a/src/rebar_qc.erl b/src/rebar_qc.erl
index cd3d288..e08833b 100644
--- a/src/rebar_qc.erl
+++ b/src/rebar_qc.erl
@@ -185,7 +185,7 @@ run1(QC, QCOpts, Config, CodePath, SrcErls) ->
rebar_cover_utils:perform_cover(Config, FilteredModules, SrcModules,
qc_dir()),
rebar_cover_utils:close(CoverLog),
- ok = cover:stop(),
+ ok = rebar_cover_utils:exit(),
true = code:set_path(CodePath),