2021-03-20 20:23:36 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
2023-05-03 14:48:32 +00:00
|
|
|
srcdir=${MESON_CURRENT_SOURCE_DIR:-./testsuite/headless}
|
2021-03-20 20:23:36 +00:00
|
|
|
|
2023-05-03 23:54:41 +00:00
|
|
|
export GTK_A11Y=none
|
|
|
|
export GIO_USE_VFS=local
|
|
|
|
|
2021-03-20 20:23:36 +00:00
|
|
|
dbus-run-session sh <<EOF
|
|
|
|
|
2023-05-03 22:45:56 +00:00
|
|
|
export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
|
|
|
|
|
|
|
|
pipewire &
|
|
|
|
pipewire_pid=\$!
|
|
|
|
wireplumber &
|
|
|
|
wireplumber_pid=\$!
|
|
|
|
sleep 1
|
|
|
|
|
2021-03-20 20:23:36 +00:00
|
|
|
# echo DBUS_SESSION_BUS_ADDRESS=\$DBUS_SESSION_BUS_ADDRESS
|
|
|
|
# echo WAYLAND_DISPLAY=gtk-test
|
|
|
|
|
|
|
|
mutter --headless --no-x11 --wayland-display gtk-test >&mutter.log &
|
2023-05-03 22:45:56 +00:00
|
|
|
mutter_pid=\$!
|
2021-03-20 20:23:36 +00:00
|
|
|
|
|
|
|
export WAYLAND_DISPLAY=gtk-test
|
|
|
|
export GDK_BACKEND=wayland
|
|
|
|
|
2023-05-03 18:50:14 +00:00
|
|
|
python3 ${srcdir}/headless-monitor-tests.py
|
2021-03-20 20:23:36 +00:00
|
|
|
status=\$?
|
|
|
|
|
2023-05-03 22:45:56 +00:00
|
|
|
kill \$mutter_pid
|
|
|
|
kill \$wireplumber_pid
|
|
|
|
kill \$pipewire_pid
|
2021-03-20 20:23:36 +00:00
|
|
|
|
|
|
|
exit \$status
|
|
|
|
|
|
|
|
EOF
|