summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsoranoba <soranoba@gamil.com>2016-04-07 18:51:39 +0900
committersoranoba <soranoba@gamil.com>2016-04-07 18:51:39 +0900
commitc2e9683679686c5078ca16e8ac84433cb806c4c1 (patch)
tree97f71638f8aa03ecd54709e85847c2cda40a5d8c /src
parent7ec2ba05fb4997c1a6bdac37a572ac7d0f13f946 (diff)
supported dist_node in ct and eunit
Diffstat (limited to 'src')
-rw-r--r--src/rebar_prv_common_test.erl5
-rw-r--r--src/rebar_prv_eunit.erl5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/rebar_prv_common_test.erl b/src/rebar_prv_common_test.erl
index 14dc4cc..4e169e8 100644
--- a/src/rebar_prv_common_test.erl
+++ b/src/rebar_prv_common_test.erl
@@ -37,6 +37,7 @@ init(State) ->
-spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}.
do(State) ->
+ setup_name(State),
Tests = prepare_tests(State),
case compile(State, Tests) of
%% successfully compiled apps
@@ -105,6 +106,10 @@ format_error({multiple_errors, Errors}) ->
%% Internal functions
%% ===================================================================
+setup_name(State) ->
+ {Long, Short, Opts} = rebar_dist_utils:find_options(State),
+ rebar_dist_utils:either(Long, Short, Opts).
+
prepare_tests(State) ->
%% command line test options
CmdOpts = cmdopts(State),
diff --git a/src/rebar_prv_eunit.erl b/src/rebar_prv_eunit.erl
index 46ea48d..eaa32b4 100644
--- a/src/rebar_prv_eunit.erl
+++ b/src/rebar_prv_eunit.erl
@@ -51,6 +51,7 @@ do(State) ->
do(State, Tests) ->
?INFO("Performing EUnit tests...", []),
+ setup_name(State),
rebar_utils:update_code(rebar_state:code_paths(State, all_deps), [soft_purge]),
%% Run eunit provider prehooks
@@ -106,6 +107,10 @@ format_error({error, Error}) ->
%% Internal functions
%% ===================================================================
+setup_name(State) ->
+ {Long, Short, Opts} = rebar_dist_utils:find_options(State),
+ rebar_dist_utils:either(Long, Short, Opts).
+
prepare_tests(State) ->
%% parse and translate command line tests
CmdTests = resolve_tests(State),