Currently, if a build is cancelled (manually or via auto-cancel), the test post hook command doesn’t run. So if you need to do any clean up, it will not occur.
In our specific case, we’re using SauceLabs’ sauce connect binary to create a tunnel to CircleCI for selenium testing our feature specs. We pay per tunnel. When a build starts a tunnel per parallel process is opened, but if that build is cancelled, the test/post command to kill the tunnel doesn’t run and the tunnel just stays open until it times out. If a new build starts and can’t acquire a tunnel, that build just end up timing out.
So my request is simple, either a post command that runs specifically on cancel, or a post command that runs always, whether cancelled or successful.