summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-04-22 17:30:00 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-04-22 17:30:00 -0500
commitde77225b49ca1af2e4a90f02ef248a15f1e74081 (patch)
treecb0c300dce1d2532f68eec6cb4109f1adb4a5430 /test
parent31ef4c491689f2e3166e4365455ebf86374ab8a2 (diff)
parent18c395ff1557d16268101d5b7ea87d56071b5ff0 (diff)
Merge pull request #361 from ferd/symlink-default-fix
Symlink existing default deps when in new profile
Diffstat (limited to 'test')
-rw-r--r--test/rebar_install_deps_SUITE.erl14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/rebar_install_deps_SUITE.erl b/test/rebar_install_deps_SUITE.erl
index 68fb9dd..d1a1118 100644
--- a/test/rebar_install_deps_SUITE.erl
+++ b/test/rebar_install_deps_SUITE.erl
@@ -218,6 +218,13 @@ default_profile(Config) ->
|| {dep, App} <- Apps],
[?assertMatch({ok, #file_info{type=directory}}, % somehow symlinks return dirs
file:read_file_info(filename:join([BuildDir, "profile", "lib", App])))
+ || {dep, App} <- Apps],
+ %% A second run to another profile also links default to the right spot
+ rebar_test_utils:run_and_check(
+ Config, RebarConfig, ["as", "other", "install_deps"], Expect
+ ),
+ [?assertMatch({ok, #file_info{type=directory}}, % somehow symlinks return dirs
+ file:read_file_info(filename:join([BuildDir, "other", "lib", App])))
|| {dep, App} <- Apps].
nondefault_profile(Config) ->
@@ -234,6 +241,13 @@ nondefault_profile(Config) ->
|| {dep, App} <- Apps],
[?assertMatch({ok, #file_info{type=directory}},
file:read_file_info(filename:join([BuildDir, "nondef", "lib", App])))
+ || {dep, App} <- Apps],
+ %% A second run to another profile doesn't link dependencies
+ rebar_test_utils:run_and_check(
+ Config, RebarConfig, ["as", "other", "install_deps"], Expect
+ ),
+ [?assertMatch({error, enoent},
+ file:read_file_info(filename:join([BuildDir, "default", "lib", App])))
|| {dep, App} <- Apps].