[erlang-questions] Rebar, common_test and cover issue
Tue Mar 13 13:58:34 CET 2012
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.
Den 10:55 13. mars 2012 skrev Maxim Treskin <> følgende:
> Yes, this modules loaded in tests. How I can fix this? Rename SUIT modules?
> On 13 March 2012 16:38, Siri Hansen <> wrote:
>> This would typically happen if your test loads my_module1 and my_module2.
>> Could that be the case?
>> Den 10:30 13. mars 2012 skrev Maxim Treskin <>følgende:
>>> I have strange behaviour of rebar+common_test+cover.
>>> There is two files in ./test/:
>>> where ct suites defined. When I run `rebar ct verbose=1` I see:
>>> Cover compiling 'myapp' (16 files) - this may take some time... done
>>> Cover analysing...
>>> WARNING: Analysis failed for my_module1. Reason:
>>> WARNING: Analysis failed for my_module2. Reason:
>>> Why I see no any error before at cover compilation step?
>>> 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.
>>> Can you explain me this strange issues? Is this any bug or expected
>>> Thank you.
>>> Maxim Treskin
>>> erlang-questions mailing list
> Maxim Treskin
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions