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"