summaryrefslogtreecommitdiff
path: root/src/rebar_ct.erl
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2012-06-08 07:11:00 -0700
committerDave Smith <dizzyd@dizzyd.com>2012-06-08 07:11:00 -0700
commit9ec6f3744486d26e88ce9d513654b8cfa45c551e (patch)
treef42721c4c4899b58637b7cbfea95c0904b4ca03a /src/rebar_ct.erl
parenta7d64deb4316b06c23e4442f4120b9afea7414a9 (diff)
parentbebd9d2ae6da04c367e4b7aa976c2b4d4abbd471 (diff)
downloadrebar-9ec6f3744486d26e88ce9d513654b8cfa45c551e.tar.gz
Merge pull request #230 from hyperthunk/ct-name
Support ct_run using short name
Diffstat (limited to 'src/rebar_ct.erl')
-rw-r--r--src/rebar_ct.erl14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/rebar_ct.erl b/src/rebar_ct.erl
index 4f69a29..27a01e8 100644
--- a/src/rebar_ct.erl
+++ b/src/rebar_ct.erl
@@ -145,14 +145,14 @@ make_cmd(TestDir, Config) ->
undefined ->
?FMT("erl " % should we expand ERL_PATH?
" -noshell -pa ~s ~s"
- " -name test@~s"
+ " ~s"
" -logdir \"~s\""
" -env TEST_DIR \"~s\""
" ~s"
" -s ct_run script_start -s erlang halt",
[CodePathString,
Include,
- net_adm:localhost(),
+ build_name(Config),
LogDir,
filename:join(Cwd, TestDir),
get_extra_params(Config)]) ++
@@ -164,14 +164,14 @@ make_cmd(TestDir, Config) ->
SpecFlags ->
?FMT("erl " % should we expand ERL_PATH?
" -noshell -pa ~s ~s"
- " -name test@~s"
+ " ~s"
" -logdir \"~s\""
" -env TEST_DIR \"~s\""
" ~s"
" -s ct_run script_start -s erlang halt",
[CodePathString,
Include,
- net_adm:localhost(),
+ build_name(Config),
LogDir,
filename:join(Cwd, TestDir),
get_extra_params(Config)]) ++
@@ -180,6 +180,12 @@ make_cmd(TestDir, Config) ->
RawLog = filename:join(LogDir, "raw.log"),
{Cmd, RawLog}.
+build_name(Config) ->
+ case rebar_config:get_local(Config, ct_use_short_names, false) of
+ true -> "-sname test";
+ false -> " -name test@" ++ net_adm:localhost()
+ end.
+
get_extra_params(Config) ->
rebar_config:get_local(Config, ct_extra_params, "").