I have a classical SWIG setup where a bunch of C++ function are called from Python. Now, after adding some tests (in Python), I'd like to get test coverage on the C++ sources. The classical Python method is
nosetests --with-coverage --cover-package=mypackage
but that only works for native Python modules. In fact, this will return the coverage on the mypackage.py
file generated by SWIG.
Since I need coverage on the C++ files (/the shared library generated by SWIG), adding --coverage
to compile and linker flags is certainly called for. Not sure where to go from there though.
Any hints?