summaryrefslogtreecommitdiff
path: root/src/rebar_prv_compile.erl
diff options
context:
space:
mode:
authoralisdair sullivan <alisdair.sullivan@askuity.com>2015-12-20 16:17:05 -0800
committeralisdair sullivan <alisdair.sullivan@askuity.com>2015-12-20 19:06:48 -0800
commit9acd23f72799c6130b9f7a2c226346dcd10ac2c8 (patch)
tree7f86c50d97dfbd91a9d03ee171c475b4af166358 /src/rebar_prv_compile.erl
parent48c372d68dbe87b7a6d929e815b3250d63de820d (diff)
allow ct suites to be specified at the root of a project (or root of app)
previously rebar3 dropped suites declared at the root of the project (via `--suite=whatever_SUITE' probably) and warned. this was because the compiler would recursively copy and compile everything in the directory indicated by the test suite. this changes the copy mechanism to only copy erl source files and directories that end with `_SUITE_data' into the `extras' dir in `_build'
Diffstat (limited to 'src/rebar_prv_compile.erl')
-rw-r--r--src/rebar_prv_compile.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rebar_prv_compile.erl b/src/rebar_prv_compile.erl
index 2996aee..d57b82b 100644
--- a/src/rebar_prv_compile.erl
+++ b/src/rebar_prv_compile.erl
@@ -217,6 +217,10 @@ copy(OldAppDir, AppDir, Dir) ->
%% TODO: use ec_file:copy/2 to do this, it preserves timestamps and
%% may prevent recompilation of files in extra dirs
+copy(Source, Source) ->
+ %% allow users to specify a directory in _build as a directory
+ %% containing additional source/tests
+ ok;
copy(Source, Target) ->
%% important to do this so no files are copied onto themselves
%% which truncates them to zero length on some platforms