summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-05-03 18:45:56 -0400
committerMatthias Clasen <mclasen@redhat.com>2023-05-03 23:27:09 -0400
commit88f27c423c4339f6f38202a93cf36d66934cba7a (patch)
treeb39d1f285de5532553e4edcee5625cc9e7a6dfc9
parent30342896d0e9f882b080e15d186c77714bc55903 (diff)
downloadgtk+-88f27c423c4339f6f38202a93cf36d66934cba7a.tar.gz
ci: Launch pipewire and wireplumber
The headless tests require pipewire and wireplumber for screencast sessions to work. So launch them.
-rwxr-xr-xtestsuite/headless/run-headless-input-tests.sh14
-rwxr-xr-xtestsuite/headless/run-headless-monitor-tests.sh14
2 files changed, 24 insertions, 4 deletions
diff --git a/testsuite/headless/run-headless-input-tests.sh b/testsuite/headless/run-headless-input-tests.sh
index d62084a28e..53dfeea222 100755
--- a/testsuite/headless/run-headless-input-tests.sh
+++ b/testsuite/headless/run-headless-input-tests.sh
@@ -4,6 +4,14 @@ srcdir=${MESON_CURRENT_SOURCE_DIR:-./testsuite/headless}
dbus-run-session sh <<EOF
+export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
+
+pipewire &
+pipewire_pid=\$!
+wireplumber &
+wireplumber_pid=\$!
+sleep 1
+
#echo DBUS_SESSION_BUS_ADDRESS=\$DBUS_SESSION_BUS_ADDRESS
#echo WAYLAND_DISPLAY=gtk-test
@@ -11,7 +19,7 @@ export GTK_A11Y=none
export GIO_USE_VFS=local
mutter --headless --virtual-monitor 1024x768 --no-x11 --wayland-display gtk-test2 >&mutter2.log &
-pid=\$!
+mutter_pid=\$!
export WAYLAND_DISPLAY=gtk-test2
export GDK_BACKEND=wayland
@@ -19,7 +27,9 @@ export GDK_BACKEND=wayland
python3 ${srcdir}/headless-input-tests.py
status=\$?
-kill \$pid
+kill \$mutter_pid
+kill \$wireplumber_pid
+kill \$pipewire_pid
exit \$status
diff --git a/testsuite/headless/run-headless-monitor-tests.sh b/testsuite/headless/run-headless-monitor-tests.sh
index 9bd9133f33..7c62766ff5 100755
--- a/testsuite/headless/run-headless-monitor-tests.sh
+++ b/testsuite/headless/run-headless-monitor-tests.sh
@@ -4,6 +4,14 @@ srcdir=${MESON_CURRENT_SOURCE_DIR:-./testsuite/headless}
dbus-run-session sh <<EOF
+export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
+
+pipewire &
+pipewire_pid=\$!
+wireplumber &
+wireplumber_pid=\$!
+sleep 1
+
# echo DBUS_SESSION_BUS_ADDRESS=\$DBUS_SESSION_BUS_ADDRESS
# echo WAYLAND_DISPLAY=gtk-test
@@ -11,7 +19,7 @@ export GTK_A11Y=none
export GIO_USE_VFS=local
mutter --headless --no-x11 --wayland-display gtk-test >&mutter.log &
-pid=\$!
+mutter_pid=\$!
export WAYLAND_DISPLAY=gtk-test
export GDK_BACKEND=wayland
@@ -19,7 +27,9 @@ export GDK_BACKEND=wayland
python3 ${srcdir}/headless-monitor-tests.py
status=\$?
-kill \$pid
+kill \$mutter_pid
+kill \$wireplumber_pid
+kill \$pipewire_pid
exit \$status