Browse Source

Merge pull request #1332 from erlang/rebar-1327

compile + cover compile prior to analyzing coverdata
pull/1334/head
Fred Hebert 8 years ago
committed by GitHub
parent
commit
69a9cf8a6d
1 changed files with 15 additions and 1 deletions
  1. +15
    -1
      src/rebar_prv_cover.erl

+ 15
- 1
src/rebar_prv_cover.erl View File

@ -15,7 +15,7 @@
-include("rebar.hrl").
-define(PROVIDER, cover).
-define(DEPS, [app_discovery]).
-define(DEPS, [lock]).
%% ===================================================================
%% Public API
@ -84,6 +84,20 @@ reset(State) ->
{ok, State}.
analyze(State) ->
%% modules have to be compiled and then cover compiled
%% in order for cover data to be reloaded
%% this maybe breaks if modules have been deleted
%% since code coverage was collected?
case rebar_prv_compile:do(State) of
%% successfully compiled apps
{ok, S} ->
ok = cover_compile(S, apps),
do_analyze(State);
%% this should look like a compiler error, not a cover error
Error -> Error
end.
do_analyze(State) ->
?INFO("Performing cover analysis...", []),
%% figure out what coverdata we have
CoverDir = cover_dir(State),

Loading…
Cancel
Save