Open lpenz opened 10 years ago
We use coveralls with cmake. Works just fine if the folder with the compiler output is selected. https://github.com/acplt/open62541/blob/master/CMakeLists.txt https://github.com/acplt/open62541/blob/master/.travis.yml
It works if the build directory is under the source directory, as coveralls searches for both .gcno and .c files recursively in the -r directory. If the build directory has no relation with the source directory, the following happens: -r
huh, so am I correct in saying that if you have:
-project_root
|-src
|-other_stuff
|-build
|-compiler_1
you won’t run into any issues?
I'd say that I have to test it, but I think that is correct: it would work if I "-r project_root"
Yes, this is correct, having both src
and build
directories under a common parent root directory works fine.
I'm also trying to use this with CMake on Travis. The problem I'm getting is that the exclude folders for the coverage reports and the source files is the same. I keep getting these matches for source files on CMake internal files (feature_tests.c
, CompilerId*
). I can use some specific rules but it seems like this is depending on CMake internals.
Any way we can have exclusion patterns specifically for source file discovery?
I've found better functionality and support on codecov.io and have moved there. The bash script works quite well, and is easier to use than coveralls.
Would it be easy to just have two arguments, one for the build tree and another for the source tree?
The utility assumes that the .c files and the git repository are in the same tree as the .gcno files (-r option). With cmake, it is quite easy (and common) to build utilities in a separate "build" directory. I think a --source-root option would make sense.