1import ./make-test-python.nix (
2 { pkgs, ... }:
3 {
4 name = "shattered-pixel-dungeon";
5 meta = with pkgs.lib.maintainers; {
6 maintainers = [ fgaz ];
7 };
8
9 nodes.machine =
10 { config, pkgs, ... }:
11 {
12 imports = [
13 ./common/x11.nix
14 ];
15
16 services.xserver.enable = true;
17 environment.systemPackages = [ pkgs.shattered-pixel-dungeon ];
18 };
19
20 enableOCR = true;
21
22 testScript = ''
23 machine.wait_for_x()
24 machine.execute("shattered-pixel-dungeon >&2 &")
25 machine.wait_for_window(r"Shattered Pixel Dungeon")
26 machine.wait_for_text("Enter")
27 machine.screenshot("screen")
28 '';
29 }
30)