Clarify comments

This commit is contained in:
Tuncer Ayaz 2012-08-12 14:03:44 +02:00
parent d76d063d05
commit fc7df16e31
2 changed files with 4 additions and 3 deletions

View file

@ -148,12 +148,13 @@ file_contents(Filename) ->
{ok, Bin} = file:read_file(Filename), {ok, Bin} = file:read_file(Filename),
Bin. Bin.
%% given a filename return zip archive dir entries for each sub-dir %% Given a filename, return zip archive dir entries for each sub-dir.
%% Required to work around issues fixed in OTP-10071.
dir_entries(File) -> dir_entries(File) ->
Dirs = dirs(File), Dirs = dirs(File),
[{Dir ++ "/", <<>>} || Dir <- Dirs]. [{Dir ++ "/", <<>>} || Dir <- Dirs].
%% given "foo/bar/baz" return ["foo", "foo/bar", "foo/bar/baz"] %% Given "foo/bar/baz", return ["foo", "foo/bar", "foo/bar/baz"].
dirs(Dir) -> dirs(Dir) ->
dirs1(filename:split(Dir), "", []). dirs1(filename:split(Dir), "", []).

View file

@ -112,6 +112,7 @@ run_eunit(Config, CodePath, SrcErls) ->
%% Get modules to be run in eunit %% Get modules to be run in eunit
AllModules = [rebar_utils:beam_to_mod(?EUNIT_DIR, N) || N <- AllBeamFiles], AllModules = [rebar_utils:beam_to_mod(?EUNIT_DIR, N) || N <- AllBeamFiles],
{SuitesProvided, FilteredModules} = filter_suites(Config, AllModules), {SuitesProvided, FilteredModules} = filter_suites(Config, AllModules),
%% TODO: make tests= work with no suites= provided
Tests = get_tests(Config, SuitesProvided, ModuleBeamFiles, FilteredModules), Tests = get_tests(Config, SuitesProvided, ModuleBeamFiles, FilteredModules),
SrcModules = [rebar_utils:erl_to_mod(M) || M <- SrcErls], SrcModules = [rebar_utils:erl_to_mod(M) || M <- SrcErls],
@ -173,7 +174,6 @@ filter_suites1(Modules, Suites) ->
[M || M <- Modules, lists:member(M, Suites)]. [M || M <- Modules, lists:member(M, Suites)].
get_tests(Config, SuitesProvided, ModuleBeamFiles, FilteredModules) -> get_tests(Config, SuitesProvided, ModuleBeamFiles, FilteredModules) ->
%% TODO: make tests= work with no suites= provided
case SuitesProvided of case SuitesProvided of
false -> false ->
%% No specific suites have been provided, use ModuleBeamFiles %% No specific suites have been provided, use ModuleBeamFiles