ci/android: Switch to using eglinfo to check GLES implementation

In newer Android versions, SurfaceFlinger uses Vulkan by default,
so `dumpsys SurfaceFlinger` no longer reveals the GLES implementation.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35232>
This commit is contained in:
Valentine Burley 2025-05-28 09:50:21 +02:00 committed by Marge Bot
parent 9e4e8542d4
commit 3029fdde65
2 changed files with 18 additions and 3 deletions

View file

@ -76,9 +76,11 @@ $ADB push /angle/libEGL_angle.so "$ANGLE_DEST_PATH/libEGL_angle.so"
$ADB push /angle/libGLESv1_CM_angle.so "$ANGLE_DEST_PATH/libGLESv1_CM_angle.so"
$ADB push /angle/libGLESv2_angle.so "$ANGLE_DEST_PATH/libGLESv2_angle.so"
$ADB push /android-tools/eglinfo /data
get_gles_runtime_version() {
while [ "$($ADB shell dumpsys SurfaceFlinger | grep GLES:)" = "" ] ; do sleep 1; done
$ADB shell dumpsys SurfaceFlinger | grep GLES
while [ "$($ADB shell /data/eglinfo | grep 'OpenGL ES profile version':)" = "" ] ; do sleep 1; done
$ADB shell /data/eglinfo | grep 'OpenGL ES profile version'
}
# Check what GLES implementation is used before loading the new libraries
@ -101,7 +103,7 @@ if [ -n "$ANGLE_TAG" ]; then
fi
else
MESA_BUILD_VERSION=$(cat "$INSTALL/VERSION")
if ! printf "%s" "$GLES_RUNTIME_VERSION" | grep --quiet "${MESA_BUILD_VERSION}$"; then
if ! printf "%s" "$GLES_RUNTIME_VERSION" | grep -Fq -- "${MESA_BUILD_VERSION}"; then
echo "Fatal: Android is loading a wrong version of the Mesa3D GLES libs: ${GLES_RUNTIME_VERSION}" 1>&2
exit 1
fi

View file

@ -42,6 +42,19 @@ apt-get install -y --no-remove --no-install-recommends \
section_end debian_setup
############### Downloading Android tools
section_start android-tools "Downloading Android tools"
mkdir /android-tools
pushd /android-tools
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o eglinfo "https://${S3_HOST}/${S3_ANDROID_BUCKET}/mesa/mesa/${DATA_STORAGE_PATH}/eglinfo-android-x86_64"
chmod +x eglinfo
popd
############### Downloading NDK for native builds for the guest ...
section_start android-ndk "Downloading Android NDK"