summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Meredith <jmeredith@basho.com>2011-09-05 16:32:13 -0600
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2011-10-14 17:10:11 +0200
commit577574675815ec93e720af5eda1dccddd463603a (patch)
treed0cb864f639e7c591d38e24d2c343e56fad046f8
parent6dfcd8b9f2b1fa73575c353b37e7b7d2e77fa5be (diff)
Remove modules that fail coverage from the list
-rw-r--r--src/rebar_eunit.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl
index efc12a0..928f96b 100644
--- a/src/rebar_eunit.erl
+++ b/src/rebar_eunit.erl
@@ -281,7 +281,7 @@ cover_analyze(Config, Modules, SrcModules) ->
end,
%% Generate coverage info for all the cover-compiled modules
- Coverage = [cover_analyze_mod(M) || M <- FilteredModules],
+ Coverage = lists:flatten([cover_analyze_mod(M) || M <- FilteredModules]),
%% Write index of coverage info
cover_write_index(lists:sort(Coverage), SrcModules),
@@ -364,12 +364,12 @@ cover_analyze_mod(Module) ->
%% test/0 fun, which cover considers a runnable line, but
%% eunit:test(TestRepresentation) never calls. Decrement
%% NotCovered in this case.
- align_notcovered_count(Module, Covered, NotCovered,
- is_eunitized(Module));
+ [align_notcovered_count(Module, Covered, NotCovered,
+ is_eunitized(Module))];
{error, Reason} ->
?ERROR("Cover analyze failed for ~p: ~p ~p\n",
[Module, Reason, code:which(Module)]),
- {0,0}
+ []
end.
is_eunitized(Mod) ->