at 23.11-pre 857 B view raw
1import ./make-test-python.nix ({ pkgs, ... }: { 2 name = "pt2-clone"; 3 meta = with pkgs.lib.maintainers; { 4 maintainers = [ fgaz ]; 5 }; 6 7 nodes.machine = { config, pkgs, ... }: { 8 imports = [ 9 ./common/x11.nix 10 ]; 11 12 services.xserver.enable = true; 13 sound.enable = true; 14 environment.systemPackages = [ pkgs.pt2-clone ]; 15 }; 16 17 enableOCR = true; 18 19 testScript = 20 '' 21 machine.wait_for_x() 22 # Add a dummy sound card, or the program won't start 23 machine.execute("modprobe snd-dummy") 24 25 machine.execute("pt2-clone >&2 &") 26 27 machine.wait_for_window(r"ProTracker") 28 machine.sleep(5) 29 # One of the few words that actually get recognized 30 if "LENGTH" not in machine.get_screen_text(): 31 raise Exception("Program did not start successfully") 32 machine.screenshot("screen") 33 ''; 34}) 35