nix: test x11 permissive defaults
Also invoke glinfo/wayland-info as part of tests. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
parent
65dc39956f
commit
aeda40fc92
19
test.nix
19
test.nix
@ -31,6 +31,13 @@ nixosTest {
|
|||||||
services.getty.autologinUser = "alice";
|
services.getty.autologinUser = "alice";
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
|
# For glinfo and wayland-info:
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
mesa-demos
|
||||||
|
wayland-utils
|
||||||
|
alacritty
|
||||||
|
];
|
||||||
|
|
||||||
variables = {
|
variables = {
|
||||||
SWAYSOCK = "/tmp/sway-ipc.sock";
|
SWAYSOCK = "/tmp/sway-ipc.sock";
|
||||||
WLR_RENDERER = "pixman";
|
WLR_RENDERER = "pixman";
|
||||||
@ -155,7 +162,7 @@ nixosTest {
|
|||||||
machine.sleep(3)
|
machine.sleep(3)
|
||||||
swaymsg("exec fortify run --wayland foot")
|
swaymsg("exec fortify run --wayland foot")
|
||||||
wait_for_window("u0_a0@machine")
|
wait_for_window("u0_a0@machine")
|
||||||
machine.send_chars("touch /tmp/success-client\n")
|
machine.send_chars("wayland-info && touch /tmp/success-client\n")
|
||||||
machine.wait_for_file("/tmp/fortify.1000/tmpdir/0/success-client")
|
machine.wait_for_file("/tmp/fortify.1000/tmpdir/0/success-client")
|
||||||
machine.screenshot("foot_wayland_permissive")
|
machine.screenshot("foot_wayland_permissive")
|
||||||
machine.send_chars("exit\n")
|
machine.send_chars("exit\n")
|
||||||
@ -166,12 +173,20 @@ nixosTest {
|
|||||||
machine.sleep(3)
|
machine.sleep(3)
|
||||||
swaymsg("exec foot fortify run --wayland foot")
|
swaymsg("exec foot fortify run --wayland foot")
|
||||||
wait_for_window("u0_a0@machine")
|
wait_for_window("u0_a0@machine")
|
||||||
machine.send_chars("touch /tmp/success-client-term\n")
|
machine.send_chars("wayland-info && touch /tmp/success-client-term\n")
|
||||||
machine.wait_for_file("/tmp/fortify.1000/tmpdir/0/success-client-term")
|
machine.wait_for_file("/tmp/fortify.1000/tmpdir/0/success-client-term")
|
||||||
machine.screenshot("foot_wayland_permissive_term")
|
machine.screenshot("foot_wayland_permissive_term")
|
||||||
machine.send_chars("exit\n")
|
machine.send_chars("exit\n")
|
||||||
machine.wait_until_fails("pgrep foot")
|
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")
|
||||||
|
machine.send_chars("glinfo && touch /tmp/success-client-x11\n")
|
||||||
|
machine.wait_for_file("/tmp/fortify.1000/tmpdir/0/success-client-x11")
|
||||||
|
machine.screenshot("alacritty_x11_permissive")
|
||||||
|
machine.succeed("pkill alacritty")
|
||||||
|
|
||||||
# Exit Sway and verify process exit status 0:
|
# Exit Sway and verify process exit status 0:
|
||||||
swaymsg("exit", succeed=False)
|
swaymsg("exit", succeed=False)
|
||||||
machine.wait_until_fails("pgrep -x sway")
|
machine.wait_until_fails("pgrep -x sway")
|
||||||
|
Loading…
Reference in New Issue
Block a user