fix(test): fix E2E retry — set -e broke exit-code capture
With set -Eeuo pipefail, a failing fvm flutter test exited the script before _e2e_exit=$? could run, so the retry-on-new-display logic never fired. Use the cmd || var=$? pattern to capture the exit code safely, and add || true to the break guard so set -e doesn't trip on it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
1b7cbdbb4b
commit
dd1425a497
@@ -139,9 +139,10 @@ done
|
||||
_e2e_exit=0
|
||||
for _attempt in 1 2; do
|
||||
ts "E2E attempt $_attempt (DISPLAY=$DISPLAY)"
|
||||
timeout 360 fvm flutter test integration_test/ -d linux
|
||||
_e2e_exit=$?
|
||||
[ $_e2e_exit -eq 0 ] && break
|
||||
# Use || to capture exit code without triggering set -e on failure.
|
||||
_e2e_exit=0
|
||||
timeout 360 fvm flutter test integration_test/ -d linux || _e2e_exit=$?
|
||||
[ "$_e2e_exit" -eq 0 ] && break || true
|
||||
if [ $_attempt -lt 2 ]; then
|
||||
ts "E2E attempt $_attempt failed (exit $_e2e_exit), restarting Xvfb and retrying..."
|
||||
pkill -u "$USER" -f "sharedinbox" 2>/dev/null || true
|
||||
|
||||
Reference in New Issue
Block a user