Implement test retry for Mobile CI (#2281)

This commit is contained in:
Vítor Vasconcellos 2024-04-04 11:19:35 -03:00 committed by GitHub
parent 475d8bd88c
commit 595172a33a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -73,6 +73,7 @@ run_maestro_test() {
fi
local i
local retry_failed=0
local retry_seconds
for i in {1..6}; do
_maestro_out=''
@ -111,7 +112,13 @@ run_maestro_test() {
# Test failed
printf '%s' "$_maestro_out"
printf '%s' "$_maestro_err" >&2
return 1
if [ $retry_failed -eq 0 ]; then
retry_failed=1
echo "Test $1 failed. Retrying once more in 10 seconds..."
sleep 10
else
return 1
fi
fi
done