Auto-retry failing tests

I’m looking for a way to automatically retry only those tests that have failed after a cargo test run. Bonus points if I can specify an amount of retries > 1.

Edit: double-bonus points (because this just happened) if it retries just the subset of tests that failed the second pass (etc).

I’m looking for an existing tool or script or even a oneliner someone hacked up. I could just parse the output and figure it out myself but I’d rather not reinvent the wheel badly.

This is for Notify’s CI, where there are occasionally spurious failures (because filesystems, and especially filesystems in high-load and/or virtual environments). That means every failing build that’s not obviously a mistake has to be manually relaunched, and not only is that tedious and inefficient, but all the dependent builds have to be restarted too (that’s more of a Travis issue though).

Thanks!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.