···
1
-
import ./make-test-python.nix (
7
-
maintainers = with lib.maintainers; [ OPNA2608 ];
6
+
maintainers = with lib.maintainers; [ OPNA2608 ];
15
-
./common/user-account.nix
14
+
./common/user-account.nix
18
-
# Seems to very rarely get interrupted by oom-killer
19
-
virtualisation.memorySize = 2047;
17
+
# Seems to very rarely get interrupted by oom-killer
18
+
virtualisation.memorySize = 2047;
21
-
test-support.displayManager.auto = {
20
+
test-support.displayManager.auto = {
25
+
programs.ydotool.enable = true;
26
-
programs.ydotool.enable = true;
27
+
services.xserver.enable = true;
28
+
services.displayManager.defaultSession = lib.mkForce "miriway";
28
-
services.xserver.enable = true;
29
-
services.displayManager.defaultSession = lib.mkForce "miriway";
30
+
programs.miriway = {
33
+
add-wayland-extensions=all
31
-
programs.miriway = {
34
-
add-wayland-extensions=all
36
+
ctrl-alt=t:foot --maximized
37
+
ctrl-alt=a:env WINIT_UNIX_BACKEND=x11 WAYLAND_DISPLAY= alacritty --option window.startup_mode=\"maximized\"
37
-
ctrl-alt=t:foot --maximized
38
-
ctrl-alt=a:env WINIT_UNIX_BACKEND=x11 WAYLAND_DISPLAY= alacritty --option window.startup_mode=\"maximized\"
39
+
shell-component=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY
40
-
shell-component=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY
41
+
shell-component=foot --maximized
42
-
shell-component=foot --maximized
47
+
test-wayland = "wayland-info | tee /tmp/test-wayland.out && touch /tmp/test-wayland-exit-ok";
48
+
test-x11 = "glinfo | tee /tmp/test-x11.out && touch /tmp/test-x11-exit-ok";
48
-
test-wayland = "wayland-info | tee /tmp/test-wayland.out && touch /tmp/test-wayland-exit-ok";
49
-
test-x11 = "glinfo | tee /tmp/test-x11.out && touch /tmp/test-x11-exit-ok";
51
+
systemPackages = with pkgs; [
59
+
etc."xdg/foot/foot.ini".source = (pkgs.formats.ini { }).generate "foot.ini" {
61
+
font = "inconsolata:size=16";
52
-
systemPackages = with pkgs; [
60
-
etc."xdg/foot/foot.ini".source = (pkgs.formats.ini { }).generate "foot.ini" {
62
-
font = "inconsolata:size=16";
65
-
foreground = "000000";
66
-
background = "ffffff";
67
-
regular2 = foreground;
64
+
foreground = "000000";
65
+
background = "ffffff";
66
+
regular2 = foreground;
70
-
etc."xdg/alacritty/alacritty.toml".source = (pkgs.formats.toml { }).generate "alacritty.toml" {
72
-
normal.family = "Inconsolata";
73
-
bold.family = normal.family;
74
-
italic.family = normal.family;
75
-
bold_italic.family = normal.family;
69
+
etc."xdg/alacritty/alacritty.toml".source = (pkgs.formats.toml { }).generate "alacritty.toml" {
71
+
normal.family = "Inconsolata";
72
+
bold.family = normal.family;
73
+
italic.family = normal.family;
74
+
bold_italic.family = normal.family;
79
+
foreground = "0x000000";
80
+
background = "0xffffff";
80
-
foreground = "0x000000";
81
-
background = "0xffffff";
84
-
green = primary.foreground;
83
+
green = primary.foreground;
90
-
fonts.packages = [ pkgs.inconsolata ];
89
+
fonts.packages = [ pkgs.inconsolata ];
99
-
machine.wait_for_unit("multi-user.target")
98
+
machine.wait_for_unit("multi-user.target")
101
-
# Wait for Miriway to complete startup
102
-
machine.wait_for_file("/run/user/1000/wayland-0")
103
-
machine.succeed("pgrep miriway-shell")
104
-
machine.screenshot("miriway_launched")
100
+
# Wait for Miriway to complete startup
101
+
machine.wait_for_file("/run/user/1000/wayland-0")
102
+
machine.succeed("pgrep miriway-shell")
103
+
machine.screenshot("miriway_launched")
107
-
# We let Miriway start the first terminal, as we might get stuck if it's not ready to process the first keybind
108
-
# machine.send_key("ctrl-alt-t")
109
-
machine.wait_for_text(r"(alice|machine)")
110
-
machine.send_chars("test-wayland\n")
111
-
machine.wait_for_file("/tmp/test-wayland-exit-ok")
112
-
machine.copy_from_vm("/tmp/test-wayland.out")
113
-
machine.screenshot("foot_wayland_info")
106
+
# We let Miriway start the first terminal, as we might get stuck if it's not ready to process the first keybind
107
+
# machine.send_key("ctrl-alt-t")
108
+
machine.wait_for_text(r"(alice|machine)")
109
+
machine.send_chars("test-wayland\n")
110
+
machine.wait_for_file("/tmp/test-wayland-exit-ok")
111
+
machine.copy_from_vm("/tmp/test-wayland.out")
112
+
machine.screenshot("foot_wayland_info")
115
-
# please actually register that we want to close the window
116
-
machine.succeed("ydotool mousemove -- 10 10")
114
+
# please actually register that we want to close the window
115
+
machine.succeed("ydotool mousemove -- 10 10")
119
-
machine.send_chars("exit\n")
118
+
machine.send_chars("exit\n")
121
-
# please actually register that we want to close the window
122
-
machine.succeed("ydotool mousemove -- 10 10")
120
+
# please actually register that we want to close the window
121
+
machine.succeed("ydotool mousemove -- 10 10")
125
-
machine.wait_until_fails("pgrep foot")
124
+
machine.wait_until_fails("pgrep foot")
128
-
machine.send_key("ctrl-alt-a")
129
-
machine.wait_for_text(r"(alice|machine)")
130
-
machine.send_chars("test-x11\n")
131
-
machine.wait_for_file("/tmp/test-x11-exit-ok")
132
-
machine.copy_from_vm("/tmp/test-x11.out")
133
-
machine.screenshot("alacritty_glinfo")
127
+
machine.send_key("ctrl-alt-a")
128
+
machine.wait_for_text(r"(alice|machine)")
129
+
machine.send_chars("test-x11\n")
130
+
machine.wait_for_file("/tmp/test-x11-exit-ok")
131
+
machine.copy_from_vm("/tmp/test-x11.out")
132
+
machine.screenshot("alacritty_glinfo")
135
-
# please actually register that we want to close the window
136
-
machine.succeed("ydotool mousemove -- 10 10")
134
+
# please actually register that we want to close the window
135
+
machine.succeed("ydotool mousemove -- 10 10")
139
-
machine.send_chars("exit\n")
138
+
machine.send_chars("exit\n")
141
-
# please actually register that we want to close the window
142
-
machine.succeed("ydotool mousemove -- 10 10")
140
+
# please actually register that we want to close the window
141
+
machine.succeed("ydotool mousemove -- 10 10")
145
-
machine.wait_until_fails("pgrep alacritty")
144
+
machine.wait_until_fails("pgrep alacritty")