<p dir="ltr">If the default mode isn't enough, the easiest solution is always:</p>
<p dir="ltr">    ct_run -dir test -pa `rebar3 path`</p>
<p dir="ltr">Which makes your whole app available to the tests. You can bypass rebar3 for the run, but still use it for the rest.</p>
<p dir="ltr">You may want to try:</p>
<p dir="ltr">    rebar3 shell --sname=mynode<br>
     ...<br>
    r3:do(ct).</p>
<p dir="ltr">To run tests from the interactive shell with a named node, but I have never tried that and don't know how it would go.</p>
<div class="gmail_quote">On Mar 19, 2016 5:07 AM, "Roberto Ostinelli" <<a href="mailto:roberto@widetag.com">roberto@widetag.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">All,<div>When I manually run CT with:</div><div><br></div><div><div><font face="monospace, monospace">ct_run -dir test -pa ebin</font></div></div><div><br></div><div>and print out the node the tests are running on with a simple:</div><div><br></div><div><font face="monospace, monospace">ct:pal("node = ~p", [node()]).</font></div><div><br></div><div>I get something similar to:</div><div><br></div><div><font face="monospace, monospace">'ct@robertos-mac'<br></font></div><div><br></div><div><br></div><div>However, when I run CT with rebar3 by issuing:</div><div><br></div><div><font face="monospace, monospace">rebar3 ct</font></div><div><br></div><div>Then the same command prints:</div><div><br></div><div><font face="monospace, monospace">'nonode@nohost'</font><br></div><div><br></div><div>This is ok for most tests, but since I'm testing distributed nodes with ct_slave [1] this impedes a slave to be started, as the main node is a 'nonode@nohost' and hence the slave node cannot connect to this 'nonode'.</div><div><br></div><div>If anyone wants to try this just run Syn's suite, it will fail when using rebar3 here:<br></div><div><a href="https://github.com/ostinelli/syn/blob/1.1.0/test/syn_test_suite_helper.erl#L62" target="_blank">https://github.com/ostinelli/syn/blob/1.1.0/test/syn_test_suite_helper.erl#L62</a><br></div><div><br></div><div>With a <font face="monospace, monospace">{{badmatch,{error,not_alive,nonode@nohost}}</font>.</div><div><br></div><div>Any ideas?</div><div><br></div><div>Thank you,</div><div>r.</div><div><br></div><div><br></div><div>[1] <a href="http://erlang.org/doc/man/ct_slave.html" target="_blank">http://erlang.org/doc/man/ct_slave.html</a></div></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div>