From adf7991dbfd5a4baa1eb8d2bdeefd57b134f1b33 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 8 Dec 2025 20:45:26 -0700 Subject: [PATCH] Use xwayland for tests --- vtk.spec | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/vtk.spec b/vtk.spec index 17b813e..1c1aaba 100644 --- a/vtk.spec +++ b/vtk.spec @@ -38,14 +38,23 @@ %endif # s390x on EL8 does not have xorg-x11-drv-dummy %if 0%{?rhel} +%if 0%{?rhel} >= 10 +%bcond_without xwayland +%else %ifarch s390x %bcond_with xdummy %else %bcond_without xdummy %endif +%endif +%else +%if 0%{?fedora} >= 44 +%bcond_without xwayland %else %bcond_without xdummy %endif +%endif +%bcond_without xwayland %if 0%{?fedora} || 0%{?rhel} >= 9 %bcond_without flexiblas @@ -185,6 +194,9 @@ BuildRequires: netcdf-openmpi-devel BuildRequires: xorg-x11-drv-dummy BuildRequires: mesa-dri-drivers %endif +%if %{with xwayland} +BuildRequires: xwayland-run +%endif Requires: hdf5 = %{_hdf5_version} # Almost every BR needs to be required by the -devel packages @@ -839,6 +851,7 @@ export QA_RPATHS=18 %ifnarch s390x %check cp %SOURCE2 . +export FLEXIBLAS=netlib %if %{with xdummy} if [ -x /usr/libexec/Xorg ]; then Xorg=/usr/libexec/Xorg @@ -848,8 +861,13 @@ fi $Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xorg.log -config ./xorg.conf -configdir . :99 & export DISPLAY=:99 %endif -export FLEXIBLAS=netlib -%ctest --verbose || : +# %%ctest starts with a newline so we need the backslash +# xwayland-run needs XDG_RUNTIME_DIR set +if [ -z "$XDG_RUNTIME_DIR" ]; then + export XDG_RUNTIME_DIR=${PWD}/tmp + mkdir -m 0700 $XDG_RUNTIME_DIR +fi +%{?with_xwayland:wlheadless-run -- xwayland-run -- \ } %ctest --verbose %if %{with xdummy} kill %1 || : cat xorg.log