at 23.11-pre 704 B view raw
1import ./make-test-python.nix ({ pkgs, ... }: { 2 name = "mindustry"; 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 environment.systemPackages = [ pkgs.mindustry ]; 14 }; 15 16 enableOCR = true; 17 18 testScript = 19 '' 20 machine.wait_for_x() 21 machine.execute("mindustry >&2 &") 22 machine.wait_for_window("Mindustry") 23 # Loading can take a while. Avoid wasting cycles on OCR during that time 24 machine.sleep(60) 25 machine.wait_for_text(r"(Play|Database|Editor|Mods|Settings|Quit)") 26 machine.screenshot("screen") 27 ''; 28})