[erlang-questions] rebar3 and CT's main node
Sun Mar 20 14:37:28 CET 2016
On 03/20, Roberto Ostinelli wrote:
>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?
I don't think we ever had a conscious decision to do it. When `rebar3
ct` was implemented, we switched away from rebar 2.x's shelling out to
'ct_run', since that had the nasty habit of leaving behind a named node
you couldn't interrupt and had to call 'kill -9' on to be able to run
When switching to the direct erlang API for 'ct', the node naming
feature was probably just lost by accident. Incidentally it now lets
people run more than one test run at a time on a given system, which may
not be all that bad.
One tricky aspect of distributed Erlang with escripts is that it still
relies on epmd, but if epmd is not running yet, the escript/net_kernel
will not boot the process for you; we'd have to shell out to it manually
and hope it doesn't get taken down when the escript is done running (if
any other system started relying on it at the tiem). I never felt super
comfortable with that, and so far 'rebar3 shell' just displays a warning
asking you to boot epmd and ignores distributed mode when that happens.
That's probably the road I'd go for with `rebar3 ct` too: make in an
explicit option, but don't lock up a node name (and possibly boot epmd)
by default if the user hasn't asked for it? Currently it's just plain
More information about the erlang-questions