diff options
-rw-r--r-- | src/rebar_escripter.erl | 5 | ||||
-rw-r--r-- | src/rebar_eunit.erl | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/rebar_escripter.erl b/src/rebar_escripter.erl index aa27399..d685f88 100644 --- a/src/rebar_escripter.erl +++ b/src/rebar_escripter.erl @@ -148,12 +148,13 @@ file_contents(Filename) -> {ok, Bin} = file:read_file(Filename), 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) -> Dirs = dirs(File), [{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) -> dirs1(filename:split(Dir), "", []). diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl index 3a529e2..be9417e 100644 --- a/src/rebar_eunit.erl +++ b/src/rebar_eunit.erl @@ -112,6 +112,7 @@ run_eunit(Config, CodePath, SrcErls) -> %% Get modules to be run in eunit AllModules = [rebar_utils:beam_to_mod(?EUNIT_DIR, N) || N <- AllBeamFiles], {SuitesProvided, FilteredModules} = filter_suites(Config, AllModules), + %% TODO: make tests= work with no suites= provided Tests = get_tests(Config, SuitesProvided, ModuleBeamFiles, FilteredModules), SrcModules = [rebar_utils:erl_to_mod(M) || M <- SrcErls], @@ -173,7 +174,6 @@ filter_suites1(Modules, Suites) -> [M || M <- Modules, lists:member(M, Suites)]. get_tests(Config, SuitesProvided, ModuleBeamFiles, FilteredModules) -> - %% TODO: make tests= work with no suites= provided case SuitesProvided of false -> %% No specific suites have been provided, use ModuleBeamFiles |