Repository navigation
[tests] Improve apkdiff invocation reliability - #12361
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Improves reliability and diagnosability of the apkdiff-based size regression checks by making tool installation deterministic in CI and by running apkdiff through the shared ProcessUtils helper with verbose output and better timeout logging.
Changes:
- Reworked CI
.NET toolinstallation to uninstall stale copies, reinstall into$(Agent.ToolsDirectory), and prepend that directory toPATH. - Updated
RunApkDiffCommandto executeapkdiffviaXamarin.Android.Tools.ProcessUtils.StartProcess, enabling--verboseand preserving partial output on timeout.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/BaseTest.cs | Switch apkdiff execution to ProcessUtils with verbose output + timeout diagnostics. |
| build-tools/automation/yaml-templates/install-dotnet-tool.yaml | Deterministic install/uninstall into $(Agent.ToolsDirectory) and prepend tool path to PATH. |
Install the pinned tool cleanly into the agent tool directory, publish it through PATH, and fail fast when installation fails. Use the shared Android ProcessUtils helper so apkdiff timeouts preserve verbose output and report the process ID while retaining no-window process behavior. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 588c6fbb-38c3-42b6-9903-3725ae589b4a
jonathanpeppers
force-pushed
the
jonathanpeppers-diagnose-apkdiff-hang
branch
from
August 12, 2026 14:33
9389c34 to
5c432e7
Compare
Member
Author
|
@dalexsoto review |
dalexsoto
approved these changes
Aug 12, 2026
dalexsoto
left a comment
Member
There was a problem hiding this comment.
Tool installation and process invocation are deterministic and cancellation-safe, with the Windows coverage green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
$(Agent.ToolsDirectory), expose that directory throughPATH, and fail fast if installation failsXamarin.Android.Tools.ProcessUtilshelperThe intermittent Windows failure could not be reproduced directly: apkdiff 0.0.17 started but produced no output or
.apkdescbefore the existing 30-second timeout. This change removes stale/PATH installation ambiguity and makes a future timeout identify apkdiff's last completed operation.Validation
Xamarin.Android.Build.Testsproject build