diff --git a/apps/rebar/src/rebar_prv_common_test.erl b/apps/rebar/src/rebar_prv_common_test.erl index 2f981efee..9d5cd9208 100644 --- a/apps/rebar/src/rebar_prv_common_test.erl +++ b/apps/rebar/src/rebar_prv_common_test.erl @@ -591,6 +591,8 @@ maybe_inject_test_dir(State, AppAcc, [App|Rest], Dir) -> Opts = inject_test_dir(rebar_state:opts(State), rebar_app_info:out_dir(App)), {rebar_state:opts(State, Opts), AppAcc ++ [App]}; {ok, Path} -> + To = filename:join([rebar_app_info:out_dir(App), Path]), + ok = copy_bare_suites(Dir, To), Opts = inject_test_dir(rebar_app_info:opts(App), Path), {State, AppAcc ++ [rebar_app_info:opts(App, Opts)] ++ Rest}; {error, badparent} -> @@ -609,6 +611,8 @@ maybe_inject_test_dir(State, AppAcc, [], Dir) -> Opts = inject_test_dir(rebar_state:opts(State), ExtrasDir), {rebar_state:opts(State, Opts), AppAcc}; {ok, Path} -> + To = filename:join([rebar_dir:base_dir(State), Path]), + ok = copy_bare_suites(Dir, To), Opts = inject_test_dir(rebar_state:opts(State), Path), {rebar_state:opts(State, Opts), AppAcc}; {error, badparent} -> diff --git a/apps/rebar/src/rebar_prv_compile.erl b/apps/rebar/src/rebar_prv_compile.erl index 650de9332..c97d7c3fa 100644 --- a/apps/rebar/src/rebar_prv_compile.erl +++ b/apps/rebar/src/rebar_prv_compile.erl @@ -481,6 +481,9 @@ symlink_or_copy_existing(OldAppDir, AppDir, Dir) -> false -> ok end. +copy(_, _, "test") -> + % In the case of the test directory, the files are copied by rebar_prv_common_test + ok; copy(OldAppDir, AppDir, Dir) -> Source = filename:join([OldAppDir, Dir]), Target = filename:join([AppDir, Dir]),