2011-08-01 07:12:36 +00:00
|
|
|
-module(t_custom_config_rt).
|
|
|
|
|
|
|
|
-compile(export_all).
|
|
|
|
|
|
|
|
-include_lib("eunit/include/eunit.hrl").
|
|
|
|
|
|
|
|
files() ->
|
2011-09-06 08:51:38 +00:00
|
|
|
[{copy, "../../rebar", "rebar"},
|
|
|
|
{copy, "custom.config", "custom.config"},
|
2011-08-01 07:12:36 +00:00
|
|
|
{create, "ebin/custom_config.app", app(custom_config, [custom_config])}].
|
|
|
|
|
|
|
|
run(Dir) ->
|
|
|
|
retest_log:log(debug, "Running in Dir: ~s~n", [Dir]),
|
2013-10-12 20:12:40 +00:00
|
|
|
Ref = retest:sh("./rebar -C custom.config check-deps -vv",
|
2012-08-18 17:29:29 +00:00
|
|
|
[{async, true}]),
|
2011-08-01 07:12:36 +00:00
|
|
|
{ok, Captured} =
|
|
|
|
retest:sh_expect(Ref,
|
|
|
|
"DEBUG: Consult config file .*/custom.config.*",
|
|
|
|
[{capture, all, list}]),
|
2011-09-06 08:51:38 +00:00
|
|
|
{ok, Missing} =
|
|
|
|
retest:sh_expect(Ref,
|
2012-08-18 17:29:29 +00:00
|
|
|
"DEBUG: Missing deps : \\[\\{dep,bad_name,"
|
Add support for non-Erlang/OTP (raw) dependencies
Introduce a new 'raw' option for dependency specs in rebar.config file.
For example:
{deps,
{dependency_name, "1.0.*",
{git, "<...>", {branch, "master"}},
[raw]
}
]}.
When this option is specified, rebar does not require the dependency to
have a standard Erlang/OTP layout which assumes presence of either
"src/dependency_name.app.src" or "ebin/dependency_name.app" files.
'raw' dependencies can still contain 'rebar.config' and even can have
the proper OTP directory layout, but they won't be compiled.
Only a subset of rebar commands will be executed on the 'raw'
subdirectories:
get-deps, update-deps, check-deps, list-deps and delete-deps.
2012-10-11 05:19:32 +00:00
|
|
|
"boo,\"\\.\",undefined,false\\}\\]",
|
2012-08-18 17:29:29 +00:00
|
|
|
[{capture, all, list}]),
|
2011-08-01 07:12:36 +00:00
|
|
|
retest_log:log(debug, "[CAPTURED]: ~s~n", [Captured]),
|
2011-09-06 08:51:38 +00:00
|
|
|
retest_log:log(debug, "[Missing]: ~s~n", [Missing]),
|
2011-08-01 07:12:36 +00:00
|
|
|
ok.
|
|
|
|
|
|
|
|
%%
|
|
|
|
%% Generate the contents of a simple .app file
|
|
|
|
%%
|
|
|
|
app(Name, Modules) ->
|
|
|
|
App = {application, Name,
|
|
|
|
[{description, atom_to_list(Name)},
|
|
|
|
{vsn, "1"},
|
|
|
|
{modules, Modules},
|
|
|
|
{registered, []},
|
|
|
|
{applications, [kernel, stdlib]}]},
|
|
|
|
io_lib:format("~p.\n", [App]).
|