[erlang-questions] slave:start/3 time out when EUnit started with ERL_FLAGS

George Catalin Serbanut cgsmcmlxxv@REDACTED
Wed Sep 7 12:21:32 CEST 2011


I thought you used make bug without stopping the first shell. Sorry,
misunderstanding.

ERL_FLAGS is equivalent with ERL_ZFLAGS which appends at the end of the
command line. Now, it depends on how "command line" is interpreted (Eshell
can be considered a continuation of the "erl" command line). Try ERL_AFLAGS.
If you still get the problem, then it may be a misbehavior of the
interpretation of those FLAGS.

Cheers,
CGS



On Wed, Sep 7, 2011 at 11:14 AM, yfyf <baliulia@REDACTED> wrote:

> On 09/07/2011 11:26 AM, Ulf Wiger wrote:
> >
> > On 7 Sep 2011, at 10:14, Ignas Vyšniauskas wrote:
> >
> >> bug: compile
> >>    EUNIT="verbose" ERL_FLAGS="-sname foobar" erl -s eunit test foo
> >
> > From the init(3) man page on the '-s' flag:
> >
> > "The functions are executed sequentially in an initialization process,
> > which then terminates normally and passes control to the user. This
> > means that a -s call which does not return will block further
> > processing; to avoid this, use some variant of spawn in such cases."
> >
> > eunit:test/1 runs to completion, blocking until the tests are done.
> > Therefore, it can't be used directly with the -s flag.
> >
> Is the '-s' flag really relevant here? Consider this:
>
> ------------------------------------------------------------
> [~/dev/fooApp]$ ERL_FLAGS="-sname foobar" erl
> Erlang R14B (erts-5.8.1) [source] [rq:1] [async-threads:0] [hipe]
> [kernel-poll:false]
>
> Eshell V5.8.1  (abort with ^G)
> (foobar@REDACTED)1> eunit:test(foo).
>
> =INFO REPORT==== 7-Sep-2011::11:58:33 ===
> Node foobar@REDACTED is alive? true
> foo: bug_test (module 'foo')...*timed out*
> undefined
> =======================================================
>  Failed: 0.  Skipped: 0.  Passed: 0.
> One or more tests were cancelled.
> ------------------------------------------------------------
>
> However:
>
> ------------------------------------------------------------
> [~/dev/fooApp]$ erl -sname foobar
> Erlang R14B (erts-5.8.1) [source] [rq:1] [async-threads:0] [hipe]
> [kernel-poll:false]
>
> Eshell V5.8.1  (abort with ^G)
> (foobar@REDACTED)1> eunit:test(foo).
>
> =INFO REPORT==== 7-Sep-2011::12:00:11 ===
> Node foobar@REDACTED is alive? true
>   Test passed.
> ok
> ------------------------------------------------------------
>
>
> Did I misunderstand your answer? If so, could you maybe explain it in a
> bit more detail.
> The reason why I ended up in this situation is that before I was using
> net_kernel:start([eunit, shortnames]) in my test setup functions, but
> then Mnesia stopped responding to EUnit's calls for some reason and I
> started digging for the problem and found this.
>
> An off topic, but related question: is using net_kernel:start/1 in EUnit
> a bad idea in general?
>
> Thank you for your help.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110907/73315f6a/attachment.htm>


More information about the erlang-questions mailing list