Cover and nested src trees

Russell Brown <>
Mon Nov 23 22:47:22 CET 2009


Hi,
I keep me src code in a hierarchy of directories like

src -
	pages -
	elements -
	data -
		mnesia -
		couchdb -
	utils


and so on. I use cover (for coverage). I use cover:compile_directory  
for each directory in my src tree and then call cover:analyse_to_file  
for each element in the result. Only the modules in the root src  
directory don't return {error,no_source_code_found}. Is there a way to  
let cover know where a modules src code is? Cover's documentation  
says: -

	'If the module was cover compiled from the .beam file, i.e. using  
compile_beam/1 or compile_beam_directory/0,1, it is assumed that the  
source code can be found in the same directory as the .beam file, or  
in ../src relative to that directory. If no source code is found, , 
{error,no_source_code_found} is returned."

But any module in question wasn't. It was cover compiled with  
cover:compile_directory("/my/nested/src/dir/") and yet the same return  
value results.

Many thanks in advance if you can help me figure out how to get  
analyse_to_file for modules belwo my src root directory.

Cheers

Russell


More information about the erlang-questions mailing list