gcov

code coverage with gcovr and Xcode 5 is not working

我的梦境 提交于 2019-12-03 12:21:54
问题 I'm using gcovr to generate code coverage for cobertura. Everything was working fine with xcode 4.6. Now I updated to xcode5 and everything I get is 0% coverage... my setup: gcovr 3.0 Xcode 5 (Apple LLVM 5) 'Generate Test Coverage Files' is set to YES 'Instrument Program Flow' is set to YES and to command I use: gcovr -r . --object-directory Build/Intermediates/myApp.build/Debug-iphonesimulator/myApp.build/Objects-normal/i386 --exclude '.*Tests.*' --exclude '.*KiwiUnitTest' --exclude '.*main.

code coverage with gcovr and Xcode 5 is not working

寵の児 提交于 2019-12-03 03:43:18
I'm using gcovr to generate code coverage for cobertura. Everything was working fine with xcode 4.6. Now I updated to xcode5 and everything I get is 0% coverage... my setup: gcovr 3.0 Xcode 5 (Apple LLVM 5) 'Generate Test Coverage Files' is set to YES 'Instrument Program Flow' is set to YES and to command I use: gcovr -r . --object-directory Build/Intermediates/myApp.build/Debug-iphonesimulator/myApp.build/Objects-normal/i386 --exclude '.*Tests.*' --exclude '.*KiwiUnitTest' --exclude '.*main.*' --xml > reports/coverage.xml is someone having the same issue or better, have a solution? :)

How to do code coverage on embedded

岁酱吖の 提交于 2019-12-03 03:20:37
I write a project for a non POSIX embedded system so I cannot use gcc option --coverage (i don't have read or write). What else can I do to produce gcov like output. I do have an output function. It can be most easily done with by a processor with embedded trace, a board design that exposes the trace port, and a suitable hardware debugger and associate software. For example, many Cortex-M based devices include ARM's embedded trace macrocell (ETM), and this is supported by Keil's uVision IDE and ULINK-Pro debugger to provide code coverage and instruction/source level trace as well as real-time

LCOV_EXCL_START/STOP has no effect when using gcovr

自作多情 提交于 2019-12-02 21:09:24
问题 When I add LCOV_EXCL_START/STOP tags to my C++ code, it does not seem to have any effect on my gcovr report. Does someone know why this occurs? I have the following: $ tree . ├── build ├── include │ └── a.h └── tests └── test_a.cpp and $ cat include/a.h void f (bool x) { // LCOV_EXCL_START if (x) throw 1; // LCOV_EXCL_STOP } and $ cat tests/test_a.cpp #include "a.h" int main () { f (false); return 0; } But line 5 throw 1; is included in the gcovr report, even though it is surrounded in

GCC6.3.0: flag “--coverage” not functioning (no gdca files generated)

£可爱£侵袭症+ 提交于 2019-12-02 10:26:57
Having a code snippet in C and the same in C++, which generates gdca files executing the exe which is compiled with GCC 4.1.2. The same code snippet compiled with GCC6.3.0 after executing is not generating gdca files, not the C.exe not the c++.exe I found out that the implementation of the gcov library is different, in GCC4.1.2 and GCC6.3.0, the version of the gcov library in GCC6.3.0 seems to be empty: _gcov_merge_add.o: file format elf32-i386 Disassembly of section .text: 00000000 <__gcov_merge_add>: 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 5d pop %ebp 4: c3 ret _gcov_merge_single.o: file

LCOV_EXCL_START/STOP has no effect when using gcovr

我的未来我决定 提交于 2019-12-02 08:46:47
When I add LCOV_EXCL_START/STOP tags to my C++ code, it does not seem to have any effect on my gcovr report. Does someone know why this occurs? I have the following: $ tree . ├── build ├── include │ └── a.h └── tests └── test_a.cpp and $ cat include/a.h void f (bool x) { // LCOV_EXCL_START if (x) throw 1; // LCOV_EXCL_STOP } and $ cat tests/test_a.cpp #include "a.h" int main () { f (false); return 0; } But line 5 throw 1; is included in the gcovr report, even though it is surrounded in exclude tags: $ g++ -c -O0 -fprofile-arcs -ftest-coverage -fPIC --coverage -I include ./tests/test_a.cpp -o .

gcov is not generating coverage information for header files

我的梦境 提交于 2019-12-02 06:52:42
问题 I'm using gcov for the first time and I'm having a problem which is similar to the one reported in this thread. However, I wasn't able to solve my problem following the comments in that thread. I'm trying to measure the coverage of a concrete test case in KMyMoney-4.6.4, namely "testConstructor" in the test file "mymoneyaccounttest.cpp". This test case is using the following method, which is in the header file "mymoneyaccount.h" and has executable code: const QString& institutionId(void)

gcov is not generating coverage information for header files

我的未来我决定 提交于 2019-12-02 05:30:54
I'm using gcov for the first time and I'm having a problem which is similar to the one reported in this thread . However, I wasn't able to solve my problem following the comments in that thread. I'm trying to measure the coverage of a concrete test case in KMyMoney-4.6.4 , namely "testConstructor" in the test file "mymoneyaccounttest.cpp". This test case is using the following method, which is in the header file "mymoneyaccount.h" and has executable code: const QString& institutionId(void) const { return m_institution; } So, I build the program and the tests, and then execute: gcov

Code Coverage GCov not working with XCode 4.2 and iOS SDK 5

主宰稳场 提交于 2019-12-01 23:58:02
I've been trying to get GCov working with Xcode 4.2Build 4D199 on Lion with iOS SDK 5.0 to no avail. Has anyone had any luck with this? I'm using Google Tools For Mac for my unit tests and I've linked in libprofile_rt.dylib and added: "OTHER_CFLAGS[arch=*]" = ( "-ftest-coverage", "-fprofile-arcs", "-falign-loops=16", ); as indicated on the Coverstory page here http://code.google.com/p/coverstory/wiki/UsingCoverstory But when I find . -name *.gcda" I come up empty. What am I missing? GCov is no longer supported in XCode 4.2 . You'll note that if you go their "man page" for it , XCode 4.2 is not

Why does gcov report 0% coverage on a header file for a well used class?

梦想的初衷 提交于 2019-12-01 08:26:47
I'm attempting to measure test coverage for the first time using gcov . Now that I'm past the initial learning curve, things seem to be going well, except for one little snag. I expect that it boils down to a lack of understanding on my part, so I'm hoping someone familiar with gcov can explain what's going on. The issue is that I have one particular header file showing 0% coverage. However the only thing in that header is a class declaration for a well-used class. In addition, The implementation file for the class shows 100% coverage, and I can point to 5 different tests where I know for a