Skip to content

Commit

Permalink
cover compile prior to calculating coverage
Browse files Browse the repository at this point in the history
fixes #1327
  • Loading branch information
alisdair sullivan committed Sep 20, 2016
1 parent fb363cd commit c0a903b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/rebar_prv_cover.erl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
-include("rebar.hrl").

-define(PROVIDER, cover).
-define(DEPS, [app_discovery]).
-define(DEPS, [compile]).

%% ===================================================================
%% Public API
Expand Down Expand Up @@ -84,6 +84,11 @@ reset(State) ->
{ok, State}.

analyze(State) ->
%% modules have to be cover compiled in order for
%% cover data to be reloaded
%% this maybe breaks if modules have been deleted
%% since code coverage was collected?
ok = cover_compile(State, apps),
?INFO("Performing cover analysis...", []),
%% figure out what coverdata we have
CoverDir = cover_dir(State),
Expand Down

0 comments on commit c0a903b

Please sign in to comment.