summaryrefslogtreecommitdiff
path: root/src/rebar_ct.erl
diff options
context:
space:
mode:
authorAlexey Romanov <alexey.v.romanov@gmail.com>2010-12-11 15:58:20 +0300
committerAlexey Romanov <alexey.v.romanov@gmail.com>2010-12-11 15:58:20 +0300
commit2ceeb3272139b7569c8dabc215ca1e7063b0d385 (patch)
treeed38fc14792cdc4702991d3712ed516f67b828cb /src/rebar_ct.erl
parentd9f0cdeddd6e7499d3901e9f10f6126d0fc1cc54 (diff)
parent90c5da80334eed4b97f475e1c0553567a9f14f0a (diff)
Merge branch 'master' of git://github.com/basho/rebar
Conflicts: priv/templates/simplenode.runner
Diffstat (limited to 'src/rebar_ct.erl')
-rw-r--r--src/rebar_ct.erl13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/rebar_ct.erl b/src/rebar_ct.erl
index fc87dd3..316998f 100644
--- a/src/rebar_ct.erl
+++ b/src/rebar_ct.erl
@@ -130,13 +130,22 @@ make_cmd(TestDir, Config) ->
Include = ""
end,
+ %% Add the code path of the rebar process to the code path. This
+ %% includes the dependencies in the code path. The directories
+ %% that are part of the root Erlang install are filtered out to
+ %% avoid duplication
+ R = code:root_dir(),
+ NonLibCodeDirs = [P || P <- code:get_path(), lists:prefix(R, P) == false],
+ CodeDirs = [io_lib:format("\"~s\"", [Dir]) ||
+ Dir <- [EbinDir|NonLibCodeDirs]],
+ CodePathString = string:join(CodeDirs, " "),
Cmd = ?FMT("erl " % should we expand ERL_PATH?
- " -noshell -pa \"~s\" ~s"
+ " -noshell -pa ~s ~s"
" -s ct_run script_start -s erlang halt"
" -name test@~s"
" -logdir \"~s\""
" -env TEST_DIR \"~s\"",
- [EbinDir,
+ [CodePathString,
Include,
net_adm:localhost(),
LogDir,