ci/android: add a job using android-cts instead of deqp-runner

We also want to run Android CTS in the Android jobs.

Since the Android CTS is quite large, download it and strip it down to
only contain the interesting tests, so to reduce the space taken in the
container image.

Eventually we might want to have android-cts be run via deqp-runner
itself, but for now add a proof-of-concept mechanism which calls the
android-cts directly and uses an ad-hoc handling of expectations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
This commit is contained in:
Antonio Ospite
2025-02-07 15:29:00 +01:00
committed by Marge Bot
parent a6a38667f9
commit bac77bb30d
7 changed files with 141 additions and 4 deletions

View File

@@ -138,6 +138,38 @@ rm -rf android-cuttlefish
addgroup --system kvm
usermod -a -G kvm,cvdnetwork root
############### Downloading Android CTS - Build tools - Platform tools ...
ANDROID_CTS_VERSION="${ANDROID_VERSION}_r1"
ANDROID_CTS_DEVICE_ARCH="x86"
mkdir /android-tools
pushd /android-tools
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip" \
"https://dl.google.com/dl/android/cts/android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip"
unzip "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip"
rm "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip"
# Keep only the interesting tests to save space
# shellcheck disable=SC2086 # we want word splitting
ANDROID_CTS_MODULES_KEEP_EXPRESSION=$(printf "%s|" $ANDROID_CTS_MODULES | sed -e 's/|$//g')
find android-cts/testcases/ -mindepth 1 -type d | grep -v -E "$ANDROID_CTS_MODULES_KEEP_EXPRESSION" | xargs rm -rf
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
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "platform-tools_r${ANDROID_SDK_VERSION}.0.0-linux.zip" "https://dl.google.com/android/repository/platform-tools_r${ANDROID_SDK_VERSION}.0.0-linux.zip"
unzip "platform-tools_r${ANDROID_SDK_VERSION}.0.0-linux.zip"
rm "platform-tools_r${ANDROID_SDK_VERSION}.0.0-linux.zip"
popd
############### Uninstall the build software
rm -rf "/${ndk:?}"

View File

@@ -193,8 +193,11 @@ debian/s390x_build:
extends:
- .container-builds-android
variables:
ANDROID_VERSION: 14
ANDROID_NDK_VERSION: "r27c"
ANDROID_SDK_VERSION: 34
# Space-separated list of interesting CTS modules
ANDROID_CTS_MODULES: CtsGraphicsTestCases
ANDROID_LLVM_VERSION: llvmorg-18.1.8
ANDROID_LLVM_ARTIFACT_NAME: android-x86_64-llvm-20250103
# This can be confusing: LLVM_VERSION refers to the host LLVM toolchain
@@ -419,6 +422,7 @@ debian/x86_64_test-android:
.use-debian/x86_64_test-android:
extends:
- .android-variables
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-x86_64_test-base