Files
buildroot/support/testing/tests/package/test_python_pyqt5.py
T
Bernd Kuhls 317260f336 package/{mesa3d, mesa3d-headers}: bump version to 25.0.6
Release notes:
https://lists.freedesktop.org/archives/mesa-announce/2024-May/000762.html
https://lists.freedesktop.org/archives/mesa-announce/2024-June/000763.html
https://lists.freedesktop.org/archives/mesa-announce/2024-June/000765.html
https://lists.freedesktop.org/archives/mesa-announce/2024-July/000766.html
https://lists.freedesktop.org/archives/mesa-announce/2024-July/000767.html
https://lists.freedesktop.org/archives/mesa-announce/2024-July/000771.html
https://lists.freedesktop.org/archives/mesa-announce/2024-August/000773.html
https://lists.freedesktop.org/archives/mesa-announce/2024-August/000776.html
https://lists.freedesktop.org/archives/mesa-announce/2024-September/000778.html
https://lists.freedesktop.org/archives/mesa-announce/2024-September/000779.html
https://lists.freedesktop.org/archives/mesa-announce/2024-October/000780.html
https://lists.freedesktop.org/archives/mesa-announce/2024-October/000781.html
https://lists.freedesktop.org/archives/mesa-announce/2024-October/000782.html
https://lists.freedesktop.org/archives/mesa-announce/2024-November/000784.html
https://lists.freedesktop.org/archives/mesa-announce/2024-November/000786.html
https://lists.freedesktop.org/archives/mesa-announce/2024-December/000788.html
https://docs.mesa3d.org/relnotes/24.3.2.html
https://docs.mesa3d.org/relnotes/24.3.3.html
https://docs.mesa3d.org/relnotes/24.3.4.html
https://lists.freedesktop.org/archives/mesa-announce/2025-February/000793.html
https://lists.freedesktop.org/archives/mesa-announce/2025-March/000794.html
https://lists.freedesktop.org/archives/mesa-announce/2025-March/000795.html
https://lists.freedesktop.org/archives/mesa-announce/2025-April/000796.html
https://lists.freedesktop.org/archives/mesa-announce/2025-April/000798.html
https://lists.freedesktop.org/archives/mesa-announce/2025-April/000801.html
https://lists.freedesktop.org/archives/mesa-announce/2025-May/000803.html
------------------------------------------------------------------------
Changes needed for the bump to 24.1.x:

Added dependency to llvm & Co. for iris driver due to upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/meson.build?h=24.1&id=a512c2a8b572c5da360873320dbbd343c6223cd6

Added host version of mesa tool intel_clc needed for target build of the
iris driver.

Added dependency to host-python-pycparser for etnaviv driver due to
upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/src/etnaviv/hwdb/meson.build?h=24.1&id=2192e620bb0c68b75ff45165d0b117c7ecb77268

Added dependency to host-python-ply for intel vulkan driver due to
upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/src/intel/vulkan/grl/meson.build?h=24.1&id=dc1aedef2bd054884685ad971a3ef5be07ecd101

Although this dependency exists since mesa3d 22.3 it is only needed when
intel-clc is enabled, this dependency is added with this patch so no need
to backport this dependency to older buildroot trees.

Update configure parameter of glvnd option due to upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/meson.build?h=24.1&id=4f25b84b2460524d375424a81b42faa4d99c8e60
------------------------------------------------------------------------
Changes needed for the bump to 24.2.x:

Added dependency to host-python-pyyaml to host and target build, needed
due to upstream commit
https://gitlab.freedesktop.org/mesa/mesa/-/commit/a3813327575e8875c8c3ed24b5f45a0b7ba64446

Rebased patch 0002 due to upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/src/gallium/drivers/vc4/meson.build?h=24.2&id=da70827656757cd070faac7aff5ca057f1e7fb8a

Renamed BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST to
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE (also updated tests) and
added new option BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LLVMPIPE due to
upstream commit
https://gitlab.freedesktop.org/mesa/mesa/-/commit/010b2f9497ab256d9e8041207902948331af5b4b
"gallium/meson: Deconflate swrast/softpipe/llvmpipe"

Also, the test_glxinfo.py now needs GBM to work. Since GBM depends
on EGL (which also selects GBM), this commit adds
BR2_PACKAGE_MESA3D_OPENGL_EGL=y to this glxinfo runtime test config.

Without this, glxinfo fails with an error such as:

    Error: couldn't find RGB GLX visual or fbconfig

This is related to upstream cleanups such as:
https://gitlab.freedesktop.org/mesa/mesa/-/commit/93511c1c5c5fb60166c806d417e4b4378bf1fb31

Thanks to El Mehdi YOUNES <elmehdi.younes@smile.fr> for pointing
that out.
------------------------------------------------------------------------
Changes needed for the bump to 24.3.x:

Rebased patch 0002 again due to upstream commit:
https://gitlab.freedesktop.org/mesa/mesa/-/commit/25ba90fd888cef431c2098c8afdb0a2bbd34b303

Removed dri3 configure option:
https://gitlab.freedesktop.org/mesa/mesa/-/commit/8f6fca89aa1812b03da6d9f7fac3966955abc41e

Removed gallium-omx configure option:
https://gitlab.freedesktop.org/mesa/mesa/-/commit/9b6c27a320ab4b0fcf1fb16220ae7c3d3f06f7df

Removed gallium kmsro configure option:
https://gitlab.freedesktop.org/mesa/mesa/-/commit/89863a050bea429d9574a307bc28953bb60accaf
https://gitlab.freedesktop.org/mesa/mesa/-/commit/70813c1c13b99cb029c8fa3537163650bdd17b6d
No legacy option needed due to automatic handling by the mesa build
system: "Automatically include it if we're building with a driver that
depends on it, and don't include it if we're not."
------------------------------------------------------------------------
Changes needed for the bump to 25.0.x:

Rebased patch 0001, added license files and updated license hash
due to upstream commits which restructured the license files:
https://gitlab.freedesktop.org/mesa/mesa/-/commit/69849bc4d1dd3cb9e9dd5d83b2ff63b8b4edce9b#e672208340b30f973cdab11421f1c91b39d5c02e
https://gitlab.freedesktop.org/mesa/mesa/-/commit/c22d640fe94f6390068f79475fb6b2c45bb2557b

Removed configure option opencl-spirv due to upstream commit:
https://gitlab.freedesktop.org/mesa/mesa/-/commit/80c4ffb61a91ed252d45e38a96e893cec0771940

Updated configure options for host-build clc which was also renamed from
intel_clc to mesa_clc, added host version of vtn_bindgen:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32719
https://gitlab.freedesktop.org/mesa/mesa/-/commit/13fe5a597bb8ededaa7c1c83f3b64c4e90315618
https://gitlab.freedesktop.org/mesa/mesa/-/commit/5ddeea9a62f720e9fd3a6e5c76f74ef6e8b1fdf8

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
[Julien: add BR2_PACKAGE_MESA3D_OPENGL_EGL=y to test_glxinfo config to
  fix the runtime test]
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-05-17 12:39:37 +02:00

80 lines
3.3 KiB
Python

import os
import infra.basetest
class TestPythonPyQt5(infra.basetest.BRTest):
# We use a specific configuration for:
# - using Aarch64, to have more than 256MB memory,
# - using a kernel config fragment, to enable VKMS,
# - to have an ext4 rootfs image exposed as a virtio storage
# (rather than cpio initrd). This will save some memory, as the
# rootfs image is big.
kernel_fragment = \
infra.filepath("tests/package/test_python_pyqt5/linux-vkms.fragment")
rootfs_overlay = \
infra.filepath("tests/package/test_python_pyqt5/rootfs-overlay")
config = \
f"""
BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.81"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{kernel_fragment}"
BR2_PACKAGE_DEJAVU=y
BR2_PACKAGE_LIBDRM=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE=y
BR2_PACKAGE_MESA3D_LLVM=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON_PYQT5=y
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5BASE_EGLFS=y
BR2_PACKAGE_QT5BASE_FONTCONFIG=y
BR2_PACKAGE_QT5BASE_WIDGETS=y
BR2_ROOTFS_OVERLAY="{rootfs_overlay}"
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="256M"
# BR2_TARGET_ROOTFS_TAR is not set
"""
def test_run(self):
drive = os.path.join(self.builddir, "images", "rootfs.ext4")
kern = os.path.join(self.builddir, "images", "Image")
self.emulator.boot(arch="aarch64",
kernel=kern,
kernel_cmdline=["root=/dev/vda console=ttyAMA0"],
options=["-M", "virt", "-cpu", "cortex-a57", "-m", "512M",
"-drive", f"file={drive},if=virtio,format=raw"])
self.emulator.login()
# We run the test application with a customized message.
# NOTE: to manually debug this test, a Qemu emulator with
# virtio-gpu can be used by starting it the command line from
# the run log generated by this test, and by adding the
# arguments "-device virtio-gpu -display gtk". With this, the
# test application will be observable on the Qemu window. Once
# logged, we can use the "card1" DRM/KMS device (virtio-gpu,
# instead of card0, which is vkms on "card0") by using the
# command:
# echo '{"device":"/dev/dri/card1"}' > cfg.json
# export QT_QPA_EGLFS_KMS_CONFIG="$PWD/cfg.json"
# The Qt debug can also be enabled with the command:
# export QT_LOGGING_RULES=*=true
# Then, run the /root/pyqt5test.py application.
msg = "Hello Buildroot."
cmd = f'/root/pyqt5test.py "{msg}"'
self.assertRunOk(cmd, timeout=30)
# We check the test message is present in the file created by
# the previous application execution.
cmd = f'grep -F "{msg}" /root/message.txt'
self.assertRunOk(cmd)