I thought you used make bug without stopping the first shell. Sorry, misunderstanding.<br><br>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.<br>
<br>Cheers,<br>CGS<br><br><br><br><div class="gmail_quote">On Wed, Sep 7, 2011 at 11:14 AM, yfyf <span dir="ltr"><<a href="mailto:baliulia@gmail.com">baliulia@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 09/07/2011 11:26 AM, Ulf Wiger wrote:<br>
><br>
> On 7 Sep 2011, at 10:14, Ignas Vyšniauskas wrote:<br>
><br>
>> bug: compile<br>
>>    EUNIT="verbose" ERL_FLAGS="-sname foobar" erl -s eunit test foo<br>
><br>
> From the init(3) man page on the '-s' flag:<br>
><br>
> "The functions are executed sequentially in an initialization process,<br>
> which then terminates normally and passes control to the user. This<br>
> means that a -s call which does not return will block further<br>
> processing; to avoid this, use some variant of spawn in such cases."<br>
><br>
> eunit:test/1 runs to completion, blocking until the tests are done.<br>
> Therefore, it can't be used directly with the -s flag.<br>
><br>
</div>Is the '-s' flag really relevant here? Consider this:<br>
<br>
------------------------------------------------------------<br>
[~/dev/fooApp]$ ERL_FLAGS="-sname foobar" erl<br>
Erlang R14B (erts-5.8.1) [source] [rq:1] [async-threads:0] [hipe]<br>
[kernel-poll:false]<br>
<br>
Eshell V5.8.1  (abort with ^G)<br>
(foobar@pufpuf)1> eunit:test(foo).<br>
<br>
=INFO REPORT==== 7-Sep-2011::11:58:33 ===<br>
<div class="im">Node foobar@pufpuf is alive? true<br>
</div>foo: bug_test (module 'foo')...*timed out*<br>
undefined<br>
=======================================================<br>
  Failed: 0.  Skipped: 0.  Passed: 0.<br>
One or more tests were cancelled.<br>
------------------------------------------------------------<br>
<br>
However:<br>
<br>
------------------------------------------------------------<br>
[~/dev/fooApp]$ erl -sname foobar<br>
Erlang R14B (erts-5.8.1) [source] [rq:1] [async-threads:0] [hipe]<br>
[kernel-poll:false]<br>
<br>
Eshell V5.8.1  (abort with ^G)<br>
(foobar@pufpuf)1> eunit:test(foo).<br>
<br>
=INFO REPORT==== 7-Sep-2011::12:00:11 ===<br>
<div class="im">Node foobar@pufpuf is alive? true<br>
</div>  Test passed.<br>
ok<br>
------------------------------------------------------------<br>
<br>
<br>
Did I misunderstand your answer? If so, could you maybe explain it in a<br>
bit more detail.<br>
The reason why I ended up in this situation is that before I was using<br>
net_kernel:start([eunit, shortnames]) in my test setup functions, but<br>
then Mnesia stopped responding to EUnit's calls for some reason and I<br>
started digging for the problem and found this.<br>
<br>
An off topic, but related question: is using net_kernel:start/1 in EUnit<br>
a bad idea in general?<br>
<br>
Thank you for your help.<br>
<div><div></div><div class="h5">_______________________________________________<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" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br>