From 8a6059861c78d6e5b74f48cf2cba717becbebc3b Mon Sep 17 00:00:00 2001 From: hommeabeil Date: Sat, 24 Mar 2018 09:47:52 -0400 Subject: add test in systest --- systest/all_SUITE.erl | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'systest/all_SUITE.erl') 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, []). -- cgit v1.1 From b5330f5e90811710f48cf63f73a0272f9d2f1551 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 30 Mar 2018 10:44:28 -0400 Subject: make systest suite work on linux --- systest/all_SUITE.erl | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'systest/all_SUITE.erl') diff --git a/systest/all_SUITE.erl b/systest/all_SUITE.erl index 41a475b..083fae9 100644 --- a/systest/all_SUITE.erl +++ b/systest/all_SUITE.erl @@ -12,7 +12,7 @@ init_per_suite(Config) -> ["rebar", Vsn | _] -> %% Copy all base cases to priv_dir rebar_file_utils:cp_r([?config(data_dir, Config)], - ?config(priv_dir, Config)), + ?config(priv_dir, Config)), Config; _ -> {skip, "expected current version "++Vsn++" in path " @@ -80,17 +80,16 @@ grisp_explode(Config) -> ok. compile_deps() -> - [{doc, "Issue #1712" - "When compile a project multiple time, the dependency should always be build event if refetch."}]. + [{doc, "When compiling a project multiple times, the deps should always be built event if refetched"}]. compile_deps(Config) -> rebar3("compile", Config), rebar3("compile", Config), PrivDir = ?config(path, Config), - BeansDir = filename:join([PrivDir, "_build", "default", "lib", "fake_dep", "ebin"]), + EbinDir = filename:join([PrivDir, "_build", "default", "lib", "fake_dep", "ebin"]), - {ok, Beans} = file:list_dir(BeansDir), - ?assert(length(Beans) > 1). + {ok, Beams} = file:list_dir(EbinDir), + ?assert(length(Beams) > 1). %%%%%%%%%%%%%%% @@ -99,7 +98,7 @@ compile_deps(Config) -> set_name_config(Atom, Config) -> [{path, filename:join([?config(priv_dir, Config), - atom_to_list(Atom)])} + atom_to_list(?MODULE)++"_data", atom_to_list(Atom)])} | Config]. rebar3(Args, Config) -> rebar3(Args, Config, []). -- cgit v1.1