at 25.11-pre 885 B view raw
1import ./make-test-python.nix ( 2 { pkgs, ... }: 3 { 4 name = "pt2-clone"; 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.pt2-clone ]; 18 }; 19 20 enableOCR = true; 21 22 testScript = '' 23 machine.wait_for_x() 24 # Add a dummy sound card, or the program won't start 25 machine.execute("modprobe snd-dummy") 26 27 machine.execute("pt2-clone >&2 &") 28 29 machine.wait_for_window(r"ProTracker") 30 machine.sleep(5) 31 # One of the few words that actually get recognized 32 if "LENGTH" not in machine.get_screen_text(): 33 raise Exception("Program did not start successfully") 34 machine.screenshot("screen") 35 ''; 36 } 37)