Android: add Module lifecycle and API coverage tests#19125
Android: add Module lifecycle and API coverage tests#19125psiddh wants to merge 2 commits intopytorch:mainfrom
Conversation
Add 13 new tests covering previously untested Module public APIs: - Load modes: MMAP, FILE - getMethods(): verify returns array containing "forward" - getMethodMetadata(): verify name and backends - readLogBuffer() / readLogBufferStatic(): verify non-null - etdump(): verify callable - Destroyed-state throws for getMethods, getMethodMetadata, readLogBuffer, etdump - Double destroy is safe (idempotent) This commit was authored with the help of Claude.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19125
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ You can merge normally! (2 Unrelated Failures)As of commit 7a8f8e0 with merge base b8f04aa ( BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
There was a problem hiding this comment.
Pull request overview
Adds Android instrumentation tests to increase coverage of the org.pytorch.executorch.Module public API and lifecycle behavior, ensuring key methods work across load modes and correctly fail after destruction.
Changes:
- Add tests for
Module.load()withLOAD_MODE_MMAPandLOAD_MODE_FILE. - Add tests for
getMethods(),getMethodMetadata(),readLogBuffer()/readLogBufferStatic(), andetdump(). - Add destroyed-state and idempotent-destroy tests for the above APIs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add 13 new tests covering previously untested Module public APIs:
This commit was authored with the help of Claude.