depot/third_party/nixpkgs/nixos/tests/shattered-pixel-dungeon.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

27 lines
622 B
Nix

import ./make-test-python.nix ({ pkgs, ... }: {
name = "shattered-pixel-dungeon";
meta = with pkgs.lib.maintainers; {
maintainers = [ fgaz ];
};
nodes.machine = { config, pkgs, ... }: {
imports = [
./common/x11.nix
];
services.xserver.enable = true;
environment.systemPackages = [ pkgs.shattered-pixel-dungeon ];
};
enableOCR = true;
testScript =
''
machine.wait_for_x()
machine.execute("shattered-pixel-dungeon >&2 &")
machine.wait_for_window(r"Shattered Pixel Dungeon")
machine.wait_for_text("Enter")
machine.screenshot("screen")
'';
})