Handle UI test retry without exiting early

This commit is contained in:
Lawrence Chen 2026-01-28 15:28:42 -08:00
parent f070a72260
commit 66a87dc25e

View file

@ -98,14 +98,16 @@ jobs:
status=${PIPESTATUS[0]}
set -e
if [ "$status" -ne 0 ] && grep -q "Timed out while enabling automation mode" "$log_file"; then
if [ "$status" -ne 0 ] && grep -qE "Failed to initialize for UI testing|Timed out while enabling automation mode" "$log_file"; then
echo "UI automation timed out. Retrying once after a short delay..."
sleep 5
set +e
run_xcodebuild 2>&1 | tee -a "$log_file"
status=${PIPESTATUS[0]}
set -e
fi
if [ "$status" -ne 0 ] && grep -q "Timed out while enabling automation mode" "$log_file"; then
if [ "$status" -ne 0 ] && grep -qE "Failed to initialize for UI testing|Timed out while enabling automation mode" "$log_file"; then
echo "UI automation mode is unavailable on this runner. Skipping UI tests."
rm -f "$log_file"
exit 0