Skip to content

Commit 8685c94

Browse files
redsun82Copilot
andcommitted
Java: gate AGP-7.x Android integration tests off linux-arm64
These tests build an Android app via the Android Gradle Plugin, which downloads Google's prebuilt aapt2 from Maven. The pinned AGP 7.0.0 and 7.3.1 ship an x86_64-only aapt2 (no linux-aarch64 binary), so on arm64 the build fails at AAPT2 daemon startup and database creation aborts. This is a third-party tool gap, not a codeql artifact, and bumping AGP is out of scope as the expected output is coupled to the exact AGP and gradle versions. Mirror the java-version-too-old precedent: mark these tests @runs_on.x86_64 so they deselect on arm64 while staying green on x86_64. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 2f32a70 commit 8685c94

8 files changed

Lines changed: 40 additions & 0 deletions

File tree

  • java/ql/integration-tests/java
    • android-sample-kotlin-build-script-no-wrapper
    • android-sample-kotlin-build-script
    • android-sample-no-wrapper
    • android-sample-old-style-kotlin-build-script-no-wrapper
    • android-sample-old-style-kotlin-build-script
    • android-sample-old-style-no-wrapper
    • android-sample-old-style
    • android-sample
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
import runs_on
2+
3+
4+
# aapt2 for this Android Gradle Plugin version ships x86_64 binaries only, so the build fails on linux-arm64.
5+
@runs_on.x86_64
16
def test(codeql, use_java_17, java, android_sdk):
27
codeql.database.create()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
import runs_on
2+
3+
4+
# aapt2 for this Android Gradle Plugin version ships x86_64 binaries only, so the build fails on linux-arm64.
5+
@runs_on.x86_64
16
def test(codeql, use_java_11, java, gradle_7_4, android_sdk):
27
codeql.database.create()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
import runs_on
2+
3+
4+
# aapt2 for this Android Gradle Plugin version ships x86_64 binaries only, so the build fails on linux-arm64.
5+
@runs_on.x86_64
16
def test(codeql, use_java_17, java, android_sdk):
27
codeql.database.create()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
import runs_on
2+
3+
4+
# aapt2 for this Android Gradle Plugin version ships x86_64 binaries only, so the build fails on linux-arm64.
5+
@runs_on.x86_64
16
def test(codeql, use_java_17, java, android_sdk, actions_toolchains_file):
27
codeql.database.create(_env={"LGTM_INDEX_MAVEN_TOOLCHAINS_FILE": str(actions_toolchains_file)})
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
import runs_on
2+
3+
4+
# aapt2 for this Android Gradle Plugin version ships x86_64 binaries only, so the build fails on linux-arm64.
5+
@runs_on.x86_64
16
def test(codeql, use_java_11, java, gradle_7_4, android_sdk):
27
codeql.database.create()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
import runs_on
2+
3+
4+
# aapt2 for this Android Gradle Plugin version ships x86_64 binaries only, so the build fails on linux-arm64.
5+
@runs_on.x86_64
16
def test(codeql, use_java_17, java, android_sdk, actions_toolchains_file):
27
codeql.database.create(_env={"LGTM_INDEX_MAVEN_TOOLCHAINS_FILE": str(actions_toolchains_file)})
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
import runs_on
2+
3+
4+
# aapt2 for this Android Gradle Plugin version ships x86_64 binaries only, so the build fails on linux-arm64.
5+
@runs_on.x86_64
16
def test(codeql, use_java_11, java, gradle_7_4, android_sdk):
27
codeql.database.create()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
import runs_on
2+
3+
4+
# aapt2 for this Android Gradle Plugin version ships x86_64 binaries only, so the build fails on linux-arm64.
5+
@runs_on.x86_64
16
def test(codeql, use_java_11, java, gradle_7_4, android_sdk):
27
codeql.database.create()

0 commit comments

Comments
 (0)