<div dir="ltr">First, it is not possible to cover compile to file, so I guess compiling ahead of time is not straight forward. <div><br></div><div>How do you start/stop your remote node? I think that specifying the node in the cover spec means that ct tries to start cover on the node when the test starts. I don't think it is clever enough to do the stuff if the node is started later on. Unless you start it with ct_slave:start, which automatically starts cover on any node, no matter if it is specified in the cover spec or not.</div><div><br></div><div>When cover is started on a remote node, it loads the same cover compiled beam files as are running on the local node, so if your nodes are running different versions of your release, then you have a potential problem (e.g. function_clause and badrecords). </div><br class="gmail-Apple-interchange-newline"><div>From the badarg with the ets table, it seems that you have cover compiled code running on the node without the cover server being running there (guessing the badarg means the table does not exist, that is). Is there any indication of the cover server crashing, or of unloading of cover compiled code failing? </div><div><br></div><div>Does this happen early in the test run, or at the end of it? A problem I often see is that processes crash when cover is stopped. This has to do with code loading and occurs if a process is still running the old (non cover-compiled) code when cover is stopped. To avoid this, the cover_stop flag is added - see Code Coverage Analysis section in the user's guide. I don't know if your problems are in any way related to this though.<br></div><div><br></div><div>So, this was a bunch of more or less related thoughts - don't know if anything may get you on the right track, but if you want to discuss further please let me know.</div><div><br></div><div>/siri<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">man. 3. jun. 2019 kl. 16:06 skrev Roger Lipscombe <<a href="mailto:roger@differentpla.net">roger@differentpla.net</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I'm attempting to use ct_run -cover (per<br>
<a href="http://erlang.org/doc/apps/common_test/cover_chapter.html" rel="noreferrer" target="_blank">http://erlang.org/doc/apps/common_test/cover_chapter.html</a>) to get<br>
coverage information from an Erlang node.<br>
<br>
I've got a coverspec file that looks like this:<br>
<br>
{nodes, ['the_server@roger-pc']}.<br>
{incl_dirs_r, ["path/to/_rel/the_server/lib"]}.<br>
{export, "cover.coverdata"}.<br>
<br>
...and I'm running it like this (abridged):<br>
<br>
ct_run -cover cover.spec -erl_args -pa path/to/_rel/the_server/lib/*/ebin<br>
<br>
After a long wait while it cover compiles 900 modules, it finally runs<br>
my CT test, but it fails because the remote node has been screwed up.<br>
I get a bunch of function_clause and badrecord errors and everything's<br>
entirely broken.<br>
<br>
The remote node finally gets stuck in a loop continually complaining<br>
about {badarg,[{ets,update_count,[cover_internal_data_table etc...<br>
<br>
Does anyone have a working example of getting coverage from a remote<br>
Erlang node while running ct_run?<br>
<br>
Potentially related: can I cover-compile the modules ahead of time,<br>
when I build the release (I'm using relx)?<br>
_______________________________________________<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" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>