summaryrefslogtreecommitdiff
path: root/src/rebar_prv_common_test.erl
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-03-02 19:04:03 -0600
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-03-02 19:04:03 -0600
commitbaf46a861b18086131707d056ee106c9fba8da3d (patch)
treec0bc1de343e52f8385d9f1740e32df5e85dfa234 /src/rebar_prv_common_test.erl
parent8affde1c37ba746df41343a52fd8e239ebfe2db3 (diff)
parentaf0f4bb20a66f1464fa25d31f9b69784f3119493 (diff)
Merge pull request #187 from tsloughter/profiles_dir
make base_dir for a run include the profiles in path, link to shared dep
Diffstat (limited to 'src/rebar_prv_common_test.erl')
-rw-r--r--src/rebar_prv_common_test.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rebar_prv_common_test.erl b/src/rebar_prv_common_test.erl
index b697d37..c3f9163 100644
--- a/src/rebar_prv_common_test.erl
+++ b/src/rebar_prv_common_test.erl
@@ -43,13 +43,14 @@ do(State) ->
?DEBUG("Compiling Common Test suites in: ~p", [OutDir]),
lists:foreach(fun(App) ->
AppDir = rebar_app_info:dir(App),
+ AppOutDir = rebar_app_info:out_dir(App),
C = rebar_config:consult(AppDir),
S = rebar_state:new(State, C, AppDir),
%% combine `erl_first_files` and `common_test_first_files` and
%% adjust compile opts to include `common_test_compile_opts`
%% and `{src_dirs, "test"}`
TestState = test_state(S, InDirs, OutDir),
- ok = rebar_erlc_compiler:compile(TestState, AppDir)
+ ok = rebar_erlc_compiler:compile(TestState, AppDir, AppOutDir)
end, TestApps),
ok = maybe_compile_extra_tests(TestApps, State, InDirs, OutDir),
Path = code:get_path(),
@@ -342,7 +343,7 @@ maybe_compile_extra_tests(TestApps, State, InDirs, OutDir) ->
[{src_dirs, ["test"|InDirs]}] ++
lists:keydelete(src_dirs, 1, ErlOpts),
TestState = first_files(rebar_state:set(State, erl_opts, TestOpts)),
- rebar_erlc_compiler:compile(TestState, rebar_dir:get_cwd());
+ rebar_erlc_compiler:compile(TestState, rebar_dir:get_cwd(), rebar_dir:get_cwd());
%% already compiled `./test` so do nothing
_ -> ok
end.