Rebasing. Fix differences with c26b0c7 c996e98 b690842.

This commit is contained in:
Pierre Fenoll 2014-06-13 14:29:54 +02:00
parent e3d2142df5
commit 258ab8a623
2 changed files with 9 additions and 10 deletions

1
THANKS
View file

@ -125,3 +125,4 @@ YeJun Su
Yuki Ito Yuki Ito
alisdair sullivan alisdair sullivan
Alexander Verbitsky Alexander Verbitsky
Pierre Fenoll

View file

@ -148,11 +148,9 @@ test_compile(Config, Cmd, OutDir) ->
%% in src but in a subdirectory of src. Cover only looks in cwd and ../src %% in src but in a subdirectory of src. Cover only looks in cwd and ../src
%% for source files. Also copy files from src_dirs. %% for source files. Also copy files from src_dirs.
SrcDirs = rebar_utils:src_dirs(proplists:append_values(src_dirs, ErlOpts1)), SrcDirs = rebar_utils:src_dirs(proplists:append_values(src_dirs, ErlOpts1)),
SrcErls = lists:foldl( SrcErls = lists:flatmap(
fun(Dir, Acc) -> fun (Dir) -> rebar_utils:find_files(Dir, ".*\\.erl$") end,
Files = rebar_utils:find_files(Dir, ".*\\.erl\$"), SrcDirs),
lists:append(Acc, Files)
end, [], SrcDirs),
%% If it is not the first time rebar eunit or rebar qc is executed, %% If it is not the first time rebar eunit or rebar qc is executed,
%% there will be source files already present in OutDir. Since some %% there will be source files already present in OutDir. Since some
@ -163,17 +161,17 @@ test_compile(Config, Cmd, OutDir) ->
%% rebar_file_utils:cp_r. %% rebar_file_utils:cp_r.
%% Get the full path to a file that was previously copied in OutDir %% Get the full path to a file that was previously copied in OutDir
ToCleanUp = fun(F, Acc) -> ToCleanUp = fun(F) ->
F2 = filename:basename(F), F2 = filename:basename(F),
F3 = filename:join([OutDir, F2]), F3 = filename:join([OutDir, F2]),
case filelib:is_regular(F3) of case filelib:is_regular(F3) of
true -> [F3|Acc]; true -> F3;
false -> Acc false -> []
end end
end, end,
ok = rebar_file_utils:delete_each(lists:foldl(ToCleanUp, [], TestErls)), ok = rebar_file_utils:delete_each(lists:flatmap(ToCleanUp, TestErls)),
ok = rebar_file_utils:delete_each(lists:foldl(ToCleanUp, [], SrcErls)), ok = rebar_file_utils:delete_each(lists:flatmap(ToCleanUp, SrcErls)),
ok = rebar_file_utils:cp_r(SrcErls ++ TestErls, OutDir), ok = rebar_file_utils:cp_r(SrcErls ++ TestErls, OutDir),