We need a way to specify a post-test command that runs on EVERY container, instead of just the first one - alternatively, if we could access the list of spec files that CircleCI inferred is supposed to run on that particular node (which makes use of junit-rspec-formatter timings), that would also work for our purposes. OR if there was a test command that we could run on each container after any inferred test commands.
Is either of this possible?
Our use-case is that we want to perform retries of failed specs for a particular container after the main run, in a new separate process, so as to have as fresh an environment as possible. This is almost possible by overriding Rspec’s
--failure-exit-code for the first run, BUT we run into the issue where we can only rerun the failed specs for the first container, due to how CCI’s post-test command works.
We also want to keep taking advantage of CCI’s inferred-runtime-balanced spec distribution, hence are refraining from overriding the inferred test command.