From e33271fc15f0016eb6df68191d52ba36c57ef7fd Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Thu, 27 Aug 2026 23:59:12 +0200 Subject: [PATCH] Shorten the leash on Android and retry more often --- .github/scripts/take-screenshots.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/scripts/take-screenshots.sh b/.github/scripts/take-screenshots.sh index b05009dc4..3f8243be3 100755 --- a/.github/scripts/take-screenshots.sh +++ b/.github/scripts/take-screenshots.sh @@ -6,8 +6,7 @@ set -euo pipefail blocks=5 -attempts=3 -block_timeout=10m +attempts=5 # Homebrew installs coreutils under the g-prefixed names only timeout=$(command -v timeout || command -v gtimeout) || { @@ -18,6 +17,13 @@ timeout=$(command -v timeout || command -v gtimeout) || { device_type=${1:?Usage: take-screenshots.sh [flutter drive args]} shift +# A healthy block takes about two minutes on Android and five on Apple, where +# the Xcode build dominates. A hang never recovers, so waiting longer is waste +case $device_type in + iOS*) block_timeout=10m ;; + *) block_timeout=5m ;; +esac + # flutter drive gives up within seconds on an offline device, so wait for it # to come back instead of burning the next attempt on it wait_for_device() {