Repeatedly run `rebar3 eunit`, collect flaky tests?

I’ve got a few unit tests that are a bit flaky (they fail about 10% of the time, and it’s not the same tests).

Is there a way to run all of my tests, say, 100 times and collect the details of the flaky tests, so that I can leave it running while I do something else?

In the end, I did this:

for i in $(seq 1 60); do rebar3 eunit | tee -a eunit.log ; done

The tests take ~20s, running them 60 times should take about 20 minutes.