I have a Jenkins
that executes ctest
which in turn executes several unit tests. A global timeout of 120 minutes for a test run is configured.
One of my test programs gets sporadically stuck and killed by the configured timeout.
What I like to have is a core dump of the test program in the problem situation. So I'd like to execute a custom command (e.g. gcore XXX
), whenever the timeout is reached.
How can I configure that in Jenkins
and/or ctest
?
I wrote my own, non-portable script to accomplish the job. Hopefully it serves as a help and/or inspiration for others...