[erlang-questions] rebar3 and CT's main node

Fred Hebert <>
Sat Mar 19 13:14:58 CET 2016


If the default mode isn't enough, the easiest solution is always:

    ct_run -dir test -pa `rebar3 path`

Which makes your whole app available to the tests. You can bypass rebar3
for the run, but still use it for the rest.

You may want to try:

    rebar3 shell --sname=mynode
     ...
    r3:do(ct).

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.
On Mar 19, 2016 5:07 AM, "Roberto Ostinelli" <> wrote:

> All,
> When I manually run CT with:
>
> ct_run -dir test -pa ebin
>
> and print out the node the tests are running on with a simple:
>
> ct:pal("node = ~p", [node()]).
>
> I get something similar to:
>
> ''
>
>
> However, when I run CT with rebar3 by issuing:
>
> rebar3 ct
>
> Then the same command prints:
>
> ''
>
> 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
> '' and hence the slave node cannot connect to this 'nonode'.
>
> If anyone wants to try this just run Syn's suite, it will fail when using
> rebar3 here:
>
> https://github.com/ostinelli/syn/blob/1.1.0/test/syn_test_suite_helper.erl#L62
>
> With a {{badmatch,{}}.
>
> Any ideas?
>
> Thank you,
> r.
>
>
> [1] http://erlang.org/doc/man/ct_slave.html
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160319/68ab79b6/attachment.html>


More information about the erlang-questions mailing list