Skip to content

Commit 438afa4

Browse files
abueideclaude
andauthored
fix(rn): scope simulator log capture to app process only (#59)
The verify-app-running step was capturing all simulator logs then scanning for crash patterns. This caused false failures when other system apps (e.g. Apple News) crashed on the simulator. Filter log capture with --predicate "process == ..." using IOS_APP_SCHEME. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a0f0292 commit 438afa4

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

examples/react-native/tests/test-suite-all-e2e.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,9 +581,10 @@ processes:
581581
exit 1
582582
fi
583583
584-
# Capture simulator logs for analysis
584+
# Capture simulator logs for analysis (scoped to our app process)
585585
if [ -n "$UDID" ]; then
586-
xcrun simctl spawn "$UDID" log show --last 2m --style compact > "$_logs_dir/simulator-app.log" 2>&1 || true
586+
APP_PROCESS="${IOS_APP_SCHEME:-ReactNativeExample}"
587+
xcrun simctl spawn "$UDID" log show --last 2m --predicate "process == \"$APP_PROCESS\"" --style compact > "$_logs_dir/simulator-app.log" 2>&1 || true
587588
588589
# Scan for native crash patterns
589590
error_patterns="Terminating app|SIGABRT|EXC_BAD_ACCESS|EXC_CRASH|Assertion failure"

examples/react-native/tests/test-suite-ios-e2e.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,10 @@ processes:
313313
exit 1
314314
fi
315315
316-
# Capture simulator logs for analysis
316+
# Capture simulator logs for analysis (scoped to our app process)
317317
if [ -n "$UDID" ]; then
318-
xcrun simctl spawn "$UDID" log show --last 2m --style compact > "$_logs_dir/simulator-app.log" 2>&1 || true
318+
APP_PROCESS="${IOS_APP_SCHEME:-ReactNativeExample}"
319+
xcrun simctl spawn "$UDID" log show --last 2m --predicate "process == \"$APP_PROCESS\"" --style compact > "$_logs_dir/simulator-app.log" 2>&1 || true
319320
320321
# Scan for native crash patterns
321322
error_patterns="Terminating app|SIGABRT|EXC_BAD_ACCESS|EXC_CRASH|Assertion failure"

0 commit comments

Comments
 (0)