Thank you for reply, it is really root of the problem.<div>I forgot mention about library meck which loads module and redefines some of its functions. When I remove meck, coverage works as expected. I should think how to replace meck.<br>
<br><div class="gmail_quote">On 13 March 2012 19:58, Siri Hansen <span dir="ltr"><<a href="mailto:erlangsiri@gmail.com">erlangsiri@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This is not related to the name of the SUITEs. What happens is that the modules (my_module1 and my_module2 - and possible other modules as derived from your cover spec file) are cover compiled and loaded by common_test before the test starts. The result of the cover compilation exists only in memory so if the test code explicitly loads these modules again the original beam files will be used and the cover compiled version disappears. The only way to overcome this is to avoid loading of code in your tests.<div>

/siri<br><br><div class="gmail_quote">Den 10:55 13. mars 2012 skrev Maxim Treskin <span dir="ltr"><<a href="mailto:zerthurd@gmail.com" target="_blank">zerthurd@gmail.com</a>></span> følgende:<div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yes, this modules loaded in tests. How I can fix this? Rename SUIT modules?<div><div><br><br><div class="gmail_quote">On 13 March 2012 16:38, Siri Hansen <span dir="ltr"><<a href="mailto:erlangsiri@gmail.com" target="_blank">erlangsiri@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This would typically happen if your test loads my_module1 and my_module2. Could that be the case?<div>/siri<br><br><div class="gmail_quote">


Den 10:30 13. mars 2012 skrev Maxim Treskin <span dir="ltr"><<a href="mailto:zerthurd@gmail.com" target="_blank">zerthurd@gmail.com</a>></span> følgende:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Hello<br><br>I have strange behaviour of rebar+common_test+cover.<br>There is two files in ./test/:<br>
<br>my_module1_SUITE.erl<br>
my_module2_SUITE.erl<br><br>where ct suites defined. When I run `rebar ct verbose=1` I see:<br>
<br>```<br>...<br>Cover compiling 'myapp' (16 files) - this may take some time... done<br>...<br clear="all">Cover analysing...<br>WARNING: Analysis failed for my_module1. Reason: {error,{not_cover_compiled,my_module1}}<br>




WARNING: Analysis failed for my_module2. Reason: {error,{not_cover_compiled,my_module2}}<br>```<br><br>Why I see no any error before at cover compilation step?<br><br>Moreover, if I just replace my_module1_SUITE:all/0 to return just empty list [], warning "Analysis failed for my_module1" disappears, and cover for this file appears in cover.html log.<br>




<br>Can you explain me this strange issues? Is this any bug or expected behaviour?<br><br>Thank you.<span><font color="#888888"><br><br>-- <br>Maxim Treskin<br><a href="http://metachord.com" target="_blank">http://metachord.com</a><br>




</font></span><br></div></div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">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>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br>Maxim Treskin<br>
</font></span></blockquote></div></div></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Maxim Treskin<br>
</div>