Просмотр исходного кода

supported dist_node in ct and eunit

pull/1152/head
soranoba 9 лет назад
Родитель
Сommit
c2e9683679
2 измененных файлов: 10 добавлений и 0 удалений
  1. +5
    -0
      src/rebar_prv_common_test.erl
  2. +5
    -0
      src/rebar_prv_eunit.erl

+ 5
- 0
src/rebar_prv_common_test.erl Просмотреть файл

@ -37,6 +37,7 @@ init(State) ->
-spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}. -spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}.
do(State) -> do(State) ->
setup_name(State),
Tests = prepare_tests(State), Tests = prepare_tests(State),
case compile(State, Tests) of case compile(State, Tests) of
%% successfully compiled apps %% successfully compiled apps
@ -105,6 +106,10 @@ format_error({multiple_errors, Errors}) ->
%% Internal functions %% Internal functions
%% =================================================================== %% ===================================================================
setup_name(State) ->
{Long, Short, Opts} = rebar_dist_utils:find_options(State),
rebar_dist_utils:either(Long, Short, Opts).
prepare_tests(State) -> prepare_tests(State) ->
%% command line test options %% command line test options
CmdOpts = cmdopts(State), CmdOpts = cmdopts(State),

+ 5
- 0
src/rebar_prv_eunit.erl Просмотреть файл

@ -51,6 +51,7 @@ do(State) ->
do(State, Tests) -> do(State, Tests) ->
?INFO("Performing EUnit tests...", []), ?INFO("Performing EUnit tests...", []),
setup_name(State),
rebar_utils:update_code(rebar_state:code_paths(State, all_deps), [soft_purge]), rebar_utils:update_code(rebar_state:code_paths(State, all_deps), [soft_purge]),
%% Run eunit provider prehooks %% Run eunit provider prehooks
@ -106,6 +107,10 @@ format_error({error, Error}) ->
%% Internal functions %% Internal functions
%% =================================================================== %% ===================================================================
setup_name(State) ->
{Long, Short, Opts} = rebar_dist_utils:find_options(State),
rebar_dist_utils:either(Long, Short, Opts).
prepare_tests(State) -> prepare_tests(State) ->
%% parse and translate command line tests %% parse and translate command line tests
CmdTests = resolve_tests(State), CmdTests = resolve_tests(State),

Загрузка…
Отмена
Сохранить