The examples in this section describe several classes of projects and ways to approach integrating C/C++test.
Build includes compilation of multiple source files without static or dynamic libraries.
Compilation phase:
For all sources files or selected subsets, compilation should be prefixed with cpptestcc
tool with options for enabling the desired coverage metrics.
Linking phase:
The linker command line should be modified to include the coverage tool library. In most of the cases, you will include the static library:
g++ source1.o source2.o <cov tool install dir>/runtime/lib/cpptest.a |
cpptestcc
tool with options for enabling desired coverage metrics. If coverage from static libraries should also be collected, they need to be instrumented, as well. cpptestcc
tool with options for enabling desired coverage metrics. If coverage from dynamic libraries should also be collected, they need to be instrumented, as well. cpptestcc
tool with options for enabling desired coverage metrics. If coverage from dynamic or shared libraries should also be collected, they need to be instrumented, as well.