From 2e87251121d6c388947b6b1f53720cc37f05db44 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Fri, 10 Jun 2016 08:40:38 -0500 Subject: 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. --- lib/common_test/src/ct_slave.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/common_test/src') 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) -> -- cgit v1.2.3