diff options
author | hommeabeil <jeanbouch418@gmail.com> | 2018-03-24 09:47:52 -0400 |
---|---|---|
committer | hommeabeil <jeanbouch418@gmail.com> | 2018-03-24 09:47:52 -0400 |
commit | 8a6059861c78d6e5b74f48cf2cba717becbebc3b (patch) | |
tree | b7bc50fe913977230ca820ca34ae611d9a0e3b03 /systest | |
parent | 4a35276bdf93869f95344eaafb2571d3c731a615 (diff) |
add test in systest
Diffstat (limited to 'systest')
6 files changed, 56 insertions, 2 deletions
diff --git a/systest/all_SUITE.erl b/systest/all_SUITE.erl index 6d2f14f..41a475b 100644 --- a/systest/all_SUITE.erl +++ b/systest/all_SUITE.erl @@ -29,7 +29,7 @@ end_per_testcase(_Name, Config) -> Config. all() -> - [noop, resource_plugins, alias_clash, grisp_explode]. + [noop, resource_plugins, alias_clash, grisp_explode, compile_deps]. %groups() -> % [{plugins, [shuffle], []}, @@ -79,13 +79,27 @@ grisp_explode(Config) -> ), ok. +compile_deps() -> + [{doc, "Issue #1712" + "When compile a project multiple time, the dependency should always be build event if refetch."}]. +compile_deps(Config) -> + rebar3("compile", Config), + rebar3("compile", Config), + + PrivDir = ?config(path, Config), + BeansDir = filename:join([PrivDir, "_build", "default", "lib", "fake_dep", "ebin"]), + + {ok, Beans} = file:list_dir(BeansDir), + ?assert(length(Beans) > 1). + + %%%%%%%%%%%%%%% %%% Helpers %%% %%%%%%%%%%%%%%% set_name_config(Atom, Config) -> [{path, filename:join([?config(priv_dir, Config), - atom_to_list(?MODULE)++"_data", atom_to_list(Atom)])} + atom_to_list(Atom)])} | Config]. rebar3(Args, Config) -> rebar3(Args, Config, []). diff --git a/systest/all_SUITE_data/compile_deps/rebar.config b/systest/all_SUITE_data/compile_deps/rebar.config new file mode 100644 index 0000000..08e2f62 --- /dev/null +++ b/systest/all_SUITE_data/compile_deps/rebar.config @@ -0,0 +1,8 @@ +{deps, [ + {fake_dep, {localdep, "fake_dep"}} + ]}. + +{plugins, [{rebar_localdep, + {git, "https://github.com/alinpopa/rebar3-localdep-plugin.git", + {branch, "master"}}}]}. + diff --git a/systest/all_SUITE_data/compile_deps/rebar.config.script b/systest/all_SUITE_data/compile_deps/rebar.config.script new file mode 100644 index 0000000..c0ebab1 --- /dev/null +++ b/systest/all_SUITE_data/compile_deps/rebar.config.script @@ -0,0 +1,2 @@ +os:putenv("LOCALDEP_DIR", "./vendored/"). +CONFIG. diff --git a/systest/all_SUITE_data/compile_deps/vendored/fake_dep/rebar.config b/systest/all_SUITE_data/compile_deps/vendored/fake_dep/rebar.config new file mode 100644 index 0000000..f618f3e --- /dev/null +++ b/systest/all_SUITE_data/compile_deps/vendored/fake_dep/rebar.config @@ -0,0 +1,2 @@ +{erl_opts, [debug_info]}. +{deps, []}.
\ No newline at end of file diff --git a/systest/all_SUITE_data/compile_deps/vendored/fake_dep/src/fake_dep.app.src b/systest/all_SUITE_data/compile_deps/vendored/fake_dep/src/fake_dep.app.src new file mode 100644 index 0000000..8547c35 --- /dev/null +++ b/systest/all_SUITE_data/compile_deps/vendored/fake_dep/src/fake_dep.app.src @@ -0,0 +1,15 @@ +{application, fake_dep, + [{description, "An OTP library"}, + {vsn, "0.1.0"}, + {registered, []}, + {applications, + [kernel, + stdlib + ]}, + {env,[]}, + {modules, []}, + + {maintainers, []}, + {licenses, ["Apache 2.0"]}, + {links, []} + ]}. diff --git a/systest/all_SUITE_data/compile_deps/vendored/fake_dep/src/fake_dep.erl b/systest/all_SUITE_data/compile_deps/vendored/fake_dep/src/fake_dep.erl new file mode 100644 index 0000000..db8d9f0 --- /dev/null +++ b/systest/all_SUITE_data/compile_deps/vendored/fake_dep/src/fake_dep.erl @@ -0,0 +1,13 @@ +-module(fake_dep). + +%% API exports +-export([]). + +%%==================================================================== +%% API functions +%%==================================================================== + + +%%==================================================================== +%% Internal functions +%%==================================================================== |