I am using Common Test for code coverage analysis in my erlang project.
File structure
myProject/
ebin/
src/
test/
myProject.coverspec
The .beam-files for the source code is located in ebin/ and for the tests they are in test/ together with the test sources.
I am currently using absolute paths to the .beam files in the .coverspec-file.
myProject.coverspec:
{level,details}.
{incl_dirs, ["/home/user/myProject/ebin", "/home/user/myProject/test"]}.
This works, but is far from optimal as the project development is distributed.
ct_run is called from the base of the project, myProject, the paths don't seem to be relative to myProject but somewhere else.
I've tried paths relative to both myProject and myProject/test w/o success.
My question is, where are the paths in myProject.coverspec relative to?
In my last Erlang project where I have used
CT
andcover
my setup looked like this:cover.spec in project root directory:
Tests executed from project root via;
Not sure if this solves your problem but it worked for me.