Skip to content

Gate remaining Android integration tests off linux-arm64 - #22334

Merged
redsun82 merged 2 commits into
mainfrom
redsun82-android-8-sample-arm-gating
Aug 13, 2026
Merged

Gate remaining Android integration tests off linux-arm64#22334
redsun82 merged 2 commits into
mainfrom
redsun82-android-8-sample-arm-gating

Conversation

@redsun82

Copy link
Copy Markdown
Contributor

Finishes the native Linux Arm64 gating begun in #22327 for the last two Android-driving Java integration tests. Those tests build with the Android Gradle Plugin, which invokes aapt2, and Google only publishes aapt2 for linux/osx/windows (x86-64) plus macOS arm64 — there is no linux-aarch64 build at any version. So on linux-arm64 the build fails when an x86-64 aapt2 is exec'd on aarch64. macOS arm64 and x86_64 stay green.

With this change, all 10 Android sample/diagnostic integration tests are deselected on linux-arm64 (8 already merged via #22327 plus these 2), which is what semmle-code #56095 needs to green the Java arm64 leg.

Changes

Both files gain import runs_on and the @(runs_on.x86_64 or runs_on.macos) decorator, byte-identical to the 8 merged siblings.

  • android-8-sample/test.py — AGP 8.0.0 hits the same x86-64-only aapt2 gap; deselect linux-arm64 while keeping macOS arm64. Signature and body are unchanged.
  • diagnostics/android-gradle-incompatibility/test.py — this test asserts a build failure for AGP/Gradle version incompatibility. On linux-arm64 the build also fails for the unrelated aapt2 arch gap, so the test would pass for the wrong reason and mask a real regression in the incompatibility diagnostic. Gating restricts the assertion to platforms where the failure cause is unambiguous. _assert_failure=True is preserved, and the comment is deliberately distinct from the aapt2 wording to keep the two reasons separate.

Notes for reviewers

The two files intentionally carry different comments because they are gated for different reasons (arch-only aapt2 gap vs. avoiding a false pass). No .expected changes are needed — gating only deselects on arm; x86_64 behavior is unchanged. python3 -m py_compile passes on both files.

Completes the arm64 gating begun in #22327 for the last two Android-driving
java integration tests, so all 10 (the 8 already merged + these) are
deselected on linux-arm64 while mac-arm64 and x86_64 stay green.

android-8-sample: AGP 8.0.0 ships no linux-aarch64 aapt2 (Google's Maven
publishes only linux/osx/windows classifiers), so the build fails on
linux-arm64 with an x86-64 aapt2 exec'd on aarch64.

android-gradle-incompatibility: gated to avoid conflating that same
x86_64-only aapt2 build failure on linux-arm64 with the AGP/Gradle-version
incompatibility failure this test asserts (otherwise the test would pass
for the wrong reason).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 13, 2026 11:37
@redsun82
redsun82 requested a review from a team as a code owner August 13, 2026 11:37
@github-actions github-actions Bot added the Java label Aug 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Gates the final two Android Java integration tests from Linux ARM64, where unavailable aapt2 binaries cause invalid failures.

Changes:

  • Adds platform decorators while retaining x86-64 and macOS coverage.
  • Prevents the diagnostic test from passing for the wrong failure reason.
Show a summary per file
File Description
java/ql/integration-tests/java/android-8-sample/test.py Gates AGP 8 testing off Linux ARM64.
java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/test.py Avoids false-positive diagnostic results on Linux ARM64.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

Comment thread java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/test.py Outdated
It no longer reads as a cross-reference to the android-8-sample comment.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f6519783-e7e9-4ddb-850f-e7b5b9f417f8
@redsun82
redsun82 merged commit 2b9eef5 into main Aug 13, 2026
16 checks passed
@redsun82
redsun82 deleted the redsun82-android-8-sample-arm-gating branch August 13, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants