xwayland: Add and hook up test script
It runs XTS via piglit on (non-rootless) Xwayland on weston using the headless backend. Xwayland might use glamor if enabled in the build, but we're making sure it uses software rendering. v2: * Use weston-info to wait for weston to be ready, instead of just a fixed sleep. (Martin Peres) v3: * Build wayland 1.18 & weston 9.0 locally, since the packages in Debian buster are too old for current Xwayland. Acked-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
parent
821399a9c9
commit
250db8708a
|
@ -6,6 +6,11 @@ set -o xtrace
|
|||
# Packages which are needed by this script, but not for the xserver build
|
||||
EPHEMERAL="
|
||||
git
|
||||
libcairo2-dev
|
||||
libevdev-dev
|
||||
libexpat-dev
|
||||
libgles2-mesa-dev
|
||||
libinput-dev
|
||||
libxkbcommon-dev
|
||||
x11-utils
|
||||
x11-xserver-utils
|
||||
|
@ -24,15 +29,21 @@ apt-get install -y \
|
|||
flex \
|
||||
libaudit-dev \
|
||||
libbsd-dev \
|
||||
libcairo2 \
|
||||
libdbus-1-dev \
|
||||
libdmx-dev \
|
||||
libdrm-dev \
|
||||
libegl1-mesa-dev \
|
||||
libepoxy-dev \
|
||||
libevdev2 \
|
||||
libexpat1 \
|
||||
libffi-dev \
|
||||
libgbm-dev \
|
||||
libgcrypt-dev \
|
||||
libgl1-mesa-dev \
|
||||
libgles2 \
|
||||
libglx-mesa0 \
|
||||
libinput10 \
|
||||
libnvidia-egl-wayland-dev \
|
||||
libpciaccess-dev \
|
||||
libpixman-1-dev \
|
||||
|
@ -41,7 +52,6 @@ apt-get install -y \
|
|||
libtool \
|
||||
libudev-dev \
|
||||
libunwind-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libx11-xcb-dev \
|
||||
libxau-dev \
|
||||
|
@ -66,6 +76,7 @@ apt-get install -y \
|
|||
libxfont-dev \
|
||||
libxi-dev \
|
||||
libxinerama-dev \
|
||||
libxkbcommon0 \
|
||||
libxkbfile-dev \
|
||||
libxmu-dev \
|
||||
libxmuu-dev \
|
||||
|
@ -92,6 +103,14 @@ apt-get install -y \
|
|||
|
||||
cd /root
|
||||
|
||||
# weston 9.0 requires libwayland >= 1.18
|
||||
git clone https://gitlab.freedesktop.org/wayland/wayland.git --depth 1 --branch=1.18.0
|
||||
cd wayland
|
||||
meson _build -D{documentation,dtd_validation}=false
|
||||
ninja -C _build -j${FDO_CI_CONCURRENT:-4} install
|
||||
cd ..
|
||||
rm -rf wayland
|
||||
|
||||
# Xwayland requires wayland-protocols >= 1.18, but Debian buster has 1.17 only
|
||||
git clone https://gitlab.freedesktop.org/wayland/wayland-protocols.git --depth 1 --branch=1.18
|
||||
cd wayland-protocols
|
||||
|
@ -100,6 +119,18 @@ make -j${FDO_CI_CONCURRENT:-4} install
|
|||
cd ..
|
||||
rm -rf wayland-protocols
|
||||
|
||||
# Xwayland requires weston > 5.0, but Debian buster has 5.0 only
|
||||
git clone https://gitlab.freedesktop.org/wayland/weston.git --depth 1 --branch=9.0
|
||||
cd weston
|
||||
meson _build -Dbackend-{drm,drm-screencast-vaapi,fbdev,rdp,wayland,x11}=false \
|
||||
-Dbackend-default=headless -Dcolor-management-{colord,lcms}=false \
|
||||
-Ddemo-clients=false -Dimage-{jpeg,webp}=false \
|
||||
-D{pipewire,remoting,screenshare,test-junit-xml,wcap-decode,weston-launch,xwayland}=false \
|
||||
-Dshell-{fullscreen,ivi,kiosk}=false -Dsimple-clients=
|
||||
ninja -C _build -j${FDO_CI_CONCURRENT:-4} install
|
||||
cd ..
|
||||
rm -rf weston
|
||||
|
||||
git clone https://gitlab.freedesktop.org/mesa/piglit.git --depth 1
|
||||
|
||||
git clone https://gitlab.freedesktop.org/xorg/test/xts --depth 1
|
||||
|
|
|
@ -112,7 +112,7 @@ if build_glx
|
|||
wayland_inc += glx_inc
|
||||
endif
|
||||
|
||||
executable(
|
||||
xwayland_server = executable(
|
||||
'Xwayland',
|
||||
srcs,
|
||||
include_directories: wayland_inc,
|
||||
|
|
|
@ -25,9 +25,14 @@ endif
|
|||
endif
|
||||
endif
|
||||
|
||||
if XWAYLAND
|
||||
XWAYLAND_TESTS = scripts/xwayland-piglit.sh
|
||||
endif
|
||||
|
||||
SCRIPT_TESTS = \
|
||||
$(XVFB_TESTS) \
|
||||
$(XEPHYR_GLAMOR_TESTS) \
|
||||
$(XWAYLAND_TESTS) \
|
||||
$(NULL)
|
||||
|
||||
TESTS = tests \
|
||||
|
@ -188,6 +193,7 @@ EXTRA_DIST = \
|
|||
scripts/xvfb-piglit.sh \
|
||||
scripts/xephyr-glamor-piglit.sh \
|
||||
scripts/xinit-piglit-session.sh \
|
||||
scripts/xwayland-piglit.sh \
|
||||
scripts/run-piglit.sh \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -100,6 +100,19 @@ if get_option('xvfb')
|
|||
endif
|
||||
endif
|
||||
|
||||
if build_xwayland
|
||||
xwayland_args = [
|
||||
xwayland_server.full_path(),
|
||||
]
|
||||
|
||||
test('XTS',
|
||||
find_program('scripts/xwayland-piglit.sh'),
|
||||
env: piglit_env,
|
||||
timeout: 1200,
|
||||
suite: 'xwayland'
|
||||
)
|
||||
endif
|
||||
|
||||
subdir('bigreq')
|
||||
subdir('damage')
|
||||
subdir('sync')
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# this times out on Travis, because the tests take too long.
|
||||
if test "x$TRAVIS_BUILD_DIR" != "x"; then
|
||||
exit 77
|
||||
fi
|
||||
|
||||
# Weston requires XDG_RUNTIME_DIR
|
||||
if test "x$XDG_RUNTIME_DIR" = "x"; then
|
||||
export XDG_RUNTIME_DIR=$(mktemp -d)
|
||||
fi
|
||||
|
||||
# Skip if weston isn't available
|
||||
weston --version >/dev/null || exit 77
|
||||
|
||||
weston --no-config --backend=headless-backend.so --socket=wayland-$$ &
|
||||
WESTON_PID=$!
|
||||
export WAYLAND_DISPLAY=wayland-$$
|
||||
|
||||
# Wait for weston to initialize before starting Xwayland
|
||||
timeout --preserve-status 60s bash -c 'while ! weston-info &>/dev/null; do sleep 1; done'
|
||||
|
||||
# Start an Xwayland server
|
||||
export PIGLIT_RESULTS_DIR=$XSERVER_BUILDDIR/test/piglit-results/xwayland
|
||||
export SERVER_COMMAND="$XSERVER_BUILDDIR/hw/xwayland/Xwayland -noreset"
|
||||
|
||||
# Make sure glamor doesn't use HW acceleration
|
||||
export GBM_ALWAYS_SOFTWARE=1
|
||||
|
||||
# Tests that currently fail on llvmpipe on CI
|
||||
PIGLIT_ARGS="$PIGLIT_ARGS -x xcleararea@6"
|
||||
PIGLIT_ARGS="$PIGLIT_ARGS -x xcleararea@7"
|
||||
PIGLIT_ARGS="$PIGLIT_ARGS -x xclearwindow@4"
|
||||
PIGLIT_ARGS="$PIGLIT_ARGS -x xclearwindow@5"
|
||||
PIGLIT_ARGS="$PIGLIT_ARGS -x xcopyarea@1"
|
||||
|
||||
export PIGLIT_ARGS
|
||||
|
||||
$XSERVER_DIR/test/scripts/run-piglit.sh
|
||||
PIGLIT_STATUS=$?
|
||||
|
||||
kill $WESTON_PID
|
||||
exit $PIGLIT_STATUS
|
Loading…
Reference in New Issue