From f8c3d533274f7ceea443bc4650173a1232808d1a Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 21 Dec 2024 17:58:14 +0900 Subject: [PATCH] nix: test pulseaudio pass through Signed-off-by: Ophestra --- test.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test.nix b/test.nix index ca0b1f4..03266fa 100644 --- a/test.nix +++ b/test.nix @@ -77,6 +77,16 @@ nixosTest { programs.sway.enable = true; + # For PulseAudio tests: + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + virtualisation.qemu.options = [ # Need to switch to a different GPU driver than the default one (-vga std) so that Sway can launch: "-vga none -device virtio-gpu-pci" @@ -197,6 +207,15 @@ nixosTest { machine.send_chars("exit\n") machine.wait_until_fails("pgrep foot") + # Test PulseAudio (fortify does not support PipeWire yet): + swaymsg("exec fortify run --wayland --pulse foot") + wait_for_window("u0_a0@machine") + machine.send_chars("pactl info && touch /tmp/success-pulse\n") + machine.wait_for_file("/tmp/fortify.1000/tmpdir/0/success-pulse") + collect_state_ui("pulse_wayland") + machine.send_chars("exit\n") + machine.wait_until_fails("pgrep foot") + # Test XWayland (foot does not support X): swaymsg("exec fortify run -X alacritty") wait_for_window("u0_a0@machine")