Plugin development - callback for finish of tests

Hello!
I want to create the following script:
- Run junit tests
- Than, if tests are not failed, I will commit my changes

I use com.intellij.execution.ExecutionManager#restartRunProfile for run of tests.
It's necessary to detect when tests are finished for my following checks. Is there a callback/ listener to subscribe to for that?

请先登录再写评论。