소스 검색

Merge pull request #2271 from ferd/test-bare-hooks

bare compiler hooks do work and this shows it.
pull/2278/head
Fred Hebert 5 년 전
committed by GitHub
부모
커밋
e64364aec8
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
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"}]}]),

불러오는 중...
취소
저장