From c9a8e1f49a3c5d0f27dd20ae1068c7ef8bec202e Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Mon, 23 Jun 2025 11:11:03 +0200 Subject: [PATCH] ci/android: get aapt from the build-tools from Google instead of Debian The aapt package form Debian might not be recent enough to install the packages from Android CTS. Resulting in an error like: ``` 03:12:09.302: Module(s) with run failure(s): 03:12:09.302: x86_64 CtsGraphicsTestCases: com.android.tradefed.targetprep.TargetSetupError[AAPT_PARSER_FAILED|520050|DEPENDENCY_ISSUE]: AaptParser failed for file CtsGraphicsTestCases.apk. The APK won't be installed ``` So get aapt from the build-tools matching the ANDROID_SDK_VERSION corresponding to the Android version and CTS version used in the tests, to ensure compatibility. This effectively reverts the changes from commit b3c07fe722d (ci/android: Use aapt from Debian packages, 2025-04-21), but moving the code around a bit. The build-tools are not taken as LAVA overlay because LAVA is not able to handle zip files, and the file in not big enough to be worth any repacking effort. Part-of: --- .gitlab-ci/android-cts-runner.sh | 2 +- .gitlab-ci/container/debian/x86_64_test-android.sh | 7 ++++++- .gitlab-ci/image-tags.yml | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/android-cts-runner.sh b/.gitlab-ci/android-cts-runner.sh index 51a62adc181..cad7f5b636c 100755 --- a/.gitlab-ci/android-cts-runner.sh +++ b/.gitlab-ci/android-cts-runner.sh @@ -6,7 +6,7 @@ ci_tag_test_time_check "ANDROID_CTS_TAG" -export PATH=/android-cts/jdk/bin/:$PATH +export PATH=/android-tools/build-tools:/android-cts/jdk/bin/:$PATH export JAVA_HOME=/android-cts/jdk # Wait for the appops service to show up diff --git a/.gitlab-ci/container/debian/x86_64_test-android.sh b/.gitlab-ci/container/debian/x86_64_test-android.sh index c45e3542085..909eb75a19b 100755 --- a/.gitlab-ci/container/debian/x86_64_test-android.sh +++ b/.gitlab-ci/container/debian/x86_64_test-android.sh @@ -30,7 +30,6 @@ EPHEMERAL=( ) DEPS=( - aapt iproute2 ) apt-get install -y --no-remove --no-install-recommends \ @@ -57,6 +56,12 @@ curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \ -o vulkaninfo "https://${S3_HOST}/${S3_ANDROID_BUCKET}/mesa/mesa/${DATA_STORAGE_PATH}/vulkaninfo-android-x86_64" chmod +x vulkaninfo +curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \ + -o "build-tools_r${ANDROID_SDK_VERSION}-linux.zip" "https://dl.google.com/android/repository/build-tools_r${ANDROID_SDK_VERSION}-linux.zip" +unzip "build-tools_r${ANDROID_SDK_VERSION}-linux.zip" +rm "build-tools_r${ANDROID_SDK_VERSION}-linux.zip" +mv "android-$ANDROID_VERSION" build-tools + popd section_end android-tools diff --git a/.gitlab-ci/image-tags.yml b/.gitlab-ci/image-tags.yml index 024780812e9..f4dce219aa6 100644 --- a/.gitlab-ci/image-tags.yml +++ b/.gitlab-ci/image-tags.yml @@ -23,7 +23,7 @@ variables: DEBIAN_BUILD_TAG: "20250611-rust" - DEBIAN_TEST_ANDROID_TAG: "20250620-sttag" + DEBIAN_TEST_ANDROID_TAG: "20250624-build-tools" DEBIAN_TEST_GL_TAG: "20250616-vkcts-main" DEBIAN_TEST_VIDEO_TAG: "20250609-helper" DEBIAN_TEST_VK_TAG: "20250619-vkd3d"