Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code coverage to nightly test #169

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jacobmerson
Copy link
Contributor

This functionality is pulled over from my implementation in
tobinw/biotissue. Valgrind is used to do memory checking, and gcov is
used for coverage.

closes #60

Note: I don't have an easy way to verify that this works. @seegyoung (I think you are in charge of the nightly tests) should try running this with ctest --script nightly.cmake. If all goes well the memory checking and test coverage should show up on cdash site.

This functionality is pulled over from my implementation in
tobinw/biotissue. Valgrind is used to do memory checking, and gcov is
used for coverage.

closes SCOREC#60
@cwsmith
Copy link
Contributor

cwsmith commented Aug 18, 2018

@timetravellers we have valgrind support that works with mpirun:

add_test(
NAME ${TESTNAME}
COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} ${PROCS} ${VALGRIND} ${VALGRIND_ARGS} ${EXE} ${ARGN}
)

core/CMakeLists.txt

Lines 61 to 64 in a6b4cbf

set(VALGRIND "" CACHE string
"the valgrind executable")
set(VALGRIND_ARGS "" CACHE string
"the command line arguments to VALGRIND")

IIRC, the builtin cmake valgrind integration does not support being called by mpirun.

The gcov addition is interesting. I'll check that out. Does this address Dan's point about aggregate coverage?

I'm currently the nightly build maintainer.

@cwsmith cwsmith self-requested a review August 18, 2018 15:33
@jacobmerson
Copy link
Contributor Author

Valgrind seems to work with mpi and cdash . You can see the result of a dynamic analysis on my project here:
https://my.cdash.org/index.php?project=Biotissue&subproject=develop

As far as I know this does aggregate data as Dan was hoping for. The following project shows an example with coverage turned on (and working): https://open.cdash.org/index.php?project=CMake

On tobinw/biotissue and tobinw/amsi I had to turn off the code coverage because our codebase is not currently completely open (we include some Simmetrix calls).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants