From ca4e6637d05bf184362ef4fd8d19c4f390495252 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 10 Sep 2019 16:43:25 +0100 Subject: [PATCH] panfrost/ci: Run dEQP with the surfaceless platform Instead of running it with the Wayland platform, which introduces unwanted dependencies and complexity. Makes tests run 30% faster, as well. Signed-off-by: Tomeu Vizoso --- .../drivers/panfrost/ci/create-rootfs.sh | 2 +- .../drivers/panfrost/ci/debian-install.sh | 35 ++++++++++++------- .../drivers/panfrost/ci/deqp-runner.sh | 10 ++---- src/gallium/drivers/panfrost/ci/gitlab-ci.yml | 21 ++++++++--- 4 files changed, 44 insertions(+), 24 deletions(-) diff --git a/src/gallium/drivers/panfrost/ci/create-rootfs.sh b/src/gallium/drivers/panfrost/ci/create-rootfs.sh index e01ccb34cb4..e84f2271f42 100644 --- a/src/gallium/drivers/panfrost/ci/create-rootfs.sh +++ b/src/gallium/drivers/panfrost/ci/create-rootfs.sh @@ -2,7 +2,7 @@ set -ex -apt-get -y install --no-install-recommends initramfs-tools libpng16-16 weston strace libsensors5 +apt-get -y install --no-install-recommends initramfs-tools libpng16-16 strace libsensors5 libexpat1 libdrm2 passwd root -d chsh -s /bin/sh ln -s /bin/sh /init diff --git a/src/gallium/drivers/panfrost/ci/debian-install.sh b/src/gallium/drivers/panfrost/ci/debian-install.sh index ec2aa6723a8..4205ae56e35 100644 --- a/src/gallium/drivers/panfrost/ci/debian-install.sh +++ b/src/gallium/drivers/panfrost/ci/debian-install.sh @@ -28,7 +28,6 @@ apt-get -y install --no-install-recommends \ python3-jinja2 \ bison \ flex \ - libwayland-dev \ gettext \ cmake \ bc \ @@ -49,6 +48,7 @@ apt-get -y install --no-install-recommends \ gdc-9 \ lld-8 \ nasm \ + libegl1-mesa-dev \ \ libdrm-dev:${DEBIAN_ARCH} \ libx11-dev:${DEBIAN_ARCH} \ @@ -70,31 +70,42 @@ apt-get -y install --no-install-recommends \ libxrandr-dev:${DEBIAN_ARCH} \ libxshmfence-dev:${DEBIAN_ARCH} \ libelf-dev:${DEBIAN_ARCH} \ - libwayland-dev:${DEBIAN_ARCH} \ - libwayland-egl-backend-dev:${DEBIAN_ARCH} \ zlib1g-dev:${DEBIAN_ARCH} \ libglvnd-core-dev:${DEBIAN_ARCH} \ - wayland-protocols:${DEBIAN_ARCH} \ + libgles2-mesa-dev:${DEBIAN_ARCH} \ + libegl1-mesa-dev:${DEBIAN_ARCH} \ libpng-dev:${DEBIAN_ARCH} - ############### Cross-build dEQP mkdir -p /artifacts/rootfs/deqp -wget https://github.com/KhronosGroup/VK-GL-CTS/archive/opengl-es-cts-3.2.5.0.zip -unzip -q opengl-es-cts-3.2.5.0.zip -d / -rm opengl-es-cts-3.2.5.0.zip +git config --global user.email "mesa@example.com" +git config --global user.name "Mesa CI" +# XXX: Use --depth 1 once we can drop the cherry-picks. +git clone \ + https://github.com/KhronosGroup/VK-GL-CTS.git \ + -b opengl-es-cts-3.2.5.1 \ + /VK-GL-CTS +cd /VK-GL-CTS +# Fix surfaceless build +git cherry-pick -x 22f41e5e321c6dcd8569c4dad91bce89f06b3670 +git cherry-pick -x 1daa8dff73161ea60ead965bd6c9f2a0a2165648 + +# surfaceless links against libkms and such despite not using it. +sed -i '/gbm/d' targets/surfaceless/surfaceless.cmake +sed -i '/libkms/d' targets/surfaceless/surfaceless.cmake +sed -i '/libgbm/d' targets/surfaceless/surfaceless.cmake -cd /VK-GL-CTS-opengl-es-cts-3.2.5.0 python3 external/fetch_sources.py cd /artifacts/rootfs/deqp -cmake -DDEQP_TARGET=wayland \ +cmake -G Ninja \ + -DDEQP_TARGET=surfaceless \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_COMPILER=${GCC_ARCH}-gcc \ -DCMAKE_CXX_COMPILER=${GCC_ARCH}-g++ \ - /VK-GL-CTS-opengl-es-cts-3.2.5.0 -make -j$(nproc) + /VK-GL-CTS +ninja rm -rf /artifacts/rootfs/deqp/external rm -rf /artifacts/rootfs/deqp/modules/gles31 rm -rf /artifacts/rootfs/deqp/modules/internal diff --git a/src/gallium/drivers/panfrost/ci/deqp-runner.sh b/src/gallium/drivers/panfrost/ci/deqp-runner.sh index bf37d75aeab..11faf235056 100644 --- a/src/gallium/drivers/panfrost/ci/deqp-runner.sh +++ b/src/gallium/drivers/panfrost/ci/deqp-runner.sh @@ -5,23 +5,18 @@ DEQP_OPTIONS="$DEQP_OPTIONS --deqp-visibility=hidden" DEQP_OPTIONS="$DEQP_OPTIONS --deqp-log-images=disable" DEQP_OPTIONS="$DEQP_OPTIONS --deqp-watchdog=enable" DEQP_OPTIONS="$DEQP_OPTIONS --deqp-crashhandler=enable" +DEQP_OPTIONS="$DEQP_OPTIONS --deqp-surface-type=pbuffer" -export XDG_RUNTIME_DIR=/tmp export LIBGL_DRIVERS_PATH=/mesa/lib/dri/ export LD_LIBRARY_PATH=/mesa/lib/ -export XDG_CONFIG_HOME=$(pwd) export MESA_GLES_VERSION_OVERRIDE=3.0 DEVFREQ_GOVERNOR=`echo /sys/devices/platform/*.gpu/devfreq/devfreq0/governor` echo performance > $DEVFREQ_GOVERNOR -echo "[core]\nidle-time=0\nrequire-input=false\n[shell]\nlocking=false" > weston.ini - cd /deqp/modules/gles2 # Generate test case list file -weston --tty=7 & -sleep 1 # Give some time for Weston to start up ./deqp-gles2 $DEQP_OPTIONS --deqp-runmode=stdout-caselist | grep "TEST: dEQP-GLES2" | cut -d ' ' -f 2 > /tmp/case-list.txt # Disable for now tests that are very slow, either by just using lots of CPU or by crashing @@ -102,7 +97,8 @@ for test in $FLIP_FLOPS; do sed -i "/$test/d" /tmp/case-list.txt; done --print-regression \ --no-print-fail \ --no-print-quality \ - --no-colour-term + --no-colour-term \ + $DEQP_OPTIONS if [ $? -ne 0 ]; then echo "Regressions detected" diff --git a/src/gallium/drivers/panfrost/ci/gitlab-ci.yml b/src/gallium/drivers/panfrost/ci/gitlab-ci.yml index 9be47935e77..a77b42f23b8 100644 --- a/src/gallium/drivers/panfrost/ci/gitlab-ci.yml +++ b/src/gallium/drivers/panfrost/ci/gitlab-ci.yml @@ -16,7 +16,7 @@ variables: UPSTREAM_REPO: mesa/mesa DEBIAN_VERSION: testing-slim - IMAGE_TAG: "2019-09-02-2" + IMAGE_TAG: "2019-09-10-1" include: - project: 'wayland/ci-templates' @@ -95,9 +95,22 @@ container:arm64: --cross-file /tmp/cross_file.txt --libdir /artifacts/rootfs/mesa/lib/ --buildtype release - -Dgallium-drivers=kmsro,panfrost - -Ddri-drivers= - -Dprefix=/artifacts/rootfs/mesa + -D gallium-drivers=kmsro,panfrost + -D dri-drivers= + -D prefix=/artifacts/rootfs/mesa + -D glx=disabled + -D gbm=false + -D egl=true + -D platforms=surfaceless + -D osmesa=none + -D dri3=false + -D gallium-vdpau=false + -D gallium-xvmc=false + -D gallium-omx=disabled + -D gallium-va=false + -D gallium-xa=false + -D gallium-nine=false + -D llvm=false - ninja -C mesa-build install - du -sh /artifacts/rootfs/mesa/* - rm -rf /artifacts/rootfs/mesa/include -- 2.30.2