diff options
author | Tristan Sloughter <t@crashfast.com> | 2014-08-30 22:14:48 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2014-08-30 22:16:30 -0500 |
commit | 21f47438614a0d50caf20801c4440d54d12c3f20 (patch) | |
tree | 054cda8b6a40d577b77d950bce898755f81962b7 /inttest/tdeps_update | |
parent | ac0d726bb8c21eca3b883f7c47e42cdea02b5a3f (diff) |
remove more code that can be brought back later if needed
Diffstat (limited to 'inttest/tdeps_update')
-rw-r--r-- | inttest/tdeps_update/a.erl | 3 | ||||
-rw-r--r-- | inttest/tdeps_update/a.rebar.config | 1 | ||||
-rw-r--r-- | inttest/tdeps_update/a2.rebar.config | 1 | ||||
-rw-r--r-- | inttest/tdeps_update/a3.rebar.config | 1 | ||||
-rw-r--r-- | inttest/tdeps_update/a4.rebar.config | 4 | ||||
-rw-r--r-- | inttest/tdeps_update/b.hrl | 1 | ||||
-rw-r--r-- | inttest/tdeps_update/b.rebar.config | 1 | ||||
-rw-r--r-- | inttest/tdeps_update/b2.rebar.config | 1 | ||||
-rw-r--r-- | inttest/tdeps_update/b3.rebar.config | 1 | ||||
-rw-r--r-- | inttest/tdeps_update/b4.rebar.config | 1 | ||||
-rw-r--r-- | inttest/tdeps_update/c.hrl | 1 | ||||
-rw-r--r-- | inttest/tdeps_update/c.rebar.config | 1 | ||||
-rw-r--r-- | inttest/tdeps_update/c2.hrl | 1 | ||||
-rw-r--r-- | inttest/tdeps_update/c2.rebar.config | 4 | ||||
-rw-r--r-- | inttest/tdeps_update/c3.rebar.config | 4 | ||||
-rw-r--r-- | inttest/tdeps_update/d.hrl | 1 | ||||
-rw-r--r-- | inttest/tdeps_update/root.rebar.config | 1 | ||||
-rw-r--r-- | inttest/tdeps_update/tdeps_update_rt.erl | 148 |
18 files changed, 0 insertions, 176 deletions
diff --git a/inttest/tdeps_update/a.erl b/inttest/tdeps_update/a.erl deleted file mode 100644 index 294ae21..0000000 --- a/inttest/tdeps_update/a.erl +++ /dev/null @@ -1,3 +0,0 @@ --module({{module}}). - --include_lib("b/include/b.hrl"). diff --git a/inttest/tdeps_update/a.rebar.config b/inttest/tdeps_update/a.rebar.config deleted file mode 100644 index 3b721dc..0000000 --- a/inttest/tdeps_update/a.rebar.config +++ /dev/null @@ -1 +0,0 @@ -{deps, [{b, "0.2.3", {git, "../repo/b", {tag, "0.2.3"}}}]}. diff --git a/inttest/tdeps_update/a2.rebar.config b/inttest/tdeps_update/a2.rebar.config deleted file mode 100644 index 5687349..0000000 --- a/inttest/tdeps_update/a2.rebar.config +++ /dev/null @@ -1 +0,0 @@ -{deps, [{b, "0.2.4", {git, "../repo/b", {tag, "0.2.4"}}}]}. diff --git a/inttest/tdeps_update/a3.rebar.config b/inttest/tdeps_update/a3.rebar.config deleted file mode 100644 index 86bf462..0000000 --- a/inttest/tdeps_update/a3.rebar.config +++ /dev/null @@ -1 +0,0 @@ -{deps, [{b, "0.2.5", {git, "../repo/b", {tag, "0.2.5"}}}]}. diff --git a/inttest/tdeps_update/a4.rebar.config b/inttest/tdeps_update/a4.rebar.config deleted file mode 100644 index bfba813..0000000 --- a/inttest/tdeps_update/a4.rebar.config +++ /dev/null @@ -1,4 +0,0 @@ -{deps, [ - {b, "0.2.6", {git, "../repo/b", {tag, "0.2.6"}}}, - {f, "0.1", {git, "../repo/f", {tag, "0.1"}}} - ]}. diff --git a/inttest/tdeps_update/b.hrl b/inttest/tdeps_update/b.hrl deleted file mode 100644 index efbeab1..0000000 --- a/inttest/tdeps_update/b.hrl +++ /dev/null @@ -1 +0,0 @@ --include_lib("c/include/c.hrl"). diff --git a/inttest/tdeps_update/b.rebar.config b/inttest/tdeps_update/b.rebar.config deleted file mode 100644 index 536aaa9..0000000 --- a/inttest/tdeps_update/b.rebar.config +++ /dev/null @@ -1 +0,0 @@ -{deps, [{c, "1.0", {git, "../repo/c", {tag, "1.0"}}}]}. diff --git a/inttest/tdeps_update/b2.rebar.config b/inttest/tdeps_update/b2.rebar.config deleted file mode 100644 index b603277..0000000 --- a/inttest/tdeps_update/b2.rebar.config +++ /dev/null @@ -1 +0,0 @@ -{deps, [{c, "1.1", {git, "../repo/c", {tag, "1.1"}}}]}. diff --git a/inttest/tdeps_update/b3.rebar.config b/inttest/tdeps_update/b3.rebar.config deleted file mode 100644 index 5f4e20a..0000000 --- a/inttest/tdeps_update/b3.rebar.config +++ /dev/null @@ -1 +0,0 @@ -{deps, [{c, "1.2", {git, "../repo/c", {tag, "1.2"}}}]}. diff --git a/inttest/tdeps_update/b4.rebar.config b/inttest/tdeps_update/b4.rebar.config deleted file mode 100644 index 5fd1dca..0000000 --- a/inttest/tdeps_update/b4.rebar.config +++ /dev/null @@ -1 +0,0 @@ -{deps, [{c, "1.3", {git, "../repo/c", {tag, "1.3"}}}]}. diff --git a/inttest/tdeps_update/c.hrl b/inttest/tdeps_update/c.hrl deleted file mode 100644 index 9f02fab..0000000 --- a/inttest/tdeps_update/c.hrl +++ /dev/null @@ -1 +0,0 @@ --define(HELLO, hello). diff --git a/inttest/tdeps_update/c.rebar.config b/inttest/tdeps_update/c.rebar.config deleted file mode 100644 index d99b963..0000000 --- a/inttest/tdeps_update/c.rebar.config +++ /dev/null @@ -1 +0,0 @@ -{deps, [{d, "0.7", {git, "../repo/d", {tag, "0.7"}}}]}. diff --git a/inttest/tdeps_update/c2.hrl b/inttest/tdeps_update/c2.hrl deleted file mode 100644 index cc87fff..0000000 --- a/inttest/tdeps_update/c2.hrl +++ /dev/null @@ -1 +0,0 @@ --include_lib("d/include/d.hrl"). diff --git a/inttest/tdeps_update/c2.rebar.config b/inttest/tdeps_update/c2.rebar.config deleted file mode 100644 index 1297e07..0000000 --- a/inttest/tdeps_update/c2.rebar.config +++ /dev/null @@ -1,4 +0,0 @@ -{deps, [ - {d, "0.7", {git, "../repo/d", {tag, "0.7"}}}, - {e, "2.0", {git, "../repo/e", {tag, "2.0"}}} - ]}. diff --git a/inttest/tdeps_update/c3.rebar.config b/inttest/tdeps_update/c3.rebar.config deleted file mode 100644 index 40c93c5..0000000 --- a/inttest/tdeps_update/c3.rebar.config +++ /dev/null @@ -1,4 +0,0 @@ -{deps, [ - {d, "0.7", {git, "../repo/d", {tag, "0.7"}}}, - {e, "2.1", {git, "../repo/e", {tag, "2.1"}}} - ]}. diff --git a/inttest/tdeps_update/d.hrl b/inttest/tdeps_update/d.hrl deleted file mode 100644 index 9f02fab..0000000 --- a/inttest/tdeps_update/d.hrl +++ /dev/null @@ -1 +0,0 @@ --define(HELLO, hello). diff --git a/inttest/tdeps_update/root.rebar.config b/inttest/tdeps_update/root.rebar.config deleted file mode 100644 index ea03437..0000000 --- a/inttest/tdeps_update/root.rebar.config +++ /dev/null @@ -1 +0,0 @@ -{sub_dirs, ["apps/a1"]}. diff --git a/inttest/tdeps_update/tdeps_update_rt.erl b/inttest/tdeps_update/tdeps_update_rt.erl deleted file mode 100644 index e182ae2..0000000 --- a/inttest/tdeps_update/tdeps_update_rt.erl +++ /dev/null @@ -1,148 +0,0 @@ --module(tdeps_update_rt). - --compile(export_all). - -%% Exercises update deps, with recursive dependency updates. -%% Initially: -%% A(v0.5) -> B(v0.2.3) -> C(v1.0) -%% But after updating A to 0.6: -%% A(v0.6) -> B(v0.2.4) -> C(v1.1) -%% -> D(v0.7) -%% And after updating A to 0.7: -%% A(v0.7) -> B(v0.2.5) -> C(v1.2) -> E(v2.0) -%% -> D(v0.7) -%% And after updating A to 0.8: -%% A(v0.8) -> B(v0.2.6) -> C(v1.3) -> E(v2.1) -%% -> D(v0.7) -%% -> F(v0.1) -> E(v2.1) -files() -> - [ - %% A1 application - {create, "apps/a1/ebin/a1.app", app(a1, [a1], "0.5")}, - {copy, "a.rebar.config", "apps/a1/rebar.config"}, - {template, "a.erl", "apps/a1/src/a1.erl", dict:from_list([{module, a1}])}, - - {copy, "root.rebar.config", "rebar.config"}, - {copy, "../../rebar", "rebar"}, - - %% B application - {create, "repo/b/ebin/b.app", app(b, [], "0.2.3")}, - {create, "b2.app", app(b, [], "0.2.4")}, - {create, "b3.app", app(b, [], "0.2.5")}, - {create, "b4.app", app(b, [], "0.2.6")}, - {copy, "b.rebar.config", "repo/b/rebar.config"}, - {copy, "b.hrl", "repo/b/include/b.hrl"}, - - %% C application - {create, "repo/c/ebin/c.app", app(c, [], "1.0")}, - {create, "c2.app", app(c, [], "1.1")}, - {create, "c3.app", app(c, [], "1.2")}, - {create, "c4.app", app(c, [], "1.3")}, - {copy, "c.hrl", "repo/c/include/c.hrl"}, - - %% D application - {create, "repo/d/ebin/d.app", app(d, [], "0.7")}, - {copy, "d.hrl", "repo/d/include/d.hrl"}, - - %% E application - {create, "repo/e/ebin/e.app", app(e, [], "2.0")}, - {create, "e2.app", app(e, [], "2.1")}, - - %% F application - {create, "repo/f/ebin/f.app", app(f, [], "0.1")}, - - %% update files - {copy, "a2.rebar.config", "a2.rebar.config"}, - {copy, "a3.rebar.config", "a3.rebar.config"}, - {copy, "a4.rebar.config", "a4.rebar.config"}, - {copy, "b2.rebar.config", "b2.rebar.config"}, - {copy, "b3.rebar.config", "b3.rebar.config"}, - {copy, "b4.rebar.config", "b4.rebar.config"}, - {copy, "c2.hrl", "c2.hrl"}, - {copy, "c.rebar.config", "c.rebar.config"}, - {copy, "c2.rebar.config", "c2.rebar.config"}, - {copy, "c3.rebar.config", "c3.rebar.config"} - ]. - -apply_cmds([], _Params) -> - ok; -apply_cmds([Cmd | Rest], Params) -> - io:format("Running: ~s (~p)\n", [Cmd, Params]), - {ok, _} = retest_sh:run(Cmd, Params), - apply_cmds(Rest, Params). - -run(_Dir) -> - %% Initialize the b/c/d apps as git repos so that dependencies pull - %% properly - GitCmds = ["git init", - "git add -A", - "git config user.email 'tdeps@example.com'", - "git config user.name 'tdeps'", - "git commit -a -m 'Initial Commit'"], - BCmds = ["git tag 0.2.3", - "cp ../../b2.rebar.config rebar.config", - "cp ../../b2.app ebin/b.app", - "git commit -a -m 'update to 0.2.4'", - "git tag 0.2.4", - "cp ../../b3.rebar.config rebar.config", - "cp ../../b3.app ebin/b.app", - "git commit -a -m 'update to 0.2.5'", - "git tag 0.2.5", - "cp ../../b4.rebar.config rebar.config", - "cp ../../b4.app ebin/b.app", - "git commit -a -m 'update to 0.2.6'", - "git tag 0.2.6"], - %"git checkout 0.2.3"], - CCmds = ["git tag 1.0", - "cp ../../c2.hrl include/c.hrl", - "cp ../../c2.app ebin/c.app", - "cp ../../c.rebar.config rebar.config", - "git add rebar.config", - "git commit -a -m 'update to 1.1'", - "git tag 1.1", - "cp ../../c3.app ebin/c.app", - "cp ../../c2.rebar.config rebar.config", - "git commit -a -m 'update to 1.2'", - "git tag 1.2", - "cp ../../c4.app ebin/c.app", - "cp ../../c3.rebar.config rebar.config", - "git commit -a -m 'update to 1.3'", - "git tag 1.3"], - %"git checkout 1.0"], - DCmds = ["git tag 0.7"], - ECmds = ["git tag 2.0", - "cp ../../e2.app ebin/e.app", - "git commit -a -m 'update to 2.1'", - "git tag 2.1"], - FCmds = ["git tag 0.1"], - - ok = apply_cmds(GitCmds++BCmds, [{dir, "repo/b"}]), - ok = apply_cmds(GitCmds++CCmds, [{dir, "repo/c"}]), - ok = apply_cmds(GitCmds++DCmds, [{dir, "repo/d"}]), - ok = apply_cmds(GitCmds++ECmds, [{dir, "repo/e"}]), - ok = apply_cmds(GitCmds++FCmds, [{dir, "repo/f"}]), - - {ok, _} = retest_sh:run("./rebar -v get-deps", []), - {ok, _} = retest_sh:run("./rebar -v 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", []), - os:cmd("cp a3.rebar.config apps/a1/rebar.config"), - {ok, _} = retest_sh:run("./rebar -v update-deps", []), - {ok, _} = retest_sh:run("./rebar -v compile", []), - os:cmd("cp a4.rebar.config apps/a1/rebar.config"), - {ok, _} = retest_sh:run("./rebar -v update-deps", []), - {ok, _} = retest_sh:run("./rebar -v compile", []), - ok. - -%% -%% Generate the contents of a simple .app file -%% -app(Name, Modules, Version) -> - App = {application, Name, - [{description, atom_to_list(Name)}, - {vsn, Version}, - {modules, Modules}, - {registered, []}, - {applications, [kernel, stdlib]}]}, - io_lib:format("~p.\n", [App]). |