Skip to content

Fix device fixture allocation and preserve per-case diagnostics - #140

Merged
andre487 merged 3 commits into
mainfrom
fix-device-test-evidence
Oct 27, 2026
Merged

andre487 merged 3 commits into
mainfrom
fix-device-test-evidence

Conversation

@andre487

@andre487 andre487 commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Device suites could fail before instrumentation when a TCP-selected port was already occupied by UDP. Allocate a port available for both protocols, with bounded retries only for allocation collisions before fixture startup.

Wait for the previous app process and activities, then use a unique Logcat marker's precise device timestamp as the next case's cursor. Avoid unreliable logcat -c on API 26. Decode Logcat with UTF-8 replacement so malformed device log bytes cannot abort evidence collection, cleanup or JUnit reporting; retain strict decoding for fixture credentials/configuration and other commands.

Collect a bounded sanitized diagnostic tail after VPN cleanup on both successful and failed cases. Capture setup/body/cleanup failure evidence without hiding the original error or skipping subsequent cleanup.

Validation: Python checks (91 tests); Android JVM (367 tests), lint, debug and unsigned-release checks; instrumentation APK build. Local API 26/35 smoke passed VPN consent denial and real TUN/JNI traffic/stop/restart with a private HTTPS fixture. Regressions cover each lifecycle failure phase, multiple errors, skips, port collisions, precise log cursors, and real subprocess output containing invalid UTF-8 while preserving both successful and failed JUnit verdicts. Full API 26/35 integration runs in CI.

@andre487
andre487 merged commit aa07ce6 into main Oct 27, 2026
14 checks passed
@andre487
andre487 deleted the fix-device-test-evidence branch October 27, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant