ci: Launch pipewire and wireplumber
authorMatthias Clasen <mclasen@redhat.com>
Wed, 3 May 2023 22:45:56 +0000 (18:45 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 4 May 2023 03:27:09 +0000 (23:27 -0400)
The headless tests require pipewire and wireplumber
for screencast sessions to work. So launch them.

testsuite/headless/run-headless-input-tests.sh
testsuite/headless/run-headless-monitor-tests.sh

index d62084a28ec8788c0091693951d4cab6b9324fb4..53dfeea222d7ef54d9df8eb081ea70c88a3dda9a 100755 (executable)
@@ -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
 
index 9bd9133f33b8953f639b061c891af3f15fefdb71..7c62766ff5b9bf831fa2e1b0c1ebc131de9fc8c7 100755 (executable)
@@ -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