Skip to content

Commit 0f65020

Browse files
andyclaude
andcommitted
macOS start test: fail when an app is ended by a signal (rc >= 128)
run.sh always exited 0, so run 37577497106 was green with the Builder killed by SIGABRT on arm64. It now exits 1 and says FAILED in the summary; the workflow steps still append the summary before failing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFPK14wBcLD1s4dYUowpP4
1 parent aaa8f4e commit 0f65020

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,9 @@ jobs:
351351
run: |
352352
export PATH="$ECCE_DEPS/sbin:$ECCE_DEPS/bin:$PATH"
353353
cmake --install build-cmake
354-
tests/macos/run.sh stage macos-run
354+
rc=0; tests/macos/run.sh stage macos-run || rc=$?
355355
cat macos-run/summary.txt >> "$GITHUB_STEP_SUMMARY"
356+
exit $rc
356357
357358
- uses: actions/upload-artifact@v4
358359
if: always()
@@ -402,8 +403,10 @@ jobs:
402403
# The build tree and the staging prefix must not be needed.
403404
mv build-cmake build-cmake.gone
404405
mv stage stage.gone
405-
ECCE_APP="$appdir/ECCE.app" tests/macos/run.sh "$appdir/ECCE.app/Contents/Resources" macos-app-run
406+
rc=0
407+
ECCE_APP="$appdir/ECCE.app" tests/macos/run.sh "$appdir/ECCE.app/Contents/Resources" macos-app-run || rc=$?
406408
cat macos-app-run/summary.txt >> "$GITHUB_STEP_SUMMARY"
409+
exit $rc
407410
408411
- name: Summary on failure
409412
if: failure()

‎tests/macos/run.sh‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/bin/bash
22
# First answer to "does ECCE run on macOS?" (#133), for CI: start the
33
# installed apps on the runner's logged-in desktop, take screenshots, and
4-
# collect logs and crash reports. Never fails the job; the verdict is in
5-
# the summary. Usage: run.sh <stage-dir> <out-dir>
4+
# collect logs and crash reports. The verdict is in the summary; exits 1
5+
# when an app was ended by a signal (rc >= 128).
6+
# Usage: run.sh <stage-dir> <out-dir>
67
# <stage-dir>/ecce is ECCE_HOME, <stage-dir>/bin holds the wrappers.
78
# With ECCE_APP=<ECCE.app> the session is started through the app's own
89
# launcher, with no Homebrew on PATH (give Contents/Resources as <stage-dir>).
@@ -14,6 +15,7 @@ HERE=$(cd "$(dirname "$0")" && pwd)
1415
SUMMARY=$OUT/summary.txt
1516
: > "$SUMMARY"
1617
say() { echo "$@" | tee -a "$SUMMARY"; }
18+
CRASHED=
1719

1820
export ECCE_HOME=$STAGE/ecce
1921
if [ -n "$ECCE_APP" ]; then
@@ -85,6 +87,7 @@ run_app() {
8587
screencapture -x "$OUT/shots/$name-1.png" 2>>"$OUT/logs/screencapture.log"
8688
fi
8789
say " $status"
90+
if [ -n "$rc" ] && [ "$rc" -ge 128 ]; then CRASHED="$CRASHED $name"; fi
8891
case "$rc" in 132|133|134|136|138|139) backtrace "${name%-hook}" ;; esac
8992
tail -n 6 "$OUT/logs/$name.log" | sed 's/^/ | /' | tee -a "$SUMMARY"
9093
sleep 3 # let ReportCrash write
@@ -176,4 +179,9 @@ fi
176179
cp -R "$ECCE_REALUSERHOME/.ECCE" "$OUT/dot-ECCE" 2>/dev/null
177180
find "$OUT/dot-ECCE" -name 'authcache*' -delete 2>/dev/null
178181
rm -f "$OUT/windows" "$BEFORE" "$OUT/.new"
182+
if [ -n "$CRASHED" ]; then
183+
say ""
184+
say "FAILED: ended by a signal:$CRASHED"
185+
exit 1
186+
fi
179187
exit 0

0 commit comments

Comments
 (0)