浏览代码

bare compiler hooks do work and this shows it.

I had misread the code in issue #2200 -- the per-app hooks are still
run, just not the umbrella-level hooks.
pull/2271/head
Fred Hebert 5 年前
父节点
当前提交
1e8ce22e1e
共有 1 个文件被更改,包括 9 次插入3 次删除
  1. +9
    -3
      test/rebar_hooks_SUITE.erl

+ 9
- 3
test/rebar_hooks_SUITE.erl 查看文件

@ -131,13 +131,19 @@ bare_compile_hooks_default_ns(Config) ->
Vsn = rebar_test_utils:create_random_vsn(),
rebar_test_utils:create_app(AppDir, Name, Vsn, [kernel, stdlib]),
RConfFile = rebar_test_utils:create_config(AppDir,
[{provider_hooks, [{post, [{compile, clean}]}]}]),
HookFile = filename:join([?config(priv_dir, Config), "bare-post.hook"]),
ConfOpts = [{provider_hooks, [{post, [{compile, clean}]}]},
{post_hooks, [{compile, "ls > " ++ HookFile}]}],
RConfFile = rebar_test_utils:create_config(AppDir, ConfOpts),
{ok, RConf} = file:consult(RConfFile),
rebar_test_utils:run_and_check(
Config, RConf, ["bare", "compile", "--paths", "."],
{ok, []}
).
),
%% check that hooks did actually run
?assertMatch({ok, _}, file:read_file(HookFile)),
ok.
deps_clean_hook_namespace(Config) ->
mock_git_resource:mock([{deps, [{some_dep, "0.0.1"}]}]),

正在加载...
取消
保存