radiasoft / zgoubi

Git repo for zgoubi source code
https://sourceforge.net/projects/zgoubi/
GNU General Public License v2.0
9 stars 3 forks source link

Test-code-coverage and Codecov.io #51

Open zbeekman opened 5 years ago

zbeekman commented 5 years ago

Hi @robnagler and @dtabell, in an effort to ensure correctness as modifications and refactorings move forward, it would be nice to have some code-coverage data to help get a sense of which portions of the code-base are actually executed. On my automate-profiling branch I have setup a code-coverage build configuration.

Would it be possible to enable Codecov.io for zgoubi?

That way, we could update code-coverage metrics during CI testing.

To build with code-coverage support, add the -DCMAKE_BUILD_TYPE:STRING=CodeCoverage flag to the CMake configuration line (or selecting it from the drop down UI in ccmake or cmake-gui) will build zgoubi with code coverage enabled. I'm still looking into the best way to process the coverage output with GCov inside the docker environment in use for CI testing.

What do you think?

Thanks, Zaak

robnagler commented 5 years ago

@dtabell I defer to you.

dtabell commented 5 years ago

Hi @zbeekman. Would be very nice to have some idea of how much of the code is actually getting tested, so sounds to me like a good thing to do. Is there any downside?

Dan