Information
We are currently investigating an issue with the editor of some pages. Please save your work and avoid to create new pages until this banner is gone.
Table of Contents |
---|
GCOV is a tool you can use in conjunction with GCC to test code coverage in your programs.
...
For building with coverage support you need to add some flags to gcc/g++ compiler and linker:
Code Block | ||
---|---|---|
| ||
g++ -fprofile-arcs -ftest-coverage #Or simply --coverage, which includes the previous flags g++ --coverage |
...
Code Block | ||
---|---|---|
| ||
#Build ACS cd ACS MAKE_GCOV=1 make build $Build#Build a single module cd <some_module>/src MAKE_GCOV=1 make clean all install |
As a result, you will have a .gcno file for each compiled .o file in your object directory.
...
The execution is the same as always, you don't need to use a wrapper application or pass any special flag or environment variable. You can either run an executable manually or use an automated testing system such as TAT.
...