summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2014-06-14 18:25:38 +0200
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2014-06-14 19:23:45 +0200
commit1363ba30381e3f40bddc134fc8415d6569a32ec3 (patch)
tree33d689726f7a6cd8fb41913abe3f4a6f2d1a3b26 /src
parent8fea315b0bfe120d8177c16bda2a6ee3e1343ac0 (diff)
Wrap cover:stop() call as rebar_cover_utils:exit/0
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),