From 8fea315b0bfe120d8177c16bda2a6ee3e1343ac0 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Sat, 14 Jun 2014 18:12:18 +0200 Subject: rebar_eunit: disambiguate internal naming Partially revert naming changes introduced in 93689703c1: CoverageModules -> FilteredModules get_coverage_modules -> get_matching_modules Having the name "coverage" meaning "filtered/selected modules" can be confused with code coverage. --- src/rebar_eunit.erl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl index a6fa0de..faa6228 100644 --- a/src/rebar_eunit.erl +++ b/src/rebar_eunit.erl @@ -157,7 +157,7 @@ run_eunit(Config, CodePath, SrcErls) -> %% Get matching tests and modules AllModules = [rebar_utils:beam_to_mod(?EUNIT_DIR, N) || N <- AllBeamFiles], - {Tests, CoverageModules} = + {Tests, FilteredModules} = get_tests_and_modules(Config, ModuleBeamFiles, AllModules), SrcModules = [rebar_utils:erl_to_mod(M) || M <- SrcErls], @@ -168,7 +168,7 @@ run_eunit(Config, CodePath, SrcErls) -> StatusBefore = status_before_eunit(), EunitResult = perform_eunit(Config, Tests), - rebar_cover_utils:perform_cover(Config, CoverageModules, SrcModules, + rebar_cover_utils:perform_cover(Config, FilteredModules, SrcModules, eunit_dir()), rebar_cover_utils:close(CoverLog), @@ -221,9 +221,9 @@ get_tests_and_modules(Config, ModuleBeamFiles, AllModules) -> {Tests, QualifiedTests} = get_qualified_and_unqualified_tests(Config), Modules = get_test_modules(SelectedSuites, Tests, QualifiedTests, ModuleBeamFiles), - CoverageModules = get_coverage_modules(AllModules, Modules, QualifiedTests), + FilteredModules = get_matching_modules(AllModules, Modules, QualifiedTests), MatchedTests = get_matching_tests(Modules, Tests, QualifiedTests), - {MatchedTests, CoverageModules}. + {MatchedTests, FilteredModules}. %% %% == get suites specified via 'suites' option == @@ -331,7 +331,7 @@ get_test_modules(SelectedSuites, Tests, QualifiedTests, ModuleBeamFiles) -> N <- ModuleBeamFiles] end. -get_coverage_modules(AllModules, Modules, QualifiedTests) -> +get_matching_modules(AllModules, Modules, QualifiedTests) -> ModuleFilterMapper = fun({M, _}) -> case lists:member(M, AllModules) of -- cgit v1.1