diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2015-04-22 21:12:10 +0000 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2015-04-22 21:12:10 +0000 |
commit | 18c395ff1557d16268101d5b7ea87d56071b5ff0 (patch) | |
tree | cb0c300dce1d2532f68eec6cb4109f1adb4a5430 /test | |
parent | 31ef4c491689f2e3166e4365455ebf86374ab8a2 (diff) |
Symlink existing default deps when in new profile
Should fix #360
Diffstat (limited to 'test')
-rw-r--r-- | test/rebar_install_deps_SUITE.erl | 14 |
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]. |