summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-08-22 09:18:47 -0500
committerTristan Sloughter <t@crashfast.com>2015-08-22 09:18:47 -0500
commit86e4c5d5ef39ce9c1ff2c7f9f30e5ab036108f11 (patch)
tree1d5ac02822ea64c5de1c5457e4834aeb85067fc7 /test
parent1f6516b231260a1b2e48f9b86e37a5d317d4983c (diff)
do not override user cli supplied outputdir for relx
Diffstat (limited to 'test')
-rw-r--r--test/rebar_release_SUITE.erl33
1 files changed, 29 insertions, 4 deletions
diff --git a/test/rebar_release_SUITE.erl b/test/rebar_release_SUITE.erl
index 1ef0771..f6fe8ff 100644
--- a/test/rebar_release_SUITE.erl
+++ b/test/rebar_release_SUITE.erl
@@ -4,10 +4,11 @@
-include_lib("eunit/include/eunit.hrl").
all() -> [release,
- dev_mode_release,
- profile_dev_mode_override_release,
- tar,
- extend_release].
+ dev_mode_release,
+ profile_dev_mode_override_release,
+ tar,
+ extend_release,
+ user_output_dir].
init_per_testcase(Case, Config0) ->
Config = rebar_test_utils:init_rebar_state(Config0),
@@ -109,3 +110,27 @@ extend_release(Config) ->
["release", "-n", "extended"],
{ok, [{release, extended, Vsn, false}]}
).
+
+user_output_dir(Config) ->
+ AppDir = ?config(apps, Config),
+ Name = ?config(name, Config),
+ ReleaseDir = filename:join(AppDir, "./_rel"),
+ Vsn = "1.0.0",
+
+ {ok, RebarConfig} =
+ file:consult(rebar_test_utils:create_config(AppDir,
+ [{relx, [{release, {list_to_atom(Name), Vsn},
+ [list_to_atom(Name)]},
+ {lib_dirs, [AppDir]},
+ {dev_mode, true}]}])),
+ rebar_test_utils:run_and_check(
+ Config, RebarConfig,
+ ["release", "-o", ReleaseDir],
+ {ok, []}
+ ),
+
+ RelxState = rlx_state:new("", [], []),
+ RelxState1 = rlx_state:base_output_dir(RelxState, ReleaseDir),
+ {ok, RelxState2} = rlx_prv_app_discover:do(RelxState1),
+ {ok, RelxState3} = rlx_prv_rel_discover:do(RelxState2),
+ rlx_state:get_realized_release(RelxState3, list_to_atom(Name), Vsn).