···6767 (mkRemovedOptionModule [ "services" "fprot" ] "The corresponding package was removed from nixpkgs.")
6868 (mkRemovedOptionModule [ "services" "frab" ] "The frab module has been removed")
6969 (mkRemovedOptionModule [ "services" "homeassistant-satellite"] "The `services.homeassistant-satellite` module has been replaced by `services.wyoming-satellite`.")
7070+ (mkRemovedOptionModule [ "services" "hydron" ] "The `services.hydron` module has been removed as the project has been archived upstream since 2022 and is affected by a severe remote code execution vulnerability.")
7071 (mkRemovedOptionModule [ "services" "ihatemoney" ] "The ihatemoney module has been removed for lack of downstream maintainer")
7172 (mkRemovedOptionModule [ "services" "kippo" ] "The corresponding package was removed from nixpkgs.")
7273 (mkRemovedOptionModule [ "services" "mailpile" ] "The corresponding package was removed from nixpkgs.")
···11-import ./make-test-python.nix ({ pkgs, lib, ... }: let
11+let
22+ makeTest = import ./make-test-python.nix;
23 # Just to make sure everything is the same, need it for OCR & navigating greeter
34 user = "alice";
45 description = "Alice Foobar";
56 password = "foobar";
66-in {
77- name = "lomiri";
77+in
88+{
99+ greeter = makeTest (
1010+ { pkgs, lib, ... }:
1111+ {
1212+ name = "lomiri-greeter";
81399- meta = {
1010- maintainers = lib.teams.lomiri.members;
1111- };
1414+ meta = {
1515+ maintainers = lib.teams.lomiri.members;
1616+ };
12171313- nodes.machine = { config, ... }: {
1414- imports = [
1515- ./common/user-account.nix
1616- ];
1818+ nodes.machine =
1919+ { config, ... }:
2020+ {
2121+ imports = [ ./common/user-account.nix ];
17221818- users.users.${user} = {
1919- inherit description password;
2020- };
2323+ virtualisation.memorySize = 2047;
21242222- # To control mouse via scripting
2323- programs.ydotool.enable = true;
2424-2525- services.desktopManager.lomiri.enable = lib.mkForce true;
2626- services.displayManager.defaultSession = lib.mkForce "lomiri";
2525+ users.users.${user} = {
2626+ inherit description password;
2727+ };
27282828- # Help with OCR
2929- fonts.packages = [ pkgs.inconsolata ];
2929+ services.desktopManager.lomiri.enable = lib.mkForce true;
3030+ services.displayManager.defaultSession = lib.mkForce "lomiri";
30313131- environment = {
3232- # Help with OCR
3333- etc."xdg/alacritty/alacritty.yml".text = lib.generators.toYAML { } {
3434- font = rec {
3535- normal.family = "Inconsolata";
3636- bold.family = normal.family;
3737- italic.family = normal.family;
3838- bold_italic.family = normal.family;
3939- size = 16;
3232+ # Help with OCR
3333+ fonts.packages = [ pkgs.inconsolata ];
4034 };
4141- colors = rec {
4242- primary = {
4343- foreground = "0x000000";
4444- background = "0xffffff";
3535+3636+ enableOCR = true;
3737+3838+ testScript =
3939+ { nodes, ... }:
4040+ ''
4141+ start_all()
4242+ machine.wait_for_unit("multi-user.target")
4343+4444+ # Lomiri in greeter mode should work & be able to start a session
4545+ with subtest("lomiri greeter works"):
4646+ machine.wait_for_unit("display-manager.service")
4747+ machine.wait_until_succeeds("pgrep -u lightdm -f 'lomiri --mode=greeter'")
4848+4949+ # Start page shows current time
5050+ machine.wait_for_text(r"(AM|PM)")
5151+ machine.screenshot("lomiri_greeter_launched")
5252+5353+ # Advance to login part
5454+ machine.send_key("ret")
5555+ machine.wait_for_text("${description}")
5656+ machine.screenshot("lomiri_greeter_login")
5757+5858+ # Login
5959+ machine.send_chars("${password}\n")
6060+ machine.wait_until_succeeds("pgrep -u ${user} -f 'lomiri --mode=full-shell'")
6161+6262+ # Output rendering from Lomiri has started when it starts printing performance diagnostics
6363+ machine.wait_for_console_text("Last frame took")
6464+ # Look for datetime's clock, one of the last elements to load
6565+ machine.wait_for_text(r"(AM|PM)")
6666+ machine.screenshot("lomiri_launched")
6767+ '';
6868+ }
6969+ );
7070+7171+ desktop = makeTest (
7272+ { pkgs, lib, ... }:
7373+ {
7474+ name = "lomiri-desktop";
7575+7676+ meta = {
7777+ maintainers = lib.teams.lomiri.members;
7878+ };
7979+8080+ nodes.machine =
8181+ { config, ... }:
8282+ {
8383+ imports = [
8484+ ./common/auto.nix
8585+ ./common/user-account.nix
8686+ ];
8787+8888+ virtualisation.memorySize = 2047;
8989+9090+ users.users.${user} = {
9191+ inherit description password;
9292+ # polkit agent test
9393+ extraGroups = [ "wheel" ];
4594 };
4646- normal = {
4747- green = primary.foreground;
9595+9696+ test-support.displayManager.auto = {
9797+ enable = true;
9898+ inherit user;
4899 };
4949- };
5050- };
511005252- variables = {
5353- # So we can test what content-hub is working behind the scenes
5454- CONTENT_HUB_LOGGING_LEVEL = "2";
5555- };
101101+ # To control mouse via scripting
102102+ programs.ydotool.enable = true;
561035757- systemPackages = with pkgs; [
5858- # For a convenient way of kicking off content-hub peer collection
5959- lomiri.content-hub.examples
104104+ services.desktopManager.lomiri.enable = lib.mkForce true;
105105+ services.displayManager.defaultSession = lib.mkForce "lomiri";
601066161- # Forcing alacritty to run as an X11 app when opened from the starter menu
6262- (symlinkJoin {
6363- name = "x11-${alacritty.name}";
107107+ # Help with OCR
108108+ fonts.packages = [ pkgs.inconsolata ];
641096565- paths = [ alacritty ];
110110+ environment = {
111111+ # Help with OCR
112112+ etc."xdg/alacritty/alacritty.yml".text = lib.generators.toYAML { } {
113113+ font = rec {
114114+ normal.family = "Inconsolata";
115115+ bold.family = normal.family;
116116+ italic.family = normal.family;
117117+ bold_italic.family = normal.family;
118118+ size = 16;
119119+ };
120120+ colors = rec {
121121+ primary = {
122122+ foreground = "0x000000";
123123+ background = "0xffffff";
124124+ };
125125+ normal = {
126126+ green = primary.foreground;
127127+ };
128128+ };
129129+ };
661306767- nativeBuildInputs = [ makeWrapper ];
131131+ variables = {
132132+ # So we can test what content-hub is working behind the scenes
133133+ CONTENT_HUB_LOGGING_LEVEL = "2";
134134+ };
681356969- postBuild = ''
7070- wrapProgram $out/bin/alacritty \
7171- --set WINIT_UNIX_BACKEND x11 \
7272- --set WAYLAND_DISPLAY ""
7373- '';
136136+ systemPackages = with pkgs; [
137137+ # For a convenient way of kicking off content-hub peer collection
138138+ lomiri.content-hub.examples
741397575- inherit (alacritty) meta;
7676- })
140140+ # Forcing alacritty to run as an X11 app when opened from the starter menu
141141+ (symlinkJoin {
142142+ name = "x11-${alacritty.name}";
771437878- # Polkit requests eventually time out.
7979- # Keep triggering them until we signal detection success
8080- (writeShellApplication {
8181- name = "lpa-check";
8282- text = ''
8383- while [ ! -f /tmp/lpa-checked ]; do
8484- pkexec echo a
8585- done
8686- '';
8787- })
8888- # Signal detection success
8989- (writeShellApplication {
9090- name = "lpa-signal";
9191- text = ''
9292- touch /tmp/lpa-checked
9393- '';
9494- })
9595- ];
9696- };
144144+ paths = [ alacritty ];
145145+146146+ nativeBuildInputs = [ makeWrapper ];
971479898- # Help with OCR
9999- systemd.tmpfiles.settings = let
100100- white = "255, 255, 255";
101101- black = "0, 0, 0";
102102- colorSection = color: {
103103- Color = color;
104104- Bold = true;
105105- Transparency = false;
106106- };
107107- terminalColors = pkgs.writeText "customized.colorscheme" (lib.generators.toINI {} {
108108- Background = colorSection white;
109109- Foreground = colorSection black;
110110- Color2 = colorSection black;
111111- Color2Intense = colorSection black;
112112- });
113113- terminalConfig = pkgs.writeText "terminal.ubports.conf" (lib.generators.toINI {} {
114114- General = {
115115- colorScheme = "customized";
116116- fontSize = "16";
117117- fontStyle = "Inconsolata";
148148+ postBuild = ''
149149+ wrapProgram $out/bin/alacritty \
150150+ --set WINIT_UNIX_BACKEND x11 \
151151+ --set WAYLAND_DISPLAY ""
152152+ '';
153153+154154+ inherit (alacritty) meta;
155155+ })
156156+ ];
157157+ };
158158+159159+ # Help with OCR
160160+ systemd.tmpfiles.settings =
161161+ let
162162+ white = "255, 255, 255";
163163+ black = "0, 0, 0";
164164+ colorSection = color: {
165165+ Color = color;
166166+ Bold = true;
167167+ Transparency = false;
168168+ };
169169+ terminalColors = pkgs.writeText "customized.colorscheme" (
170170+ lib.generators.toINI { } {
171171+ Background = colorSection white;
172172+ Foreground = colorSection black;
173173+ Color2 = colorSection black;
174174+ Color2Intense = colorSection black;
175175+ }
176176+ );
177177+ terminalConfig = pkgs.writeText "terminal.ubports.conf" (
178178+ lib.generators.toINI { } {
179179+ General = {
180180+ colorScheme = "customized";
181181+ fontSize = "16";
182182+ fontStyle = "Inconsolata";
183183+ };
184184+ }
185185+ );
186186+ confBase = "${config.users.users.${user}.home}/.config";
187187+ userDirArgs = {
188188+ mode = "0700";
189189+ user = user;
190190+ group = "users";
191191+ };
192192+ in
193193+ {
194194+ "10-lomiri-test-setup" = {
195195+ "${confBase}".d = userDirArgs;
196196+ "${confBase}/terminal.ubports".d = userDirArgs;
197197+ "${confBase}/terminal.ubports/customized.colorscheme".L.argument = "${terminalColors}";
198198+ "${confBase}/terminal.ubports/terminal.ubports.conf".L.argument = "${terminalConfig}";
199199+ };
200200+ };
118201 };
119119- });
120120- confBase = "${config.users.users.${user}.home}/.config";
121121- userDirArgs = {
122122- mode = "0700";
123123- user = user;
124124- group = "users";
125125- };
126126- in {
127127- "10-lomiri-test-setup" = {
128128- "${confBase}".d = userDirArgs;
129129- "${confBase}/terminal.ubports".d = userDirArgs;
130130- "${confBase}/terminal.ubports/customized.colorscheme".L.argument = "${terminalColors}";
131131- "${confBase}/terminal.ubports/terminal.ubports.conf".L.argument = "${terminalConfig}";
132132- };
133133- };
134134- };
202202+203203+ enableOCR = true;
204204+205205+ testScript =
206206+ { nodes, ... }:
207207+ ''
208208+ def toggle_maximise():
209209+ """
210210+ Maximise the current window.
211211+ """
212212+ machine.send_key("ctrl-meta_l-up")
213213+214214+ # For some reason, Lomiri in these VM tests very frequently opens the starter menu a few seconds after sending the above.
215215+ # Because this isn't 100% reproducible all the time, and there is no command to await when OCR doesn't pick up some text,
216216+ # the best we can do is send some Escape input after waiting some arbitrary time and hope that it works out fine.
217217+ machine.sleep(5)
218218+ machine.send_key("esc")
219219+ machine.sleep(5)
135220136136- enableOCR = true;
221221+ def mouse_click(xpos, ypos):
222222+ """
223223+ Move the mouse to a screen location and hit left-click.
224224+ """
137225138138- testScript = { nodes, ... }: ''
139139- def toggle_maximise():
140140- """
141141- Maximise the current window.
142142- """
143143- machine.send_key("ctrl-meta_l-up")
226226+ # Need to reset to top-left, --absolute doesn't work?
227227+ machine.execute("ydotool mousemove -- -10000 -10000")
228228+ machine.sleep(2)
229229+230230+ # Move
231231+ machine.execute(f"ydotool mousemove -- {xpos} {ypos}")
232232+ machine.sleep(2)
233233+234234+ # Click (C0 - left button: down & up)
235235+ machine.execute("ydotool click 0xC0")
236236+ machine.sleep(2)
237237+238238+ def open_starter():
239239+ """
240240+ Open the starter, and ensure it's opened.
241241+ """
242242+243243+ # Using the keybind has a chance of instantly closing the menu again? Just click the button
244244+ mouse_click(20, 30)
245245+246246+ start_all()
247247+ machine.wait_for_unit("multi-user.target")
248248+249249+ # The session should start, and not be stuck in i.e. a crash loop
250250+ with subtest("lomiri starts"):
251251+ machine.wait_until_succeeds("pgrep -u ${user} -f 'lomiri --mode=full-shell'")
252252+ # Output rendering from Lomiri has started when it starts printing performance diagnostics
253253+ machine.wait_for_console_text("Last frame took")
254254+ # Look for datetime's clock, one of the last elements to load
255255+ machine.wait_for_text(r"(AM|PM)")
256256+ machine.screenshot("lomiri_launched")
257257+258258+ # Working terminal keybind is good
259259+ with subtest("terminal keybind works"):
260260+ machine.send_key("ctrl-alt-t")
261261+ machine.wait_for_text(r"(${user}|machine)")
262262+ machine.screenshot("terminal_opens")
263263+264264+ # lomiri-terminal-app has a separate VM test to test its basic functionality
265265+266266+ # for the LSS content-hub test to work reliably, we need to kick off peer collecting
267267+ machine.send_chars("content-hub-test-importer\n")
268268+ machine.wait_for_text(r"(/build/source|hub.cpp|handler.cpp|void|virtual|const)") # awaiting log messages from content-hub
269269+ machine.send_key("ctrl-c")
270270+271271+ # Doing this here, since we need an in-session shell & separately starting a terminal again wastes time
272272+ with subtest("polkit agent works"):
273273+ machine.send_chars("pkexec touch /tmp/polkit-test\n")
274274+ # There's an authentication notification here that gains focus, but we struggle with OCRing it
275275+ # Just hope that it's up after a short wait
276276+ machine.sleep(10)
277277+ machine.screenshot("polkit_agent")
278278+ machine.send_chars("${password}")
279279+ machine.sleep(2) # Hopefully enough delay to make sure all the password characters have been registered? Maybe just placebo
280280+ machine.send_chars("\n")
281281+ machine.wait_for_file("/tmp/polkit-test", 10)
144282145145- # For some reason, Lomiri in these VM tests very frequently opens the starter menu a few seconds after sending the above.
146146- # Because this isn't 100% reproducible all the time, and there is no command to await when OCR doesn't pick up some text,
147147- # the best we can do is send some Escape input after waiting some arbitrary time and hope that it works out fine.
148148- machine.sleep(5)
149149- machine.send_key("esc")
150150- machine.sleep(5)
283283+ machine.send_key("alt-f4")
151284152152- def mouse_click(xpos, ypos):
153153- """
154154- Move the mouse to a screen location and hit left-click.
155155- """
285285+ # We want the ability to launch applications
286286+ with subtest("starter menu works"):
287287+ open_starter()
288288+ machine.screenshot("starter_opens")
156289157157- # Need to reset to top-left, --absolute doesn't work?
158158- machine.execute("ydotool mousemove -- -10000 -10000")
159159- machine.sleep(2)
290290+ # Just try the terminal again, we know that it should work
291291+ machine.send_chars("Terminal\n")
292292+ machine.wait_for_text(r"(${user}|machine)")
293293+ machine.send_key("alt-f4")
160294161161- # Move
162162- machine.execute(f"ydotool mousemove -- {xpos} {ypos}")
163163- machine.sleep(2)
295295+ # We want support for X11 apps
296296+ with subtest("xwayland support works"):
297297+ open_starter()
298298+ machine.send_chars("Alacritty\n")
299299+ machine.wait_for_text(r"(${user}|machine)")
300300+ machine.screenshot("alacritty_opens")
301301+ machine.send_key("alt-f4")
164302165165- # Click (C0 - left button: down & up)
166166- machine.execute("ydotool click 0xC0")
167167- machine.sleep(2)
303303+ # Morph is how we go online
304304+ with subtest("morph browser works"):
305305+ open_starter()
306306+ machine.send_chars("Morph\n")
307307+ machine.wait_for_text(r"(Bookmarks|address|site|visited any)")
308308+ machine.screenshot("morph_open")
168309169169- def open_starter():
170170- """
171171- Open the starter, and ensure it's opened.
172172- """
310310+ # morph-browser has a separate VM test, there isn't anything new we could test here
173311174174- # Using the keybind has a chance of instantly closing the menu again? Just click the button
175175- mouse_click(20, 30)
312312+ machine.send_key("alt-f4")
176313177177- start_all()
178178- machine.wait_for_unit("multi-user.target")
314314+ # LSS provides DE settings
315315+ with subtest("system settings open"):
316316+ open_starter()
317317+ machine.send_chars("System Settings\n")
318318+ machine.wait_for_text("Rotation Lock")
319319+ machine.screenshot("settings_open")
179320180180- # Lomiri in greeter mode should work & be able to start a session
181181- with subtest("lomiri greeter works"):
182182- machine.wait_for_unit("display-manager.service")
183183- machine.wait_until_succeeds("pgrep -u lightdm -f 'lomiri --mode=greeter'")
321321+ # lomiri-system-settings has a separate VM test, only test Lomiri-specific content-hub functionalities here
184322185185- # Start page shows current time
186186- machine.wait_for_text(r"(AM|PM)")
187187- machine.screenshot("lomiri_greeter_launched")
323323+ # Make fullscreen, can't navigate to Background plugin via keyboard unless window has non-phone-like aspect ratio
324324+ toggle_maximise()
188325189189- # Advance to login part
190190- machine.send_key("ret")
191191- machine.wait_for_text("${description}")
192192- machine.screenshot("lomiri_greeter_login")
326326+ # Load Background plugin
327327+ machine.send_key("tab")
328328+ machine.send_key("tab")
329329+ machine.send_key("tab")
330330+ machine.send_key("tab")
331331+ machine.send_key("tab")
332332+ machine.send_key("tab")
333333+ machine.send_key("ret")
334334+ machine.wait_for_text("Background image")
193335194194- # Login
195195- machine.send_chars("${password}\n")
196196- machine.wait_until_succeeds("pgrep -u ${user} -f 'lomiri --mode=full-shell'")
336336+ # Try to load custom background
337337+ machine.send_key("shift-tab")
338338+ machine.send_key("shift-tab")
339339+ machine.send_key("shift-tab")
340340+ machine.send_key("shift-tab")
341341+ machine.send_key("shift-tab")
342342+ machine.send_key("shift-tab")
343343+ machine.send_key("ret")
197344198198- # The session should start, and not be stuck in i.e. a crash loop
199199- with subtest("lomiri starts"):
200200- # Output rendering from Lomiri has started when it starts printing performance diagnostics
201201- machine.wait_for_console_text("Last frame took")
202202- # Look for datetime's clock, one of the last elements to load
203203- machine.wait_for_text(r"(AM|PM)")
204204- machine.screenshot("lomiri_launched")
345345+ # Peers should be loaded
346346+ machine.wait_for_text("Morph") # or Gallery, but Morph is already packaged
347347+ machine.screenshot("settings_content-hub_peers")
205348206206- # Working terminal keybind is good
207207- with subtest("terminal keybind works"):
208208- machine.send_key("ctrl-alt-t")
209209- machine.wait_for_text(r"(${user}|machine)")
210210- machine.screenshot("terminal_opens")
349349+ # Select Morph as content source
350350+ mouse_click(370, 100)
211351212212- # lomiri-terminal-app has a separate VM test to test its basic functionality
352352+ # Expect Morph to be brought into the foreground, with its Downloads page open
353353+ machine.wait_for_text("No downloads")
213354214214- # for the LSS content-hub test to work reliably, we need to kick off peer collecting
215215- machine.send_chars("content-hub-test-importer\n")
216216- machine.wait_for_text(r"(/build/source|hub.cpp|handler.cpp|void|virtual|const)") # awaiting log messages from content-hub
217217- machine.send_key("ctrl-c")
355355+ # If content-hub encounters a problem, it may have crashed the original application issuing the request.
356356+ # Check that it's still alive
357357+ machine.succeed("pgrep -u ${user} -f lomiri-system-settings")
218358219219- # Doing this here, since we need an in-session shell & separately starting a terminal again wastes time
220220- with subtest("polkit agent works"):
221221- machine.send_chars("exec lpa-check\n")
222222- machine.wait_for_text(r"(Elevated permissions|Login)")
223223- machine.screenshot("polkit_agent")
224224- machine.execute("lpa-signal")
359359+ machine.screenshot("content-hub_exchange")
225360226226- # polkit test will quit terminal when agent request times out after OCR success
227227- machine.wait_until_fails("pgrep -u ${user} -f lomiri-terminal-app")
361361+ # Testing any more would require more applications & setup, the fact that it's already being attempted is a good sign
362362+ machine.send_key("esc")
228363229229- # We want the ability to launch applications
230230- with subtest("starter menu works"):
231231- open_starter()
232232- machine.screenshot("starter_opens")
364364+ machine.sleep(2) # sleep a tiny bit so morph can close & the focus can return to LSS
365365+ machine.send_key("alt-f4")
366366+ '';
367367+ }
368368+ );
233369234234- # Just try the terminal again, we know that it should work
235235- machine.send_chars("Terminal\n")
236236- machine.wait_for_text(r"(${user}|machine)")
237237- machine.send_key("alt-f4")
370370+ desktop-ayatana-indicators = makeTest (
371371+ { pkgs, lib, ... }:
372372+ {
373373+ name = "lomiri-desktop-ayatana-indicators";
238374239239- # We want support for X11 apps
240240- with subtest("xwayland support works"):
241241- open_starter()
242242- machine.send_chars("Alacritty\n")
243243- machine.wait_for_text(r"(${user}|machine)")
244244- machine.screenshot("alacritty_opens")
245245- machine.send_key("alt-f4")
375375+ meta = {
376376+ maintainers = lib.teams.lomiri.members;
377377+ };
246378247247- # Morph is how we go online
248248- with subtest("morph browser works"):
249249- open_starter()
250250- machine.send_chars("Morph\n")
251251- machine.wait_for_text(r"(Bookmarks|address|site|visited any)")
252252- machine.screenshot("morph_open")
379379+ nodes.machine =
380380+ { config, ... }:
381381+ {
382382+ imports = [
383383+ ./common/auto.nix
384384+ ./common/user-account.nix
385385+ ];
253386254254- # morph-browser has a separate VM test, there isn't anything new we could test here
387387+ virtualisation.memorySize = 2047;
255388256256- machine.send_key("alt-f4")
389389+ users.users.${user} = {
390390+ inherit description password;
391391+ };
257392258258- # LSS provides DE settings
259259- with subtest("system settings open"):
260260- open_starter()
261261- machine.send_chars("System Settings\n")
262262- machine.wait_for_text("Rotation Lock")
263263- machine.screenshot("settings_open")
393393+ test-support.displayManager.auto = {
394394+ enable = true;
395395+ inherit user;
396396+ };
264397265265- # lomiri-system-settings has a separate VM test, only test Lomiri-specific content-hub functionalities here
398398+ # To control mouse via scripting
399399+ programs.ydotool.enable = true;
266400267267- # Make fullscreen, can't navigate to Background plugin via keyboard unless window has non-phone-like aspect ratio
268268- toggle_maximise()
401401+ services.desktopManager.lomiri.enable = lib.mkForce true;
402402+ services.displayManager.defaultSession = lib.mkForce "lomiri";
269403270270- # Load Background plugin
271271- machine.send_key("tab")
272272- machine.send_key("tab")
273273- machine.send_key("tab")
274274- machine.send_key("tab")
275275- machine.send_key("tab")
276276- machine.send_key("tab")
277277- machine.send_key("ret")
278278- machine.wait_for_text("Background image")
404404+ # Help with OCR
405405+ fonts.packages = [ pkgs.inconsolata ];
406406+ };
279407280280- # Try to load custom background
281281- machine.send_key("shift-tab")
282282- machine.send_key("shift-tab")
283283- machine.send_key("shift-tab")
284284- machine.send_key("shift-tab")
285285- machine.send_key("shift-tab")
286286- machine.send_key("shift-tab")
287287- machine.send_key("ret")
408408+ enableOCR = true;
288409289289- # Peers should be loaded
290290- machine.wait_for_text("Morph") # or Gallery, but Morph is already packaged
291291- machine.screenshot("settings_content-hub_peers")
410410+ testScript =
411411+ { nodes, ... }:
412412+ ''
413413+ def mouse_click(xpos, ypos):
414414+ """
415415+ Move the mouse to a screen location and hit left-click.
416416+ """
292417293293- # Select Morph as content source
294294- mouse_click(370, 100)
418418+ # Need to reset to top-left, --absolute doesn't work?
419419+ machine.execute("ydotool mousemove -- -10000 -10000")
420420+ machine.sleep(2)
295421296296- # Expect Morph to be brought into the foreground, with its Downloads page open
297297- machine.wait_for_text("No downloads")
422422+ # Move
423423+ machine.execute(f"ydotool mousemove -- {xpos} {ypos}")
424424+ machine.sleep(2)
298425299299- # If content-hub encounters a problem, it may have crashed the original application issuing the request.
300300- # Check that it's still alive
301301- machine.succeed("pgrep -u ${user} -f lomiri-system-settings")
426426+ # Click (C0 - left button: down & up)
427427+ machine.execute("ydotool click 0xC0")
428428+ machine.sleep(2)
302429303303- machine.screenshot("content-hub_exchange")
430430+ start_all()
431431+ machine.wait_for_unit("multi-user.target")
304432305305- # Testing any more would require more applications & setup, the fact that it's already being attempted is a good sign
306306- machine.send_key("esc")
433433+ # The session should start, and not be stuck in i.e. a crash loop
434434+ with subtest("lomiri starts"):
435435+ machine.wait_until_succeeds("pgrep -u ${user} -f 'lomiri --mode=full-shell'")
436436+ # Output rendering from Lomiri has started when it starts printing performance diagnostics
437437+ machine.wait_for_console_text("Last frame took")
438438+ # Look for datetime's clock, one of the last elements to load
439439+ machine.wait_for_text(r"(AM|PM)")
440440+ machine.screenshot("lomiri_launched")
307441308308- machine.sleep(2) # sleep a tiny bit so morph can close & the focus can return to LSS
309309- machine.send_key("alt-f4")
442442+ # The ayatana indicators are an important part of the experience, and they hold the only graphical way of exiting the session.
443443+ # There's a test app we could use that also displays their contents, but it's abit inconsistent.
444444+ with subtest("ayatana indicators work"):
445445+ mouse_click(735, 0) # the cog in the top-right, for the session indicator
446446+ machine.wait_for_text(r"(Notifications|Rotation|Battery|Sound|Time|Date|System)")
447447+ machine.screenshot("indicators_open")
310448311311- # The ayatana indicators are an important part of the experience, and they hold the only graphical way of exiting the session.
312312- # There's a test app we could use that also displays their contents, but it's abit inconsistent.
313313- with subtest("ayatana indicators work"):
314314- mouse_click(735, 0) # the cog in the top-right, for the session indicator
315315- machine.wait_for_text(r"(Notifications|Rotation|Battery|Sound|Time|Date|System)")
316316- machine.screenshot("indicators_open")
449449+ # Indicator order within the menus *should* be fixed based on per-indicator order setting
450450+ # Session is the one we clicked, but the last we should test (logout). Go as far left as we can test.
451451+ machine.send_key("left")
452452+ machine.send_key("left")
453453+ machine.send_key("left")
454454+ machine.send_key("left")
455455+ machine.send_key("left")
456456+ # Notifications are usually empty, nothing to check there
317457318318- # Indicator order within the menus *should* be fixed based on per-indicator order setting
319319- # Session is the one we clicked, but the last we should test (logout). Go as far left as we can test.
320320- machine.send_key("left")
321321- machine.send_key("left")
322322- machine.send_key("left")
323323- machine.send_key("left")
324324- machine.send_key("left")
325325- # Notifications are usually empty, nothing to check there
458458+ with subtest("ayatana indicator display works"):
459459+ # We start on this, don't go right
460460+ machine.wait_for_text("Lock")
461461+ machine.screenshot("indicators_display")
326462327327- with subtest("ayatana indicator display works"):
328328- # We start on this, don't go right
329329- machine.wait_for_text("Lock")
330330- machine.screenshot("indicators_display")
463463+ with subtest("lomiri indicator network works"):
464464+ machine.send_key("right")
465465+ machine.wait_for_text(r"(Flight|Wi-Fi)")
466466+ machine.screenshot("indicators_network")
331467332332- with subtest("lomiri indicator network works"):
333333- machine.send_key("right")
334334- machine.wait_for_text(r"(Flight|Wi-Fi)")
335335- machine.screenshot("indicators_network")
468468+ with subtest("ayatana indicator sound works"):
469469+ machine.send_key("right")
470470+ machine.wait_for_text(r"(Silent|Volume)")
471471+ machine.screenshot("indicators_sound")
336472337337- with subtest("ayatana indicator sound works"):
338338- machine.send_key("right")
339339- machine.wait_for_text(r"(Silent|Volume)")
340340- machine.screenshot("indicators_sound")
473473+ with subtest("ayatana indicator power works"):
474474+ machine.send_key("right")
475475+ machine.wait_for_text(r"(Charge|Battery settings)")
476476+ machine.screenshot("indicators_power")
341477342342- with subtest("ayatana indicator power works"):
343343- machine.send_key("right")
344344- machine.wait_for_text(r"(Charge|Battery settings)")
345345- machine.screenshot("indicators_power")
478478+ with subtest("ayatana indicator datetime works"):
479479+ machine.send_key("right")
480480+ machine.wait_for_text("Time and Date Settings")
481481+ machine.screenshot("indicators_timedate")
346482347347- with subtest("ayatana indicator datetime works"):
348348- machine.send_key("right")
349349- machine.wait_for_text("Time and Date Settings")
350350- machine.screenshot("indicators_timedate")
483483+ with subtest("ayatana indicator session works"):
484484+ machine.send_key("right")
485485+ machine.wait_for_text("Log Out")
486486+ machine.screenshot("indicators_session")
351487352352- with subtest("ayatana indicator session works"):
353353- machine.send_key("right")
354354- machine.wait_for_text("Log Out")
355355- machine.screenshot("indicators_session")
488488+ # We should be able to log out and return to the greeter
489489+ mouse_click(720, 280) # "Log Out"
490490+ mouse_click(400, 240) # confirm logout
491491+ machine.wait_until_fails("pgrep -u ${user} -f 'lomiri --mode=full-shell'")
492492+ '';
493493+ }
494494+ );
356495357357- # We should be able to log out and return to the greeter
358358- mouse_click(720, 280) # "Log Out"
359359- mouse_click(400, 240) # confirm logout
360360- machine.wait_until_fails("pgrep -u ${user} -f 'lomiri --mode=full-shell'")
361361- machine.wait_until_succeeds("pgrep -u lightdm -f 'lomiri --mode=greeter'")
362362- '';
363363-})
496496+}
···6677buildPythonPackage rec {
88 pname = "pytest-cov-stub";
99+ # please use pythonRemoveDeps rather than change this version
910 version = (lib.importTOML ./src/pyproject.toml).project.version;
1011 pyproject = true;
1112
···645645 hll2390dw-cups = throw "The hll2390dw-cups package was dropped since it was unmaintained."; # Added 2024-06-21
646646 ht-rust = xh; # Added 2021-02-13
647647 hydra-unstable = hydra_unstable; # added 2022-05-10
648648+ hydron = throw "hydron has been removed as the project has been archived upstream since 2022 and is affected by a severe remote code execution vulnerability";
649649+648650 hyper-haskell = throw "'hyper-haskell' has been removed. reason: has been broken for a long time and depends on an insecure electron version"; # Added 2024-03-14
649651 hyper-haskell-server-with-packages = throw "'hyper-haskell-server-with-packages' has been removed. reason: has been broken for a long time"; # Added 2024-03-14
650652
···4949 ansible-doctor = throw "ansible-doctor has been promoted to a top-level attribute name: `pkgs.ansible-doctor`"; # Added 2023-05-16
5050 ansible-later = throw "ansible-later has been promoted to a top-level attribute name: `pkgs.ansible-later`"; # Added 2023-05-16
5151 ansible-lint = throw "ansible-lint has been promoted to a top-level attribute name: `pkgs.ansible-lint`"; # Added 2023-05-16
5252+ ansible-navigator = throw "ansible-navigator has been promoted to a top-level attribute name: pkgs.ansible-navigator"; # Added 2024-08-07
5253 anyjson = throw "anyjson has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-01-18
5354 apache-airflow = throw "apache-airflow has been moved out of pythonPackages and is available as a standalone package"; # added 2023-06-05
5455 argon2_cffi = argon2-cffi; # added 2022-05-09