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}
|
2023-05-06 13:00:27 +00:00
|
|
|
builddir=${MESON_CURRENT_BUILD_DIR:-.}
|
|
|
|
outputdir=${builddir}/monitor
|
|
|
|
|
|
|
|
mkdir -p ${outputdir}
|
|
|
|
|
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
|
|
|
|
|
2023-05-06 13:00:27 +00:00
|
|
|
dbus-run-session sh 2>${outputdir}/dbus-stderr.log <<EOF
|
2021-03-20 20:23:36 +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-04 10:53:35 +00:00
|
|
|
sleep 2
|
|
|
|
|
2023-05-06 13:00:27 +00:00
|
|
|
wireplumber >&${outputdir}/wireplumber.log &
|
2023-05-03 22:45:56 +00:00
|
|
|
wireplumber_pid=\$!
|
2023-05-04 10:53:35 +00:00
|
|
|
sleep 2
|
2023-05-03 22:45:56 +00:00
|
|
|
|
2021-03-20 20:23:36 +00:00
|
|
|
# echo DBUS_SESSION_BUS_ADDRESS=\$DBUS_SESSION_BUS_ADDRESS
|
|
|
|
# echo WAYLAND_DISPLAY=gtk-test
|
|
|
|
|
2023-05-04 11:32:57 +00:00
|
|
|
export MUTTER_DEBUG=screen-cast
|
|
|
|
|
2023-05-06 13:00:27 +00:00
|
|
|
mutter --headless --no-x11 --wayland-display gtk-test >&${outputdir}/mutter.log &
|
2023-05-03 22:45:56 +00:00
|
|
|
mutter_pid=\$!
|
2021-03-20 20:23:36 +00:00
|
|
|
|
2023-05-04 10:53:35 +00:00
|
|
|
sleep 2
|
|
|
|
|
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
|