summaryrefslogtreecommitdiff
path: root/src/rebar_prv_common_test.erl
diff options
context:
space:
mode:
authoralisdair sullivan <alisdairsullivan@yahoo.ca>2016-10-13 12:45:01 -0700
committerGitHub <noreply@github.com>2016-10-13 12:45:01 -0700
commit24a43accbde52690e7b6be8fcb9e3db07326ec68 (patch)
treeb13223812013c4b2de781b94df4d52204b1b1442 /src/rebar_prv_common_test.erl
parent65f66dae0fdb27de4fab289b5d7c60733d8598f5 (diff)
parente71b80752f905d9f4bb5dbf78c16693dbc6133f4 (diff)
Merge pull request #1348 from ElectronicRU/master
Fix sys.config's handling in common_test and otherwise. closes #1289
Diffstat (limited to 'src/rebar_prv_common_test.erl')
-rw-r--r--src/rebar_prv_common_test.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rebar_prv_common_test.erl b/src/rebar_prv_common_test.erl
index 1e0632e..46bd1a7 100644
--- a/src/rebar_prv_common_test.erl
+++ b/src/rebar_prv_common_test.erl
@@ -221,8 +221,13 @@ select_tests(State, ProjectApps, CmdOpts, CfgOpts) ->
Configs = lists:flatmap(fun(Filename) ->
rebar_file_utils:consult_config(State, Filename)
end, SysConfigs),
+ %% NB: load the applications (from user directories too) to support OTP < 17
+ %% to our best ability.
+ OldPath = code:get_path(),
+ code:add_pathsa(rebar_state:code_paths(State, all_deps)),
[application:load(Application) || Config <- Configs, {Application, _} <- Config],
rebar_utils:reread_config(Configs),
+ code:set_path(OldPath),
Merged = lists:ukeymerge(1,
lists:ukeysort(1, CmdOpts),