lcov

generating branch coverage data for lcov

时光总嘲笑我的痴心妄想 提交于 2019-11-30 03:24:57
i'm trying to use lcov for code coverage metrics, but I cannot get branches coverage to work. Here's how i'm using it: g++ -ggdb3 --coverage src/read.c tests/test.cpp -o bin/test lcov --zerocounters --directory $PWD lcov --capture --initial --directory $PWD --output-file coverage_output ./bin/test lcov --no-checksum --directory $PWD --capture --output-file coverage_output genhtml --branch-coverage --highlight --legend --output-directory out coverage_output but i get: Overall coverage rate: lines......: 100.0% (60 of 60 lines) functions..: 100.0% (26 of 26 functions) branches...: no data found

How to change the format of the LCOV report executed by Karma?

我们两清 提交于 2019-11-30 01:17:46
I've configured Karma to report the coverage of my JavaScript code. Here is the part of the configuration in the karma.conf.js file: coverageReporter: { reporters: [ { type: 'html', dir: 'build/karma/coverage' }, { type: 'lcov', dir: 'build/karma/coverage', subdir: '.' }, { type: 'cobertura', dir: 'build/karma/coverage' } ] }, My lcov.info file has the following format: TN: SF:./app/scripts/app.js FN:16,(anonymous_1) FN:26,(anonymous_2) FNF:2 FNH:1 FNDA:1,(anonymous_1) FNDA:0,(anonymous_2) DA:2,1 DA:20,1 DA:29,0 DA:34,0 LF:4 LH:2 BRF:0 BRH:0 end_of_record Unfortunately, the Sonarqube

Is there any actively supported lcov port for windows

筅森魡賤 提交于 2019-11-29 21:56:52
问题 I measure coverage for my code using gcov library and I would like to generate coverage report in user-friendly format. I've found lcov utility for that, but it's not compatibile with Windows environment (mainly because of the way the paths are parsed). Does anyone know about actively supported lcov port for Windows? It seems that making it work on Windows would be quite easy (it think it might even be solved by few creative batch/perl scripts that mimic the behavior of unix shell commands),

generating branch coverage data for lcov

[亡魂溺海] 提交于 2019-11-29 00:53:57
问题 i'm trying to use lcov for code coverage metrics, but I cannot get branches coverage to work. Here's how i'm using it: g++ -ggdb3 --coverage src/read.c tests/test.cpp -o bin/test lcov --zerocounters --directory $PWD lcov --capture --initial --directory $PWD --output-file coverage_output ./bin/test lcov --no-checksum --directory $PWD --capture --output-file coverage_output genhtml --branch-coverage --highlight --legend --output-directory out coverage_output but i get: Overall coverage rate:

XCode 5.1 Unit Test Coverage Analysis Fails On Files Using Blocks

杀马特。学长 韩版系。学妹 提交于 2019-11-28 17:04:07
Today I was tasked with adding unit test coverage analysis to our code base. Today is also the day iOS 7.1 is released along with XCode 5.1. From the release notes: The gcov tool for code coverage testing has been reimplemented. The new version uses the llvm-cov tool from the LLVM project. It is functionally equivalent to the old version for all significant features. The location of gcov within Xcode has also moved, use xcrun to invoke it. If you find problems, please file bug reports. For this release, you can still use the old version of gcov from GCC, which is available as gcov-4.2.

With gcov, is it possible to merge to .gcda files?

丶灬走出姿态 提交于 2019-11-28 09:17:41
I have the same source files (C and Obj-C) being compiled into two targets: the unit test executable and the actual product (which then gets integration tested). The two targets build into different places, so the object files, .gcno and .gcda files are separate. Not all source files are compiled into the unit test, so not all objects will exist there. All source files are compiled into the product build. Is there a way to combine the two sets of .gcda files to get the total coverage for unit tests and integration tests (as they are run on the product build)? I'm using lcov. Mac OS X 10.6, GCC

With gcov, is it possible to merge to .gcda files?

断了今生、忘了曾经 提交于 2019-11-27 02:47:28
问题 I have the same source files (C and Obj-C) being compiled into two targets: the unit test executable and the actual product (which then gets integration tested). The two targets build into different places, so the object files, .gcno and .gcda files are separate. Not all source files are compiled into the unit test, so not all objects will exist there. All source files are compiled into the product build. Is there a way to combine the two sets of .gcda files to get the total coverage for unit

LCOV/GCOV branch coverage with C++ producing branches all over the place

喜欢而已 提交于 2019-11-26 19:41:50
问题 We are using LCOV/GCOV to produce test coverage of our projects. Recently we tried to enable branch-coverage additionally. But it looks like, this just doesn't yield the results we expected from a high-level developer view. Using branch-coverage with C++ blows the report up with branches all over the place. We suspect (as the searching for the issues indicates) that mostly exception handling code creates these "hidden branches". And GCOV/LCOV doesn't seem to skip over these. I created a small