Will Fancher 45f2610415 nixos/lemurs: Fix test
> machine.wait_until_succeeds("pgrep -f 'lemurs.*tty1'")

This was guaranteed to succeed whether the desired process existed or
not, because it was matching the 'bach -c ...' command the test driver
uses to run the command. Let's wait for evidence on screen instead.
2025-07-27 22:38:42 -04:00

40 lines
842 B
Nix

{
lib,
...
}:
{
name = "lemurs";
meta = with lib.maintainers; {
maintainers = [
nullcube
stunkymonkey
];
};
enableOCR = true;
nodes.machine = _: {
imports = [ ../common/user-account.nix ];
services.displayManager.lemurs.enable = true;
};
testScript = ''
machine.start()
machine.wait_for_unit("multi-user.target")
machine.wait_for_text("Login")
machine.screenshot("postboot")
with subtest("Log in as alice on a virtual console"):
machine.send_chars("\n")
machine.send_chars("alice\n")
machine.sleep(1)
machine.send_chars("foobar\n")
machine.sleep(1)
machine.wait_until_succeeds("pgrep -u alice bash")
machine.screenshot("postlogin")
machine.send_chars("touch done\n")
machine.wait_for_file("/home/alice/done")
'';
}