From c4fd424a2bf11ba3edea4d4436239a6f1e3a0bbc Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Thu, 22 Aug 2024 13:50:41 +0200 Subject: [PATCH] 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 Part-of: --- .gitlab-ci/cuttlefish-runner.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.gitlab-ci/cuttlefish-runner.sh b/.gitlab-ci/cuttlefish-runner.sh index 40376b81b87..f22909c9478 100755 --- a/.gitlab-ci/cuttlefish-runner.sh +++ b/.gitlab-ci/cuttlefish-runner.sh @@ -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"