treewide: include PipeWire op and enforce PulseAudio check
Some checks failed
Test / Create distribution (push) Successful in 37s
Test / Flake checks (push) Has been cancelled
Test / Hakurei (push) Has been cancelled
Test / Hakurei (race detector) (push) Has been cancelled
Test / Sandbox (push) Has been cancelled
Test / Sandbox (race detector) (push) Has been cancelled
Test / Hpkg (push) Has been cancelled
Some checks failed
Test / Create distribution (push) Successful in 37s
Test / Flake checks (push) Has been cancelled
Test / Hakurei (push) Has been cancelled
Test / Hakurei (race detector) (push) Has been cancelled
Test / Sandbox (push) Has been cancelled
Test / Sandbox (race detector) (push) Has been cancelled
Test / Hpkg (push) Has been cancelled
This fully replaces PulseAudio with PipeWire and enforces the PulseAudio check and error message. The pipewire-pulse daemon is handled in the NixOS module. Closes #26. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -134,7 +134,6 @@
|
||||
enablements = {
|
||||
wayland = false;
|
||||
pipewire = false;
|
||||
pulse = false;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -154,7 +153,6 @@
|
||||
enablements = {
|
||||
dbus = false;
|
||||
pipewire = false;
|
||||
pulse = false;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -170,7 +168,6 @@
|
||||
enablements = {
|
||||
dbus = false;
|
||||
pipewire = false;
|
||||
pulse = false;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -203,7 +200,6 @@
|
||||
x11 = true;
|
||||
dbus = false;
|
||||
pipewire = false;
|
||||
pulse = false;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -223,7 +219,6 @@
|
||||
enablements = {
|
||||
dbus = false;
|
||||
pipewire = false;
|
||||
pulse = false;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -238,7 +233,6 @@
|
||||
x11 = false;
|
||||
dbus = false;
|
||||
pipewire = false;
|
||||
pulse = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
command = "foot";
|
||||
enablements = {
|
||||
dbus = false;
|
||||
pulse = false;
|
||||
pipewire = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
18
test/test.py
18
test/test.py
@@ -160,17 +160,17 @@ machine.succeed("pkill -9 mako")
|
||||
# Check revert type selection:
|
||||
hakurei("-v run --wayland -X --dbus --pulse -u p0 foot && touch /tmp/p0-exit-ok")
|
||||
wait_for_window("p0@machine")
|
||||
print(machine.succeed("getfacl --absolute-names --omit-header --numeric /run/user/1000 | grep 10000"))
|
||||
print(machine.succeed("getfacl --absolute-names --omit-header --numeric /tmp/hakurei.0/runtime | grep 10000"))
|
||||
hakurei("-v run --wayland -X --dbus --pulse -u p1 foot && touch /tmp/p1-exit-ok")
|
||||
wait_for_window("p1@machine")
|
||||
print(machine.succeed("getfacl --absolute-names --omit-header --numeric /run/user/1000 | grep 10000"))
|
||||
print(machine.succeed("getfacl --absolute-names --omit-header --numeric /tmp/hakurei.0/runtime | grep 10000"))
|
||||
machine.send_chars("exit\n")
|
||||
machine.wait_for_file("/tmp/p1-exit-ok", timeout=15)
|
||||
# Verify acl is kept alive:
|
||||
print(machine.succeed("getfacl --absolute-names --omit-header --numeric /run/user/1000 | grep 10000"))
|
||||
print(machine.succeed("getfacl --absolute-names --omit-header --numeric /tmp/hakurei.0/runtime | grep 10000"))
|
||||
machine.send_chars("exit\n")
|
||||
machine.wait_for_file("/tmp/p0-exit-ok", timeout=15)
|
||||
machine.fail("getfacl --absolute-names --omit-header --numeric /run/user/1000 | grep 10000")
|
||||
machine.fail("getfacl --absolute-names --omit-header --numeric /tmp/hakurei.0/runtime | grep 10000")
|
||||
|
||||
# Check invalid identifier fd behaviour:
|
||||
machine.fail('echo \'{"container":{"shell":"/proc/nonexistent","home":"/proc/nonexistent","path":"/proc/nonexistent"}}\' | sudo -u alice -i hakurei -v app --identifier-fd 32767 - 2>&1 | tee > /tmp/invalid-identifier-fd')
|
||||
@@ -219,15 +219,21 @@ machine.send_chars("exit\n")
|
||||
machine.wait_until_fails("pgrep foot", timeout=5)
|
||||
machine.fail(f"getfacl --absolute-names --omit-header --numeric /run/user/1000 | grep {hakurei_identity(0) + 10000}", timeout=5)
|
||||
|
||||
# Test PulseAudio (hakurei does not support PipeWire yet):
|
||||
# Test pipewire-pulse:
|
||||
swaymsg("exec pa-foot")
|
||||
wait_for_window(f"u0_a{hakurei_identity(1)}@machine")
|
||||
machine.send_chars("clear; pactl info && touch /var/tmp/pulse-ok\n")
|
||||
machine.wait_for_file("/var/tmp/pulse-ok", timeout=15)
|
||||
collect_state_ui("pulse_wayland")
|
||||
check_state("pa-foot", {"wayland": True, "pipewire": True, "pulse": True})
|
||||
check_state("pa-foot", {"wayland": True, "pipewire": True})
|
||||
# Test PipeWire:
|
||||
machine.send_chars("clear; pw-cli i 0 && touch /var/tmp/pw-ok\n")
|
||||
machine.wait_for_file("/var/tmp/pw-ok", timeout=15)
|
||||
collect_state_ui("pipewire_wayland")
|
||||
machine.send_chars("exit\n")
|
||||
machine.wait_until_fails("pgrep foot", timeout=5)
|
||||
# Test PipeWire SecurityContext:
|
||||
machine.fail("sudo -u alice -i XDG_RUNTIME_DIR=/run/user/1000 hakurei -v run --pulse pactl set-sink-mute @DEFAULT_SINK@ toggle")
|
||||
|
||||
# Test XWayland (foot does not support X):
|
||||
swaymsg("exec x11-alacritty")
|
||||
|
||||
Reference in New Issue
Block a user