nixpkgs/nixos/tests/sgt-puzzles.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
603 B
Nix
Raw Normal View History

{ pkgs, ... }:
{
name = "sgt-puzzles";
meta = with pkgs.lib.maintainers; {
maintainers = [ tomfitzhenry ];
};
2022-11-26 18:59:13 +11:00
nodes.machine =
{ ... }:
2022-11-26 18:59:13 +11:00
{
imports = [
./common/x11.nix
];
2022-11-26 18:59:13 +11:00
services.xserver.enable = true;
environment.systemPackages = with pkgs; [
sgt-puzzles
];
};
2022-11-26 18:59:13 +11:00
enableOCR = true;
2022-11-26 18:59:13 +11:00
testScript =
{ nodes, ... }:
''
start_all()
machine.wait_for_x()
2022-11-26 18:59:13 +11:00
machine.execute("mines >&2 &")
2022-11-26 18:59:13 +11:00
machine.wait_for_window("Mines")
machine.wait_for_text("Marked")
machine.screenshot("mines")
'';
}