2020-08-09 13:20:17 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
|
|
|
name = "shattered-pixel-dungeon";
|
|
|
|
meta = with pkgs.lib.maintainers; {
|
|
|
|
maintainers = [ fgaz ];
|
|
|
|
};
|
|
|
|
|
|
|
|
machine = { config, pkgs, ... }: {
|
|
|
|
imports = [
|
|
|
|
./common/x11.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
services.xserver.enable = true;
|
2021-08-17 20:40:48 +00:00
|
|
|
sound.enable = true;
|
2020-08-09 13:20:17 +00:00
|
|
|
environment.systemPackages = [ pkgs.shattered-pixel-dungeon ];
|
|
|
|
};
|
|
|
|
|
|
|
|
enableOCR = true;
|
|
|
|
|
|
|
|
testScript =
|
|
|
|
''
|
|
|
|
machine.wait_for_x()
|
2021-11-05 00:43:22 +00:00
|
|
|
machine.execute("shattered-pixel-dungeon >&2 &")
|
2020-08-09 13:20:17 +00:00
|
|
|
machine.wait_for_window(r"Shattered Pixel Dungeon")
|
|
|
|
machine.sleep(5)
|
|
|
|
if "Enter" not in machine.get_screen_text():
|
|
|
|
raise Exception("Program did not start successfully")
|
|
|
|
machine.screenshot("screen")
|
|
|
|
'';
|
|
|
|
})
|
|
|
|
|