diff options
author | Tristan Sloughter <t@crashfast.com> | 2015-09-26 14:09:42 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2015-09-26 14:15:15 -0500 |
commit | 90a06efa4f00fb6efda19dbf1cbe3334e863a724 (patch) | |
tree | 8eb612d12cd71cf6f699748ebe6d5971de9e590b | |
parent | dfa668f21102ef5ac4cc5c2384e91b8d256513b5 (diff) |
add test to not upgrade unrelated transitive dep during upgrade
-rw-r--r-- | src/rebar_prv_upgrade.erl | 2 | ||||
-rw-r--r-- | test/rebar_upgrade_SUITE.erl | 22 |
2 files changed, 22 insertions, 2 deletions
diff --git a/src/rebar_prv_upgrade.erl b/src/rebar_prv_upgrade.erl index 476d62f..a2864ab 100644 --- a/src/rebar_prv_upgrade.erl +++ b/src/rebar_prv_upgrade.erl @@ -163,7 +163,7 @@ all_children(Name, Dict) -> all_children_(Name, Dict) -> case dict:find(ec_cnv:to_binary(Name), Dict) of {ok, Children} -> - Children ++ [all_children_(Child, Dict) || Child <- Children]; + [Children | [all_children_(Child, Dict) || Child <- Children]]; error -> [] end. diff --git a/test/rebar_upgrade_SUITE.erl b/test/rebar_upgrade_SUITE.erl index d9cd49a..cfe1d8a 100644 --- a/test/rebar_upgrade_SUITE.erl +++ b/test/rebar_upgrade_SUITE.erl @@ -9,7 +9,7 @@ groups() -> [{all, [], [top_a, top_b, top_c, top_d1, top_d2, top_e, pair_a, pair_b, pair_ab, pair_c, pair_all, triplet_a, triplet_b, triplet_c, - tree_a, tree_b, tree_c, tree_c2, tree_ac, tree_all, + tree_a, tree_b, tree_c, tree_c2, tree_cj, tree_ac, tree_all, delete_d, promote, stable_lock, fwd_lock, compile_upgrade_parity]}, {git, [], [{group, all}]}, @@ -327,6 +327,25 @@ upgrades(tree_c2) -> {"C", [{"A","1"}, "D", "J", "E", {"B","1"}, "F", "G", {"C","1"}, "H", {"I", "2"}, "K"]}}; +upgrades(tree_cj) -> + {[{"A", "1", [{"D",[{"J", "1",[]}]}, + {"E",[{"I","1",[]}]}]}, + {"B", "1", [{"F",[]}, + {"G",[]}]}, + {"C", "1", [{"H",[]}, + {"I","1",[]}]} + ], + [{"A", "1", [{"D",[{"J", "2", []}]}, + {"E",[{"I","1",[]}]}]}, + {"B", "1", [{"F",[]}, + {"G",[]}]}, + {"C", "1", [{"H",[]}, + {"I","1",[]}]} + ], + ["C","J"], + {"C", [{"A","1"}, "D", {"J", "1"}, "E", {"I","1"}, + {"B","1"}, "F", "G", + {"C","1"}, "H"]}}; upgrades(tree_ac) -> {[{"A", "1", [{"D",[{"J",[]}]}, {"E",[{"I","1",[]}]}]}, @@ -481,6 +500,7 @@ tree_a(Config) -> run(Config). tree_b(Config) -> run(Config). tree_c(Config) -> run(Config). tree_c2(Config) -> run(Config). +tree_cj(Config) -> run(Config). tree_ac(Config) -> run(Config). tree_all(Config) -> run(Config). promote(Config) -> run(Config). |