Execute command line before timeout
Answered
Hello,
I have configured a unit test build step using google test in command line. I have also configured a timeout, let's say: I don't want the unit tests to run more than xx minutes.
When it happens, I'd like to know the callstack before killing the process, by using a command line tool like ProcDump. But to achieve that, I need to launch the tool just before the timeout.
Is there a trigger or another way to execute a command line before the timeout kills the process?
Please sign in to leave a comment.
I am not aware of such a mechanism in Team City to my knowledge. You probably need to have your own wrapper which executes necessary command when the timeout triggers and just before killing the process.
Hi Tony,
You can add the last build step with Execution step: "Always, even if build stop command was issued" option selected. In this case the last step will run even if build fails because of timeout.
I know this is an old thread but what Alina Mishina state above is incorrect.
If a job suffers a timeout in a previous build step, then all following build steps are skipped (even if they are marked as: "Always, even if build stop command was issued"):
Below is an example of a job that timed out during build step 4, with build step 5 marked as "Always, even if build stop command was issued"