CubbyDNN
CubbyDNN copied to clipboard
Apply lcov settings to generate code coverage report
This revision sets lcov to generate code coverage report.
CAUTION
lcov --directory . --capture --output-file coverage.info doesn't work. I added the compiler flag and link flag, and when I built it, the .gcno file was created, but the .gcda file was not created. It seems to be a problem caused by the updated version of gcov. (WARNING: no .gcda files found in .)
The following is a list of commands to print a report using lcov.
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make -j 8
lcov -c -i -d Tests/UnitTests -o base.info
bin/UnitTests
lcov -c -d Tests/UnitTests -o test.info
lcov -a base.info -a test.info -o coverage.info
lcov -r coverage.info '/usr/*' -o coverage.info
lcov -r coverage.info '*/Libraries/*' -o coverage.info
lcov -r coverage.info '*/Tests/*' -o coverage.info
lcov -l coverage.info
genhtml coverage.info -o out