ci/android: restart all services after copying the new mesa libraries

After copying the newly built mesa libraries to the Android vendor
partition the services have to be restarted to make sure that the new
libraries are used, in particular by Surfaceflinger, so call 'stop'
and 'start' for that.

Also print the GLES implementation used by Surfaceflinger before and
after restarting, to be able to compare and check that the new libraries
are effectively picked up.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
This commit is contained in:
Antonio Ospite
2024-08-22 13:50:41 +02:00
committed by Marge Bot
parent 5bd669e076
commit c4fd424a2b

View File

@@ -91,6 +91,22 @@ $ADB shell rm /vendor/lib64/egl/libGLESv1_CM_emulation.so
$ADB shell rm /vendor/lib64/egl/libGLESv2_angle.so
$ADB shell rm /vendor/lib64/egl/libGLESv2_emulation.so
# Check what GLES implementation Surfaceflinger is using before copying the new mesa libraries
while [ "$($ADB shell dumpsys SurfaceFlinger | grep GLES:)" = "" ] ; do sleep 1; done
$ADB shell dumpsys SurfaceFlinger | grep GLES
# restart Android shell, so that surfaceflinger uses the new libraries
$ADB shell stop
$ADB shell start
# Check what GLES implementation Surfaceflinger is using after copying the new mesa libraries
while [ "$($ADB shell dumpsys SurfaceFlinger | grep GLES:)" = "" ] ; do sleep 1; done
MESA_RUNTIME_VERSION="$($ADB shell dumpsys SurfaceFlinger | grep GLES:)"
MESA_BUILD_VERSION=$(cat install/VERSION)
if ! printf "%s" "$MESA_RUNTIME_VERSION" | grep "${MESA_BUILD_VERSION}$"; then
echo "Fatal: Android is loading a wrong version of the Mesa3D libs: ${MESA_RUNTIME_VERSION}" 1>&2
exit 1
fi
AOSP_RESULTS=/data/results
uncollapsed_section_switch cuttlefish_test "cuttlefish: testing"