summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/rebar_hooks_SUITE.erl22
1 files changed, 18 insertions, 4 deletions
diff --git a/test/rebar_hooks_SUITE.erl b/test/rebar_hooks_SUITE.erl
index 85ca0e5..188fb34 100644
--- a/test/rebar_hooks_SUITE.erl
+++ b/test/rebar_hooks_SUITE.erl
@@ -43,7 +43,12 @@ build_and_clean_app(Config) ->
Vsn = rebar_test_utils:create_random_vsn(),
rebar_test_utils:create_app(AppDir, Name, Vsn, [kernel, stdlib]),
rebar_test_utils:run_and_check(Config, [], ["compile"], {ok, [{app, Name, valid}]}),
- rebar_test_utils:run_and_check(Config, [{provider_hooks, [{post, [{compile, clean}]}]}],
+ RConfFile =
+ rebar_test_utils:create_config(AppDir,
+ [{provider_hooks, [{post, [{compile, clean}]}]}]),
+ {ok, RConf} = file:consult(RConfFile),
+
+ rebar_test_utils:run_and_check(Config, RConf,
["compile"], {ok, [{app, Name, invalid}]}).
escriptize_artifacts(Config) ->
@@ -53,7 +58,7 @@ escriptize_artifacts(Config) ->
Vsn = rebar_test_utils:create_random_vsn(),
rebar_test_utils:create_app(AppDir, Name, Vsn, [kernel, stdlib]),
- Artifact = "bin/"++Name,
+ Artifact = "{{profile_dir}}/bin/"++Name,
RConfFile =
rebar_test_utils:create_config(AppDir,
[
@@ -69,9 +74,18 @@ escriptize_artifacts(Config) ->
{missing_artifact, Artifact}}} ->
ok
end,
- rebar_test_utils:run_and_check(Config, RConf++[{provider_hooks, [{post, [{compile, escriptize}]}]}],
+ RConfFile1 =
+ rebar_test_utils:create_config(AppDir,
+ [
+ {escript_name, list_to_atom(Name)}
+ ,{artifacts, [Artifact]}
+ ,{provider_hooks, [{post, [{compile, escriptize}]}]}
+ ]),
+ {ok, RConf1} = file:consult(RConfFile1),
+
+ rebar_test_utils:run_and_check(Config, RConf1,
["compile"], {ok, [{app, Name, valid}
- ,{file, filename:join([AppDir, "_build/default/", Artifact])}]}).
+ ,{file, filename:join([AppDir, "_build/default/bin", Name])}]}).
run_hooks_once(Config) ->
AppDir = ?config(apps, Config),