Is there any way for me to easily run a Go test many times, halting the first time it fails? I can of course do something like this:
for i in {1..1000}; do go test ./mypkg && done
but that causes a recompile every time, which is very slow compared to the test
itself. I imagine I could do this with some clever application of the -exec
flag and xargs
, but I am not good at one-liners.
Bonus points for running it many times in parallel with some semblance of sane verbose output if it fails one or two out of a thousand times.