Ver a proveniência

Add rebar code path to common test code path

pull/3/head
Benjamin Nortier há 14 anos
committed by Tuncer Ayaz
ascendente
cometimento
ab4e0a32ab
1 ficheiros alterados com 11 adições e 2 eliminações
  1. +11
    -2
      src/rebar_ct.erl

+ 11
- 2
src/rebar_ct.erl Ver ficheiro

@ -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,

Carregando…
Cancelar
Guardar