From 2e654513dddeec4e93345b83c2f56cd368b87542 Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Sat, 23 Apr 2011 17:17:49 +0200 Subject: [PATCH] Fix eunit regression (reported-by Alexander Dorofeev) --- src/rebar_eunit.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl index 6dd3bde..8f7c682 100644 --- a/src/rebar_eunit.erl +++ b/src/rebar_eunit.erl @@ -247,7 +247,10 @@ cover_analyze(Config, Modules, SrcModules) -> %% suite can be a comma seperated list of modules to test Suite = [list_to_atom(S) || S <- string:tokens(rebar_config:get_global(suite, ""), ",")], - FilteredModules = [M || M <- Modules, lists:member(M, Suite)], + FilteredModules = case Suite of + [] -> Modules; + _ -> [M || M <- Modules, lists:member(M, Suite)] + end, %% Generate coverage info for all the cover-compiled modules Coverage = [cover_analyze_mod(M) || M <- FilteredModules],