2021-03-21 12:31:25 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
2023-05-03 14:48:32 +00:00
|
|
|
srcdir=${MESON_CURRENT_SOURCE_DIR:-./testsuite/headless}
|
2023-05-06 13:00:27 +00:00
|
|
|
builddir=${MESON_CURRENT_BUILD_DIR:-.}
|
|
|
|
outputdir=${builddir}/input
|
2021-03-21 12:31:25 +00:00
|
|
|
|
2023-05-06 13:00:27 +00:00
|
|
|
mkdir -p ${outputdir}
|
|
|
|
|
|
|
|
|
|
|
|
export GTK_A11Y=none
|
|
|
|
|
|
|
|
dbus-run-session sh 2>${outputdir}/dbus-stderr.log <<EOF
|
2021-03-21 12:31:25 +00:00
|
|
|
|
2023-05-03 22:45:56 +00:00
|
|
|
export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
|
|
|
|
|
2023-05-06 13:00:27 +00:00
|
|
|
pipewire >&${outputdir}/pipewire.log &
|
2023-05-03 22:45:56 +00:00
|
|
|
pipewire_pid=\$!
|
2023-05-06 13:00:27 +00:00
|
|
|
sleep 2
|
|
|
|
|
|
|
|
wireplumber >&${outputdir}/wireplumber.log &
|
2023-05-03 22:45:56 +00:00
|
|
|
wireplumber_pid=\$!
|
2023-05-06 13:00:27 +00:00
|
|
|
sleep 2
|
2023-05-03 22:45:56 +00:00
|
|
|
|
2023-05-03 12:49:23 +00:00
|
|
|
#echo DBUS_SESSION_BUS_ADDRESS=\$DBUS_SESSION_BUS_ADDRESS
|
|
|
|
#echo WAYLAND_DISPLAY=gtk-test
|
2021-03-21 12:31:25 +00:00
|
|
|
|
2023-05-06 13:00:27 +00:00
|
|
|
mutter --headless --virtual-monitor 1024x768 --no-x11 --wayland-display gtk-test2 >&${outputdir}/mutter.log &
|
2023-05-03 22:45:56 +00:00
|
|
|
mutter_pid=\$!
|
2021-03-21 12:31:25 +00:00
|
|
|
|
2023-05-06 13:00:27 +00:00
|
|
|
sleep 2
|
|
|
|
|
2023-05-03 14:48:32 +00:00
|
|
|
export WAYLAND_DISPLAY=gtk-test2
|
2021-03-21 12:31:25 +00:00
|
|
|
export GDK_BACKEND=wayland
|
|
|
|
|
2023-05-03 18:50:14 +00:00
|
|
|
python3 ${srcdir}/headless-input-tests.py
|
2021-03-21 12:31:25 +00:00
|
|
|
status=\$?
|
|
|
|
|
2023-05-03 22:45:56 +00:00
|
|
|
kill \$mutter_pid
|
|
|
|
kill \$wireplumber_pid
|
|
|
|
kill \$pipewire_pid
|
2021-03-21 12:31:25 +00:00
|
|
|
|
|
|
|
exit \$status
|
|
|
|
|
|
|
|
EOF
|