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

Roberto Ostinelli roberto@REDACTED
Sun Mar 20 13:55:30 CET 2016


One question I need to ask though: why does `rebar ct` not set the node?
This is actually set by CT itself, so why does it get removed?

Thanks,
r.

On Sun, Mar 20, 2016 at 10:22 AM, Roberto Ostinelli <roberto@REDACTED>
wrote:

>
>
> On Sun, Mar 20, 2016 at 10:07 AM, Roberto Ostinelli <roberto@REDACTED>
> wrote:
>
>>
>> Long story short: in my tests I define some callback functions that need
>> to be called for the tests to pass.
>> However, I need to specify the path to the test directory too, because
>> otherwise my slave node doesn't have these functions defined.
>>
>> This is how I do the trick now:
>>
>> https://github.com/ostinelli/syn/blob/1.2.0/test/syn_test_suite_helper.erl#L59
>> (this passes)
>>
>> https://github.com/ostinelli/syn/blob/1.2.0/test/syn_test_suite_helper.erl#L60
>> (this directory does not exist when I use rebar3).
>>
>> SO: is there a way to have rebar copy the test directory to:
>> syn/_build/default/lib/syn/test
>>
>> ?
>>
>
> Found an alternative to this, leaving it here for anyone interested. I
> start the slave node with:
>
> start_slave(NodeShortName) ->
>     CodePath = code:get_path(),
>     {ok, Node} = ct_slave:start(NodeShortName, [{boot_timeout, 10}]),
>     true = rpc:call(Node, code, set_path, [CodePath]),
>     {ok, Node}.
>
> Hence I do not need to "rebuild" the directories.
>
> Fred, Tristan, thank you for your help I can consider this matter closed.
>
> Best,
> r.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160320/0b36be96/attachment.htm>


More information about the erlang-questions mailing list