summaryrefslogtreecommitdiff
path: root/inttest
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2012-11-05 20:08:48 +0100
committerJared Morrow <jared@basho.com>2014-03-11 21:11:36 +0000
commit77a0eb6fe4dca909c6fe63f00b6793ba759f1a63 (patch)
tree865da21cd27a7c2c765c02a28aaee42eeaf5aa4f /inttest
parent195d61a4021f5df5604a584f04ed5fbe80cafde7 (diff)
Fix #56 (always-on recursion)
Always-on recursive application of all rebar commands causes too many issues. Recursive application is required for: 1. dealing with dependencies: get-deps, update-deps, and compile of deps right after get-deps or update-deps 2. projects with a riak-like apps/ project structure and dev process The vast majority of projects are not structured like riak. Therefore, moving forward it's best to (by default) restrict recursive behavior to dealing with deps. This commit does that and also adds command line and rebar.config options for controlling or configuring recursion. Also, we introduce two meta commands: prepare-deps (equivalent to rebar -r get-deps compile) and refresh-deps (equivalent to rebar -r update-deps compile). riak-like projects can extend the list of recursive commands (to include 'eunit' and 'compile') by adding {recursive_cmds, [eunit, compile]} to rebar.config.
Diffstat (limited to 'inttest')
-rw-r--r--inttest/depplugins/depplugins_rt.erl2
-rw-r--r--inttest/tdeps1/tdeps1_rt.erl3
-rw-r--r--inttest/tdeps2/tdeps2_rt.erl3
-rw-r--r--inttest/tdeps_update/tdeps_update_rt.erl3
4 files changed, 7 insertions, 4 deletions
diff --git a/inttest/depplugins/depplugins_rt.erl b/inttest/depplugins/depplugins_rt.erl
index a45fa93..686d719 100644
--- a/inttest/depplugins/depplugins_rt.erl
+++ b/inttest/depplugins/depplugins_rt.erl
@@ -39,7 +39,7 @@ files() ->
].
run(_Dir) ->
- ?assertMatch({ok, _}, retest_sh:run("./rebar compile", [])),
+ ?assertMatch({ok, _}, retest_sh:run("./rebar -r compile", [])),
?assertEqual(true, filelib:is_regular("base_dir_cwd_pre.compile")),
diff --git a/inttest/tdeps1/tdeps1_rt.erl b/inttest/tdeps1/tdeps1_rt.erl
index 3de1a2b..425402f 100644
--- a/inttest/tdeps1/tdeps1_rt.erl
+++ b/inttest/tdeps1/tdeps1_rt.erl
@@ -41,7 +41,8 @@ run(_Dir) ->
apply_cmds(GitCmds, [{dir, "repo/b"}]),
apply_cmds(GitCmds, [{dir, "repo/c"}]),
- {ok, _} = retest_sh:run("./rebar get-deps compile", []),
+ {ok, _} = retest_sh:run("./rebar get-deps", []),
+ {ok, _} = retest_sh:run("./rebar -r compile", []),
true = filelib:is_regular("ebin/a.beam"),
ok.
diff --git a/inttest/tdeps2/tdeps2_rt.erl b/inttest/tdeps2/tdeps2_rt.erl
index 987567e..61fc42b 100644
--- a/inttest/tdeps2/tdeps2_rt.erl
+++ b/inttest/tdeps2/tdeps2_rt.erl
@@ -49,7 +49,8 @@ run(_Dir) ->
ok = apply_cmds(GitCmds, [{dir, "repo/b"}]),
ok = apply_cmds(GitCmds, [{dir, "repo/c"}]),
- {ok, _} = retest_sh:run("./rebar -v get-deps compile", []),
+ {ok, _} = retest_sh:run("./rebar -v get-deps", []),
+ {ok, _} = retest_sh:run("./rebar -v -r compile", []),
ok.
%%
diff --git a/inttest/tdeps_update/tdeps_update_rt.erl b/inttest/tdeps_update/tdeps_update_rt.erl
index 81bb7ef..3a0d9bb 100644
--- a/inttest/tdeps_update/tdeps_update_rt.erl
+++ b/inttest/tdeps_update/tdeps_update_rt.erl
@@ -122,7 +122,8 @@ run(_Dir) ->
ok = apply_cmds(GitCmds++ECmds, [{dir, "repo/e"}]),
ok = apply_cmds(GitCmds++FCmds, [{dir, "repo/f"}]),
- {ok, _} = retest_sh:run("./rebar -v get-deps compile", []),
+ {ok, _} = retest_sh:run("./rebar -v get-deps", []),
+ {ok, _} = retest_sh:run("./rebar -v -r compile", []),
os:cmd("cp a2.rebar.config apps/a1/rebar.config"),
{ok, _} = retest_sh:run("./rebar -v update-deps", []),
{ok, _} = retest_sh:run("./rebar -v compile", []),