I have an embedded system that runs indefinitely, and need to check it for memory leaks. In a terminal it's easy enough to just kill the process, however, I need to set this up as an automatic thing on a Jenkins build server. I have been unable to find a time limit option myself, so does anyone else know of a way for me to do this?
I am using the Jenkins Valgrind Plugin found here:
https://wiki.jenkins-ci.org/display/JENKINS/Valgrind+Plugin
After pouring through the valgrind
manual, there is no built-in time limit option.
However, if you want to do something like this, you can use --trace-children
and build a wrapper/helper program that will fork the target program and then kill the fork after the time limit.