aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2016-06-10 08:40:38 -0500
committerTristan Sloughter <[email protected]>2016-06-13 07:07:34 -0500
commit2e87251121d6c388947b6b1f53720cc37f05db44 (patch)
treec31c9c17d93284479fe8d23368946a7abf072109 /lib/common_test/src
parent7979f72ce15ec5eeb8e0e9cfc1c291f10c4f0432 (diff)
downloadotp-2e87251121d6c388947b6b1f53720cc37f05db44.tar.gz
otp-2e87251121d6c388947b6b1f53720cc37f05db44.tar.bz2
otp-2e87251121d6c388947b6b1f53720cc37f05db44.zip
handle ct_slave nodename in the same way as net_kernel
Prior to this patch ct_slave:start/1 and /2 did not recognize the host part of a nodename (node@host) atom. This cause it to have different behaviour from net_kernel:start, requiring the hostname to be resolved instead of being able to be specified in the nodename argument.
Diffstat (limited to 'lib/common_test/src')
-rw-r--r--lib/common_test/src/ct_slave.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/common_test/src/ct_slave.erl b/lib/common_test/src/ct_slave.erl
index 571958ca03..4188bd7c3b 100644
--- a/lib/common_test/src/ct_slave.erl
+++ b/lib/common_test/src/ct_slave.erl
@@ -309,7 +309,12 @@ is_started(ENode) ->
% make a Erlang node name from name and hostname
enodename(Host, Node) ->
- list_to_atom(atom_to_list(Node)++"@"++atom_to_list(Host)).
+ case lists:member($@, atom_to_list(Node)) of
+ true ->
+ Node;
+ false ->
+ list_to_atom(atom_to_list(Node)++"@"++atom_to_list(Host))
+ end.
% performs actual start of the "slave" node
do_start(Host, Node, Options) ->