nixpkgs-suyu/nixos/tests/pt2-clone.nix

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

36 lines
857 B
Nix
Raw Normal View History

2020-07-29 19:00:33 +02:00
import ./make-test-python.nix ({ pkgs, ... }: {
name = "pt2-clone";
meta = with pkgs.lib.maintainers; {
2020-07-29 19:00:33 +02:00
maintainers = [ fgaz ];
};
2022-03-21 00:15:30 +01:00
nodes.machine = { config, pkgs, ... }: {
2020-07-29 19:00:33 +02:00
imports = [
./common/x11.nix
];
services.xserver.enable = true;
sound.enable = true;
environment.systemPackages = [ pkgs.pt2-clone ];
};
enableOCR = true;
testScript =
''
machine.wait_for_x()
# Add a dummy sound card, or the program won't start
machine.execute("modprobe snd-dummy")
machine.execute("pt2-clone >&2 &")
2020-07-29 19:00:33 +02:00
machine.wait_for_window(r"ProTracker")
machine.sleep(5)
# One of the few words that actually get recognized
if "LENGTH" not in machine.get_screen_text():
raise Exception("Program did not start successfully")
machine.screenshot("screen")
'';
})